/**
 * ==========================================================================
 * QuestUI Design System - Panels & Dashboards Extension
 * Unified Styles for Admin, User Panel, Auth & Pricing Systems
 * Built natively for Persian RTL | Dual-Theme Support | Rounded Ergonomics
 * ==========================================================================
 */

/* ==========================================================================
   1. Dashboard & Panel Layout
   ========================================================================== */
.panel-page-wrapper {
    width: 100%;
    max-width: 1480px;
    margin-inline: auto;
}

.panel-wrapper {
    display: flex;
    gap: var(--space-lg);
    width: 100%;
    margin-block-start: var(--space-md);
}

.panel-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-default);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.panel-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

@media (max-width: 900px) {
    .panel-wrapper {
        flex-direction: column;
    }
    .panel-sidebar {
        width: 100%;
    }
}

.panel-header-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
    border: 1px solid rgba(2, 132, 199, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.panel-header-badge.gold {
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
    border-color: rgba(217, 119, 6, 0.25);
}

.panel-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.panel-nav-link:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
}

.panel-nav-link.active {
    background: var(--primary-action);
    color: var(--primary-contrast);
    font-weight: 600;
}

.panel-nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ==========================================================================
   2. User Identity Hero Banner (views/panel.php)
   ========================================================================== */
.user-hero-banner {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-default);
    margin-block-end: var(--space-lg);
}

.hero-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.hero-profile-cluster {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hero-avatar-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.hero-user-details h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-status {
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.pill-status.success {
    background: rgba(5, 150, 105, 0.12);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.pill-status.warning {
    background: rgba(217, 119, 6, 0.12);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.25);
}

.pill-status.danger {
    background: rgba(225, 29, 72, 0.12);
    color: var(--secondary-accent);
    border: 1px solid rgba(225, 29, 72, 0.25);
}

.hero-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}

.hero-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action-prime {
    background: var(--primary-action);
    color: var(--primary-contrast) !important;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    border: 1.5px solid var(--primary-action);
    box-shadow: var(--shadow-sm);
}

.btn-action-prime:hover {
    background: var(--primary-action-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-action-prime.btn-action-gold {
    background: #D97706;
    border-color: #D97706;
    color: #FFFFFF !important;
}

.btn-action-prime.btn-action-gold:hover {
    background: #B45309;
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.35);
}

/* ==========================================================================
   3. KPI & Stat Cards Grid
   ========================================================================== */
.dashboard-kpi-grid,
.stats-grid,
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-block-end: var(--space-lg);
}

.kpi-card,
.stat-card,
.admin-stat-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.kpi-card:hover,
.stat-card:hover,
.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
}

.kpi-icon-wrap,
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-val,
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'IRANYekanX', sans-serif;
    line-height: 1.2;
}

.kpi-sub,
.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   4. Panel Navigation Tabs
   ========================================================================== */
.panel-tabs-navigation,
.admin-tabs {
    display: flex;
    gap: var(--space-sm);
    border-block-end: 1.5px solid var(--border-default);
    margin-block-end: var(--space-lg);
    padding-block-end: 8px;
    overflow-x: auto;
}

.panel-tab-btn,
.admin-tab-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.panel-tab-btn:hover,
.admin-tab-btn:hover {
    background: var(--surface-elevated);
    color: var(--text-primary);
}

.panel-tab-btn.active,
.admin-tab-btn.active {
    background: var(--primary-action);
    color: var(--primary-contrast);
}

.panel-content-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-default);
    margin-block-end: var(--space-lg);
}

.panel-content-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: var(--space-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-block-end: 10px;
    border-block-end: 1px solid var(--border-default);
}

/* ==========================================================================
   5. Auth Interface (views/auth.php)
   ========================================================================== */
body.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-md);
}

.auth-wrapper {
    max-width: 480px;
    margin: auto;
    width: 100%;
}

.auth-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.auth-brand {
    text-align: center;
    margin-block-end: var(--space-lg);
}

.auth-brand img {
    margin-block-end: 10px;
    border-radius: var(--radius-md);
    padding: 6px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
}

.auth-brand h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: 4px;
}

