/* ============================================
   FORM PAGES - SEND CARD, WITHDRAW, SERVICES
   ============================================ */

/* Common Form Wrapper */
.send-card-wrapper,
.withdraw-wrapper,
.service-wrapper {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
    padding: 1.6rem 1.7rem;
    margin-top: 1.25rem;
}

.withdraw-wrapper {
    margin-bottom: 2rem;
}

/* Header Simple */
.card-header-simple {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf1f7;
}

.card-header-simple h3 {
    font-size: 1.18rem;
    font-weight: 700;
    color: #172033;
    margin: 0 0 0.2rem;
}

.card-header-simple h3 i {
    color: #1561ac;
    margin-right: 0.4rem;
    font-size: 1rem;
}

.card-header-simple p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.send-card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.send-card-heading-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #eaf3ff;
    border: 1px solid #d8e9ff;
    color: #1561ac;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-card-policy-note {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    background: #fff8e6;
    border: 1px solid #fde5a7;
    color: #8a5200;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}

.send-card-policy-note i {
    color: #d97706;
    line-height: 1.35;
    flex-shrink: 0;
}

/* Form Styling - Grid Layout */
form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (min-width: 769px) {
    .send-card-wrapper #sendForm {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: end;
    }
}

.form-group-custom {
    margin-bottom: 0;
}

.form-group-custom label {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}

.required {
    color: #dc3545;
}

.form-control-custom {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid #dbe3ee;
    border-radius: 9px;
    transition: all 0.3s;
    background: #fff;
}

.form-control-custom:focus {
    border-color: #1561ac;
    outline: none;
    box-shadow: 0 0 0 3px rgba(21, 97, 172, 0.1);
}

.form-control-custom.is-invalid {
    border-color: #dc3545;
}

.form-control-custom::placeholder {
    color: #adb5bd;
}

/* Form Row - inline in grid */
.form-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Submit Button */
.btn-submit {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    padding: 0.72rem 1.25rem;
    background: #1561ac;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0;
}

.btn-submit:hover {
    background: #0f559b;
    box-shadow: 0 8px 18px rgba(21, 97, 172, 0.2);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Alerts */
.alert-info-custom,
.alert-warning-custom {
    padding: 0.85rem 1.15rem;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    border: none;
}

.alert-info-custom {
    background: #e7f3ff;
    color: #0c5aa6;
}

.alert-warning-custom {
    background: #fff3cd;
    color: #856404;
}

.alert-info-custom i,
.alert-warning-custom i {
    font-size: 1.1rem;
}

.alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1.25rem;
}

/* ============================================
   FEE TABLE - SIMPLE & CLEAN
   ============================================ */

.fee-table-wrapper {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 2rem;
}

