/* account.css - Comprehensive Account Section Styles */

:root {
    --account-sidebar-width: 280px;
    --account-bg-card: #ffffff;
    --account-border: var(--border-color, #e2e8f0);
    --account-badge-success: #10b981;
    --account-badge-info: #0284c7;
    --account-badge-warning: #f59e0b;
    --account-badge-danger: #ef4444;
}

/* Page Wrapper & Layout */
.account-wrapper {
    padding: var(--spacing-xl, 48px) 0;
    background-color: var(--bg-light, #f8fafc);
    min-height: 80vh;
}

.account-grid {
    display: grid;
    grid-template-columns: var(--account-sidebar-width) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    min-width: 0;
}

/* Sidebar Styles */
.account-sidebar {
    background: var(--account-bg-card);
    border: 1px solid var(--account-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.user-profile-summary {
    padding: 24px;
    background: linear-gradient(135deg, var(--primary, #0f172a) 0%, var(--primary-light, #1e293b) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--secondary, #d97706);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
    flex-shrink: 0;
}

.user-info-text {
    overflow: hidden;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-email {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.account-nav {
    padding: 12px 0;
}

.account-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.account-nav-item {
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

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

.account-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    color: var(--text-main, #334155);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast, 0.2s ease);
    text-decoration: none;
}

.account-nav-link-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--text-light, #64748b);
    transition: color var(--transition-fast, 0.2s ease);
}

.account-nav-link:hover {
    background-color: var(--bg-light, #f8fafc);
    color: var(--secondary, #d97706);
}

.account-nav-link:hover i {
    color: var(--secondary, #d97706);
}

.account-nav-item.active .account-nav-link {
    background-color: rgba(217, 119, 6, 0.08);
    color: var(--secondary, #d97706);
    border-left: 4px solid var(--secondary, #d97706);
}

.account-nav-item.active .account-nav-link i {
    color: var(--secondary, #d97706);
}

.nav-unread-badge {
    background-color: var(--secondary, #d97706);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full, 9999px);
}

/* Account Main Content Container */
.account-content {
    background: var(--account-bg-card);
    border: 1px solid var(--account-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
    padding: 32px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.account-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--bg-light, #f8fafc);
    flex-wrap: wrap;
    gap: 16px;
}

.account-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-page-subtitle {
    font-size: 0.9rem;
    color: var(--text-light, #64748b);
    margin-top: 4px;
    font-weight: 400;
}

/* 1. My Addresses Component */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.address-card {
    background: #ffffff;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    padding: 24px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.address-card:hover {
    border-color: var(--secondary, #d97706);
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(15, 23, 42, 0.1));
}

.address-card.is-default {
    border: 2px solid var(--secondary, #d97706);
    background: rgba(217, 119, 6, 0.02);
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.address-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--bg-gray, #f1f5f9);
    color: var(--primary, #0f172a);
}

.default-badge {
    background-color: var(--secondary, #d97706);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full, 9999px);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.address-recipient-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin-bottom: 6px;
}

.address-body {
    font-size: 0.95rem;
    color: var(--text-main, #334155);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
}

.address-phone {
    font-size: 0.9rem;
    color: var(--text-light, #64748b);
    margin-top: 10px;
}

.address-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--account-border);
    margin-top: auto;
}

.address-action-btns {
    display: flex;
    gap: 8px;
}

.btn-address-edit {
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--primary, #0f172a);
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--account-border);
    border-radius: var(--radius-sm, 4px);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-address-edit:hover {
    background: var(--primary, #0f172a);
    color: #ffffff;
    border-color: var(--primary, #0f172a);
}

.btn-address-delete {
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--account-badge-danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm, 4px);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-address-delete:hover {
    background: var(--account-badge-danger);
    color: #ffffff;
}

.btn-set-default {
    background: none;
    border: none;
    color: var(--secondary, #d97706);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.btn-set-default:hover {
    color: var(--secondary-hover, #b45309);
}

.add-address-trigger-wrapper {
    text-align: center;
    margin-top: 12px;
}

/* 2. Modal Popup Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--account-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light, #f8fafc);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light, #64748b);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--account-border);
    color: var(--primary, #0f172a);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--account-border);
    background: var(--bg-light, #f8fafc);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Styles */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading, #0f172a);
}

.form-label .required {
    color: var(--account-badge-danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main, #334155);
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--secondary, #d97706);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.form-control.is-invalid {
    border-color: var(--account-badge-danger);
    background-color: #fff5f5;
}

.invalid-feedback {
    color: var(--account-badge-danger);
    font-size: 0.82rem;
    margin-top: 4px;
    display: none;
    font-weight: 500;
}

.form-control.is-invalid+.invalid-feedback,
.is-invalid~.invalid-feedback {
    display: block;
}

.address-type-selector {
    display: flex;
    gap: 12px;
}

.address-type-option {
    flex: 1;
}

.address-type-option input {
    display: none;
}

.address-type-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main, #334155);
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.address-type-option input:checked+.address-type-label {
    border-color: var(--secondary, #d97706);
    background-color: rgba(217, 119, 6, 0.08);
    color: var(--secondary, #d97706);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main, #334155);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary, #d97706);
    cursor: pointer;
}

/* 4. Orders Page Component */
.order-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--account-border);
    padding-bottom: 12px;
    overflow-x: auto;
    white-space: nowrap;
}

.order-tab-btn {
    padding: 10px 20px;
    border-radius: var(--radius-full, 9999px);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light, #64748b);
    background: var(--bg-gray, #f1f5f9);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-tab-btn:hover {
    background: var(--account-border);
    color: var(--primary, #0f172a);
}

.order-tab-btn.active {
    background: var(--primary, #0f172a);
    color: #ffffff;
}

.order-tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.order-tab-btn.active .order-tab-count {
    background: var(--secondary, #d97706);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: #ffffff;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(15, 23, 42, 0.1));
    border-color: #cbd5e1;
}

.order-card-header {
    background: var(--bg-light, #f8fafc);
    padding: 16px 24px;
    border-bottom: 1px solid var(--account-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.order-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.order-id-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
}

.order-date-label {
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
}

.order-status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-processing {
    background-color: #e0f2fe;
    color: #0369a1;
}

.status-shipped {
    background-color: #fef3c7;
    color: #b45309;
}

.status-delivered {
    background-color: #d1fae5;
    color: #047857;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

.order-card-body {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.order-items-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 280px;
}

.order-item-thumb {
    width: 64px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm, 4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--account-border);
}

.order-items-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary, #0f172a);
    margin-bottom: 4px;
}

.order-items-count {
    font-size: 0.85rem;
    color: var(--text-light, #64748b);
}

.order-card-summary {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.order-total-price {
    text-align: right;
}

.order-total-label {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
    display: block;
}

.order-total-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary, #d97706);
}

/* 5. Order Details Component */
.order-details-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Order Progress Timeline */
.timeline-container {
    background: var(--bg-light, #f8fafc);
    padding: 28px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--account-border);
    margin-bottom: 32px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin-bottom: 24px;
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--account-border);
    z-index: 1;
}

.timeline-progress-bar {
    position: absolute;
    top: 18px;
    left: 40px;
    height: 4px;
    background: var(--secondary, #d97706);
    z-index: 2;
    transition: width 0.5s ease;
}

.timeline-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.timeline-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--account-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light, #64748b);
    font-size: 1rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.timeline-step.completed .timeline-icon-box {
    background: var(--secondary, #d97706);
    border-color: var(--secondary, #d97706);
    color: #ffffff;
}

.timeline-step.active .timeline-icon-box {
    background: #ffffff;
    border-color: var(--secondary, #d97706);
    color: var(--secondary, #d97706);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2);
}

.timeline-step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main, #334155);
}

.timeline-step-date {
    font-size: 0.75rem;
    color: var(--text-light, #64748b);
    margin-top: 2px;
}

/* Products Table & Horizontal Scrollable Wrapper (reusing Cart page scrollbar styling) */
.order-items-card {
    background: #ffffff;
    border: 1px solid var(--account-border, #e2e8f0);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
    overflow: hidden;
    margin-bottom: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.order-swipe-notice {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid #dbeafe;
}

.order-swipe-notice-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e40af;
}

.order-swipe-notice-left i {
    color: #2563eb;
    font-size: 0.95rem;
    animation: swipeAnim 1.2s infinite alternate;
}

.order-swipe-pill {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 10px;
    border-radius: 12px;
    letter-spacing: 1px;
}

.order-items-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #f1f5f9;
}

/* Subtle, modern horizontal scrollbar reusing Cart page styles */
.order-items-table-wrapper::-webkit-scrollbar {
    height: 7px;
    display: block !important;
}

.order-items-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.order-items-table-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.order-items-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Explicit Horizontal Scrollbar Track & Thumb (matching reference image) */
.order-table-scrollbar-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    position: relative;
    border-top: 1px solid var(--account-border, #e2e8f0);
    display: none;
}

.order-table-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    background: #94a3b8;
    border-radius: 3px;
    transition: left 0.05s ease-out;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    text-align: left;
}

.order-items-table th {
    background: var(--bg-light, #f8fafc);
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary, #0f172a);
    border-bottom: 2px solid var(--account-border);
}

.order-items-table td {
    padding: 16px;
    border-bottom: 1px solid var(--account-border);
    vertical-align: middle;
}

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

.order-items-table th.col-product,
.order-items-table td.col-product {
    min-width: 240px;
}

.order-items-table th.col-price,
.order-items-table td.col-price {
    min-width: 95px;
    white-space: nowrap;
    color: var(--text-main);
    font-weight: 600;
}

.order-items-table th.col-qty,
.order-items-table td.col-qty {
    min-width: 80px;
    white-space: nowrap;
}

.order-items-table th.col-total,
.order-items-table td.col-total {
    min-width: 95px;
    white-space: nowrap;
    text-align: right;
    font-weight: 700;
    color: var(--primary);
}

.product-item-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-item-img {
    width: 50px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--account-border);
    flex-shrink: 0;
}

.order-summary-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.info-box-card {
    background: var(--bg-light, #f8fafc);
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    padding: 24px;
    box-sizing: border-box;
}

.info-box-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--account-border);
    padding-bottom: 8px;
}

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

.price-summary-table tr td {
    padding: 8px 0;
    font-size: 0.95rem;
}

.price-summary-table tr td:first-child {
    text-align: left;
    color: var(--text-main);
}

.price-summary-table tr td:last-child {
    text-align: right;
    font-weight: 700;
    color: var(--primary, #0f172a);
    white-space: nowrap;
}

.price-summary-table tr.total-row td {
    border-top: 2px solid var(--account-border);
    padding-top: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
}

.price-summary-table tr.total-row td:last-child {
    color: var(--secondary, #d97706);
    font-size: 1.3rem;
}

/* 6. Notifications Component */
.notifications-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    background: #ffffff;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.notification-card:hover {
    border-color: var(--secondary, #d97706);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
}

.notification-card.unread {
    background: rgba(217, 119, 6, 0.03);
    border-left: 4px solid var(--secondary, #d97706);
}

.notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.icon-success {
    background: #d1fae5;
    color: #047857;
}

.icon-info {
    background: #e0f2fe;
    color: #0369a1;
}

.icon-warning {
    background: #fef3c7;
    color: #b45309;
}

.icon-primary {
    background: #f1f5f9;
    color: #0f172a;
}

.icon-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.notification-content {
    flex: 1;
}

.notification-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.notification-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin: 0;
}

.notification-card.unread .notification-title {
    color: var(--primary, #0f172a);
}

.notification-time {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
}

.notification-desc {
    font-size: 0.9rem;
    color: var(--text-main, #334155);
    margin: 0;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-dismiss-notif {
    color: var(--text-light, #64748b);
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.btn-dismiss-notif:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary, #d97706);
    display: inline-block;
}

/* 7. Password Component */
.password-meter-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-gray, #f1f5f9);
    margin-top: 8px;
    overflow: hidden;
}

.password-meter-progress {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.password-req-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.password-req-item {
    font-size: 0.82rem;
    color: var(--text-light, #64748b);
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-req-item.met {
    color: var(--account-badge-success);
    font-weight: 600;
}

.input-password-wrapper {
    position: relative;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-light, #64748b);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

/* Empty State Component */
.empty-state-box {
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-light, #f8fafc);
    border-radius: var(--radius-md, 8px);
    border: 2px dashed var(--account-border);
}

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--text-light, #64748b);
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary, #0f172a);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 0.95rem;
    color: var(--text-light, #64748b);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Toast Notifications */
.account-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary, #0f172a);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(15, 23, 42, 0.1));
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.account-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.account-toast.success {
    background: #065f46;
    border-left: 4px solid #10b981;
}

.account-toast.error {
    background: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Responsive Styles - Mobile View Vertical Stack & Horizontal Scroll Navigation */
@media (max-width: 992px) {
    .account-wrapper {
        padding: 20px 0;
    }


    /* Vertical Structure: Account Menu FIRST (Full Width), Main Content SECOND */
    .account-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .account-sidebar {
        position: static;
        width: 100%;
        border-radius: var(--radius-lg, 12px);
        box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
        overflow: hidden;
    }

    /* User Profile Header on Mobile */
    .user-profile-summary {
        padding: 14px 18px;
        display: flex;
        align-items: center;
        gap: 12px;
        background: linear-gradient(135deg, var(--primary, #0f172a) 0%, var(--primary-light, #1e293b) 100%);
    }

    .user-avatar {
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .user-name {
        font-size: 0.95rem;
    }

    .user-email {
        font-size: 0.78rem;
    }

    /* Single Horizontal Row with Horizontal Touch/Swipe Scrollbar */
    .account-nav {
        padding: 10px 12px;
        background: #ffffff;
        width: 100%;
        overflow: hidden;
    }

    .account-nav-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .account-nav-list::-webkit-scrollbar {
        display: none !important;
        /* Chrome, Safari, Opera */
        width: 0;
        height: 0;
    }

    .account-nav-item {
        flex: 0 0 auto !important;
        border-bottom: none !important;
        margin: 0;
    }

    .account-nav-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px 16px !important;
        border-radius: var(--radius-md, 8px) !important;
        border: 1px solid var(--account-border) !important;
        background: var(--bg-light, #f8fafc) !important;
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        color: var(--text-main, #334155) !important;
        white-space: nowrap !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
    }

    .account-nav-link-content {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        white-space: nowrap !important;
    }

    .account-nav-link i {
        font-size: 0.95rem !important;
        width: auto !important;
        color: var(--text-light, #64748b) !important;
    }

    .account-nav-item.active .account-nav-link {
        background: rgba(217, 119, 6, 0.1) !important;
        border-color: var(--secondary, #d97706) !important;
        color: var(--secondary, #d97706) !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15);
    }

    .account-nav-item.active .account-nav-link i {
        color: var(--secondary, #d97706) !important;
    }

    .nav-unread-badge {
        font-size: 0.72rem !important;
        padding: 2px 7px !important;
        margin-left: 6px !important;
        border-radius: 9999px !important;
        background-color: var(--secondary, #d97706) !important;
        color: #ffffff !important;
    }

    /* Content Area on Mobile / Tablet */
    .account-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .account-content {
        padding: 24px 20px;
        border-radius: var(--radius-md, 8px);
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .order-summary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 768px) {
    .account-wrapper {
        padding: 16px 0;
        overflow-x: hidden;
    }

    .account-grid {
        gap: 16px;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .account-content {
        padding: 18px 14px;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .account-page-header {
        padding-bottom: 14px;
        margin-bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .account-page-title {
        font-size: 1.3rem;
    }

    .account-page-subtitle {
        font-size: 0.82rem;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 24px;
    }

    .address-card {
        padding: 16px;
    }

    .address-card-actions {
        padding-top: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .order-details-top-bar {
        margin-bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .timeline-container {
        padding: 18px 14px;
        margin-bottom: 24px;
    }

    .timeline-track {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .timeline-track::before,
    .timeline-progress-bar {
        display: none;
    }

    .timeline-step {
        flex-direction: row;
        gap: 12px;
        text-align: left;
    }

    .timeline-icon-box {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .order-swipe-notice {
        display: flex !important;
    }

    .order-items-card {
        margin-bottom: 24px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .order-items-table-wrapper {
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .order-items-table {
        min-width: 560px !important;
        width: 100% !important;
    }

    .order-items-table th,
    .order-items-table td {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }

    .order-summary-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .info-box-card {
        padding: 18px 14px !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .price-summary-table {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .price-summary-table tr td {
        padding: 8px 0 !important;
        font-size: 0.9rem !important;
    }

    .price-summary-table tr td:first-child {
        text-align: left !important;
    }

    .price-summary-table tr td:last-child {
        text-align: right !important;
        white-space: nowrap !important;
    }

    .price-summary-table tr.total-row td:last-child {
        font-size: 1.15rem !important;
    }

    .notification-card {
        padding: 14px;
        gap: 12px;
    }

    .password-req-list {
        grid-template-columns: 1fr;
    }

    .modal-container {
        max-height: 94vh;
        margin: 10px;
    }
}

@media (max-width: 480px) {

    .account-nav-link {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
    }

    .account-content {
        padding: 14px 10px;
    }

    .account-page-title {
        font-size: 1.15rem;
    }

    .order-items-card {
        border-radius: var(--radius-sm, 6px);
    }

    .order-swipe-notice {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .info-box-card {
        padding: 14px 10px !important;
    }
}

/* ==========================================================================
   My Profile Page Specific Styles
   ========================================================================== */
.profile-card {
    background: #ffffff;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    margin-bottom: 24px;
}

.profile-header-banner {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--account-border);
    margin-bottom: 24px;
}

.profile-avatar-container {
    position: relative;
    width: 124px;
    height: 124px;
    flex-shrink: 0;
}

.profile-avatar-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    background: #f1f5f9;
    cursor: pointer;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-avatar-img {
    transform: scale(1.05);
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 50%;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.avatar-badge-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary, #d97706);
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.avatar-badge-btn:hover {
    background: #b45309;
    transform: scale(1.1);
}

.profile-avatar-info {
    flex: 1;
    min-width: 240px;
}

.profile-avatar-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-avatar-tip {
    font-size: 0.8rem;
    color: var(--text-light, #64748b);
    margin-top: 8px;
}

/* Profile Stats Bar */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.profile-stat-box {
    background: #ffffff;
    border: 1px solid var(--account-border);
    border-radius: var(--radius-md, 8px);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.profile-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.profile-stat-val {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary, #0f172a);
    line-height: 1.1;
}

.profile-stat-label {
    font-size: 0.82rem;
    color: var(--text-light, #64748b);
    margin-top: 4px;
}

/* Verified Badge */
.verified-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.75rem;
    font-weight: 600;
    background: #dcfce7;
    color: #15803d;
    margin-left: 8px;
    vertical-align: middle;
}

/* Subject tags */
.genre-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.genre-tag-checkbox {
    display: none;
}

.genre-tag-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--account-border);
    background: #f8fafc;
    color: var(--text-main, #334155);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.genre-tag-checkbox:checked+.genre-tag-label {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

@media (max-width: 640px) {
    .profile-header-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar-actions {
        justify-content: center;
    }
}