.auth-brand p {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-tabs {
    display: flex;
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    padding: 4px;
    margin-block-end: var(--space-lg);
    border: 1px solid var(--border-default);
}

.auth-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.auth-tab-btn.active {
    background: var(--surface-card);
    color: var(--primary-action);
    box-shadow: var(--shadow-sm);
}

.captcha-row-wrapper {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.captcha-img-holder {
    height: 44px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-default);
    cursor: pointer;
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-img-holder img {
    height: 100%;
    display: block;
}

.btn-refresh-unified {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    border: 1.5px solid var(--border-default);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition-fast);
}

.btn-refresh-unified:hover {
    background: var(--primary-action);
    color: var(--primary-contrast);
    border-color: var(--primary-action);
}

.auth-submit-btn {
    width: 100%;
    background: var(--primary-action);
    color: var(--primary-contrast) !important;
    border: 1.5px solid var(--primary-action);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    margin-block-start: var(--space-md);
}

.auth-submit-btn:hover {
    background: var(--primary-action-hover);
    box-shadow: var(--shadow-glow);
}

.auth-alert {
    display: none;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-block-end: var(--space-md);
    font-weight: 500;
}

.auth-alert.visible {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-alert.error {
    background: rgba(225, 29, 72, 0.12);
    color: var(--secondary-accent);
    border: 1px solid rgba(225, 29, 72, 0.25);
}

.auth-alert.success {
    background: rgba(5, 150, 105, 0.12);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.25);
}

.otp-box-wrapper.is-hidden {
    display: none !important;
}

.otp-instruction-text {
    font-size: 12.5px;
    color: var(--success);
    margin-block-end: 8px;
    font-weight: 600;
}

.otp-resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin-block-start: 6px;
    color: var(--text-secondary);
}

.btn-resend-link {
    background: none;
    border: none;
    color: var(--primary-action);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.btn-resend-link:disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================================================
   6. Pricing Plans & Mock Payment Gateway (views/pricing.php)
   ========================================================================== */
#pricing-plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-block-end: var(--space-2xl);
}

.pricing-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-default);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.pricing-card.popular {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md), var(--shadow-gold-glow);
}

.popular-badge {
    position: absolute;
    top: -14px;
    inset-inline-end: 20px;
    background: linear-gradient(135deg, #D97706, #B45309);
    color: #FFFFFF;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: 6px;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-secondary);
    min-height: 40px;
}

.plan-price-wrap {
    margin-block: var(--space-md);
    padding-block: var(--space-sm);
    border-block: 1px solid var(--border-default);
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'IRANYekanX', sans-serif;
}

.plan-currency {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-inline-start: 4px;
}

.plan-duration {
    font-size: 12px;
    color: var(--primary-action);
    font-weight: 600;
    margin-block-start: 4px;
}

.plan-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-block: var(--space-md);
    flex-grow: 1;
}

.plan-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-primary);
}

.feature-check {
    color: var(--success);
    font-size: 14px;
    flex-shrink: 0;
}

.btn-buy-plan {
    width: 100%;
    background: var(--primary-action);
    color: var(--primary-contrast) !important;
    border: 1.5px solid var(--primary-action);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-buy-plan:hover {
    background: var(--primary-action-hover);
    box-shadow: var(--shadow-glow);
}

.pricing-card.popular .btn-buy-plan {
    background: linear-gradient(135deg, #D97706, #B45309);
    border-color: #D97706;
}

.pricing-card.popular .btn-buy-plan:hover {
    background: #B45309;
    box-shadow: var(--shadow-gold-glow);
}

/* Mock Gateway Modal */
.mock-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mock-modal-overlay.active,
.mock-modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.mock-modal-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    text-align: center;
}

.gateway-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
    margin-block-end: var(--space-md);
}

.gateway-badge.gold {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold, #D97706);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-copy-chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-copy-chip:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-copy-chip.copied {
    background: #10B981 !important;
    border-color: #10B981 !important;
    color: #FFFFFF !important;
}

.pricing-modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-block-start: var(--space-lg);
}

.btn-modal-cancel {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
}

.btn-modal-confirm {
    background: var(--success);
    border: 1px solid var(--success);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 700;
}

.btn-modal-confirm:hover {
    background: var(--success-hover);
    box-shadow: 0 0 16px rgba(5, 150, 105, 0.35);
}

/* ==========================================================================
   7. Admin Data Tables & Controls (views/admin.php)
   ========================================================================== */
