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

:root {
    --bg-dark: #020420;
    --bg-card: #0b1121; /* Légèrement plus clair que le fond */
    --primary: #00dc82;
    --primary-glow: rgba(0, 220, 130, 0.4);
    --accent: #3b82f6;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html, body {
    width: 100%; overflow-x: hidden;
    background-color: var(--bg-dark); color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.6;
}

/* --- GLOBAL UTILS --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- BACKGROUNDS --- */
.aurora-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: -1; pointer-events: none;
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.blob-1 { top: -10%; left: -10%; width: 300px; height: 300px; background: radial-gradient(#1a2c5b, transparent 70%); }
.blob-2 { bottom: -10%; right: -10%; width: 300px; height: 300px; background: radial-gradient(#064e3b, transparent 70%); }

/* --- LANDING STYLES (Conservés pour la cohérence) --- */
nav {
    position: fixed; top: 0; width: 100%; z-index: 1000; padding: 15px 0;
    backdrop-filter: blur(12px); background: rgba(2, 4, 32, 0.85);
    border-bottom: 1px solid var(--glass-border);
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: white; }
.btn-glow {
    background: var(--primary); color: #000; padding: 10px 24px; border-radius: 50px;
    font-weight: 700; font-size: 0.9rem; box-shadow: 0 0 15px var(--primary-glow);
}
.hamburger { display: none; font-size: 1.5rem; color: white; cursor: pointer; }

/* Hero Specifics */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; padding-bottom: 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; width: 100%; }
h1 { font-size: 3.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
.text-gradient { background: linear-gradient(135deg, #fff, var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; }

/* Phone 3D */
.phone-container { perspective: 1000px; display: flex; justify-content: center; }
.glass-phone {
    width: 300px; height: 580px; background: rgba(15, 23, 42, 0.6);
    border-radius: 40px; border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px); transform: rotateY(-15deg) rotateX(5deg);
    transition: 0.5s; overflow: hidden; position: relative; box-shadow: 20px 20px 50px rgba(0,0,0,0.5);
}
.glass-phone:hover { transform: rotateY(0deg) rotateX(0deg); }
.phone-ui { padding: 20px; height: 100%; display: flex; flex-direction: column; }
.ui-card {
    background: rgba(255,255,255,0.05); padding: 12px; border-radius: 12px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px; border: 1px solid var(--glass-border);
}
.ui-card.active { border-color: var(--primary); background: rgba(0, 220, 130, 0.1); }

/* Landing Sections */
.section-padding { padding: 80px 0; }
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card { background: var(--glass); border: 1px solid var(--glass-border); padding: 30px; border-radius: 20px; }
.icon-box { width: 45px; height: 45px; background: rgba(255,255,255,0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--primary); margin-bottom: 20px; }
footer { border-top: 1px solid var(--glass-border); padding: 60px 0 30px; margin-top: 60px; font-size: 0.9rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; }

/* =========================================
   AUTH PAGES (LOGIN / REGISTER)
   ========================================= */
.auth-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-card {
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); padding: 40px; border-radius: 24px;
    width: 100%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 1.8rem; margin-bottom: 10px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.form-input {
    width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border); border-radius: 12px;
    color: white; font-size: 1rem; transition: 0.3s;
}
.form-input:focus { outline: none; border-color: var(--primary); background: rgba(0, 220, 130, 0.05); }
.btn-block { width: 100%; display: block; text-align: center; cursor: pointer; border: none; }

/* =========================================
   DASHBOARD STYLES
   ========================================= */
.dash-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px; background: var(--bg-card); border-right: 1px solid var(--glass-border);
    padding: 30px 20px; display: flex; flex-direction: column;
    position: fixed; height: 100%; z-index: 900; transition: 0.3s ease;
}
.sidebar-nav { margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.dash-link {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-radius: 12px; color: var(--text-muted); font-weight: 500; transition: 0.2s;
}
.dash-link:hover { background: rgba(255,255,255,0.05); color: white; }
.dash-link.active { background: rgba(0, 220, 130, 0.1); color: var(--primary); border: 1px solid rgba(0, 220, 130, 0.2); }

/* Main Content */
.main-content { flex: 1; margin-left: 260px; padding: 30px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.user-info { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: black; font-weight: bold; }

/* Cards */
.grid-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 30px; }
.dash-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    padding: 24px; border-radius: 20px;
}
.balance-card {
    background: linear-gradient(135deg, rgba(0,220,130,0.1), rgba(0,0,0,0));
    border-color: rgba(0,220,130,0.3); position: relative; overflow: hidden;
}
.balance-amount { font-size: 2.5rem; font-weight: 800; color: white; margin: 10px 0; }

/* Table */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; padding: 15px; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; border-bottom: 1px solid var(--glass-border); }
td { padding: 15px; border-bottom: 1px solid var(--glass-border); font-size: 0.9rem; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-success { background: rgba(0,220,130,0.1); color: var(--primary); border: 1px solid rgba(0,220,130,0.2); }
.badge-pending { background: rgba(245,158,11,0.1); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--glass-border); border-radius: 16px; padding: 30px;
    text-align: center; cursor: pointer; transition: 0.3s; background: rgba(255,255,255,0.02);
}
.upload-zone:hover { border-color: var(--primary); background: rgba(0,220,130,0.05); }

/* Mobile Toggle */
.menu-toggle { display: none; font-size: 1.5rem; color: white; cursor: pointer; }

/* =========================================
   RESPONSIVE (Landing & Dash)
   ========================================= */
@media (max-width: 900px) {
    /* Landing */
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .phone-container { perspective: none; }
    .glass-phone { transform: none !important; width: 100%; max-width: 280px; height: 500px; margin: 0 auto; }
    .hamburger { display: block; z-index: 1002; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: rgba(2, 4, 32, 0.98); flex-direction: column; justify-content: center;
        border-left: 1px solid var(--glass-border); transition: 0.3s ease;
    }
    .nav-links.active { right: 0; }

    /* Dashboard */
    .sidebar { transform: translateX(-100%); width: 280px; box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 20px; }
    .menu-toggle { display: block; margin-right: 15px; }
    .dash-header { justify-content: flex-start; }
}