/* ==========================================================
   Tabaarak University System — Brand Stylesheet
   Tokens derived from the university crest & banner:
     Navy   #123A66  (authority, the crest ring)
     Navy-D #0B2745  (depth / gradients)
     Green  #5FAE3E  (the pencil-in-U mark, growth)
     Green-D#3B7D26
     Gold   #E4A93B  (accent — academic achievement)
     Paper  #F6F8F4  (soft background, not stark white)
     Ink    #16233A  (body text)
   Type: Poppins (display / brand) + Inter (body / forms)
   ========================================================== */

:root {
    --navy: #123A66;
    --navy-dark: #0B2745;
    --green: #5FAE3E;
    --green-dark: #3B7D26;
    --gold: #E4A93B;
    --paper: #F6F8F4;
    --ink: #16233A;
    --ink-soft: #5B6B7F;
    --line: #E3E8E4;
    --radius-lg: 22px;
    --radius-md: 14px;
    --shadow-soft: 0 20px 50px -20px rgba(11, 39, 69, 0.35);
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3, h4, .brand-font {
    font-family: 'Poppins', 'Inter', sans-serif;
}

a { text-decoration: none; }

/* ---------------- Login Layout ---------------- */
.login-shell {
    min-height: 100vh;
    display: flex;
}

/* Left: brand / hero panel */
.login-hero {
    position: relative;
    flex: 1.05;
    background: radial-gradient(120% 140% at 15% 10%, var(--navy) 0%, var(--navy-dark) 60%, #081b30 100%);
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 64px);
    min-height: 100vh;
}

.login-hero .sparkle {
    position: absolute;
    opacity: 0.55;
    pointer-events: none;
}

.login-hero .crest-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.login-hero .crest-wrap img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: var(--shadow-soft);
}

.login-hero .crest-wrap .brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
}
.login-hero .crest-wrap .brand-name span {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--green);
}

.login-hero .hero-copy {
    z-index: 2;
    max-width: 480px;
    margin: auto 0;
}

.login-hero .hero-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 18px;
}
.login-hero .hero-copy .eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--green);
    display: inline-block;
}

.login-hero .hero-copy h1 {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.login-hero .hero-copy p {
    color: #C9D4E3;
    font-size: 1rem;
    line-height: 1.6;
}

/* Faculty strip — echoes the 5 banner icons */
.faculty-strip {
    z-index: 2;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}
.faculty-strip .chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #E7ECF3;
    backdrop-filter: blur(2px);
}
.faculty-strip .chip i { color: var(--green); font-size: 0.95rem; }

.login-hero .hero-footer {
    z-index: 2;
    font-size: 0.8rem;
    color: #9FB0C6;
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.login-hero .hero-footer a { color: #C9D4E3; }
.login-hero .hero-footer a:hover { color: var(--green); }

/* Right: form panel */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--paper);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card .mobile-crest {
    display: none;
}

.login-card h2 {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: var(--navy-dark);
}

.login-card .subtitle {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-bottom: 30px;
}

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy-dark);
    margin-bottom: 6px;
}

.input-group-custom {
    position: relative;
    margin-bottom: 20px;
}
.input-group-custom i.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-soft);
    font-size: 1rem;
}
.input-group-custom .form-control {
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--line);
    font-size: 0.95rem;
    height: 50px;
}
.input-group-custom .form-control:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(95, 174, 62, 0.14);
}
.input-group-custom .toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 4px;
}

.form-check-label { font-size: 0.85rem; color: var(--ink-soft); }

.forgot-link {
    font-size: 0.85rem;
    color: var(--navy);
    font-weight: 600;
}
.forgot-link:hover { color: var(--green-dark); }

.btn-brand {
    width: 100%;
    background: var(--navy);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 13px;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    transition: background 0.2s ease, transform 0.1s ease;
}
.btn-brand:hover { background: var(--green-dark); color: #fff; }
.btn-brand:active { transform: scale(0.99); }

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    margin: 26px 0;
}
.divider-text::before, .divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.helper-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--ink-soft);
}
.helper-note a { color: var(--navy); font-weight: 600; }

.alert-brand {
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 991px) {
    .login-shell { flex-direction: column; }
    .login-hero { min-height: 320px; padding: 28px 24px; }
    .login-hero .hero-copy { margin: 18px 0; }
    .login-hero .hero-copy p { display: none; }
    .faculty-strip { display: none; }
    .login-panel { padding: 30px 20px 50px; }
}

@media (max-width: 991px) {
    .login-card .mobile-crest {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 22px;
    }
    .login-card .mobile-crest img { width: 40px; height: 40px; border-radius: 50%; }
}
