/* Compatibility Styles for Old Layouts with New Theme */

/* -- Account Card -- */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.account-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: var(--primary);
}

.account-media {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.account-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-code {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.account-price-top {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    padding: 6px 0;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.account-price-top .price-unit {
    font-size: 0.9em;
    font-weight: 600;
}

.account-info {
    padding: 16px;
    flex: 1;
}

.account-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 8px;
}
.account-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    width: 48%;
}

.info-item__title {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
}

.info-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
}

.account-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    margin-top: auto;
}

.card-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.action-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn--detail {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.action-btn--detail:hover {
    background: #b91c1c;
    color: #fff;
}

/* -- Page Title Header -- */
.page-title-section {
    padding: 24px 0 32px 0;
}

.page-breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: #999;
}

.breadcrumb-current {
    font-weight: 600;
    color: #1a1a1a;
}

.page-title-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.title-bar {
    display: block;
    width: 4px;
    height: 28px;
    background-color: #dc2626;
    border-radius: 2px;
}

.page-desc-box {
    background-color: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* -- Sections -- */
.account-section {
    padding-bottom: 80px;
}

/* -- Account Filter -- */
.account-filter {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.account-filter__row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.account-filter__group {
    flex: 1;
    min-width: 200px;
}

.account-filter__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.account-filter__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.account-filter__input:focus {
    border-color: var(--primary);
}

.account-filter__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.account-filter__button {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
}

.account-filter__button--primary {
    background: var(--primary);
    color: #fff;
}

.account-filter__button--primary:hover {
    background: var(--primary-dark);
}

.account-filter__button--outline {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #333;
}

.account-filter__button--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* -- Inline Filter Bar -- */
.filter-inline-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.filter-input, .filter-select {
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    flex: 1;
    min-width: 150px;
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--primary);
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.filter-btn-search {
    background: var(--primary);
    color: #fff;
}

.filter-btn-search:hover {
    background: var(--primary-dark);
}

.filter-btn-reset {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #333;
}

.filter-btn-reset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* -- Account Detail Layout -- */
.product-detail-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 24px;
}
.product-gallery {
    flex: 1;
    min-width: 320px;
}
.product-info-panel {
    width: 400px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}
@media(max-width: 768px) {
    .product-info-panel { width: 100%; }
}
.product-price-box {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
}
.product-price-box .price-atm {
    font-size: 1.4rem;
    font-weight: 800;
    color: #dc2626;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.product-price-box .price-card {
    font-size: 1.05rem;
    color: #991b1b;
    font-weight: 600;
    background: #fecaca;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}
.product-attributes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.attr-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}
.attr-box:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.attr-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.attr-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}
.product-buy-btn {
    width: 100%;
    background: linear-gradient(to right, #ef4444, #dc2626);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}
.product-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}
.action-btn-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.modern-action-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 14px;
    font-weight: 600;
}
.highlight-box {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2);
    margin-bottom: 32px;
}
.highlight-box .attr-label { color: #d97706; }
.highlight-box .attr-val { color: #b45309; line-height: 1.5; }

/* -- E-Commerce Classic Layout -- */
.ecom-layout { display: flex; gap: 24px; align-items: flex-start; }
.ecom-left { flex: 1; min-width: 0; }
.ecom-right { width: 420px; flex-shrink: 0; }

.ecom-box {
    background: #fff;
    border: 1px solid #991b1b;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}
.ecom-gallery-inner { display: flex; gap: 16px; height: 400px; }
.ecom-thumbs-vertical { display: flex; flex-direction: column; gap: 8px; width: 80px; overflow-y: auto; padding-right: 4px; }
.ecom-thumbs-vertical::-webkit-scrollbar { width: 4px; }
.ecom-thumbs-vertical::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.ecom-thumb { width: 100%; height: 50px; object-fit: cover; border-radius: 4px; border: 1px solid #e5e7eb; cursor: pointer; transition: 0.2s; }
.ecom-thumb:hover { border-color: var(--primary); }
.ecom-main-img-wrapper { flex: 1; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.ecom-main-img { width: 100%; height: 100%; object-fit: cover; }
.ecom-img-count { position: absolute; bottom: 12px; right: 12px; background: #fff; border: 1px solid #e5e7eb; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.ecom-box-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: #111827; }
.ecom-note-content { font-size: 0.95rem; color: #4b5563; line-height: 1.6; }

.ecom-all-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ecom-grid-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; transition: 0.2s; }
.ecom-grid-img:hover { transform: scale(1.02); }

.ecom-title { font-size: 1.4rem; font-weight: 700; color: #111827; margin-bottom: 8px; }
.ecom-id { font-size: 0.9rem; color: #4b5563; margin-bottom: 16px; }
.ecom-divider { border: 0; border-top: 1px dashed #e5e7eb; margin: 16px 0; }

.ecom-attr-header { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: #374151; }
.ecom-attr-list { display: flex; flex-direction: column; gap: 8px; }
.ecom-attr-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 8px 12px; background: #f9fafb; border-radius: 6px; }
.ecom-attr-label { color: #6b7280; }
.ecom-attr-value { font-weight: 600; color: #111827; }

.ecom-price-box { background: #f8fafc; border-radius: 8px; padding: 20px; text-align: center; margin-top: 20px; border: 1px solid #f1f5f9; }
.ecom-price-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.old-price { font-size: 1.1rem; color: #9ca3af; text-decoration: line-through; }
.new-price { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.discount-badge { background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.ecom-price-subtitle { font-size: 0.85rem; color: #6b7280; }

.ecom-actions { margin-top: 24px; }
.ecom-action-row-1 { display: flex; gap: 12px; margin-bottom: 16px; }
.ecom-btn { flex: 1; padding: 12px; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; text-align: center; border: none; text-decoration: none; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ecom-btn-outline { border: 1px solid var(--primary); color: var(--primary); background: #fff; }
.ecom-btn-outline:hover { background: #fef2f2; }
.ecom-btn-solid { background: var(--primary); color: #fff; }
.ecom-btn-solid:hover { background: var(--primary-dark); }

.ecom-or-divider { text-align: center; color: #9ca3af; font-size: 0.85rem; margin-bottom: 16px; }

.ecom-btn-atm { width: 100%; background: #1f2937; color: #fff; padding: 14px; border-radius: 8px; display: flex; flex-direction: column; line-height: 1.2; }
.ecom-btn-atm:hover { background: #111827; }
.ecom-btn-atm small { font-weight: 400; font-size: 0.85rem; margin-top: 4px; opacity: 0.9; }

@media (max-width: 992px) {
    .ecom-layout { flex-direction: column; }
    .ecom-right { width: 100%; }
    .ecom-gallery-inner { flex-direction: column-reverse; height: auto; }
    .ecom-thumbs-vertical { flex-direction: row; width: 100%; height: 60px; overflow-x: auto; padding-right: 0; padding-bottom: 4px; }
    .ecom-thumb { width: 80px; height: 100%; }
    .ecom-main-img-wrapper { aspect-ratio: 16/9; }
}

/* -- Profile General -- */
.profile-section {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.profile-header {
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
.profile-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-transform: uppercase;
}
.profile-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
@media(max-width: 768px) {
    .profile-content {
        flex-direction: column;
    }
}
.profile-sidebar {
    width: 290px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 18px 12px;
    flex-shrink: 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}
@media(max-width: 768px) {
    .profile-sidebar { width: 100%; margin-bottom: 20px; padding: 14px; }
}
.sidebar-header {
    padding: 0 10px 8px;
    margin-bottom: 8px;
}
.sidebar-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar-item {
    margin: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #475569;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-item.active .sidebar-link {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.08);
}
.sidebar-link:hover {
    color: #0f172a;
    background: #f8fafc;
}

.profile-main {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.profile-info-card {
    padding: 24px;
}
.info-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.balance-info {
    font-size: 1.1rem;
    color: #1a1a1a;
}
.balance-label {
    font-weight: 600;
    margin-right: 8px;
}
.balance-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
}

/* -- Bank Account / Deposit Layout -- */
.deposit-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}
.notice-header {
    font-weight: 700;
    color: #d97706;
    margin-bottom: 8px;
}
.notice-content p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #92400e;
}
.notice-warning {
    margin-top: 12px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.bank-accounts-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}
.bank-account-item {
    display: flex;
    gap: 24px;
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
@media(max-width: 768px) {
    .bank-account-item { flex-direction: column; }
}
.bank-account-info {
    flex: 1;
}
.bank-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 12px 0;
}
.bank-details .branch, .bank-details .account-number, .bank-details .note, .bank-details .auto-confirm {
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.bank-details .label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}
.bank-details .value {
    font-weight: 700;
    color: #1a1a1a;
}
.copy-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}
.copy-btn:hover { color: var(--primary); }
.bank-qr-code {
    width: 200px;
    flex-shrink: 0;
    text-align: center;
}
.bank-qr-code img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* -- Tables -- */
.history-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 32px 0 16px;
    color: #1a1a1a;
}
.history-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table th, .history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 0.9rem;
}
.history-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}
.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr:hover td { background: #fef2f2; }

/* -- Dark Mode Compat -- */
[data-theme="dark"] .account-card,
[data-theme="dark"] .account-filter,
[data-theme="dark"] .product-info-panel,
[data-theme="dark"] .profile-content,
[data-theme="dark"] .profile-header,
[data-theme="dark"] .profile-main,
[data-theme="dark"] .profile-sidebar {
    background: #171717;
    border-color: #2a2a2a;
}
[data-theme="dark"] .info-value,
[data-theme="dark"] .account-filter__label,
[data-theme="dark"] .attr-val,
[data-theme="dark"] .profile-title,
[data-theme="dark"] .balance-info,
[data-theme="dark"] .bank-accounts-title,
[data-theme="dark"] .bank-details .value,
[data-theme="dark"] .history-header {
    color: #fafafa;
}
[data-theme="dark"] .account-filter__input,
[data-theme="dark"] .account-filter__button--outline,
[data-theme="dark"] .filter-inline-bar,
[data-theme="dark"] .filter-input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .filter-btn-reset {
    background: #262626;
    border-color: #404040;
    color: #fff;
}
[data-theme="dark"] .account-row { border-color: #333; }
[data-theme="dark"] .account-actions {
    background: #262626;
    border-color: #404040;
}
[data-theme="dark"] .sidebar-link { color: #d4d4d4; }
[data-theme="dark"] .sidebar-item.active .sidebar-link, [data-theme="dark"] .sidebar-link:hover {
    background: var(--menu-accent-bg);
    color: var(--menu-accent);
    border-left-color: var(--menu-accent);
}
[data-theme="dark"] .product-info-panel {
    background: #262626;
    border-color: #404040;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .ecom-box { background: #262626; border-color: #404040; }
[data-theme="dark"] .ecom-thumb { border-color: #404040; }
[data-theme="dark"] .ecom-main-img-wrapper { border-color: #404040; }
[data-theme="dark"] .ecom-img-count { background: #171717; border-color: #404040; color: #a3a3a3; }
[data-theme="dark"] .ecom-box-title { color: #fafafa; }
[data-theme="dark"] .ecom-note-content { color: #d4d4d4; }
[data-theme="dark"] .ecom-title { color: #fafafa; }
[data-theme="dark"] .ecom-id { color: #a3a3a3; }
[data-theme="dark"] .ecom-divider { border-color: #404040; }
[data-theme="dark"] .ecom-attr-header { color: #fafafa; }
[data-theme="dark"] .ecom-attr-row { background: #171717; }
[data-theme="dark"] .ecom-attr-label { color: #a3a3a3; }
[data-theme="dark"] .ecom-attr-value { color: #fafafa; }
[data-theme="dark"] .ecom-price-box { background: #171717; border-color: #404040; }
[data-theme="dark"] .ecom-btn-outline { background: #262626; border-color: var(--primary); color: var(--primary); }
[data-theme="dark"] .ecom-btn-outline:hover { background: rgba(220, 38, 38, 0.1); }
[data-theme="dark"] .ecom-btn-atm { background: #171717; border: 1px solid #404040; }
[data-theme="dark"] .ecom-btn-atm:hover { background: #2a2a2a; }
[data-theme="dark"] .history-table th {
    background: #262626;
    color: #fafafa;
}
[data-theme="dark"] .history-table th, [data-theme="dark"] .history-table td {
    border-color: #2a2a2a;
}
[data-theme="dark"] .bank-account-item {
    background: #262626;
    border-color: #404040;
}
[data-theme="dark"] .sidebar-header { border-color: #2a2a2a; }
[data-theme="dark"] .info-header { border-color: #2a2a2a; }
[data-theme="dark"] .history-table tbody tr:hover td { background: #333; }
[data-theme="dark"] .page-breadcrumb {
    color: #a3a3a3;
}
[data-theme="dark"] .breadcrumb-link {
    color: #a3a3a3;
}
[data-theme="dark"] .breadcrumb-link:hover {
    color: var(--primary);
}
[data-theme="dark"] .page-title-heading {
    color: #fafafa;
}
[data-theme="dark"] .page-desc-box {
    background: #171717;
    border-color: #2a2a2a;
    color: #d1d5db;
}
[data-theme="dark"] .breadcrumb-separator {
    color: #737373;
}
[data-theme="dark"] .breadcrumb-current {
    color: #fafafa;
}
[data-theme="dark"] .page-title-heading {
    color: #fafafa;
}
[data-theme="dark"] .page-desc-box {
    background: #262626;
    border-color: #404040;
    color: #d4d4d4;
}

/* -- Modern Purchase Modal -- */
.modal-modern {
    position: fixed;
    z-index: 10000;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-modern.active,
.modal-modern.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.modal-modern .modal__content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    margin: auto;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    transform: scale(0.95) translateY(8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-modern.active .modal__content,
.modal-modern.show .modal__content {
    transform: scale(1) translateY(0);
}
.modal-modern .modal__header {
    background: var(--primary);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}
.modal-modern .modal__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.modal-modern .modal__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.modal-modern .modal__close:hover { opacity: 1; }
.modal-modern .modal__body { padding: 24px; }
.modal-modern .modal__info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}
.modal-modern .modal__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.modal-modern .modal__row:last-child { margin-bottom: 0; }
.modal-modern .modal__label {
    color: #64748b;
    font-weight: 600;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
.modal-modern .modal__value {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}
.modal-modern .modal__value--price { color: var(--primary); font-size: 1.2rem; }

.modal-modern .modal__discount { margin-bottom: 20px; }
.modal-modern .discount-input-group {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: stretch;
}
.modal-modern .modal__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
}
.modal-modern .modal__input:focus { border-color: var(--primary); }
.modal-modern .modal__btn--check {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap !important;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.88rem;
    box-sizing: border-box;
    transition: background 0.2s;
}
.modal-modern .modal__btn--check:hover { background: #0f172a; }

.modal-modern .modal__notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 14px;
    border-radius: 8px;
    color: #b45309;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.modal-modern .modal__footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}
.modal-modern .modal__btn {
    flex: 1;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    white-space: nowrap !important;
}
.modal-modern .modal__btn--submit { background: var(--primary); color: #fff; }
.modal-modern .modal__btn--submit:hover { background: var(--primary-dark); }
.modal-modern .modal__btn--card { background: #f59e0b; color: #fff; }
.modal-modern .modal__btn--wallet { background: #3b82f6; color: #fff; }
.modal-modern .modal__btn--close { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.modal-modern .modal__btn--close:hover { background: #e2e8f0; }

/* Dark Mode Modal */
[data-theme="dark"] .modal-modern .modal__content { background: #262626; border: 1px solid #404040; }
[data-theme="dark"] .modal-modern .modal__info { background: #171717; border-color: #2a2a2a; }
[data-theme="dark"] .modal-modern .modal__label { color: #a3a3a3; }
[data-theme="dark"] .modal-modern .modal__value { color: #fafafa; }
[data-theme="dark"] .modal-modern .modal__input { background: #171717; border-color: #404040; color: #fff; }
[data-theme="dark"] .modal-modern .modal__notice { background: rgba(217, 119, 6, 0.1); border-color: #b45309; color: #fcd34d; }
[data-theme="dark"] .modal-modern .modal__btn--close { background: #404040; color: #fafafa; }
[data-theme="dark"] .modal-modern .modal__btn--close:hover { background: #525252; }

/* FuiToast card skin. Positioning stays under FuiToast control. */
.fui-toast .fui-toast-box {
    min-width: 280px;
    max-width: min(400px, calc(100vw - 40px));
    padding: 15px 18px;
    color: #334155;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 14px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14), 0 3px 8px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
}

.fui-toast .fui-toast-box.iconCss { padding-left: 52px; }
.fui-toast .fui-toast-box.custom2 { padding-right: 52px; }
.fui-toast .fui-toast-box.custom2.iconCss { padding-left: 52px; }
.fui-toast-success .fui-toast-box { border-left-color: #10b981; }
.fui-toast-error .fui-toast-box { border-left-color: #ef4444; }
.fui-toast-info .fui-toast-box { border-left-color: #0ea5e9; }
.fui-toast-warning .fui-toast-box { border-left-color: #f59e0b; }

.fui-toast .fui-toast-body {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.fui-toast .fui-toast-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 800;
}

.fui-toast .fui-toast-icon svg { filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.16)); }

.fui-toast .fui-toast-close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 8px;
}

.fui-toast .fui-toast-close:hover { color: #dc2626; background: #fee2e2; }
.fui-toast .fui-toast-close svg { width: 12px; height: 12px; }

[data-theme="dark"] .fui-toast .fui-toast-box {
    color: #dbe4f0;
    background: rgba(24, 24, 27, 0.98);
    border-color: #3f3f46;
    border-left-color: #71717a;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .fui-toast-success .fui-toast-box { border-left-color: #34d399; }
[data-theme="dark"] .fui-toast-error .fui-toast-box { border-left-color: #f87171; }
[data-theme="dark"] .fui-toast-info .fui-toast-box { border-left-color: #38bdf8; }
[data-theme="dark"] .fui-toast-warning .fui-toast-box { border-left-color: #fbbf24; }
[data-theme="dark"] .fui-toast .fui-toast-title { color: #f8fafc; }
[data-theme="dark"] .fui-toast .fui-toast-close { color: #a1a1aa; background: #27272a; }
[data-theme="dark"] .fui-toast .fui-toast-close:hover { color: #fecaca; background: #3f292c; }

@media (max-width: 520px) {
    .fui-toast .fui-toast-box {
        min-width: min(280px, calc(100vw - 40px));
        padding-top: 13px;
        padding-bottom: 13px;
        border-radius: 12px;
    }
}

/* ============================================================
   Profile Info Content Styles
   ============================================================ */
.info-content { background: #fff; border-radius: var(--radius-lg, 12px); padding: 24px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05)); }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px dashed #e2e8f0; }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-label { color: #64748b; font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; }
.info-label i { width: 24px; color: #94a3b8; }
.info-value { color: #0f172a; font-weight: 600; font-size: 1rem; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.info-value--highlight { color: #ef4444; font-size: 1.1rem; }
.change-password-link { background: #fef2f2; color: #ef4444; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; text-decoration: none; transition: 0.2s; border: 1px solid #fecaca; }
.change-password-link:hover { background: #fee2e2; color: #dc2626; }

/* Dark mode Profile */
[data-theme="dark"] .info-content { background: #171717; border: 1px solid #2a2a2a; }
[data-theme="dark"] .info-row { border-bottom-color: #333; }
[data-theme="dark"] .info-label { color: #9ca3af; }
[data-theme="dark"] .info-value { color: #f8fafc; }
[data-theme="dark"] .change-password-link { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .change-password-link:hover { background: rgba(239, 68, 68, 0.2); }

@media (max-width: 768px) {
    .info-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .info-value { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
}

@media (max-width: 768px) {
    .profile-section { padding: 20px 0; }
    .profile-container { gap: 12px; }
    .profile-header { padding: 14px; border-radius: 10px; }
    .profile-title { font-size: 1rem; }
    .profile-content { gap: 12px; }
    .profile-sidebar { padding: 12px; border-radius: 14px; }
    .sidebar-header { margin: 0 0 6px; padding: 0 4px 7px; }
    .sidebar-header.mt-4 { margin-top: 14px !important; }
    .sidebar-title { font-size: .75rem; }
    .sidebar-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .sidebar-item { margin: 0; min-width: 0; }
    .sidebar-link { min-height: 42px; gap: 8px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: .78rem; line-height: 1.2; }
    .sidebar-link i { flex: 0 0 auto; }
    .sidebar-item.active .sidebar-link { border-color: #fecaca; background: #fef2f2; color: #dc2626; }
    .profile-main { width: 100%; min-width: 0; border-radius: 10px; }
    .profile-info-card, .info-content { padding: 14px; }
    .info-header { margin-bottom: 14px; padding-bottom: 12px; }
    .balance-info { font-size: .92rem; }
    .info-row { padding: 12px 0; }
    .info-label { font-size: .84rem; }
    .info-value { font-size: .9rem; overflow-wrap: anywhere; }
    .change-password-link { padding: 5px 8px; font-size: .75rem; }
    .history-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .history-table { min-width: 640px; }
}
   /*============================================================ */
.auth-page {
    min-height: calc(100vh - 64px - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: transparent;
}
.auth-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl, 16px);
    box-shadow: var(--shadow-md, 0 4px 24px rgba(0,0,0,0.06));
    padding: 32px;
    border: 1px solid #e5e7eb;
}
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}
.auth-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #333;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid #d9d9d9;
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}
.form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}
.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}
.auth-btn:hover {
    background: var(--primary-dark);
}
.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
}
.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-links a:hover {
    text-decoration: underline;
}
.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #999;
    font-size: 0.8rem;
}
.social-divider::before, .social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}
.social-divider:not(:empty)::before {
    margin-right: .25em;
}
.social-divider:not(:empty)::after {
    margin-left: .25em;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 10px;
}
.social-btn:hover {
    background: #f9f9f9;
    border-color: #d9d9d9;
}
.social-btn img {
    width: 20px;
    height: 20px;
}

/* Dark Mode Auth */
[data-theme="dark"] .auth-card {
    background: #171717;
    border-color: #2a2a2a;
}
[data-theme="dark"] .auth-title { color: #fff; }
[data-theme="dark"] .auth-subtitle { color: #999; }
[data-theme="dark"] .form-label { color: #ccc; }
[data-theme="dark"] .form-input {
    background: #262626;
    border-color: #404040;
    color: #fff;
}
[data-theme="dark"] .social-divider::before, [data-theme="dark"] .social-divider::after {
    border-color: #2a2a2a;
}
[data-theme="dark"] .social-btn {
    background: #262626;
    border-color: #404040;
    color: #ccc;
}
[data-theme="dark"] .social-btn:hover {
    background: #333;
}
