:root {
    --navy-900: #0a1628;
    --navy-800: #0f2240;
    --navy-700: #1a365d;
    --navy-600: #234876;
    --gold-500: #c9a227;
    --gold-400: #dbb84d;
    --gold-300: #e8cc7a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --green-500: #10b981;
    --green-600: #059669;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-weight: 700; color: var(--navy-900); line-height: 1.2; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

img { max-width: 100%; height: auto; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 15px;
    border: 2px solid transparent; cursor: pointer; transition: var(--transition);
    font-family: inherit;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-primary {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: var(--navy-900); border-color: var(--gold-500);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-400), var(--gold-300)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-navy { background: var(--navy-700); color: var(--white); }
.btn-navy:hover { background: var(--navy-600); }
.btn-danger { background: var(--red-500); color: var(--white); }
.btn-block { width: 100%; }

/* Card type selector (withdraw) */
.card-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.card-type-option { cursor: pointer; }
.card-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.card-type-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-600);
    transition: var(--transition);
    background: var(--white);
}
.card-type-box i { font-size: 32px; }
.card-type-option input:checked + .card-type-box {
    border-color: var(--gold-500);
    background: rgba(201, 162, 39, 0.08);
    color: var(--navy-900);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.2);
}
.card-type-option:hover .card-type-box { border-color: var(--gold-400); }

.withdraw-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .withdraw-layout { grid-template-columns: 1fr; }
}

/* Admin panel */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.admin-stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}
.admin-stat-card i { font-size: 28px; color: var(--gold-500); margin-bottom: 12px; }
.admin-stat-card strong { display: block; font-size: 28px; color: var(--navy-900); margin-bottom: 4px; }
.admin-stat-card span { font-size: 13px; color: var(--gray-500); }
.nav-badge {
    background: var(--red-500);
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 50px;
    margin-left: auto;
}
.sidebar-nav a { position: relative; }
.admin-user-info {
    padding: 12px 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
}
.admin-inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Support chat */
.support-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    transition: var(--transition);
    font-size: 14px;
}
.ticket-item:hover, .ticket-item.active {
    border-color: var(--gold-400);
    background: rgba(201,162,39,0.06);
}
.ticket-item small { color: var(--gray-400); font-size: 12px; }
.chat-card { display: flex; flex-direction: column; min-height: 480px; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    max-height: 420px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-bubble {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.chat-user { align-self: flex-end; background: var(--navy-700); color: var(--white); border-bottom-right-radius: 4px; }
.chat-admin { align-self: flex-start; background: var(--white); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; }
.chat-meta { font-size: 11px; opacity: 0.7; margin-bottom: 6px; }
.chat-text { word-break: break-word; }
.chat-reply-form textarea { resize: vertical; min-height: 80px; }
.card-header a { color: var(--gold-500); font-size: 14px; font-weight: 600; }

@media (max-width: 1024px) {
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .support-layout { grid-template-columns: 1fr; }
}

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 22, 40, 0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(10, 22, 40, 0.98); box-shadow: var(--shadow-lg); }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 48px; height: 48px; background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--navy-900);
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--white); letter-spacing: 0.5px; }
.logo-tagline { font-size: 11px; color: var(--gold-400); text-transform: uppercase; letter-spacing: 1.5px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.85); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--gold-400); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--white); transition: var(--transition); }

/* Hero */
.hero {
    min-height: 100vh; display: flex; align-items: center; position: relative;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
    overflow: hidden; padding-top: 80px;
}
.hero::before {
    content: ''; position: absolute; top: 0; right: 0; width: 60%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-glow {
    position: absolute; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(201,162,39,0.15) 0%, transparent 70%);
    top: -200px; right: -100px; pointer-events: none;
}
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 60px 0; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(201,162,39,0.15);
    border: 1px solid rgba(201,162,39,0.3); padding: 8px 16px; border-radius: 50px;
    color: var(--gold-400); font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-family: 'Playfair Display', serif; font-size: 56px; color: var(--white); margin-bottom: 20px; line-height: 1.15; }
.hero h1 span { color: var(--gold-400); }
.hero p { font-size: 18px; color: rgba(255,255,255,0.75); margin-bottom: 36px; max-width: 520px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-stat strong { display: block; font-size: 28px; color: var(--gold-400); font-weight: 800; }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,0.6); }

