/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --card-bg: #ffffff;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg: #0f172a;
    --white: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --card-bg: #1e293b;
}

body {
    margin: 0;
    background-color: var(--bg);
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    transition: background 0.3s, color 0.3s;
}

/* --- AUTH LAYOUT (Login/Register) --- */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    background: var(--white);
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    display: flex;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px;
}

.auth-banner {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
}

.auth-banner h1 { font-size: 42px; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.auth-form-section { flex: 1.2; padding: 60px; display: flex; flex-direction: column; justify-content: center; background: var(--white); }

/* --- DASHBOARD & TOP NAV --- */
.top-nav {
    background: var(--white);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dashboard-wrapper { display: flex; min-height: calc(100vh - 70px); }

.sidebar { 
    width: 260px; 
    background: var(--white); 
    border-right: 1px solid var(--border); 
    padding: 20px; 
    transition: 0.3s;
}

.main-content { flex: 1; padding: 30px; }

.nav-link { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 12px 15px; 
    text-decoration: none; 
    color: var(--text-muted); 
    border-radius: 12px; 
    font-weight: 500;
    margin-bottom: 5px;
}

.nav-link.active, .nav-link:hover { background: rgba(79, 70, 229, 0.1); color: var(--brand); }

/* --- SERVICE GRID & PREMIUM CARDS --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.service-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-head {
    padding: 35px 20px;
    text-align: center;
    color: white;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-head i {
    font-size: 35px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.2);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.card-head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.card-head p { margin: 8px 0 0; font-size: 13px; opacity: 0.8; }

.card-foot {
    padding: 20px;
    display: flex;
    gap: 12px;
    background: var(--white);
}

.s-btn {
    flex: 1;
    padding: 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    transition: 0.3s;
}

/* --- STAT CARDS (Top Bar) --- */
.stat-card { 
    background: var(--card-bg); 
    padding: 25px; 
    border-radius: 20px; 
    border: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* --- COLORS & GRADIENTS --- */
.bg-blue { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.bg-dark-blue { background: linear-gradient(135deg, #0f172a 0%, #334155 100%); }
.bg-purple { background: linear-gradient(135deg, #581c87 0%, #a855f7 100%); }
.bg-indigo { background: linear-gradient(135deg, #312e81 0%, #6366f1 100%); }
.bg-teal { background: linear-gradient(135deg, #134e4a 0%, #14b8a6 100%); }
.bg-coming { background: #e2e8f0; color: #64748b !important; }

.badge-soon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 10;
}

/* QR Modal Styles */
.qr-modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.qr-content {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

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

.main-content { animation: fadeInUp 0.6s ease-out; }

/* Responsive */
@media (max-width: 900px) {
    .auth-banner { display: none; }
    .auth-container { max-width: 450px; }
    .sidebar { position: fixed; left: -260px; z-index: 1001; height: 100%; }
}


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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* --- FULL SCREEN CENTERING --- */
.auth-layout {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    width: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%); /* Deep Navy Gradient */
    padding: 20px;
}

/* --- MAIN CARD (NEW.jpg Style) --- */
.auth-container {
    display: flex;
    width: 100%;
    max-width: 1050px;
    min-height: 600px;
    background: #0b0e14; /* Solid Dark Gray-Black */
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- LEFT BANNER (Glass-Purple Gradient) --- */
.auth-banner {
    flex: 1;
    background: linear-gradient(165deg, #6366f1 0%, #4338ca 100%);
    padding: 60px 50px;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-banner h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.auth-banner p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Floating Icon Background */
.print-icon-bg {
    position: absolute;
    bottom: -30px;
    left: 20px;
    font-size: 150px;
    opacity: 0.08;
    color: #fff;
}

/* --- RIGHT FORM SECTION --- */
.auth-form-section {
    flex: 1.3;
    padding: 60px;
    background: #0f1218;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-section h2 {
    color: #ffffff !important;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-form-section p {
    color: #64748b !important;
    margin-bottom: 35px;
}

/* --- INPUTS & LABELS --- */
.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    color: #94a3b8 !important;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #818cf8;
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 18px 16px 50px !important;
    background: #1a1f26 !important;
    border: 1px solid #2d333b !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: #6366f1 !important;
    background: #22272e !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* --- BUTTONS (Login & Register Same Style) --- */
.login-btn, .reg-btn {
    width: 100%;
    padding: 16px !important;
    background: #4f46e5 !important;
    background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

.login-btn:hover, .reg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(79, 70, 229, 0.5);
    filter: brightness(1.1);
}

/* --- BOTTOM TEXT --- */
.switch-auth {
    margin-top: 30px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.switch-auth a {
    color: #818cf8 !important;
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
}

/* --- MOBILE VIEW --- */
@media (max-width: 850px) {
    .auth-container {
        flex-direction: column;
        max-width: 450px;
    }
    .auth-banner {
        padding: 40px 30px;
        text-align: center;
    }
    .print-icon-bg { display: none; }
    .auth-form-section { padding: 40px 25px; }
}

/* --- SIDEBAR BASE STYLING --- */
.sidebar {
    width: 260px;
    background: var(--bg-card); /* Header.php se variable pick karega */
    border-right: 1px solid var(--border);
    height: calc(100vh - 70px); /* Top nav ke niche ka area */
    position: sticky;
    top: 70px;
    padding: 20px 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

/* Sidebar Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Active & Hover States */
.nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
    color: var(--brand);
}

.nav-link.active {
    background: var(--brand); /* Premium Indigo/Blue */
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

/* --- MOBILE RESPONSIVENESS (The Main Fix) --- */
@media (max-width: 768px) {
    /* Menu Button ko mobile me dikhayen */
    .menu-toggle {
        display: block !important;
    }

    /* Sidebar ko screen se bahar bhejein */
    .sidebar {
        position: fixed;
        left: -280px; /* Hidden by default */
        top: 0;
        height: 100vh;
        width: 260px;
        box-shadow: 20px 0 50px rgba(0,0,0,0.2);
        z-index: 2000;
    }

    /* Jab JS se 'active' class add ho */
    .sidebar.active {
        left: 0;
    }

    /* Overlay Background */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1500;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Mobile par Main Content ko poori jagah dein */
    .main-content {
        padding: 20px !important;
    }
}

/* Desktop par Menu Toggle chhupayein */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}

/* --- THEME SPECIFIC COLORS (Variables) --- */
[data-theme="dark"] {
    --bg-card: #151921;
    --border: #2d333b;
    --text-muted: #94a3b8;
    --brand: #6366f1;
}

[data-theme="light"] {
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-muted: #64748b;
    --brand: #4f46e5;
}

/* Balance Transfer Page Styles */
.transfer-box { 
    max-width: 500px; 
    margin: 40px auto; 
    background: var(--bg-card); 
    padding: 25px; 
    border-radius: 15px; 
    border: 1px solid var(--border); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
}

.search-group { 
    margin-bottom: 20px; 
    position: relative; 
}

.search-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 13px; 
    color: var(--text-muted); 
}

.search-input { 
    width: 100%; 
    padding: 12px; 
    border-radius: 10px; 
    border: 1px solid var(--border); 
    background: rgba(255,255,255,0.05); 
    color: var(--text-light); 
    outline: none; 
    box-sizing: border-box;
}

.result-card { 
    background: var(--brand); 
    color: white; 
    padding: 15px; 
    border-radius: 10px; 
    cursor: pointer; 
    display: none; 
    margin-bottom: 20px; 
    transition: 0.3s; 
}

.result-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4); 
}

.transfer-form { 
    display: none; 
    animation: fadeIn 0.4s ease; 
}

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

.input-field { 
    width: 100%; 
    padding: 12px; 
    margin-top: 10px; 
    border-radius: 8px; 
    border: 1px solid var(--border); 
    background: var(--bg-body); 
    color: var(--text-light); 
    box-sizing: border-box;
}

.btn-submit { 
    width: 100%; 
    padding: 15px; 
    background: var(--brand); 
    border: none; 
    color: white; 
    border-radius: 10px; 
    margin-top: 20px; 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 16px; 
}

.current-bal-box {
    background: rgba(255,255,255,0.02); 
    padding: 15px; 
    border-radius: 10px; 
    margin-bottom: 15px;
}

.current-bal-text { 
    font-size: 14px; 
    color: #10b981; 
    font-weight: bold; 
}