/* ====================================================
   ApnaDholera.in — Main Stylesheet
   Color Palette: Navy #0B1F3A | Gold #C9A84C | White #FFF
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --navy: #0B1F3A;
    --navy-light: #1a3a6b;
    --gold: #C9A84C;
    --gold-light: #e8c96e;
    --white: #ffffff;
    --bg: #f4f6fb;
    --sidebar-w: 260px;
    --border: #e8edf5;
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #2980b9;
    --shadow: 0 4px 24px rgba(11, 31, 58, 0.08);
    --shadow-lg: 0 8px 40px rgba(11, 31, 58, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.6;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--navy); }
.display-title { font-size: 2.5rem; font-weight: 700; }

/* ── BUTTONS ── */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(201, 168, 76, 0.35);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.5);
    color: var(--white);
}
.btn-navy {
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-navy:hover { background: var(--navy-light); color: var(--white); transform: translateY(-1px); }
.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    background: transparent;
    border-radius: var(--radius-sm);
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-gold:hover { background: var(--gold); color: white; }

/* ── CARDS ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.card-stat, .stat-card {
    padding: 24px;
    border-radius: var(--radius);
    border: none;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-stat:hover, .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.card-stat::before, .stat-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.12;
    background: white;
}
.card-stat .stat-icon, .stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 14px;
    color: #ffffff;
}
.card-stat .stat-value, .stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.2;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
}
.card-stat .stat-label, .stat-card .stat-label { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; }

.stat-navy { background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; }
.stat-gold { background: linear-gradient(135deg, #C9A84C, #b8933b); color: #fff; }
.stat-success { background: linear-gradient(135deg, #27ae60, #1e8449); color: #fff; }
.stat-info { background: linear-gradient(135deg, #2980b9, #1a5276); color: #fff; }
.stat-warning { background: linear-gradient(135deg, #f39c12, #d68910); color: #fff; }
.stat-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; }

/* ── COLOR UTILITIES ── */
.text-navy { color: var(--navy) !important; }
.bg-navy { background-color: var(--navy) !important; color: #ffffff !important; }
.text-gold { color: var(--gold) !important; }
.bg-gold { background-color: var(--gold) !important; color: var(--navy) !important; }
.border-gold { border-color: var(--gold) !important; }
.border-navy { border-color: var(--navy) !important; }
.btn-outline-navy {
    border: 1.5px solid var(--navy);
    color: var(--navy);
    background: transparent;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-outline-navy:hover {
    background: var(--navy);
    color: #ffffff;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}
.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand h4 {
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin: 0;
}
.sidebar-brand small { color: rgba(255,255,255,0.4); font-size: 11px; }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section-title {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 20px 8px;
    font-weight: 600;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    gap: 12px;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: white;
    background: rgba(255,255,255,0.06);
    border-left-color: var(--gold);
}
.sidebar-nav a .nav-icon { width: 20px; text-align: center; font-size: 16px; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    text-decoration: none;
}

/* ── TOPBAR ── */
.topbar {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(11,31,58,0.04);
}
.topbar-title { font-size: 18px; font-weight: 600; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }

.notification-bell {
    position: relative;
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    transition: all 0.2s;
}
.notification-bell:hover { background: var(--navy); color: white; }
.notification-badge {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.page-content { padding: 28px; flex: 1; }

/* ── KYC STATUS BADGE ── */
.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.kyc-verified { background: #d5f5e3; color: #1e8449; }
.kyc-pending { background: #fef9e7; color: #b7950b; }
.kyc-rejected { background: #fde8e7; color: #c0392b; }
.kyc-none { background: #eaecee; color: #7f8c8d; }

/* ── REFERRAL BOX ── */
.referral-box {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: var(--radius);
    padding: 24px;
    color: white;
}
.referral-code-display {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 6px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* ── FORMS ── */
.form-label { font-weight: 500; color: var(--text); margin-bottom: 6px; font-size: 14px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
    outline: none;
}
.form-text { font-size: 12px; color: var(--text-muted); }

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbff;
}
.file-upload-area:hover { border-color: var(--gold); background: #fffdf5; }
.file-upload-area .upload-icon { font-size: 36px; color: var(--gold); margin-bottom: 8px; }

/* ── STEP WIZARD ── */
.wizard-steps {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
}
.wizard-step {
    flex: 1;
    text-align: center;
    position: relative;
}
.wizard-step::after {
    content: '';
    position: absolute;
    top: 20px; left: 60%;
    width: 80%;
    height: 2px;
    background: var(--border);
}
.wizard-step:last-child::after { display: none; }
.wizard-step.active::after { background: var(--gold); }
.wizard-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.wizard-step.active .wizard-dot {
    border-color: var(--gold);
    background: var(--gold);
    color: white;
}
.wizard-step.completed .wizard-dot {
    border-color: var(--success);
    background: var(--success);
    color: white;
}
.wizard-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.wizard-step.active .wizard-label { color: var(--gold); }

/* ── TABLES ── */
.table { font-size: 14px; }
.table thead th {
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
    border: none;
    padding: 12px 16px;
}
.table td { padding: 12px 16px; vertical-align: middle; border-color: var(--border); }
.table-hover tbody tr:hover { background: #f8fbff; }

/* ── BADGES ── */
.badge-pill { border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; }

/* ── PUBLIC LAYOUT (Landing/Auth) ── */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 480px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h2 { color: var(--gold); font-family: 'Playfair Display', serif; font-size: 28px; }
.auth-logo p { color: var(--text-muted); font-size: 14px; }

/* ── ALERT / TOAST ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.alert-custom {
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow);
    font-size: 14px;
    padding: 14px 20px;
}

/* ── COMMISSION CARD ── */
.commission-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}
.commission-item:hover { background: #f8fbff; }
.commission-item:last-child { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-content { padding: 16px; }
    .auth-card { padding: 28px 20px; }
    .topbar { padding: 0 16px; }
}

/* ── ADMIN SPECIFIC ── */
.admin-sidebar { background: linear-gradient(180deg, #0a1628 0%, #0B1F3A 100%); }
.admin-sidebar .sidebar-brand h4 { color: var(--gold); }
.admin-badge {
    background: var(--gold);
    color: var(--navy);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: auto;
}

/* ── PREMIUM MODERN DASHBOARD STYLES ── */
.dashboard-hero {
    background: linear-gradient(135deg, #071224 0%, #0B1F3A 55%, #163660 100%);
    border-radius: 18px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    border: 1px solid rgba(201, 168, 76, 0.25);
    box-shadow: 0 10px 30px rgba(11, 31, 58, 0.2);
}
.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.18) 0%, rgba(201, 168, 76, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9A84C, #e8c96e);
    color: #0B1F3A;
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.2);
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-tag.gold {
    background: rgba(201, 168, 76, 0.18);
    color: #f7df94;
    border-color: rgba(201, 168, 76, 0.4);
}

.stat-card-pro {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(11, 31, 58, 0.08);
    box-shadow: 0 4px 18px rgba(11, 31, 58, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.stat-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 31, 58, 0.1);
    border-color: rgba(201, 168, 76, 0.3);
}
.stat-card-pro .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.stat-card-pro .icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.stat-card-pro .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif;
}
.stat-card-pro .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.stat-card-pro .stat-subtext {
    font-size: 0.78rem;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.referral-vip-card {
    background: linear-gradient(135deg, #091a32 0%, #10284d 100%);
    border-radius: 18px;
    border: 1px solid rgba(201, 168, 76, 0.35);
    box-shadow: 0 8px 30px rgba(11, 31, 58, 0.15);
    padding: 26px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.referral-vip-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -20px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
    pointer-events: none;
}
.referral-link-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(201, 168, 76, 0.5);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    text-decoration: none;
}
.btn-whatsapp:hover {
    background-color: #1ebd5a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.plot-card-modern {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(11, 31, 58, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}
.plot-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(11, 31, 58, 0.09);
    border-color: rgba(201, 168, 76, 0.4);
}

.action-card-pro {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(11, 31, 58, 0.07);
    padding: 18px 14px;
    text-align: center;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    height: 100%;
}
.action-card-pro:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(201, 168, 76, 0.2);
    background: #fffdf7;
}
.action-card-pro .action-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}
.action-card-pro:hover .action-icon {
    transform: scale(1.1);
}

.progress-step-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.progress-step-item {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}
.progress-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.progress-step-icon.done {
    background: #27ae60;
    color: #fff;
}
.progress-step-icon.current {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.25);
}
.progress-step-icon.waiting {
    background: #e9ecef;
    color: #6c757d;
}