.hero-card {
    background: rgba(255,255,255,0.05); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg);
    padding: 32px; position: relative;
}
.hero-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.hero-card-chip { width: 48px; height: 36px; background: linear-gradient(135deg, var(--gold-500), var(--gold-300)); border-radius: 6px; }
.hero-card-type { color: rgba(255,255,255,0.5); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.hero-card-number { font-size: 22px; color: var(--white); letter-spacing: 3px; margin-bottom: 20px; font-weight: 300; }
.hero-card-footer { display: flex; justify-content: space-between; }
.hero-card-footer div span { display: block; font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.hero-card-footer div strong { color: var(--white); font-size: 14px; }
.hero-card-balance { text-align: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-card-balance span { font-size: 13px; color: rgba(255,255,255,0.5); }
.hero-card-balance strong { display: block; font-size: 36px; color: var(--gold-400); font-weight: 800; margin-top: 4px; }

/* Section */
section { padding: 100px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-badge {
    display: inline-block; background: rgba(201,162,39,0.1); color: var(--gold-500);
    padding: 6px 16px; border-radius: 50px; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.section-header h2 { font-family: 'Playfair Display', serif; font-size: 40px; margin-bottom: 16px; }
.section-header p { color: var(--gray-500); font-size: 17px; }

/* Feature Cards */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 32px; text-align: center; transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); transform: scaleX(0); transition: var(--transition);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: transparent; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
    width: 64px; height: 64px; margin: 0 auto 20px; background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--gold-400);
}
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card p { color: var(--gray-500); font-size: 14px; line-height: 1.7; }

/* About */
.about-section { background: var(--gray-50); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); border-radius: var(--radius-lg);
    height: 480px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.about-image i { font-size: 120px; color: rgba(201,162,39,0.3); }
.about-cards { display: grid; gap: 20px; margin-top: 32px; }
.about-card {
    display: flex; gap: 16px; padding: 20px; background: var(--white);
    border-radius: var(--radius); border: 1px solid var(--gray-200);
}
.about-card-icon {
    width: 48px; height: 48px; min-width: 48px; background: rgba(201,162,39,0.1);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: var(--gold-500); font-size: 20px;
}
.about-card h4 { font-size: 16px; margin-bottom: 4px; }
.about-card p { font-size: 14px; color: var(--gray-500); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 36px;
    border: 1px solid var(--gray-200); transition: var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-xl); border-color: var(--gold-400); }
.service-card .feature-icon { margin: 0 0 20px; }
.service-card h3 { font-size: 20px; margin-bottom: 12px; }
.service-card p { color: var(--gray-500); font-size: 15px; margin-bottom: 20px; }
.service-card a { color: var(--gold-500); font-weight: 600; font-size: 14px; }
.service-card a i { margin-left: 6px; transition: var(--transition); }
.service-card a:hover i { transform: translateX(4px); }

/* Why Choose */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.why-card {
    display: flex; gap: 20px; padding: 32px; background: var(--white);
    border-radius: var(--radius-lg); border: 1px solid var(--gray-200);
}
.why-card .feature-icon { min-width: 64px; margin: 0; }
.why-card h3 { font-size: 18px; margin-bottom: 8px; }
.why-card p { color: var(--gray-500); font-size: 14px; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step-card { text-align: center; position: relative; padding: 32px 20px; }
.step-number {
    width: 56px; height: 56px; margin: 0 auto 20px; background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--gold-400); font-size: 22px; font-weight: 800;
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--gray-500); font-size: 14px; }

/* Stats Banner */
.stats-banner {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    padding: 80px 0; position: relative; overflow: hidden;
}
.stats-banner::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9a227' fill-opacity='0.05'%3E%3Cpath d='M20 20h20v20H20V20zm-20 0h20v20H0V20z'/%3E%3C/g%3E%3C/svg%3E");
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; z-index: 1; }
.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: 48px; font-weight: 800; color: var(--gold-400); line-height: 1; margin-bottom: 8px; }
.stat-item span { color: rgba(255,255,255,0.7); font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }

/* Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.testimonial-card {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 28px; transition: var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-lg); }
.testimonial-stars { color: var(--gold-500); margin-bottom: 16px; font-size: 14px; }
.testimonial-card p { color: var(--gray-600); font-size: 14px; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: var(--navy-700);
    display: flex; align-items: center; justify-content: center; color: var(--gold-400); font-weight: 700;
}
.testimonial-author strong { display: block; font-size: 14px; color: var(--navy-900); }
.testimonial-author span { font-size: 12px; color: var(--gray-400); }

/* FAQ */
.faq-section { background: var(--gray-50); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-question {
    width: 100%; padding: 20px 24px; background: none; border: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-family: inherit;
    font-size: 16px; font-weight: 600; color: var(--navy-900); text-align: left;
}
.faq-question i { color: var(--gold-500); transition: var(--transition); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 200px; }
.faq-answer p { padding: 0 24px 20px; color: var(--gray-500); font-size: 15px; }

/* Partners */
.partners-grid { display: flex; justify-content: center; align-items: center; gap: 48px; flex-wrap: wrap; opacity: 0.5; }
.partner-logo { font-size: 28px; font-weight: 800; color: var(--gray-400); letter-spacing: 1px; }

/* Footer */
.footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
.footer .logo-name { font-size: 18px; }
.footer-brand p { margin: 16px 0 24px; font-size: 14px; line-height: 1.7; }
.social-links { display: flex; gap: 12px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7);
}
.social-links a:hover { background: var(--gold-500); color: var(--navy-900); }
.footer-links h4, .footer-newsletter h4 { color: var(--white); font-size: 16px; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; }
.footer-links a:hover { color: var(--gold-400); }
.footer-newsletter p { font-size: 14px; margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
    flex: 1; padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: var(--white); font-family: inherit; font-size: 14px;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0;
    display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--gold-400); }

