
.user-dashboard {
    padding: 1rem 0 3rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray-500);
    font-size: 1rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-cards .stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition);
    text-decoration: none;
}

.stats-cards .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stats-cards .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, rgba(239, 64, 86, 0.1), rgba(239, 64, 86, 0.05));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-cards .stat-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--primary);
}

.stats-cards .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
}

.stats-cards .stat-label {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.dashboard-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
    color: var(--gray-800);
}

.orders-list .order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.orders-list .order-item:hover {
    background: var(--gray-50);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: var(--radius);
}

.orders-list .order-item:last-child {
    border-bottom: none;
}

.order-info .order-number {
    font-weight: 600;
    color: var(--gray-800);
    display: block;
    margin-bottom: 0.25rem;
}

.order-info .order-date {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.order-status .badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-primary {
    background: rgba(239, 64, 86, 0.1);
    color: var(--primary);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.order-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.see-all:hover {
    background: var(--gray-50);
    border-radius: var(--radius);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--primary);
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(135deg, var(--gray-50), var(--white));
}

.card-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: right;
    border-bottom: 1px solid var(--gray-100);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    white-space: nowrap;
}

.table td {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-200);
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.25rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}

.page-link:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.wishlist-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: all var(--transition);
}

.wishlist-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--gray-200);
}

.wishlist-image {
    display: block;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
}

.wishlist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.wishlist-item:hover .wishlist-image img {
    transform: scale(1.05);
}

.wishlist-info {
    padding: 1.25rem;
}

.wishlist-info h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.wishlist-info h3 a {
    color: var(--gray-800);
}

.wishlist-info h3 a:hover {
    color: var(--primary);
}

.wishlist-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.wishlist-actions {
    display: flex;
    gap: 0.5rem;
}

.wishlist-actions .btn {
    flex: 1;
    font-size: 0.8125rem;
    padding: 0.625rem;
}

.order-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.order-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
}

.order-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.order-info .order-number {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.order-items {
    padding: 0;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--gray-100);
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-info {
    flex: 1;
}

.order-item-info h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
    font-weight: 600;
}

.order-item-info .item-price {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.order-item-qty {
    text-align: center;
    padding: 0 1rem;
}

.order-item-qty span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.order-item-qty strong {
    font-size: 1.25rem;
    color: var(--gray-800);
}

.order-item-total {
    text-align: left;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.order-summary {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border-top: 1px solid var(--gray-100);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--gray-600);
}

.order-summary-row.total {
    border-top: 2px solid var(--gray-200);
    margin-top: 0.75rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
}

.order-summary-row.total span:last-child {
    color: var(--primary);
}

.order-timeline {
    padding: 1.5rem;
}

.timeline {
    position: relative;
    padding-right: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    right: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gray-300);
}

.timeline-item.active .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-content {
    padding-right: 1rem;
}

.timeline-content h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
    font-weight: 600;
}

.timeline-content time {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.ticket-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
}

.ticket-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.ticket-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.ticket-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.ticket-meta-item svg {
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
}

.ticket-messages {
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.ticket-message {
    margin-bottom: 1.5rem;
}

.ticket-message:last-child {
    margin-bottom: 0;
}

.ticket-message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ticket-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.ticket-message-avatar.staff {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
}

.ticket-message-author {
    font-weight: 600;
    color: var(--gray-800);
}

.ticket-message-time {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.ticket-message-content {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-right: 3rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.ticket-message.staff .ticket-message-content {
    background: rgba(239, 64, 86, 0.05);
    border-right: 3px solid var(--primary);
}

.ticket-reply-form {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.form-label .required {
    color: var(--primary);
    margin-right: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--gray-800);
    background-color: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(239, 64, 86, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.stat-icon.primary {
    background: rgba(239, 64, 86, 0.1);
    color: var(--primary);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-content p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.quick-actions .btn {
    font-size: 0.875rem;
}

@media (max-width: 992px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table th,
    .table td {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .order-item {
        flex-wrap: wrap;
    }
    
    .order-item-qty,
    .order-item-total {
        width: 50%;
        padding-top: 1rem;
    }
}

@media (max-width: 480px) {
    .wishlist-image {
        height: 180px;
    }
    
    .wishlist-actions {
        flex-direction: column;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
}