.admin-table-wrap {
    overflow-x: auto;
    width: 100%;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.admin-table th {
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-weight: 600;
    padding: 12px 14px;
    border-block-end: 1.5px solid var(--border-default);
    text-align: right;
}

.admin-table td {
    padding: 12px 14px;
    border-block-end: 1px solid var(--border-default);
    color: var(--text-primary);
}

.admin-table tr:hover td {
    background: var(--surface-elevated);
}

.admin-action-btn {
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.admin-action-btn.edit {
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
    border-color: rgba(2, 132, 199, 0.25);
}

.admin-action-btn.edit:hover {
    background: var(--primary-action);
    color: var(--primary-contrast);
}

.admin-action-btn.delete {
    background: rgba(225, 29, 72, 0.12);
    color: var(--secondary-accent);
    border-color: rgba(225, 29, 72, 0.25);
}

.admin-action-btn.delete:hover {
    background: var(--secondary-accent);
    color: #FFFFFF;
}


/* ==========================================================================
   Complete Auth Form Enhancements (views/auth.php)
   ========================================================================== */
.form-input-wrap {
    width: 100%;
    position: relative;
}

.form-input-wrap input {
    width: 100%;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.password-toggle-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

.password-toggle-wrap input {
    padding-inline-end: 42px;
}

.btn-toggle-password {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-toggle-password:hover {
    color: var(--primary-action);
    background: rgba(2, 132, 199, 0.08);
}

.btn-toggle-password:focus {
    outline: none;
    color: var(--primary-action);
}

.form-input-wrap input:hover {
    border-color: var(--border-accent);
}

.form-input-wrap input:focus {
    border-color: var(--border-accent);
    box-shadow: var(--focus-ring);
}

.required-asterisk {
    color: var(--secondary-accent);
    margin-inline-start: 3px;
}

.flex-1 {
    flex: 1;
}

.input-code-captcha,
.input-code-otp {
    letter-spacing: 4px;
    text-align: center;
    font-weight: 800;
    font-family: var(--font-mono), monospace;
    font-size: 18px !important;
}

.btn-refresh-unified {
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    color: var(--primary-action);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
    flex-shrink: 0;
}

.btn-refresh-unified:hover {
    border-color: var(--primary-action);
    background: rgba(2, 132, 199, 0.08);
    transform: rotate(45deg);
}

.otp-box-wrapper {
    background: var(--surface-elevated);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-block-end: 16px;
}

.otp-box-wrapper.is-hidden {
    display: none;
}

.otp-instruction-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-action);
    margin-block-end: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.otp-resend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block-start: 8px;
    font-size: 12px;
}

.btn-resend-link {
    background: none;
    border: none;
    color: var(--primary-action);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 0;
}

.btn-resend-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-submit-btn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary-action) 0%, #0369A1 100%);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all var(--transition-fast);
    margin-block-start: 18px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
    filter: brightness(1.08);
}

.auth-footer {
    text-align: center;
    margin-block-start: 24px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--border-default);
}

.auth-footer a {
    color: var(--primary-action);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--primary-action-hover);
    transform: translateX(-4px);
}

/* ==========================================================================
   Notice Boxes across Panel, Auth & Admin
   ========================================================================== */
.panel-notice-box {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-block-end: 18px;
}

.panel-notice-box.gold {
    background: rgba(217, 119, 6, 0.08);
    border-color: rgba(217, 119, 6, 0.3);
}

.panel-notice-box.emerald {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.3);
}

.panel-notice-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-notice-box.gold .panel-notice-title {
    color: #B45309;
}

.panel-notice-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   User Dashboard Panel Extensions (views/panel.php)
   ========================================================================== */
.metrics-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-block-end: 24px;
}

.metric-stat-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

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

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

html[data-theme="dark"] .glass-card {
    background: rgba(17, 24, 39, 0.7);
}

.metric-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block-end: 12px;
}

.metric-card-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.metric-icon-wrap.cyan {
    background: rgba(2, 132, 199, 0.12);
    color: var(--primary-action);
}

.metric-icon-wrap.purple {
    background: rgba(124, 58, 237, 0.12);
    color: var(--tertiary-accent);
}

.metric-icon-wrap.emerald {
    background: rgba(5, 150, 105, 0.12);
    color: var(--success);
}

.metric-card-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-block-end: 4px;
}

.metric-card-caption {
    font-size: 11px;
    color: var(--text-secondary);
}

.segmented-nav-tabs {
    display: flex;
    background: var(--surface-elevated);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    margin-block-end: 20px;
    gap: 4px;
    overflow-x: auto;
}

