/* Track The Gold - Styles with Multiple Themes */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* ========== Dark Mode (Default) ========== */
:root {
    --gold: #D4AF37;
    --gold-light: #F4E4BA;
    --gold-dark: #B8960C;
    --bg: #0A0A0F;
    --bg2: #12121A;
    --card: #12121A;
    --card-hover: #1A1A25;
    --input: #1E1E2A;
    --text: #FFFFFF;
    --text2: #A0A0B0;
    --text3: #606070;
    --border: rgba(255,255,255,0.05);
    --border-hover: rgba(212,175,55,0.2);
    --success: #00C853;
    --error: #FF5252;
    --warning: #FFB300;
    --shadow: rgba(0,0,0,0.3);
    --header-bg: rgba(10,10,15,0.95);
    --theme-name: 'dark';
}

/* ========== Light Mode ========== */
[data-theme="light"],
html[data-theme="light"],
body[data-theme="light"] {
    --gold: #B8960C;
    --gold-light: #D4AF37;
    --gold-dark: #8B7206;
    --bg: #F5F5F7;
    --bg2: #FFFFFF;
    --card: #FFFFFF;
    --card-hover: #F8F8FA;
    --input: #F0F0F5;
    --text: #1A1A2E;
    --text2: #4A4A5A;
    --text3: #8A8A9A;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(184,150,12,0.3);
    --success: #00A844;
    --error: #E53935;
    --warning: #F59E0B;
    --shadow: rgba(0,0,0,0.1);
    --header-bg: rgba(255,255,255,0.95);
    --theme-name: 'light';
}

/* ========== Royal Blue Mode ========== */
[data-theme="royal"],
html[data-theme="royal"],
body[data-theme="royal"] {
    --gold: #D4AF37;
    --gold-light: #FFD700;
    --gold-dark: #B8960C;
    --bg: #0d1b2a;
    --bg2: #1b263b;
    --card: #1b263b;
    --card-hover: #243447;
    --input: #243447;
    --text: #FFFFFF;
    --text2: #a0aec0;
    --text3: #718096;
    --border: rgba(212,175,55,0.15);
    --border-hover: rgba(212,175,55,0.3);
    --success: #48bb78;
    --error: #fc8181;
    --warning: #f6ad55;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(13,27,42,0.95);
    --theme-name: 'royal';
}

/* ========== Emerald Mode ========== */
[data-theme="emerald"],
html[data-theme="emerald"],
body[data-theme="emerald"] {
    --gold: #10b981;
    --gold-light: #34d399;
    --gold-dark: #059669;
    --bg: #022c22;
    --bg2: #064e3b;
    --card: #064e3b;
    --card-hover: #065f46;
    --input: #065f46;
    --text: #FFFFFF;
    --text2: #a7f3d0;
    --text3: #6ee7b7;
    --border: rgba(16,185,129,0.15);
    --border-hover: rgba(16,185,129,0.3);
    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(2,44,34,0.95);
    --theme-name: 'emerald';
}

/* ========== Burgundy Mode ========== */
[data-theme="burgundy"],
html[data-theme="burgundy"],
body[data-theme="burgundy"] {
    --gold: #ec4899;
    --gold-light: #f472b6;
    --gold-dark: #db2777;
    --bg: #2d0a26;
    --bg2: #4a1942;
    --card: #4a1942;
    --card-hover: #5c2153;
    --input: #5c2153;
    --text: #FFFFFF;
    --text2: #fbcfe8;
    --text3: #f9a8d4;
    --border: rgba(236,72,153,0.15);
    --border-hover: rgba(236,72,153,0.3);
    --success: #4ade80;
    --error: #f87171;
    --warning: #fbbf24;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(45,10,38,0.95);
    --theme-name: 'burgundy';
}

