/* ============================================================
   JosmaBASE — Student Hub
   Modern, clean, responsive stylesheet
   ============================================================ */

:root {
    /* Brand — JosmaBASE sea blue */
    --brand:         #0B4F6C;
    --brand-600:     #0A4761;
    --brand-700:     #083A4F;
    --brand-100:     #E5EFF4;
    --brand-50:      #F1F7FA;

    /* Ink */
    --ink:           #0F1720;
    --ink-soft:      #4B5966;
    --ink-muted:     #8896A3;

    /* Surfaces */
    --bg:            #F5F7FA;
    --surface:       #FFFFFF;
    --line:          #E6EAEF;
    --line-strong:   #D5DCE3;

    /* Accents */
    --accent:        #14B8A6;   /* teal for vision */
    --accent-2:      #F59E0B;   /* amber for mission */

    /* Shape & depth */
    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 18px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 32, .04);
    --shadow-sm: 0 1px 2px rgba(15, 23, 32, .04), 0 2px 8px rgba(15, 23, 32, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 32, .06), 0 12px 28px rgba(15, 23, 32, .06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 32, .10);

    /* Layout */
    --header-h:  68px;
    --max-w:     1180px;

    /* Typography */
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--brand); color: #fff;
    padding: 10px 16px;
    z-index: 2000;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; outline: none; }

/* ============================================================
   Header
   ============================================================ */
.app-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.app-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header__brand {
    display: flex; align-items: center; gap: 12px;
    color: var(--ink);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    min-width: 0;
    text-decoration: none;
}
.app-header__brand:hover { text-decoration: none; }
.app-header__brand-mark {
    width: 36px; height: 36px; flex: 0 0 36px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    border-radius: 10px;
    font-weight: 800;
    font-size: 16px;
    box-shadow: var(--shadow-xs);
}
.app-header__brand-text {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 320px;
}

.app-header__menu { display: none; }
.app-header__actions { margin-left: auto; }

/* ---------- Primary nav ---------- */
.app-nav { margin-left: auto; }
.app-nav__list {
    display: flex; gap: 2px;
    margin: 0; padding: 4px;
    list-style: none;
    background: var(--brand-50);
    border-radius: 10px;
}
.app-nav__link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.app-nav__link:hover {
    background: #fff; color: var(--brand);
    text-decoration: none;
}
.app-nav__link.is-active {
    background: #fff;
    color: var(--brand);
    box-shadow: var(--shadow-xs);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s, border-color .18s, color .18s, transform .1s;
}
.btn:active { transform: translateY(1px); }

.btn--ghost {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--line-strong);
}
.btn--ghost:hover {
    background: var(--brand-50);
    color: var(--brand);
    border-color: var(--brand-100);
    text-decoration: none;
}

.btn--outline {
    background: transparent;
    color: var(--brand);
    border-color: var(--brand-100);
}
.btn--outline:hover {
    background: var(--brand-50);
    text-decoration: none;
}

.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--brand-50); color: var(--brand); }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: 300px; max-width: 86vw; height: 100dvh;
    background: #fff;
    color: var(--ink);
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    z-index: 1100;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.sidebar.is-open { transform: translateX(0); }

.sidebar__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.sidebar__title {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.sidebar__list {
    list-style: none;
    margin: 0; padding: 12px;
    flex: 1;
}
.sidebar__link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.sidebar__link:hover {
    background: var(--brand-50);
    color: var(--brand);
    text-decoration: none;
}
.sidebar__link.is-active {
    background: var(--brand);
    color: #fff;
}
.sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
}

.sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 32, .45);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   Main
   ============================================================ */
