@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #060913;               /* Deep space blue/black */
  --bg2: #0B1120;              /* Sleek dark slate blue */
  --card: #121A2E;             /* High-tech cockpit dark card */
  --card2: #1B2644;            /* Secondary active card */
  --border: #1E2D4A;           /* Cyber steel blue border */
  --fg: #F1F5F9;
  --muted: #64748B;            /* Muted cool gray */
  --accent: #00F2FE;           /* Bright neon cyber cyan */
  --accent2: #059669;          /* Sub-teal accent */
  --accent-glow: rgba(0, 242, 254, 0.12); /* Vibrant neon cyan glow */
  --gold: #FFB800;             /* Futuristic neon orange-yellow */
  --gold2: #D97706;
  --danger: #FF3B30;
  --success: #34C759;
  --info: #007AFF;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { 
  font-family:'DM Sans', sans-serif; 
  background: radial-gradient(circle at 50% 0%, #0c1735 0%, #060913 70%); 
  color:var(--fg); 
  overflow-x:hidden; 
}
h1,h2,h3,h4,h5 { font-family:'Outfit', sans-serif; letter-spacing: -0.02em; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Background Pattern (Futuristic Cyber Grid) */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(0, 242, 254, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 254, 0.025) 1px, transparent 1px);
  background-size: 36px 30px;
  background-attachment: fixed;
}

/* General Styling & Variables */
:root {
    --primary-blue: #3b82f6;
    --secondary-cyan: #14B8A6;
    --accent-purple: #8b5cf6;
    --bg-start: #0f172a;
    --bg-end: #1e3a8a;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
}

#loginPage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    overflow: hidden;
    position: relative;
}

/* Animated Background Shapes */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    list-style: none;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    animation: float 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.shape1 { width: 80px; height: 80px; left: 25%; animation-duration: 20s; animation-delay: 0s; }
.shape2 { width: 20px; height: 20px; left: 10%; animation-duration: 12s; animation-delay: 2s; }
.shape3 { width: 50px; height: 50px; left: 70%; animation-duration: 18s; animation-delay: 4s; }
.shape4 { width: 120px; height: 120px; left: 45%; animation-duration: 22s; animation-delay: 0s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

/* Main Content Layout */
.login-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    align-items: center;
}

.fade-in {
    animation: fadeInAnimation 0.8s ease-in-out forwards;
}

@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section (Left) */
.hero-section {
    color: var(--text-light);
}

.hero-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-subheadline {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 90%;
}

.hero-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    border-left: 3px solid var(--secondary-cyan);
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.hero-taglines {
    display: flex;
    gap: 2rem;
}

.tagline-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.tagline-item i {
    color: var(--secondary-cyan);
}

/* Login Card (Right) */
.login-card-wrapper {
    display: flex;
    justify-content: center;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
}

.login-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
}

.login-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i.fa-user,
.input-wrapper i.fa-lock {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#loginEmail, #loginPass {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#loginEmail::placeholder, #loginPass::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

#loginEmail:focus, #loginPass:focus {
    outline: none;
    border-color: var(--secondary-cyan);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3);
}

.pass-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pass-toggle:hover {
    color: var(--text-light);
}

.login-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.forgot-password {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--secondary-cyan);
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 12px;
    background: var(--secondary-cyan);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 1.5rem;
}

.login-button:hover {
    background: #10a38e;
    transform: translateY(-2px);
}

.login-button:active {
    transform: translateY(0);
}

/* Demo Accounts */
.demo-accounts {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-muted);
}
.demo-accounts p {
    margin-bottom: 0.75rem;
}
.demo-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.demo-buttons button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color 0.3s;
}
.demo-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-section {
        margin-bottom: 3rem;
    }
    .hero-subheadline, .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-taglines {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-headline {
        font-size: 2.2rem;
    }
    .login-card {
        padding: 2rem 1.5rem;
    }
    .hero-taglines {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* Logo styling */
.logo-img { height: 52px; width: auto; object-fit: contain; display: block; }
.logo-img-sm { height: 34px; width: auto; object-fit: contain; display: block; }
.logo-container { display: flex; align-items: center; justify-content: center; }
.logo-container-sm { display: flex; align-items: center; }

/* Sidebar & Layout */
.sidebar { width:260px; min-height:100vh; background:var(--bg2); border-right:1px solid var(--border); position:fixed; left:0; top:0; z-index:40; display:flex; flex-direction:column; transition: transform 0.3s; }
.sidebar.collapsed { transform: translateX(-260px); }
.main-content { margin-left:260px; min-height:100vh; transition: margin-left 0.3s; }
.main-content.expanded { margin-left:0; }

.sidebar-link { display:flex; align-items:center; gap:12px; padding:12px 20px; color:var(--muted); text-decoration:none; border-radius:10px; margin:4px 12px; cursor:pointer; transition:0.2s; font-size:14px; }
.sidebar-link:hover { background:var(--card); color:var(--fg); }
.sidebar-link.active { background:var(--accent-glow); color:var(--accent); font-weight:600; }

.topbar { height:64px; background:rgba(11,17,32,0.8); backdrop-filter:blur(16px); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 24px; position:sticky; top:0; z-index:30; }

/* Dashboard Elements */
.card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:24px; transition:0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.card:hover { border-color: rgba(0, 242, 254, 0.3); transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(0, 242, 254, 0.15); }

.text-muted { color: var(--muted); }

.input { width:100%; padding:12px 16px; background:var(--bg); border:1px solid var(--border); border-radius:10px; color:var(--fg); outline:none; transition:0.2s; font-size:14px; }
.input:focus { border-color:var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.btn { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; border-radius:10px; font-weight:600; cursor:pointer; transition:0.2s; border:none; font-size:14px; }
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent2); transform:translateY(-1px); }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--fg); }
.btn-outline:hover { border-color:var(--accent); color:var(--accent); }
.btn-sm { padding:6px 12px; font-size:12px; }

.badge { padding:4px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.badge-success { background:rgba(34,197,94,0.15); color:#22C55E; }
.badge-warning { background:rgba(245,158,11,0.15); color:#F59E0B; }
.badge-danger { background:rgba(239,68,68,0.15); color:#EF4444; }
.badge-info { background:rgba(59,130,246,0.15); color:#3B82F6; }
.badge-accent { background:var(--accent-glow); color:var(--accent); }

.progress-bar { height:8px; background:var(--bg2); border-radius:4px; overflow:hidden; }
.progress-fill { height:100%; background:var(--accent); border-radius:4px; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(0, 242, 254, 0.015); }

/* Course Card */
.course-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: 0.3s; }
.course-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.course-card img { width: 100%; height: 160px; object-fit: cover; }

/* Toasts */
.toast-container { position:fixed; top:20px; right:20px; z-index:1000; display:flex; flex-direction:column; gap:10px; }
.toast { background:var(--card); border:1px solid var(--border); padding:16px 20px; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.5); display:flex; align-items:center; gap:12px; animation: slideIn 0.3s ease; }

/* Modals */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.7); backdrop-filter:blur(4px); z-index:500; display:flex; align-items:center; justify-content:center; }
.modal-box { background:var(--card); border:1px solid var(--border); padding:32px; border-radius:20px; width:90%; max-width:500px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease forwards; }

@keyframes glowPulse { 
  0%,100% { box-shadow: 0 0 15px rgba(20,184,166,0.1); border-color: var(--border); } 
  50% { box-shadow: 0 0 30px rgba(20,184,166,0.3); border-color: var(--accent); } 
}

@keyframes slideIn { 
  from { transform: translateX(100%); opacity:0; } 
  to { transform: translateX(0); opacity:1; } 
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
}