/* 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.9rem;
}

.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: 280px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px 0;
    flex-shrink: 0;
}
@media(max-width: 768px) {
    .profile-sidebar { width: 100%; }
}
.sidebar-header {
    padding: 0 20px 10px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}
.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
    margin: 0;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-item {
    margin-bottom: 4px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar-item.active .sidebar-link, .sidebar-link:hover {
    color: var(--primary);
    background: #fef2f2;
    border-left-color: var(--primary);
}

.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: #2a2a2a;
    color: var(--primary);
}
[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 {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.modal-modern .modal__content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    margin: 5% 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);
    animation: modalSlideIn 0.3s ease-out forwards;
}
@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.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;
    margin-bottom: 12px;
}
.modal-modern .modal__row:last-child { margin-bottom: 0; }
.modal-modern .modal__label { color: #64748b; font-weight: 600; }
.modal-modern .modal__value { color: #0f172a; font-weight: 700; }
.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; }
.modal-modern .modal__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
}
.modal-modern .modal__input:focus { border-color: var(--primary); }
.modal-modern .modal__btn--check {
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-modern .modal__btn--check:hover { background: #0f172a; }

.modal-modern .modal__notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 16px;
    border-radius: 8px;
    color: #b45309;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.modal-modern .modal__footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}
.modal-modern .modal__btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.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; }
.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 Dark Mode Fix */
[data-theme="dark"] .fui-toast .fui-toast-box {
    background-color: #262626;
    color: #f8fafc;
    border: 1px solid #404040;
}
[data-theme="dark"] .fui-toast .fui-toast-title,
[data-theme="dark"] .fui-toast .fui-toast-message {
    color: #f8fafc;
}
[data-theme="dark"] .fui-toast .fui-toast-close:hover {
    background-color: #404040;
}