.app-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 20px 56px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
    color: #fff;
    padding: 44px 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero__eyebrow {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.hero__title {
    margin: 0 0 10px;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.hero__subtitle {
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: 15.5px;
}
.hero__decor {
    position: absolute;
    right: -80px; top: -80px;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 60%);
    pointer-events: none;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Card ---------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 28px 26px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: .9;
}
.card--mission::before { background: linear-gradient(90deg, var(--accent-2), #FB923C); }
.card--vision::before  { background: linear-gradient(90deg, var(--accent), #0EA5A0); }

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-100);
}

.card__icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--brand-50);
    color: var(--brand);
    margin-bottom: 16px;
}
.card--mission .card__icon { background: #FEF3C7; color: #B45309; }
.card--vision  .card__icon { background: #CCFBF1; color: #0F766E; }

.card__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.card__text {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.7;
}
.card__text--muted { color: var(--ink-muted); font-style: italic; }

/* ============================================================
   Footer
   ============================================================ */
.app-footer {
    border-top: 1px solid var(--line);
    padding: 24px 20px;
    text-align: center;
    color: var(--ink-muted);
    font-size: 13px;
    background: var(--surface);
}
.app-footer p { margin: 0; }
.app-footer strong { color: var(--brand); font-weight: 700; }

/* ============================================================
   Focus visibility
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .app-nav { display: none; }
    .app-header__menu { display: inline-grid; }
    .app-header__actions { display: none; }
    .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .app-header__inner { padding: 0 14px; gap: 10px; }
    .app-header__brand-text { max-width: 180px; font-size: 15px; }
    .app-main { padding: 20px 14px 44px; }
    .hero { padding: 32px 24px; border-radius: var(--radius); }
    .card { padding: 24px 22px; border-radius: var(--radius); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    .app-header, .sidebar, .sidebar-backdrop, .app-footer { display: none !important; }
    body { background: #fff; }
    .app-main { padding: 0; max-width: none; }
    .hero { box-shadow: none; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}


/* ============================================================
   Auth — split layout
   ============================================================ */
.auth-body--split {
    padding: 0;
    display: block;
    background: var(--bg);
    min-height: 100dvh;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(420px, 1fr);
    min-height: 100dvh;
}

/* ---------- Left: brand panel ---------- */
.auth-split__brand {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--brand) 0%, var(--brand-700) 100%);
    color: #fff;
    padding: 56px 56px 48px;
    display: flex;
    align-items: center;
}
.auth-split__brand-inner { position: relative; z-index: 1; max-width: 460px; }

.auth-split__mark {
    display: inline-grid;
    place-items: center;
    width: 48px; height: 48px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 28px;
    backdrop-filter: blur(6px);
}

.auth-split__headline {
    margin: 0 0 16px;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.auth-split__headline em {
    font-style: normal;
    color: #7FE3D5;
}
.auth-split__tagline {
    margin: 0 0 36px;
    color: rgba(255,255,255,.82);
    font-size: 16px;
    line-height: 1.6;
    max-width: 380px;
}

.auth-split__features {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 14px;
}
.auth-split__features li {
    display: flex; align-items: center; gap: 12px;
    font-size: 14.5px;
    color: rgba(255,255,255,.92);
    font-weight: 500;
}
.auth-split__features svg {
    flex: 0 0 18px;
    color: #7FE3D5;
}

.auth-split__glow {
    position: absolute;
    right: -160px; bottom: -160px;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(127, 227, 213, .35), transparent 60%);
    pointer-events: none;
}

/* ---------- Right: form panel ---------- */
.auth-split__form {
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.auth-split__form-inner {
    width: 100%;
    max-width: 400px;
}

.auth-split__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-bottom: 36px;
    text-decoration: none;
}
.auth-split__back:hover { color: var(--brand); text-decoration: none; }

.auth-split__header { margin-bottom: 28px; }
.auth-split__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.auth-split__subtitle {
    margin: 0;
    font-size: 15px;
    color: var(--ink-soft);
}

.auth-split__footer {
    margin-top: 28px;
    font-size: 13.5px;
    color: var(--ink-soft);
    text-align: center;
}
.auth-split__footer p { margin: 0; }
.auth-split__footer a { color: var(--brand); font-weight: 600; }

/* ---------- Big form input ---------- */
.form-input-wrap--big .form-input-icon { left: 18px; }
.form-input--big {
    padding: 16px 18px 16px 50px;
    font-size: 16px;
    border-radius: 12px;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert p { margin: 0 0 6px; }
.alert p:last-child { margin-bottom: 0; }
.alert--error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

/* ---------- Form fields ---------- */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: .02em;
}

.form-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.form-input-icon {
    position: absolute;
    left: 14px;
    color: var(--ink-muted);
    pointer-events: none;
}
.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.form-input::placeholder { color: var(--ink-muted); }
.form-input:hover { border-color: #B8C4CF; }
.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(11, 79, 108, .12);
}
.form-hint {
    margin: 0;
    font-size: 12.5px;
    color: var(--ink-muted);
}

/* ---------- Buttons ---------- */
.btn--primary {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 1px 2px rgba(11,79,108,.15);
}
.btn--primary:hover {
    background: var(--brand-700);
    border-color: var(--brand-700);
    text-decoration: none;
}
.btn--primary:active { background: #062F42; }

.btn--lg {
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 11px;
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-split__brand {
        padding: 40px 28px;
        min-height: auto;
    }
    .auth-split__headline { font-size: 26px; }
    .auth-split__tagline { margin-bottom: 24px; }
    .auth-split__features { display: none; }
    .auth-split__form { padding: 32px 24px 48px; }
    .auth-split__back { margin-bottom: 24px; }
}
@media (max-width: 480px) {
    .auth-split__brand { padding: 32px 22px; }
    .auth-split__headline { font-size: 22px; }
    .auth-split__title { font-size: 24px; }
    .auth-split__form { padding: 28px 20px 40px; }
}