.segmented-tab-btn {
    flex: 1;
    min-width: 130px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.segmented-tab-btn.active {
    background: var(--surface-card);
    color: var(--primary-action);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.panel-content-box {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-block-end: 24px;
}

.panel-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-block-end: 20px;
    padding-block-end: 14px;
    border-block-end: 1px solid var(--border-default);
}

.form-double-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-double-col {
        grid-template-columns: 1fr;
    }
}

.form-group-wrap {
    margin-block-end: 16px;
}

.form-group-wrap label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-block-end: 6px;
}

.form-input-styled {
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
    padding: 10px 14px;
    background: var(--surface-elevated);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input-styled:focus {
    border-color: var(--border-accent);
    box-shadow: var(--focus-ring);
    background: var(--surface-card);
}

.btn-action-emerald {
    background: var(--success);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-action-emerald:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--surface-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-block: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-action);
    border-radius: var(--radius-full);
    transition: width 0.3s;
}

.progress-bar-fill.rose {
    background: var(--secondary-accent);
}

.data-table-scroll {
    overflow-x: auto;
}

.data-table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table-custom th {
    background: var(--surface-elevated);
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-primary);
    border-block-end: 2px solid var(--border-default);
    text-align: right;
}

.data-table-custom td {
    padding: 12px 14px;
    border-block-end: 1px solid var(--border-default);
    color: var(--text-primary);
}

.table-cell-muted {
    color: var(--text-secondary);
}

.tool-feature-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-block-end: 12px;
}

.tool-feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-block-end: 4px;
}

.tool-feature-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   Pricing Page Extensions (views/pricing.php)
   ========================================================================== */
.pricing-hero {
    text-align: center;
    margin-block-end: 32px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-block-end: 40px;
}

.user-status-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-block-end: 24px;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Admin Panel Extensions (views/admin.php)
   ========================================================================== */
.admin-nav {
    display: flex;
    gap: 6px;
    background: var(--surface-elevated);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
    margin-block-end: 24px;
    overflow-x: auto;
}

.admin-tab {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.admin-tab.active {
    background: var(--surface-card);
    color: var(--primary-action);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.stat-box {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-box-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-block-end: 4px;
}

.stat-box-title {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-block-end: 16px;
    flex-wrap: wrap;
}

.action-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn-sm:hover {
    border-color: var(--primary-action);
    color: var(--primary-action);
}

.data-table-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--surface-elevated);
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-primary);
    border-block-end: 2px solid var(--border-default);
    text-align: right;
}

.data-table td {
    padding: 12px 14px;
    border-block-end: 1px solid var(--border-default);
    color: var(--text-primary);
}

.monetization-mode-card {
    transition: all var(--transition-base);
}

.monetization-mode-card.active {
    border-color: var(--primary-action) !important;
    background: rgba(2, 132, 199, 0.06) !important;
    box-shadow: var(--shadow-glow);
}

.mode-active-indicator {
    position: static !important;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
}

/* Transaction Filter Pills */
.filter-tx-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'IRANYekanX', sans-serif !important;
    font-feature-settings: "ss01" on, "ss02" on;
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-tx-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
    background: var(--surface-card);
}

.filter-tx-btn.active {
    background: var(--surface-card);
    color: var(--text-primary) !important;
    border-color: var(--primary-action);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .filter-tx-btn#btn-tx-filter-all {
    color: #334155 !important;
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
}

[data-theme="light"] .filter-tx-btn#btn-tx-filter-all.active {
    color: #0284C7 !important;
    background: #E0F2FE !important;
    border-color: #0284C7 !important;
}

[data-theme="dark"] .filter-tx-btn#btn-tx-filter-all {
    color: #94A3B8 !important;
    background: #1F2937 !important;
    border-color: #374151 !important;
}

[data-theme="dark"] .filter-tx-btn#btn-tx-filter-all.active {
    color: #38BDF8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: #38BDF8 !important;
}

.perm-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 8px 12px;
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    margin-block-end: 6px;
}

.badge-verified {
    background: rgba(5, 150, 105, 0.15);
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.badge-unverified {
    background: rgba(217, 119, 6, 0.15);
    color: #B45309;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.btn-verify-now {
    background: var(--primary-action);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-xs);
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}