/* Auth Pages */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); padding: 40px 24px;
}
.auth-container { width: 100%; max-width: 480px; }
.auth-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 48px 40px;
    box-shadow: var(--shadow-xl);
}
.auth-header { text-align: center; margin-bottom: 36px; }
.auth-header .logo { justify-content: center; margin-bottom: 24px; }
.auth-header .logo-name { color: var(--navy-900); }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; }
.auth-header p { color: var(--gray-500); font-size: 15px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--gray-700); }
.form-control {
    width: 100%; padding: 14px 16px; border: 2px solid var(--gray-200); border-radius: 8px;
    font-size: 15px; font-family: inherit; transition: var(--transition); background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--gray-500); }
.form-footer a { color: var(--gold-500); font-weight: 600; }

/* Alerts */
.alert {
    padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* Dashboard Layout */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px; background: var(--navy-900); color: var(--white); position: fixed;
    top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; transition: var(--transition);
}
.sidebar-header { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-nav { padding: 16px 12px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px;
    color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500; margin-bottom: 4px;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(201,162,39,0.15); color: var(--gold-400); }
.sidebar-nav a i { width: 20px; text-align: center; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: auto; }

.dashboard-main { flex: 1; margin-left: 280px; background: var(--gray-50); min-height: 100vh; }
.dashboard-header {
    background: var(--white); padding: 20px 32px; border-bottom: 1px solid var(--gray-200);
    display: flex; justify-content: space-between; align-items: center;
}
.dashboard-header h1 { font-size: 24px; }
.dashboard-content { padding: 32px; }

/* Dashboard Cards */
.balance-card {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); border-radius: var(--radius-lg);
    padding: 36px; color: var(--white); margin-bottom: 32px; position: relative; overflow: hidden;
}
.balance-card::after {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(201,162,39,0.15), transparent 70%); border-radius: 50%;
}
.balance-label { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.balance-amount { font-size: 42px; font-weight: 800; color: var(--gold-400); margin-bottom: 16px; }
.balance-meta { display: flex; gap: 32px; font-size: 14px; color: rgba(255,255,255,0.7); }
.balance-meta strong { color: var(--white); }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.quick-action {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
    padding: 24px; text-align: center; transition: var(--transition); cursor: pointer;
}
.quick-action:hover { border-color: var(--gold-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick-action i { font-size: 28px; color: var(--navy-700); margin-bottom: 12px; display: block; }
.quick-action span { font-size: 14px; font-weight: 600; color: var(--gray-700); }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-size: 18px; }

/* Transactions Table */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-400); border-bottom: 2px solid var(--gray-100); }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-pending { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.tx-credit { color: var(--green-600); font-weight: 600; }
.tx-debit { color: var(--red-500); font-weight: 600; }

/* Plans Grid */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plan-card {
    background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
    padding: 32px; transition: var(--transition); position: relative;
}
.plan-card.featured { border-color: var(--gold-500); }
.plan-card.featured::before {
    content: 'Popular'; position: absolute; top: -12px; right: 24px;
    background: var(--gold-500); color: var(--navy-900); padding: 4px 16px;
    border-radius: 50px; font-size: 12px; font-weight: 700;
}
.plan-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.plan-rate { font-size: 36px; font-weight: 800; color: var(--navy-700); }
.plan-rate span { font-size: 16px; font-weight: 500; color: var(--gray-400); }
.plan-card h3 { font-size: 20px; margin: 12px 0; }
.plan-features { list-style: none; margin: 20px 0; }
.plan-features li { padding: 8px 0; font-size: 14px; color: var(--gray-600); display: flex; align-items: center; gap: 8px; }
.plan-features li i { color: var(--green-500); }

/* OTP Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 2000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px;
    max-width: 420px; width: 90%; text-align: center;
}
.modal h3 { font-size: 22px; margin-bottom: 8px; }
.modal p { color: var(--gray-500); margin-bottom: 24px; font-size: 14px; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.otp-inputs input {
    width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 700;
    border: 2px solid var(--gray-200); border-radius: 8px; font-family: inherit;
}
.otp-inputs input:focus { border-color: var(--gold-500); outline: none; }

/* Responsive */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin: 0 auto 36px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-card { max-width: 420px; margin: 0 auto; }
    .features-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Page layout grids (replaces inline styles) */
.page-grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.page-grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: start; }
.page-grid-stack { display: grid; gap: 16px; }
.page-grid-stack-lg { display: grid; gap: 24px; max-width: 700px; }
@media (max-width: 900px) {
    .page-grid-2-1, .page-grid-1-2 { grid-template-columns: 1fr; }
}

