/* ====================================
   IBT Academy — Main Stylesheet
   Design: Refined Editorial / Dark Luxury
   ==================================== */

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

:root {
    --navy: #0f1724;
    --navy-mid: #16213e;
    --navy-light: #1e2d50;
    --gold: #e8c84a;
    --gold-dim: #c9a830;
    --gold-bg: rgba(232, 200, 74, 0.08);
    --white: #ffffff;
    --off-white: #f8f7f4;
    --text-primary: #0f1724;
    --text-secondary: #5a6275;
    --text-muted: #9aa0b0;
    --border: #e4e6eb;
    --border-dark: #d0d4dc;
    --success: #22c55e;
    --success-bg: #f0fdf4;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --shadow-sm: 0 2px 8px rgba(15,23,36,.06);
    --shadow-md: 0 4px 24px rgba(15,23,36,.10);
    --shadow-lg: 0 8px 48px rgba(15,23,36,.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text-primary); line-height: 1.6; }

/* ====== LOGIN PAGE ====== */
.login-body {
    background: var(--off-white);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    background: var(--navy);
    background-image: radial-gradient(ellipse at 20% 50%, rgba(30,45,80,.8) 0%, transparent 60%),
                      radial-gradient(ellipse at 80% 20%, rgba(232,200,74,.06) 0%, transparent 50%);
    padding: 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.login-right {
    width: 480px;
    flex-shrink: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    box-shadow: -4px 0 40px rgba(15,23,36,.08);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    margin-bottom: auto;
}

.brand-icon {
    width: 44px;
    height: 44px;
    color: var(--gold);
}
.brand-icon.small { width: 32px; height: 32px; }

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.login-hero {
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
}

.login-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 900;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.login-hero h1 em {
    color: var(--gold);
    font-style: italic;
}

.login-hero p {
    color: rgba(255,255,255,.65);
    font-size: 17px;
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 48px;
}

.login-stats {
    display: flex;
    gap: 40px;
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}
.stat-label {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(232,200,74,.12);
}
.deco-1 { width: 400px; height: 400px; right: -100px; bottom: -100px; }
.deco-2 { width: 250px; height: 250px; right: -30px; bottom: 60px; }
.deco-3 { width: 600px; height: 600px; left: -200px; top: -200px; border-color: rgba(255,255,255,.04); }

/* Login Form */
.login-form-wrap { width: 100%; max-width: 360px; }

.form-header { margin-bottom: 36px; }
.form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}
.form-header p { color: var(--text-secondary); font-size: 15px; }

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,.2); }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--white);
    transition: all var(--transition);
    outline: none;
}

.input-wrap input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15,23,36,.08);
}

.input-wrap input::placeholder { color: var(--text-muted); }

.btn-login {
    width: 100%;
    padding: 15px 24px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
    margin-top: 28px;
}

.btn-login:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-login:disabled { opacity: .6; cursor: default; transform: none; }
.btn-login svg { width: 18px; height: 18px; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

/* ====== SHARED COMPONENTS ====== */
blockquote {
    border-left: 3px solid var(--gold);
    padding: 16px 20px;
    background: var(--gold-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-secondary);
    margin: 24px 0;
    font-size: 16px;
    line-height: 1.7;
}

/* Print styles */
@media print {
    .top-nav, .tab-nav-container, .btn-print, .status-cta { display: none !important; }
    .certificate-card { box-shadow: none !important; page-break-inside: avoid; }
}

@media (max-width: 900px) {
    .login-left { display: none; }
    .login-right { width: 100%; padding: 32px 24px; }
}