/* ========== Smooth Transition ========== */
body, .card, .header, .sidebar, .btn, .form-control, .stat-card, .price-card, .feature-card, .pricing-card, .chat-box, .alert {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ========== Theme Selector ========== */
.theme-selector {
    position: fixed;
    top: 85px;
    left: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.theme-selector-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px var(--shadow);
}

.theme-selector-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.theme-selector-btn.active {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.theme-selector-btn::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    opacity: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transition: opacity 0.3s;
}

.theme-selector-btn.active::after {
    opacity: 1;
}

/* Theme Button Colors */
.theme-selector-btn.dark {
    background: linear-gradient(135deg, #1a1a2a, #0a0a0f);
}

.theme-selector-btn.light {
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
}

.theme-selector-btn.royal {
    background: linear-gradient(135deg, #1b263b, #0d1b2a);
}

.theme-selector-btn.emerald {
    background: linear-gradient(135deg, #064e3b, #022c22);
}

.theme-selector-btn.burgundy {
    background: linear-gradient(135deg, #4a1942, #2d0a26);
}

/* Tooltip for theme names */
.theme-selector-btn[title]:hover::before {
    content: attr(title);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--card);
    color: var(--text);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
}

/* ========== Collapsed Theme Selector (Mobile Friendly) ========== */
.theme-selector.collapsed {
    flex-direction: row;
    flex-wrap: wrap;
    width: 40px;
    overflow: hidden;
    transition: width 0.3s ease;
}

.theme-selector.collapsed:hover {
    width: auto;
    background: var(--card);
    padding: 8px;
    border-radius: 25px;
    border: 1px solid var(--border);
}

.theme-selector.collapsed .theme-selector-btn:not(.active) {
    display: none;
}

.theme-selector.collapsed:hover .theme-selector-btn {
    display: block;
}

/* ========== Old Theme Toggle (Fallback) ========== */
.theme-toggle {
    position: fixed;
    top: 85px;
    left: 20px;
    z-index: 9998;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 70px;
    height: 36px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.theme-toggle-icon {
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.theme-toggle-icon.sun {
    opacity: 0.4;
}

.theme-toggle-icon.moon {
    opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.sun {
    opacity: 1;
}

[data-theme="light"] .theme-toggle-icon.moon {
    opacity: 0.4;
}

.theme-toggle-thumb {
    position: absolute;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    right: 4px;
    transition: all 0.3s cubic-bezier(0.68, -0.15, 0.32, 1.15);
    box-shadow: 0 2px 10px rgba(212,175,55,0.4);
}

[data-theme="light"] .theme-toggle-thumb {
    right: calc(100% - 30px);
}

/* Animated glow effect */
.theme-toggle-thumb::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.theme-toggle:hover .theme-toggle-thumb::after {
    opacity: 0.5;
}

/* ========== Alternative Theme Toggle (Fancy) ========== */
.theme-switch {
    position: fixed;
    top: 85px;
    left: 20px;
    z-index: 9998;
}

.theme-switch-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.4s cubic-bezier(0.68, -0.15, 0.32, 1.15);
    overflow: hidden;
    position: relative;
}

.theme-switch-btn:hover {
    border-color: var(--gold);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 25px rgba(212,175,55,0.4);
}

.theme-switch-btn .icon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.15, 0.32, 1.15);
}

.theme-switch-btn .sun-icon {
    opacity: 0;
    transform: translateY(30px) rotate(-90deg);
}

.theme-switch-btn .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

[data-theme="light"] .theme-switch-btn .sun-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

[data-theme="light"] .theme-switch-btn .moon-icon {
    opacity: 0;
    transform: translateY(-30px) rotate(90deg);
}

/* ========== Sidebar Dropdown ========== */
.sidebar-nav .has-dropdown { position: relative; }
.sidebar-nav .has-dropdown > .sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text2);
    border-radius: 10px;
    transition: all 0.3s;
    cursor: pointer;
}
.sidebar-nav .has-dropdown > .sidebar-link i:first-child { margin-left: 10px; }
.sidebar-nav .has-dropdown > .sidebar-link:hover {
    background: var(--input);
    color: var(--gold);
}
.sidebar-nav .has-dropdown > .sidebar-link.active {
    background: var(--input);
    color: var(--gold);
}
.sidebar-nav .has-dropdown > .sidebar-link .arrow { 
    margin-right: auto; 
    font-size: 0.7rem; 
    transition: transform 0.3s; 
}
.sidebar-nav .has-dropdown.open > .sidebar-link .arrow { 
    transform: rotate(-90deg); 
}
.sidebar-nav .dropdown-menu {
    display: none;
    background: var(--card);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 8px;
    margin-top: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.sidebar-nav .has-dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.sidebar-nav .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.sidebar-nav .dropdown-menu a:hover { background: var(--input); }
.sidebar-nav .dropdown-menu a.gold-link:hover { color: #D4AF37; }
.sidebar-nav .dropdown-menu a.silver-link:hover { color: #C0C0C0; }
.sidebar-nav .dropdown-menu a.gold-link i { color: #D4AF37; }
.sidebar-nav .dropdown-menu a.silver-link i { color: #C0C0C0; }

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

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 500px; }

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span { color: var(--gold); }

.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--text2); padding: 8px 16px; border-radius: 8px; }
.nav a:hover { color: var(--gold); background: rgba(212,175,55,0.1); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
}

.btn-gold:hover {
    box-shadow: 0 5px 20px rgba(212,175,55,0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: #000;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border);
}

.card:hover {
    border-color: var(--border-hover);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text2);
}

/* Stat Cards */
.stat-card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    color: var(--text2);
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(0,200,83,0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(255,82,82,0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-warning {
    background: rgba(255,179,0,0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    right: 0;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--bg2);
    border-left: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text2);
    border-radius: 10px;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--input);
    color: var(--gold);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
}

/* Main Content with Sidebar */
.main-content {
    flex: 1;
    margin-right: 250px;
    margin-left: 0;
    padding: 20px;
    min-width: 0;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--input);
    font-weight: 600;
    color: var(--text);
}

tr:hover {
    background: var(--card-hover);
}

/* Pricing Cards */
.pricing-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.pricing-card:hover,
.pricing-card.featured {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
}

.pricing-card.featured {
    background: linear-gradient(135deg, var(--card), var(--card-hover));
}

/* Feature Cards */
.feature-card {
    background: var(--card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Chat Box */
.chat-box {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.chat-header {
    background: var(--input);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 10px;
}

.chat-bubble.user {
    background: var(--gold);
    color: #000;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.bot {
    background: var(--input);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Price Cards */
.price-card {
    background: var(--card);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.price-card:hover {
    border-color: var(--gold);
    transform: scale(1.02);
}

.price-card .karat {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.price-card .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 10px 0;
}

.price-card .unit {
    color: var(--text2);
    font-size: 0.9rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.event-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tip-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

/* Calculator */
.calc-result {
    background: var(--input);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-top: 20px;
}

.calc-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #000;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Utilities */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text2); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* Dashboard Layout */
.dashboard {
    display: flex;
    flex-direction: row-reverse;
    min-height: 100vh;
    padding-top: 70px;
    width: 100%;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text);
}

/* Contact Float Button */
.contact-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.contact-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.contact-btn:hover {
    transform: scale(1.1);
}

.contact-btn.whatsapp { background: #25D366; }
.contact-btn.telegram { background: #0088cc; }
.contact-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

/* Consultation Widget */
.consultation-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px var(--shadow);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.consultation-widget.active {
    display: flex;
}

.consultation-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(212,175,55,0.4);
    z-index: 9999;
    transition: all 0.3s;
}

.consultation-toggle:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.animate-pulse { animation: pulse 2s infinite; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease; }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .theme-selector {
        top: auto;
        bottom: 20px;
        flex-direction: row;
    }
    
    .theme-selector-btn {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .logo { font-size: 1.2rem; }
    .nav { display: none; }
    
    .card { padding: 20px 15px; border-radius: 12px; }
    
    .form-control { padding: 12px 14px; }
    .form-label { font-size: 0.9rem; }
    .form-group { margin-bottom: 15px; }
    
    .btn { padding: 12px 20px; font-size: 0.95rem; }
    .btn-block { width: 100%; }
    
    main { padding: 80px 0 30px !important; }
    
    .page-title { font-size: 1.4rem; margin-bottom: 20px; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 15px 10px; }
    .stat-icon { font-size: 1.5rem; }
    .stat-value { font-size: 1.3rem; }
    .stat-label { font-size: 0.75rem; }
    
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    th, td { padding: 10px 8px; font-size: 0.85rem; }
    
    .alert { padding: 12px 15px; font-size: 0.9rem; margin-bottom: 15px; }
    
    .calc-result { padding: 20px 15px; }
    .calc-value { font-size: 1.8rem; }
    
    .chat-box { height: 400px; }
    .chat-messages { padding: 15px; }
    .chat-bubble { max-width: 85%; padding: 10px 14px; font-size: 0.9rem; }
    .chat-input { padding: 10px 15px; }
    .chat-input input { padding: 10px 12px; }
    
    .pricing-grid { grid-template-columns: 1fr; gap: 15px; }
    .pricing-card { padding: 25px 20px; }
    
    .footer { padding: 40px 0 20px; margin-top: 50px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; text-align: center; }
    
    .feature-card { padding: 20px 15px; }
    .features-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .news-grid { grid-template-columns: 1fr; gap: 15px; }
    .news-card { padding: 15px; }
    
    .calendar-grid { grid-template-columns: 1fr; }
    .event-card { padding: 15px; }
    
    .tips-grid { grid-template-columns: 1fr; }
    .tip-card { padding: 15px; }
    
    .profile-header { flex-direction: column; text-align: center; gap: 15px; }
    .profile-avatar { width: 80px; height: 80px; font-size: 2rem; }
    
    .payment-methods { flex-direction: column; gap: 15px; }
    .payment-option { padding: 20px 15px; }
    .qr-code img { max-width: 180px; }
    
    .analysis-card { padding: 20px 15px; }
    
    .referral-box { padding: 20px 15px; }
    .referral-link { font-size: 0.8rem; word-break: break-all; }
    
    .contact-float { bottom: 15px; left: 15px; }
    .contact-btn { width: 45px; height: 45px; font-size: 1.1rem; }
    .contact-main-btn { width: 50px; height: 50px; font-size: 1.2rem; }
    
    .consultation-widget { width: calc(100% - 20px); right: 10px; bottom: 70px; max-height: 70vh; }
    .consultation-toggle { width: 50px; height: 50px; bottom: 10px; right: 10px; }
    
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
    .flex-mobile-col { flex-direction: column !important; }
    .gap-mobile-sm { gap: 10px !important; }
    .text-mobile-center { text-align: center !important; }
    .text-mobile-sm { font-size: 0.9rem !important; }
    .p-mobile-sm { padding: 15px !important; }
    .m-mobile-0 { margin: 0 !important; }
    
    .theme-selector {
        top: auto;
        bottom: 70px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 10px; }
    .card { padding: 15px 12px; margin: 0; }
    .logo { font-size: 1.1rem; }
    .logo span { display: none; }
    .btn { padding: 10px 16px; font-size: 0.9rem; }
    .form-control { padding: 10px 12px; }
    .page-title { font-size: 1.2rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 12px 8px; }
    .stat-value { font-size: 1.1rem; }
    .stat-label { font-size: 0.7rem; }
    .calc-value { font-size: 1.5rem; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    
    .theme-selector-btn {
        width: 30px;
        height: 30px;
    }
}

/* ملاحظة تدوير الشاشة للموبايل */
.rotate-notice {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border-top: 2px solid var(--gold);
    padding: 12px 15px;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #ccc;
    text-align: center;
}
.rotate-notice i {
    color: var(--gold);
    font-size: 1.2rem;
    animation: rotatePhone 2s ease-in-out infinite;
}
@keyframes rotatePhone {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}
.rotate-notice button {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    padding: 0;
    line-height: 1;
}
.rotate-notice button:hover {
    color: #fff;
}

@media (max-width: 768px) and (orientation: portrait) {
    .rotate-notice {
        display: flex;
    }
    body {
        padding-bottom: 50px;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .sidebar { display: none !important; }
}

@media (orientation: landscape) and (max-width: 1024px) {
    .header {
        padding: 8px 0;
        height: 50px;
    }
    
    .dashboard {
        padding-top: 50px;
    }
    
    .sidebar {
        display: block !important;
        width: 160px;
        padding: 8px;
        top: 50px;
        height: calc(100vh - 50px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-nav li {
        margin-bottom: 2px;
    }
    
    .sidebar-nav a {
        padding: 6px 8px;
        font-size: 0.75rem;
        gap: 6px;
    }
    
    .sidebar-nav i { 
        width: 14px; 
        font-size: 0.7rem; 
    }
    
    .sidebar-nav .has-dropdown > .sidebar-link {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .sidebar-nav .dropdown-menu {
        padding: 4px;
    }
    
    .sidebar-nav .dropdown-menu a {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .main-content {
        margin-right: 160px;
        padding: 10px;
    }
    
    .page-title { 
        font-size: 1.1rem; 
        margin-bottom: 10px; 
    }
    
    .theme-selector {
        top: auto;
        bottom: 10px;
        left: 10px;
        flex-direction: row;
    }
    
    .theme-selector-btn {
        width: 30px;
        height: 30px;
    }
}

@media (orientation: landscape) and (max-height: 450px) {
    .header {
        padding: 5px 0;
        height: 40px;
    }
    
    .header .logo {
        font-size: 1rem;
    }
    
    .dashboard {
        padding-top: 40px;
    }
    
    .sidebar {
        width: 140px;
        padding: 5px;
        top: 40px;
        height: calc(100vh - 40px);
    }
    
    .sidebar-nav a {
        padding: 5px 6px;
        font-size: 0.7rem;
        gap: 5px;
    }
    
    .sidebar-nav i { 
        width: 12px; 
        font-size: 0.65rem; 
    }
    
    .main-content {
        margin-right: 140px;
        padding: 8px;
    }
    
    .page-title { 
        font-size: 1rem; 
        margin-bottom: 8px; 
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-icon {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}
/* ========================================
   Track The Gold - Theme Additions
   أضف هذا الكود لنهاية ملف style.css
   ======================================== */

/* ========== Royal Blue Mode ========== */
[data-theme="royal"],
html[data-theme="royal"],
body[data-theme="royal"] {
    --gold: #D4AF37;
    --gold-light: #FFD700;
    --gold-dark: #B8960C;
    --bg: #0d1b2a;
    --bg2: #1b263b;
    --card: #1b263b;
    --card-hover: #243447;
    --input: #243447;
    --text: #FFFFFF;
    --text2: #a0aec0;
    --text3: #718096;
    --border: rgba(212,175,55,0.15);
    --border-hover: rgba(212,175,55,0.3);
    --success: #48bb78;
    --error: #fc8181;
    --warning: #f6ad55;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(13,27,42,0.95);
}

/* ========== Emerald Mode ========== */
[data-theme="emerald"],
html[data-theme="emerald"],
body[data-theme="emerald"] {
    --gold: #10b981;
    --gold-light: #34d399;
    --gold-dark: #059669;
    --bg: #022c22;
    --bg2: #064e3b;
    --card: #064e3b;
    --card-hover: #065f46;
    --input: #065f46;
    --text: #FFFFFF;
    --text2: #a7f3d0;
    --text3: #6ee7b7;
    --border: rgba(16,185,129,0.15);
    --border-hover: rgba(16,185,129,0.3);
    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(2,44,34,0.95);
}

/* ========== Burgundy Mode ========== */
[data-theme="burgundy"],
html[data-theme="burgundy"],
body[data-theme="burgundy"] {
    --gold: #ec4899;
    --gold-light: #f472b6;
    --gold-dark: #db2777;
    --bg: #2d0a26;
    --bg2: #4a1942;
    --card: #4a1942;
    --card-hover: #5c2153;
    --input: #5c2153;
    --text: #FFFFFF;
    --text2: #fbcfe8;
    --text3: #f9a8d4;
    --border: rgba(236,72,153,0.15);
    --border-hover: rgba(236,72,153,0.3);
    --success: #4ade80;
    --error: #f87171;
    --warning: #fbbf24;
    --shadow: rgba(0,0,0,0.4);
    --header-bg: rgba(45,10,38,0.95);
}

/* ========== Theme Selector Buttons ========== */
.theme-selector {
    position: fixed !important;
    top: 85px !important;
    left: 20px !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

.theme-selector-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    border: 3px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

.theme-selector-btn:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

.theme-selector-btn.active {
    border-color: #fff !important;
    box-shadow: 0 0 15px rgba(255,255,255,0.5) !important;
}

.theme-selector-btn::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    opacity: 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
    transition: opacity 0.3s !important;
}

.theme-selector-btn.active::after {
    opacity: 1 !important;
}

/* Theme Button Colors */
.theme-selector-btn.dark {
    background: linear-gradient(135deg, #1a1a2a, #0a0a0f) !important;
}

.theme-selector-btn.light {
    background: linear-gradient(135deg, #ffffff, #e0e0e0) !important;
}

.theme-selector-btn.royal {
    background: linear-gradient(135deg, #1b263b, #0d1b2a) !important;
}

.theme-selector-btn.emerald {
    background: linear-gradient(135deg, #064e3b, #022c22) !important;
}

.theme-selector-btn.burgundy {
    background: linear-gradient(135deg, #4a1942, #2d0a26) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-selector {
        top: auto !important;
        bottom: 80px !important;
        left: 15px !important;
    }
    
    .theme-selector-btn {
        width: 35px !important;
        height: 35px !important;
        min-width: 35px !important;
        min-height: 35px !important;
    }
}

@media (max-width: 480px) {
    .theme-selector-btn {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }
}

/* ========================================
   Rotate Notice - رسالة قلب الشاشة
   ======================================== */
.rotate-notice {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(212,175,55,0.95), rgba(184,150,46,0.95));
    color: #000;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9998;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    align-items: center;
    gap: 10px;
    animation: slideUpNotice 0.5s ease-out;
    max-width: 90%;
    text-align: center;
}

.rotate-notice i {
    font-size: 1.2rem;
    animation: rotateIcon 2s ease-in-out infinite;
}

.rotate-notice button {
    background: rgba(0,0,0,0.2);
    border: none;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: -5px;
    transition: background 0.3s;
}

.rotate-notice button:hover {
    background: rgba(0,0,0,0.3);
}

@keyframes slideUpNotice {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes rotateIcon {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(0deg); }
}

/* إظهار فقط على الموبايل في الوضع العمودي */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .rotate-notice { display: flex; }
}

/* إخفاء في الوضع الأفقي */
@media screen and (orientation: landscape) {
    .rotate-notice { display: none !important; }
}


/* ===================================================
   iOS App Overrides — class .ios-app على الـ body
   =================================================== */
body.ios-app .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    align-items: center !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}
body.ios-app .nav::-webkit-scrollbar { display: none !important; }
body.ios-app .nav a {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
}
body.ios-app .nav .btn {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
}
body.ios-app .logo span { display: inline !important; }
body.ios-app .rotate-notice { display: none !important; }

/* ===== iOS App Fixes ===== */
body.ios-app .dashboard {
    padding-top: 50px !important;
}
body.ios-app .main-content {
    margin-right: 0 !important;
}
body.ios-app .header .nav {
    display: none !important;
}
body.ios-app .header {
    padding: 8px 0 !important;
}
body.ios-app .theme-selector {
    top: 58px !important;
}