/* Dashboard mobile topbar */
.dashboard-header-text { flex: 1; min-width: 0; }
.dashboard-subtitle { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.dashboard-header--compact {
    background: transparent;
    border-bottom: none;
    padding: 12px 16px 0;
    min-height: 0;
    justify-content: flex-end;
}
.dashboard-header--compact .sidebar-toggle-btn { margin-left: auto; }

.sidebar-toggle-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--navy-700);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--transition);
}
.sidebar-toggle-btn:hover { background: var(--navy-600); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }
body.sidebar-open { overflow: hidden; }

@media (max-width: 768px) {
    /* Mobile nav handled in responsive.css */
    .hero h1 { font-size: 36px; }
    .features-grid, .services-grid, .steps-grid, .why-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .card-type-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .sidebar {
        transform: translateX(-100%);
        z-index: 1100;
        box-shadow: var(--shadow-xl);
    }
    .sidebar.active { transform: translateX(0); }
    .sidebar-toggle-btn { display: flex; }
    .dashboard-main { margin-left: 0; }
    .dashboard-content { padding: 16px; }
    .dashboard-header { padding: 16px; gap: 12px; }
    .dashboard-header h1 { font-size: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .container { padding: 0 16px; }
    section { padding: 60px 0; }
    .balance-card { padding: 24px; }
    .balance-amount { font-size: 32px; }
    .balance-meta { flex-direction: column; gap: 8px; }
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .admin-stat-card { padding: 16px; }
    .admin-stat-card strong { font-size: 22px; }
    .admin-inline-form { flex-direction: column; align-items: stretch; }
    .auth-page { padding: 24px 16px; }
    .auth-card { padding: 32px 24px; }
    .card { padding: 16px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    th, td { padding: 10px 12px; font-size: 13px; }
    .modal { padding: 24px; margin: 16px; }
    .otp-inputs { gap: 6px; }
    .otp-inputs input { width: 42px; height: 50px; font-size: 20px; }
    .nav-container { height: 64px; }
    .nav-links { top: 64px; }
    .section-header h2 { font-size: 28px; }
    .section-header { margin-bottom: 40px; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero h1 { font-size: 28px; }
    .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item strong { font-size: 36px; }
    .admin-stats-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .quick-action { padding: 16px; }
    .balance-amount { font-size: 28px; }
    .newsletter-form { flex-direction: column; }
    .btn-lg { padding: 14px 24px; font-size: 15px; }
    .dashboard-header--compact { padding: 8px 12px 0; }
    .support-page-header { padding: 20px 16px; border-radius: 16px; }
    .support-page-header h1 { font-size: 18px; }
    .chat-panel-header { flex-direction: column; align-items: flex-start !important; }
    .chat-bubble-premium { max-width: 92%; }
    .chat-bubble { max-width: 92%; }
    .footer-legal { flex-direction: column; gap: 8px; }
    .table-responsive { -webkit-overflow-scrolling: touch; }
    table { min-width: 520px; }
}

/* Support chat — sender vs receiver colors (admin + customer) */
.chat-messages-premium {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chat-bubble-premium { max-width: 75%; }
.chat-bubble-premium.mine { align-self: flex-end; }
.chat-bubble-premium.theirs { align-self: flex-start; }
.chat-bubble-premium.mine .chat-bubble-inner {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #ffffff;
    border: 2px solid #60a5fa;
    border-bottom-right-radius: 6px;
}
.chat-bubble-premium.theirs.admin-msg .chat-bubble-inner {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 2px solid #34d399;
    border-bottom-left-radius: 6px;
}
.chat-bubble-premium.theirs.customer-msg .chat-bubble-inner {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    color: #9f1239;
    border: 2px solid #fb7185;
    border-bottom-left-radius: 6px;
}
