/* ==========================================================================
   Referral & Yield Platform - Unified Styling System (Premium Glassmorphism)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Vazirmatn:wght@300;400;500;700&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #07080e;
    --bg-deep: #0a0c16;
    --bg-panel: rgba(16, 19, 36, 0.6);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --primary: #00f2fe; /* Neon Cyan */
    --primary-glow: rgba(0, 242, 254, 0.3);
    --secondary: #b92b27;
    --accent-purple: #8a2be2; /* Electric Purple */
    --accent-pink: #ff007f; /* Cyber Pink */
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    --success: #00e676; /* Vivid Green */
    --success-glow: rgba(0, 230, 118, 0.2);
    --warning: #ffb300;
    --error: #ff1744;
    
    /* Font Families */
    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Outfit', sans-serif;
    
    /* Layout Tokens */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-speed: 0.3s;
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.12) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-en); /* Default English Font */
    line-height: 1.6;
    overflow-x: hidden;
    direction: ltr; /* Default LTR */
}

/* RTL Override for Persian */
body.rtl {
    direction: rtl;
    font-family: var(--font-fa);
}

/* English numbers and terms formatting */
.en-text {
    font-family: var(--font-en);
    direction: ltr;
    display: inline-block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Structure and Layout Helpers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glowing Background Decors */
.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}
.glow-orb-primary {
    background: var(--primary);
    top: 10%;
    left: 10%;
}
.glow-orb-secondary {
    background: var(--accent-purple);
    bottom: 20%;
    right: 15%;
}

/* Glass Card Component */
.glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-main);
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.1);
}

/* Premium Typography styling */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-primary);
}

.neon-text {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 242, 254, 0.2);
}

/* Header & Navigation */
header {
    background: rgba(7, 8, 14, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-en);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
    font-size: 15px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-auth {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    padding: 4px;
    border-radius: var(--border-radius-sm);
    margin-right: 8px;
}
body.rtl .lang-switcher {
    margin-right: 0;
    margin-left: 8px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.lang-btn.active, .lang-btn:hover {
    background: var(--primary-glow);
    color: var(--primary);
}

/* Inputs & Form Elements */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}
body.rtl .form-label {
    text-align: right;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(7, 8, 14, 0.6);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-en);
    font-size: 15px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    outline: none;
}
body.rtl .form-input {
    font-family: var(--font-fa);
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}
.form-input.en-input {
    font-family: var(--font-en);
    direction: ltr;
}