.fee-header {
    background: #1561ac;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.fee-header i {
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.fee-header span {
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    line-height: 1.3;
}

.fee-table {
    width: 100%;
    margin: 0;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.fee-table thead {
    background: #eef7ff;
    color: #1561ac;
}

.fee-table thead th {
    padding: 0.78rem 0.55rem;
    font-weight: 700;
    font-size: 0.82rem;
    color: #1561ac;
    text-align: center;
    border-bottom: 1px solid #d9eafb;
    white-space: nowrap;
}

.fee-table thead th.text-start {
    text-align: left;
    padding-left: 1rem;
    color: #1561ac;
    width: 165px;
    min-width: 165px;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #e5f3ff;
    box-shadow: 1px 0 0 #d9eafb;
}

.fee-table tbody tr {
    transition: all 0.2s;
}

.fee-table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.fee-table tbody tr:hover {
    background: #f7fbff;
}

.fee-table tbody td {
    padding: 0.62rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #edf1f7;
}

.card-name-simple {
    text-align: left !important;
    padding-left: 1rem !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: #172033;
    font-size: 0.86rem;
    position: sticky;
    left: 0;
    z-index: 2;
    background: inherit;
    width: 165px;
    min-width: 165px;
    min-height: 56px;
    box-shadow: 1px 0 0 #edf1f7;
}

.card-name-simple img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.fee-rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 32px;
    padding: 0.28rem 0.58rem;
    background: #eaf3ff;
    color: #11589f;
    border: 1px solid #cfe4fb;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.84rem;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.fee-rate:hover {
    background: #ddecff;
    border-color: #b9d7f8;
    color: #0d47a1;
}

/* Game Card - Blue Theme (synchronized with phone card) */
.fee-header-game {
    background: #1561ac;
}

.fee-table thead th {
    border-bottom-color: #d9eafb;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .send-card-wrapper,
    .withdraw-wrapper,
    .service-wrapper {
        padding: 1.25rem;
        margin-top: 1rem;
    }
    
    .card-header-simple {
        margin-bottom: 1.25rem;
        padding-bottom: 0.85rem;
    }

    .send-card-heading {
        align-items: flex-start;
    }

    .send-card-policy-note {
        font-size: 0.78rem;
        padding: 0.7rem 0.75rem;
    }
    
    .card-header-simple h3 {
        font-size: 1.15rem;
    }
    
    .card-header-simple p {
        font-size: 0.85rem;
    }
    
    form {
        grid-template-columns: 1fr 1fr;
    }
    
    .fee-header {
        padding: 0.75rem 1rem;
    }
    
    .fee-table thead th,
    .fee-table tbody td {
        padding: 0.58rem 0.36rem;
        font-size: 0.76rem;
    }
    
    .card-name-simple {
        padding-left: 0.75rem !important;
        font-size: 0.8rem;
        width: 132px;
        min-width: 132px;
        min-height: 50px;
    }
    
    .card-name-simple img {
        width: 22px;
        height: 22px;
    }
    
    .fee-rate {
        min-width: 46px;
        min-height: 29px;
        padding: 0.22rem 0.44rem;
        border-radius: 8px;
        font-size: 0.76rem;
    }
}

@media (max-width: 576px) {
    .send-card-wrapper,
    .withdraw-wrapper,
    .service-wrapper {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .card-header-simple {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .card-header-simple h3 {
        font-size: 1.1rem;
    }

    .send-card-heading-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    form {
        grid-template-columns: 1fr;
    }
    
    .form-group-custom label {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }
    
    .form-control-custom {
        padding: 0.6rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-submit {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
    
    .fee-table-wrapper {
        border-radius: 8px;
    }
}

/* ============================================
   AUTH FORMS - LOGIN & REGISTER
   ============================================ */

.auth-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.75rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f4f8;
}

.auth-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.auth-header h3 i {
    color: #667eea;
    font-size: 1.3rem;
}

.auth-header p {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label-modern {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-label-modern i {
    color: #667eea;
    font-size: 0.85rem;
}

.form-control-modern {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2c3e50;
    background: #fff;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.form-control-modern::placeholder {
    color: #adb5bd;
}

.form-control-modern.is-invalid {
    border-color: #dc3545;
}

.form-control-modern.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.invalid-feedback {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback i {
    font-size: 0.8rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.form-check-modern {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-check-input-modern {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-check-label-modern {
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    margin: 0;
}

.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-auth-primary {
    width: 100%;
    padding: 0.8rem 1.25rem;
    background: linear-gradient(135deg, #1561ac 0%, #0d47a1 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(21, 97, 172, 0.3);
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 97, 172, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

.btn-auth-primary i {
    font-size: 0.9rem;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.25rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e6ed;
}

.auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 0.875rem;
    color: #6c757d;
    font-size: 0.8rem;
}

.auth-footer {
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f4f8;
}

.auth-footer p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.registration-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.math-captcha-card {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(190px, 1.2fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #d9e5f2;
    border-radius: 8px;
    background: #f6f9fc;
}

.math-captcha-question-wrap {
    display: grid;
    gap: 0.2rem;
}

.math-captcha-caption,
.math-captcha-help {
    color: #6b7d91;
    font-size: 0.75rem;
    line-height: 1.4;
}

.math-captcha-question {
    color: #155da8;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
}

.math-captcha-answer-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0.5rem;
}

.math-captcha-input {
    min-width: 0;
    text-align: center;
    font-weight: 700;
}

.math-captcha-refresh {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #c8daed;
    border-radius: 7px;
    background: #fff;
    color: #155da8;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.math-captcha-refresh:hover,
.math-captcha-refresh:focus-visible {
    border-color: #8eb8df;
    background: #eaf3fb;
    color: #0f4f91;
    outline: none;
}

.math-captcha-refresh:disabled {
    cursor: wait;
    opacity: 0.65;
}

.math-captcha-refresh.is-loading i {
    animation: math-captcha-spin 0.8s linear infinite;
}

.math-captcha-help {
    display: block;
    margin-top: 0.35rem;
}

@keyframes math-captcha-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .math-captcha-card {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }
}

/* Alert Messages */
.alert-modern {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    border: none;
}

.alert-modern i {
    font-size: 1rem;
    flex-shrink: 0;
}

.alert-success-modern {
    background: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.alert-success-modern i {
    color: #28a745;
}

.alert-danger-modern {
    background: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.alert-danger-modern i {
    color: #dc3545;
}

.alert-warning-modern {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

.alert-warning-modern i {
    color: #ffc107;
}

.alert-info-modern {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 3px solid #17a2b8;
}

.alert-info-modern i {
    color: #17a2b8;
}

/* Auth Message */
.auth-message {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auth-message p {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.auth-message p:last-child {
    margin-bottom: 0;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.profile-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 1rem;
}

.profile-header {
    background: linear-gradient(135deg, #1561ac 0%, #0d47a1 100%);
    padding: 2rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.profile-info-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #fff;
}

.profile-email {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
}

.profile-balance-section {
    text-align: right;
}

.balance-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.profile-body {
    padding: 2rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.form-section-title i {
    color: #1561ac;
    font-size: 1rem;
}

.form-text-muted {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.security-info {
    padding: 0.5rem 0;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.security-item i {
    font-size: 1.1rem;
}

.security-item span {
    color: #495057;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .profile-avatar-section {
        width: 100%;
    }
    
    .profile-balance-section {
        text-align: left;
        width: 100%;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    .profile-body {
        padding: 1.5rem;
    }
    
    .form-section {
        padding: 1.25rem;
    }
    
    .profile-avatar-large {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .profile-info-header h3 {
        font-size: 1.35rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin-top: 0.5rem;
    }
    
    .auth-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }
    
    .auth-header h3 {
        font-size: 1.35rem;
    }
    
    .auth-header p {
        font-size: 0.8rem;
    }
    
    .auth-form {
        gap: 0.875rem;
    }
    
    .form-control-modern {
        padding: 0.65rem 0.8rem;
        font-size: 0.875rem;
    }
    
    .btn-auth-primary {
        padding: 0.75rem 1.15rem;
        font-size: 0.9rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .forgot-password-link {
        align-self: flex-end;
    }
    
    .auth-divider {
        margin: 1rem 0;
    }
    
    .auth-footer {
        margin-top: 0.5rem;
        padding-top: 1rem;
    }
}

/* ============================================
   DATA PAGES - TABLES, LISTS, FILTERS
   ============================================ */

/* Page Header */
.page-header-modern {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header-modern h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-modern h2 i {
    color: #667eea;
    font-size: 1.5rem;
}

.page-header-modern p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* Data Card */
.data-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.data-card-header {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-toggle-filter {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1561ac 0%, #0d47a1 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(21, 97, 172, 0.3);
}

.btn-toggle-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 97, 172, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.btn-toggle-filter i:first-child {
    font-size: 0.9rem;
}

.filter-chevron {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filter-form-modern {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.data-card-header h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-card-header h4 i {
    color: #1561ac;
}

.btn-toggle-filter {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
    position: relative;
}

.btn-toggle-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-toggle-filter i:first-child {
    font-size: 0.9rem;
}

.filter-chevron {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filter-toggle-text {
    display: inline-block;
}

/* Desktop: Hide toggle button, show filter */
@media (min-width: 769px) {
    .btn-toggle-filter {
        display: none !important;
    }
    
    .filter-form-modern {
        display: flex !important;
    }
}

/* Mobile: Show toggle button, hide filter by default */
@media (max-width: 768px) {
    .btn-toggle-filter {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filter-form-modern {
        display: none !important;
    }
    
    .filter-form-modern.show {
        display: flex !important;
    }
}

.table-wrapper-modern {
    padding: 1.5rem 2rem;
}

/* Buttons */
.btn-add-modern {
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-add-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: #fff;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-action-modern {
    padding: 0.4rem 0.85rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-action-modern:hover {
    background: #764ba2;
    color: #fff;
    transform: translateY(-1px);
}

.btn-auth-secondary {
    padding: 0.8rem 1.25rem;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-auth-secondary:hover {
    background: #5a6268;
    color: #fff;
    transform: translateY(-2px);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Table Modern */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table-modern thead {
    background: linear-gradient(135deg, #1561ac 0%, #0d47a1 100%);
    color: #fff;
}

.table-modern thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.table-modern tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
    background: #f8f9fa;
}

.table-modern tbody td {
    padding: 1rem;
    color: #495057;
    font-size: 0.9rem;
}

.table-modern tbody td strong {
    color: #2c3e50;
    font-weight: 600;
}

.code-modern {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #667eea;
    border: 1px solid #e9ecef;
    word-break: break-all;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #6c757d;
}

/* Filter Form */
.filter-form-modern {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-form-modern .form-group-modern {
    flex: 1;
    min-width: 150px;
    margin: 0;
}

.filter-form-modern .form-label-modern {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.filter-form-modern .form-control-modern {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
}

.filter-form-modern .btn-filter {
    padding: 0.6rem 1.25rem;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.filter-form-modern .btn-filter:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

/* Badge Modern */
.badge-modern {
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success-modern {
    background: #d4edda;
    color: #155724;
}

.badge-warning-modern {
    background: #fff3cd;
    color: #856404;
}

.badge-danger-modern {
    background: #f8d7da;
    color: #721c24;
}

.badge-info-modern {
    background: #d1ecf1;
    color: #0c5460;
}

.auth-security-icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    place-items: center;
    border-radius: 8px;
    color: #1769b0;
    background: #eaf3fc;
}

.two-factor-login-code {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0;
}

.auth-secondary-link {
    display: block;
    margin-top: 0.9rem;
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: #1769b0;
}

.log-balance-page .table-modern thead th {
    vertical-align: middle;
}

.log-balance-page .table-modern tbody td {
    vertical-align: middle;
}

.log-balance-page .balance-status-col {
    width: 118px;
    min-width: 118px;
}

.log-balance-page .badge-modern {
    min-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
}

.log-balance-page .badge-modern i {
    font-size: 0.68rem;
}

.log-balance-page .badge-refund-modern {
    background: #e7f8f0;
    color: #11623d;
}

.log-balance-page .balance-row-canceled {
    background: #fff8f8;
}

.log-balance-page .balance-row-canceled:hover {
    background: #fff3f3;
}

.log-balance-page .balance-row-refund {
    background: #f7fff9;
}

.log-balance-page .balance-row-refund:hover {
    background: #effbf3;
}

.log-balance-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin: -0.75rem 0 1rem;
    flex-wrap: wrap;
}

.log-balance-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    color: #1561ac;
    background: #fff;
    border: 1px solid #d8e7f7;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 97, 172, 0.06);
}

.log-balance-action:hover {
    color: #0d47a1;
    border-color: #9bc9f5;
    background: #f3f8ff;
}

.log-balance-page .table-modern {
    table-layout: fixed;
}

.log-balance-page .table-modern thead th:nth-child(1),
.log-balance-page .table-modern thead th:nth-child(2),
.log-balance-page .table-modern thead th:nth-child(3) {
    width: 12%;
}

.log-balance-page .table-modern thead th:nth-child(4) {
    width: 13%;
}

.log-balance-page .table-modern thead th:nth-child(5) {
    width: 25%;
}

.log-balance-page .table-modern thead th:nth-child(7) {
    width: 11%;
}

.balance-amount-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #4b5563;
    font-weight: 600;
    white-space: nowrap;
}

.balance-amount-cell.is-final {
    color: #27384a;
    font-weight: 800;
}

.balance-change-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.balance-change-pill.is-credit {
    color: #177245;
    background: #e9f8ef;
}

.balance-change-pill.is-debit {
    color: #c0343f;
    background: #fff0f1;
}

.balance-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 32px;
    max-width: 100%;
    color: #334155;
    font-weight: 700;
    line-height: 1.2;
}

.balance-type-pill i {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    border-radius: 50%;
    font-size: 0.72rem;
    background: #e8f2ff;
    color: #1561ac;
}

.balance-type-pill.is-credit i {
    background: #e6f6ec;
    color: #177245;
}

.balance-type-pill.is-debit i {
    background: #fff0f1;
    color: #c0343f;
}

.balance-type-pill.is-transfer i {
    background: #fff7df;
    color: #9a6700;
}

.balance-note-text {
    display: block;
    color: #4b5563;
    line-height: 1.38;
}

.balance-time-cell {
    display: inline-block;
    color: #3f4a57;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.balance-front-pagination {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e9ecef;
}

.purchase-history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin: -0.75rem 0 1rem;
    flex-wrap: wrap;
}

.purchase-history-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
    color: #1561ac;
    background: #fff;
    border: 1px solid #d8e7f7;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 97, 172, 0.06);
}

.purchase-history-action:hover {
    color: #0d47a1;
    border-color: #9bc9f5;
    background: #f3f8ff;
}

.purchase-history-table {
    min-width: 980px;
}

.purchase-history-table thead th {
    vertical-align: middle;
}

.purchase-history-table tbody tr {
    transition: background 0.2s ease;
}

.purchase-history-table tbody tr:hover {
    background: #f8fbff;
}

.purchase-history-table td {
    vertical-align: middle;
}

.purchase-row-refunded {
    background: #fff8f8;
}

.purchase-muted {
    display: block;
    color: #6c757d;
    font-size: 0.76rem;
    margin-top: 0.2rem;
}

.purchase-order-cell,
.purchase-info-cell,
.purchase-money-cell {
    display: grid;
    gap: 0.18rem;
}

.purchase-order-cell strong {
    color: #1f2937;
    font-size: 0.92rem;
}

.purchase-order-cell small,
.purchase-info-cell small,
.purchase-money-cell small {
    color: #6b7280;
    font-size: 0.75rem;
}

.purchase-money-cell strong {
    color: #059669;
}

.purchase-type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.purchase-type i {
    color: #1561ac;
}

.purchase-card-list {
    display: grid;
    gap: 0.45rem;
    min-width: 260px;
}

.purchase-card-item {
    display: grid;
    gap: 0.22rem;
    padding: 0.55rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.purchase-card-item span {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.purchase-card-item code {
    width: fit-content;
    max-width: 100%;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #b42318;
    font-size: 0.78rem;
    white-space: normal;
    word-break: break-all;
}

.purchase-card-item small {
    color: #6c757d;
}

.purchase-card-column {
    min-width: 280px;
}

.purchase-state-note {
    max-width: 320px;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    color: #6b7280;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
}

.purchase-state-note i {
    margin-top: 0.1rem;
    color: #64748b;
}

.purchase-state-refunded {
    color: #991b1b;
    background: #fff1f2;
    border-color: #fecdd3;
}

.purchase-state-refunded i {
    color: #dc2626;
}

.purchase-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 92px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-modern h2 {
        font-size: 1.5rem;
    }
    
    .data-card-header {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .data-card-header h4 {
        flex: 1;
        font-size: 1.1rem;
    }
    
    .btn-toggle-filter {
        display: flex !important;
        flex-shrink: 0;
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .table-wrapper-modern {
        padding: 1rem;
        overflow-x: auto;
    }
    
    .table-modern {
        min-width: 600px;
    }

    .purchase-history-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin: -0.25rem 0 0.85rem;
    }

    .purchase-history-action {
        justify-content: center;
        padding: 0.55rem 0.45rem;
        font-size: 0.76rem;
    }

    .purchase-history-table {
        min-width: 900px;
    }

    .purchase-card-list {
        min-width: 240px;
    }

    .purchase-card-column {
        min-width: 250px;
    }

    .purchase-state-note {
        max-width: 260px;
    }

    .log-balance-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin: -0.25rem 0 0.85rem;
    }

    .log-balance-action {
        justify-content: center;
        padding: 0.55rem 0.45rem;
        font-size: 0.76rem;
    }

    .log-balance-page .table-wrapper-modern {
        overflow-x: visible;
    }

    .log-balance-page .table-modern {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .log-balance-page .table-modern thead {
        display: none;
    }

    .log-balance-page .table-modern tbody {
        display: grid;
        gap: 0.75rem;
    }

    .log-balance-page .table-modern tbody tr {
        display: grid;
        border: 1px solid #e7edf5;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .log-balance-page .table-modern tbody tr:hover {
        background: #fff;
    }

    .log-balance-page .table-modern tbody td {
        display: grid;
        grid-template-columns: 108px minmax(0, 1fr);
        align-items: center;
        gap: 0.7rem;
        padding: 0.62rem 0.8rem;
        border-bottom: 1px dashed #e7edf5;
        text-align: left !important;
    }

    .log-balance-page .table-modern tbody td:last-child {
        border-bottom: 0;
    }

    .log-balance-page .table-modern tbody td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 0.76rem;
        font-weight: 800;
    }

    .log-balance-page .balance-status-col {
        width: auto;
        min-width: 0;
    }

    .log-balance-page .badge-modern {
        justify-self: start;
    }

    .balance-change-pill {
        justify-self: start;
    }

    .balance-amount-cell,
    .balance-time-cell {
        justify-content: flex-start;
        white-space: normal;
    }

    .balance-note-text {
        word-break: break-word;
    }
    
    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .filter-form-modern {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .filter-form-modern.show {
        display: flex !important;
    }
    
    .filter-form-modern .form-group-modern {
        width: 100%;
        margin-bottom: 0;
    }
    
    .filter-form-modern .form-label-modern {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .filter-form-modern .form-control-modern {
        padding: 0.5rem 0.65rem;
        font-size: 0.85rem;
    }
    
    .filter-form-modern .btn-filter {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .data-card-header {
        padding: 1rem;
    }
    
    .data-card-header h4 {
        font-size: 1.1rem;
    }
    
    .table-wrapper-modern {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-auth-primary,
    .form-actions .btn-auth-secondary {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .log-balance-actions {
        grid-template-columns: 1fr;
    }

    .log-balance-page .table-modern tbody td {
        grid-template-columns: 1fr;
        gap: 0.28rem;
    }

    .log-balance-page .table-modern tbody td::before {
        font-size: 0.72rem;
    }
}

/* Guide Section */
.guide-section {
    padding: 0.5rem 0;
}

.guide-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-section h5 i {
    color: #667eea;
}

.info-box-modern {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    margin-bottom: 1rem;
}

.info-box-modern p {
    margin-bottom: 0.75rem;
    color: #495057;
    font-size: 0.9rem;
}

.info-box-modern p:last-child {
    margin-bottom: 0;
}

.code-block-modern {
    display: block;
    background: #2c3e50;
    color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0.75rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.provider-list,
.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.provider-list li,
.error-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 0.9rem;
}

.provider-list li:last-child,
.error-list li:last-child {
    border-bottom: none;
}

.provider-list li code,
.error-list li code {
    margin-left: 0.5rem;
}

/* Accordion Modern */
.accordion-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-item-modern {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header-modern {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.accordion-header-modern:hover {
    background: #e9ecef;
}

.accordion-header-modern i:first-child {
    color: #667eea;
    margin-right: 0.5rem;
}

.accordion-header-modern i:last-child {
    color: #6c757d;
    transition: transform 0.3s ease;
}

.accordion-header-modern[aria-expanded="true"] i:last-child {
    transform: rotate(180deg);
}

.accordion-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-collapse.show {
    max-height: 2000px;
}

.accordion-body-modern {
    padding: 1.25rem;
    background: #fff;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

/* ============================================
   PAGE CONTENT
   ============================================ */

.page-card-modern {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.page-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.page-description-modern {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 0;
}

.page-image-modern {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.page-image-modern img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content-modern {
    margin-top: 2rem;
    color: #495057;
    line-height: 1.8;
    font-size: 1rem;
}

.page-content-modern h1,
.page-content-modern h2,
.page-content-modern h3,
.page-content-modern h4 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.page-content-modern p {
    margin-bottom: 1rem;
}

.page-content-modern ul,
.page-content-modern ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.page-content-modern a {
    color: #667eea;
    text-decoration: none;
}

.page-content-modern a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .page-card-modern {
        padding: 1.5rem;
    }
    
    .page-title-modern {
        font-size: 1.75rem;
    }
    
    .page-description-modern {
        font-size: 1rem;
    }
}

/* Extra Small Mobile - Filter Optimization */
@media (max-width: 576px) {
    .page-header-modern {
        margin-bottom: 1.25rem;
        padding-bottom: 0.5rem;
    }
    
    .page-header-modern h2 {
        font-size: 1.35rem;
    }
    
    .page-header-modern p {
        font-size: 0.8rem;
    }
    
    .data-card-header {
        padding: 0.875rem;
    }
    
    .data-card-header h4 {
        font-size: 1rem;
    }
    
    .btn-toggle-filter {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .filter-toggle-text {
        display: none;
    }
    
    .filter-form-modern {
        padding: 0.875rem;
        gap: 0.4rem;
        margin-bottom: 1rem;
    }
    
    .filter-form-modern .form-label-modern {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .filter-form-modern .form-control-modern {
        padding: 0.45rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .filter-form-modern .btn-filter {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .table-wrapper-modern {
        padding: 0.75rem;
    }
    
    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* ============================================
   FINAL MOBILE UX OVERRIDES
   ============================================ */

@media (max-width: 768px) {
    .send-card-wrapper,
    .withdraw-wrapper,
    .service-wrapper,
    .data-card,
    .page-card-modern,
    .auth-card,
    .profile-card {
        border-radius: 8px !important;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
    }

    .send-card-wrapper,
    .withdraw-wrapper,
    .service-wrapper {
        padding: 1rem !important;
        margin-top: 0.75rem !important;
    }

    .card-header-simple {
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }

    .card-header-simple h3,
    .page-header-modern h2,
    .data-card-header h4 {
        line-height: 1.3 !important;
    }

    .send-card-wrapper form,
    .withdraw-wrapper form,
    .service-wrapper form,
    .auth-form,
    .profile-form {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .form-group-custom,
    .form-group-modern,
    .auth-form .form-group,
    .profile-form .form-group {
        min-width: 0 !important;
        width: 100% !important;
    }

    .form-control-custom,
    .form-control-modern,
    .auth-form .form-control,
    .profile-form .form-control,
    .filter-form-modern .form-control-modern {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .btn-submit,
    .btn-filter,
    .btn-add-modern,
    .btn-action-modern,
    .btn-auth-primary,
    .btn-auth-secondary {
        min-height: 44px !important;
        justify-content: center !important;
    }

    .btn-submit,
    .filter-form-modern .btn-filter,
    .form-actions .btn-auth-primary,
    .form-actions .btn-auth-secondary {
        width: 100% !important;
    }

    .page-header-modern {
        margin-bottom: 1rem !important;
        padding-bottom: 0.5rem !important;
    }

    .page-header-modern h2 {
        font-size: 1.3rem !important;
        gap: 0.5rem !important;
    }

    .page-header-modern p,
    .card-header-simple p {
        font-size: 0.85rem !important;
    }

    .data-card-header {
        padding: 0.85rem 1rem !important;
        gap: 0.6rem !important;
    }

    .data-card-header h4 {
        font-size: 1rem !important;
        min-width: 0 !important;
    }

    .filter-form-modern,
    .filter-form-modern.show {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.65rem !important;
        padding: 0.85rem !important;
    }

    .table-wrapper-modern,
    .table-responsive,
    .fee-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .table-wrapper-modern {
        padding: 0.75rem !important;
    }

    .table-modern,
    .fee-table {
        min-width: 650px !important;
    }

    .table-modern thead th,
    .table-modern tbody td,
    .fee-table thead th,
    .fee-table tbody td {
        padding: 0.5rem 0.34rem !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    .card-name-simple {
        white-space: normal !important;
        width: 132px !important;
        min-width: 132px !important;
    }
}

@media (max-width: 480px) {
    .send-card-wrapper,
    .withdraw-wrapper,
    .service-wrapper,
    .page-card-modern,
    .auth-card,
    .profile-card {
        padding: 0.85rem !important;
    }

    .page-header-modern h2 {
        font-size: 1.2rem !important;
    }

    .btn-toggle-filter {
        padding: 0.5rem 0.65rem !important;
    }

    .filter-toggle-text {
        display: none !important;
    }

    .table-modern,
    .fee-table {
        min-width: 650px !important;
    }

    .card-name-simple {
        width: 112px !important;
        min-width: 112px !important;
        padding-left: 0.6rem !important;
        gap: 0.42rem !important;
        font-size: 0.76rem !important;
    }

    .fee-rate {
        min-width: 42px;
        min-height: 28px;
        font-size: 0.72rem;
    }
}

/* Authentication pages: shared login/register presentation. */
.auth-page-shell {
    max-width: 1120px;
}

.auth-page-shell .auth-card {
    margin-top: 0;
    padding: 1.5rem;
    border: 1px solid #dbe6f2;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(25, 68, 112, 0.08);
    transition: none;
}

.auth-page-shell .auth-card:hover {
    box-shadow: 0 10px 30px rgba(25, 68, 112, 0.08);
}

.auth-page-shell .auth-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e4edf6;
}

.auth-page-shell .auth-header h3 {
    margin-bottom: 0.35rem;
    color: #15243b;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.auth-page-shell .auth-header h3 i,
.auth-page-shell .form-label-modern i {
    color: #1768b4;
}

.auth-page-shell .auth-header p {
    max-width: 540px;
    margin: 0 auto;
    color: #66758a;
    line-height: 1.55;
}

.auth-page-shell .auth-form {
    gap: 0.9rem;
}

.auth-page-shell .form-label-modern {
    color: #26364c;
}

.auth-page-shell .form-control-modern {
    min-height: 46px;
    padding: 0.68rem 0.85rem;
    border: 1px solid #cfdeed;
    border-radius: 7px;
    color: #17243a;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-page-shell .form-control-modern:focus {
    border-color: #2879c6;
    box-shadow: 0 0 0 3px rgba(40, 121, 198, 0.13);
}

.auth-page-shell .password-input-wrap {
    position: relative;
}

.auth-page-shell .password-input-wrap .form-control-modern {
    padding-right: 3rem;
}

.auth-page-shell .auth-password-toggle {
    right: 4px;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    color: #62738a;
}

.auth-page-shell .auth-password-toggle:hover,
.auth-page-shell .auth-password-toggle:focus-visible {
    color: #145fa8;
    background: #edf5fd;
    outline: none;
}

.auth-page-shell .btn-auth-primary {
    min-height: 46px;
    padding: 0.72rem 1.1rem;
    border-radius: 7px;
    background: #1768b4;
    box-shadow: 0 4px 12px rgba(23, 104, 180, 0.2);
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-page-shell .btn-auth-primary:hover,
.auth-page-shell .btn-auth-primary:focus-visible {
    transform: none;
    background: #105a9e;
    box-shadow: 0 5px 15px rgba(23, 104, 180, 0.25);
}

.auth-page-shell .forgot-password-link,
.auth-page-shell .terms-link,
.auth-page-shell .auth-link {
    color: #1768b4;
}

.auth-page-shell .forgot-password-link:hover,
.auth-page-shell .terms-link:hover,
.auth-page-shell .auth-link:hover {
    color: #0d4f8d;
}

.password-strength {
    padding: 0.75rem;
    border: 1px solid #dce7f2;
    border-radius: 7px;
    background: #f8fbfe;
}

.password-strength-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #536379;
    font-size: 0.78rem;
}

.password-strength-heading strong {
    color: #6b7788;
    font-size: 0.78rem;
}

.password-strength-track {
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: #dfe8f1;
}

.password-strength-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #94a3b8;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength[data-level="weak"] .password-strength-track span { width: 25%; background: #dc4545; }
.password-strength[data-level="medium"] .password-strength-track span { width: 50%; background: #d88716; }
.password-strength[data-level="good"] .password-strength-track span { width: 75%; background: #2779bd; }
.password-strength[data-level="strong"] .password-strength-track span { width: 100%; background: #16835f; }
.password-strength[data-level="weak"] .password-strength-heading strong { color: #c93434; }
.password-strength[data-level="medium"] .password-strength-heading strong { color: #ad690f; }
.password-strength[data-level="good"] .password-strength-heading strong { color: #1768b4; }
.password-strength[data-level="strong"] .password-strength-heading strong { color: #117453; }

.auth-password-requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.auth-password-requirements li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #7b8798;
    font-size: 0.75rem;
    line-height: 1.35;
}

.auth-password-requirements li .ui-icon {
    flex: 0 0 auto;
    color: #b5c0cd;
}

.auth-password-requirements li.is-met {
    color: #117453;
}

.auth-password-requirements li.is-met .ui-icon {
    color: #16835f;
}

.password-match {
    min-height: 1rem;
    color: #69778a;
    font-size: 0.76rem;
}

.password-match:empty {
    display: none;
}

.password-match.is-match { color: #117453; }
.password-match.is-mismatch { color: #c93434; }

@media (max-width: 768px) {
    .auth-page-shell {
        padding-top: 1rem !important;
        padding-bottom: 1.5rem !important;
    }

    .auth-page-shell .auth-card {
        margin-top: 0 !important;
        padding: 1rem !important;
    }

    .auth-page-shell .auth-header {
        margin-bottom: 1rem;
    }

    .auth-page-shell .auth-header h3 {
        font-size: 1.2rem;
    }

    .auth-page-shell .form-options {
        display: flex !important;
    }

    .auth-password-requirements {
        grid-template-columns: minmax(0, 1fr);
    }
}