/* Admin & Panel Specific Classes */
.gradient-text-gold {
    background: linear-gradient(135deg, #D97706, #B45309);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.admin-header-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: rgba(217, 119, 6, 0.15);
    color: #B45309;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.btn-admin-logout {
    background: rgba(225, 29, 72, 0.1);
    color: var(--secondary-accent) !important;
    border: 1px solid rgba(225, 29, 72, 0.25);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-admin-logout:hover {
    background: var(--secondary-accent);
    color: #FFFFFF !important;
}

.btn-danger {
    background: var(--secondary-accent);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: var(--secondary-accent-hover);
}

.modal-box {
    background: var(--surface-card);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    padding: 24px;
    width: 100%;
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.app-brand-heading {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-action-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.glow-ambient-gold {
    box-shadow: 0 0 24px rgba(217, 119, 6, 0.2);
}

.text-gold {
    color: #B45309 !important;
}

.text-emerald {
    color: var(--success) !important;
}

.gradient-text-blue {
    background: linear-gradient(135deg, var(--primary-action), #7C3AED);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.tab-pane-section {
    display: none;
}

.tab-pane-section.active {
    display: block;
}

.anim-fade-in {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-input-caption {
    font-size: 11px;
    color: var(--text-secondary);
    margin-block-start: 4px;
}

.form-action-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-block-start: 20px;
    padding-block-start: 16px;
    border-block-start: 1px solid var(--border-default);
}

.panel-section-wrap {
    margin-block-end: 24px;
}

.panel-section-heading {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-block-end: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info {
    color: var(--primary-action) !important;
}

.font-bold {
    font-weight: 700 !important;
}

/* Modal Form Inputs - Dynamic Theme Support (Zero White-on-White Glitch) */
.modal-box input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.modal-box select,
.modal-box textarea {
    background: var(--surface-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-default) !important;
}

.modal-box input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
.modal-box select:focus,
.modal-box textarea:focus {
    border-color: var(--border-accent) !important;
    outline: none !important;
    box-shadow: var(--focus-ring) !important;
}

.modal-box input::placeholder,
.modal-box textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.65 !important;
}

[data-theme="dark"] .modal-box input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] .modal-box select,
[data-theme="dark"] .modal-box textarea {
    background: #0F172A !important;
    color: #F8FAFC !important;
    border-color: #334155 !important;
}

/* ==========================================================================
   Typography & Local IRANYekanX Font Compliance (RTL + Persian Numerals)
   ========================================================================== */
.panel-page-wrapper,
.panel-page-wrapper input,
.panel-page-wrapper textarea,
.panel-page-wrapper select,
.panel-page-wrapper button:not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab),
.panel-page-wrapper label,
.panel-page-wrapper table,
.panel-page-wrapper td,
.panel-page-wrapper th,
.panel-page-wrapper .modal-box,
.modal-overlay,
.modal-box,
.panel-page-wrapper .stat-box,
.panel-page-wrapper .monetization-mode-card,
.panel-page-wrapper section {
    font-family: 'IRANYekanX', var(--font-primary), sans-serif !important;
    font-feature-settings: "ss01" on, "ss02" on;
}

/* Strict Input & Textarea Light/Dark Contrast in Panels & Modals */
.panel-page-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.panel-page-wrapper textarea,
.panel-page-wrapper select,
.modal-overlay input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.modal-overlay textarea,
.modal-overlay select {
    color: var(--text-primary) !important;
    background-color: var(--bg-input) !important;
    font-family: 'IRANYekanX', var(--font-primary), sans-serif !important;
    font-feature-settings: "ss01" on, "ss02" on;
}

[data-theme="light"] .panel-page-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="light"] .panel-page-wrapper textarea,
[data-theme="light"] .panel-page-wrapper select,
[data-theme="light"] .modal-overlay input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="light"] .modal-overlay textarea,
[data-theme="light"] .modal-overlay select {
    color: #0F172A !important;
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
}

[data-theme="dark"] .panel-page-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] .panel-page-wrapper textarea,
[data-theme="dark"] .panel-page-wrapper select,
[data-theme="dark"] .modal-overlay input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] .modal-overlay textarea,
[data-theme="dark"] .modal-overlay select {
    color: #F8FAFC !important;
    background-color: #0F172A !important;
    border-color: #334155 !important;
}

.panel-page-wrapper input::placeholder,
.panel-page-wrapper textarea::placeholder,
.modal-overlay input::placeholder,
.modal-overlay textarea::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.65 !important;
}