/* Custom Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
    border: none;
    gap: 8px;
}
body.rtl .btn {
    font-family: var(--font-fa);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: #07080e;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-glow);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error);
    color: white;
}
.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Landing Page Elements */
.hero-section {
    padding: 120px 0 80px 0;
    position: relative;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-title {
    font-size: 48px;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    text-align: center;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    font-size: 28px;
    color: var(--primary);
}

.feature-title {
    font-size: 20px;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Yield Calculator Card */
.calculator-section {
    padding: 60px 0;
}

.calc-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 768px) {
    .calc-wrapper {
        grid-template-columns: 1fr;
    }
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-result-box {
    background: rgba(7, 8, 14, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calc-result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-light);
}
.calc-result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Authentication Page Forms */
.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 550px; /* Increased slightly for more fields */
    padding: 40px 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* User Dashboard Styling */
.dashboard-container {
    padding: 40px 0 80px 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: #07080e;
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-glow);
}

.referral-link-box {
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 450px;
}

.referral-link-box span {
    font-size: 13px;
    color: var(--text-secondary);
}

.referral-link-box input {
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: var(--font-en);
    font-size: 14px;
    outline: none;
    width: 200px;
    text-overflow: ellipsis;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}
body.rtl .stat-card::before {
    left: auto;
    right: 0;
}
.stat-card.purple::before {
    background: var(--accent-purple);
}
.stat-card.pink::before {
    background: var(--accent-pink);
}
.stat-card.success::before {
    background: var(--success);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-val {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-en);
    line-height: 1.2;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Financial Panels Layout */
.dashboard-body-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

@media (max-width: 992px) {
    .dashboard-body-grid {
        grid-template-columns: 1fr;
    }
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Tabs System */
.tab-headers {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-speed);
}
body.rtl .tab-btn {
    font-family: var(--font-fa);
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--primary);
    font-weight: 700;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Transaction Panels */
.transaction-panel {
    padding: 32px;
}

.wallet-address-display {
    background: rgba(7, 8, 14, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin: 20px 0;
    text-align: center;
    word-break: break-all;
}

.wallet-address-display p {
    font-family: var(--font-en);
    color: var(--primary);
    font-size: 15px;
    margin-top: 8px;
    user-select: all;
    letter-spacing: 0.5px;
}

.qr-code-box {
    width: 150px;
    height: 150px;
    margin: 0 auto 16px auto;
    background: white;
    padding: 8px;
    border-radius: var(--border-radius-sm);
}
.qr-code-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* List of Referrals and Levels */
.referral-levels-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.level-row {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.level-num {
    width: 40px;
    height: 40px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-weight: 700;
    color: var(--primary);
}

.level-stats-bar {
    text-align: right;
}
body.rtl .level-stats-bar {
    text-align: left;
}

.level-percentage {
    color: var(--success);
    font-weight: 700;
    font-family: var(--font-en);
}

.referral-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.referral-table th, .referral-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
body.rtl .referral-table th, body.rtl .referral-table td {
    text-align: right;
}

.referral-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.referral-table td {
    font-size: 14px;
}

.referral-table tr:last-child td {
    border-bottom: none;
}

/* Transaction List Styling */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
}

.tx-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
body.rtl .tx-info {
    text-align: right;
}

.tx-title {
    font-size: 14px;
    font-weight: 500;
}

.tx-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.tx-amount-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
body.rtl .tx-amount-status {
    align-items: flex-start;
}

.tx-amount {
    font-family: var(--font-en);
    font-weight: 700;
}
.tx-amount.deposit {
    color: var(--success);
}
.tx-amount.withdraw {
    color: var(--error);
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}
.status-badge.pending {
    background: rgba(255, 179, 0, 0.15);
    color: var(--warning);
}
.status-badge.approved {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
}
.status-badge.rejected {
    background: rgba(255, 23, 68, 0.15);
    color: var(--error);
}

/* Toast Notification Utility */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 16px 24px;
    color: white;
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateY(100px);
    opacity: 0;
    animation: toastIn 0.3s forwards;
    border-left: 4px solid var(--primary);
}
body.rtl .toast {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}
body.rtl .toast.success {
    border-right-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}
body.rtl .toast.error {
    border-right-color: var(--error);
}

/* Admin Dashboard Section */
.admin-card {
    border-color: var(--accent-pink);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.admin-list-box {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-tx-item {
    background: rgba(7, 8, 14, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
}

.admin-tx-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.admin-tx-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.admin-badge {
    background: rgba(255, 0, 127, 0.1);
    border: 1px solid rgba(255, 0, 127, 0.2);
    color: var(--accent-pink);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Keyframes & Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 242, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.pulse-btn {
    animation: pulse 2s infinite;
}

/* Landing Page Operations Board */
.tx-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-speed);
}
body.rtl .filter-pill {
    font-family: var(--font-fa);
}

.filter-pill.active, .filter-pill:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.tx-search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.tx-search-input {
    max-width: 400px;
    text-align: center;
}

.tx-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.page-num-display {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font-en);
}

.tx-table-container {
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-main);
}

.tx-table-container table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(16, 19, 36, 0.4);
    backdrop-filter: blur(16px);
}

.tx-table-container th, .tx-table-container td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
body.rtl .tx-table-container th, body.rtl .tx-table-container td {
    text-align: right;
}

.tx-table-container th {
    background: rgba(7, 8, 14, 0.6);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tx-table-container tr:last-child td {
    border-bottom: none;
}

.tx-table-container tr {
    transition: background-color var(--transition-speed);
}

.tx-table-container tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   New Premium Custom Elements (v3 Updates)
   ========================================================================== */

/* Language Dropdown Selector */
.lang-dropdown-container {
    position: relative;
    display: inline-block;
    margin-right: 8px;
    z-index: 150;
}
body.rtl .lang-dropdown-container {
    margin-right: 0;
    margin-left: 8px;
}
.lang-dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
}
.lang-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}
.lang-dropdown-trigger::after {
    content: "▼";
    font-size: 8px;
    color: var(--text-secondary);
    transition: transform var(--transition-speed);
}
.lang-dropdown-container:hover .lang-dropdown-trigger::after {
    transform: rotate(180deg);
}
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(16, 19, 36, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-main);
    display: none;
    flex-direction: column;
    min-width: 140px;
    overflow: hidden;
    padding: 4px 0;
}
body.rtl .lang-dropdown-menu {
    right: auto;
    left: 0;
}
.lang-dropdown-container:hover .lang-dropdown-menu,
.lang-dropdown-container.show .lang-dropdown-menu {
    display: flex;
}
.lang-dropdown-container.show .lang-dropdown-trigger::after {
    transform: rotate(180deg);
}
.lang-dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
body.rtl .lang-dropdown-item {
    text-align: right;
    direction: rtl;
}
.lang-dropdown-item:hover {
    background: var(--primary-glow);
    color: var(--primary);
}
.lang-dropdown-item.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(0, 242, 254, 0.05);
}

/* Stats Section & Grid */
.stats-section {
    padding: 40px 0 20px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
.stat-card {
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.stat-icon {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}
.stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Licenses & Compliance Section */
.licenses-section {
    padding: 60px 0;
    position: relative;
}
.licenses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}
@media (max-width: 992px) {
    .licenses-grid {
        grid-template-columns: 1fr;
    }
}
.license-card {
    padding: 32px 24px;
    position: relative;
    border-radius: var(--border-radius-md);
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    transition: all var(--transition-speed);
}
.license-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.1);
}
.license-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    color: var(--primary);
    opacity: 0.6;
}
body.rtl .license-badge {
    right: auto;
    left: 24px;
}
.license-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.license-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Admin Alert & Indicator Badges */
.admin-alert-badge {
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 0 8px rgba(255, 23, 68, 0.6);
}
body.rtl .admin-alert-badge {
    margin-left: 0;
    margin-right: 8px;
}
.admin-alert-flash {
    animation: adminAlertFlash 1.5s infinite;
}
@keyframes adminAlertFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 23, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0);
    }
}

/* Custom styling for native dropdown select option elements to fix light mode/white background issue */
select, select option {
    background-color: #0d0e15 !important;
    color: #ffffff !important;
}



