/* ==========================================================================
   Diplomax HRMS - the sign-in pages (design "07d The people on the globe",
   28 Oct 2026, demos/sign-in/07-the-people-globe.html and
   07-the-people-globe-code.html)

   A charcoal stage the whole size of the window, where the Earth gives way
   to the gold map of Lebanon and its campus towns (components/
   login-scene.inc.php, drawn by js/pages/login-globe.js), with its headline
   at top left. The paper panel with the brand bar, the form and the footer
   floats over it at right; under 1100px it sits in the middle, over the
   map, and the headline and the town names are left out. The panel never
   scrolls: when it is taller than the window the stage grows and the page
   scrolls instead.

   The values are the design's own, kept as page properties: the stage is an
   illustration and must look the same under every theme.
   layouts/auth.css still serves the access-denied page.
   ========================================================================== */

.login-shell {
    --login-ink: #1f1f1f;
    --login-ink-soft: #4a4a47;
    --login-muted: #6b6b66;
    --login-faint: #8a8a85;
    --login-gold: #f5c842;
    --login-gold-dark: #8a6d1a;
    --login-gold-wash: #fdf1c9;
    --login-paper: #fffdf7;
    --login-chalk: #f4f1ea;
    --login-line: #e6e0cf;
    --login-green: #1e6b42;
    --login-green-soft: #e3f2e4;
    --login-red: #a33a2b;
    --login-red-soft: #fbeae6;
    margin: 0;
    background: #0b0b0a;
    color: var(--login-ink);
    font-family: var(--font-sans);
}

/* --- the stage ----------------------------------------------------------- */

.login {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 100vh;
    padding: 28px 56px;
    overflow: hidden;
    background: radial-gradient(110% 90% at 60% 30%, #232220 0%, #151514 45%, #0a0a09 100%);
}

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

.login-scene canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.login-scene__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 95% at 50% 40%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.7) 100%);
}

/* The town names: plain gold type at the end of the leaders drawn on the
   map, placed by the script; Beirut, the main campus, larger. */
.login-places {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    pointer-events: none;
}

.login-place {
    position: absolute;
    left: 0;
    top: 0;
    color: #f3dfa0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(245, 200, 66, 0.35);
    opacity: 0;
    will-change: transform, opacity;
}

.login-place--main { font-size: 16px; font-weight: 700; }

.login-caption {
    position: absolute;
    left: 56px;
    top: 48px;
    z-index: 5;
    max-width: 520px;
    pointer-events: none;
    animation: login-rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

.login-caption small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--login-gold);
}

.login-caption b {
    display: block;
    margin-top: 14px;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
}

.login-caption strong { font-weight: 700; }

@media (max-width: 1099px) {
    .login { justify-content: center; padding: 24px 16px; }
    .login-caption,
    .login-places { display: none; }
}

/* --- the paper panel --------------------------------------------------- */

.login-panel {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 420px;
    max-width: 100%;
    padding: 28px 32px 26px;
    overflow: hidden;
    border-radius: 26px;
    background-color: var(--login-paper);
    background-image: radial-gradient(rgba(160, 130, 40, 0.13) 1px, transparent 1.2px);
    background-size: 18px 18px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    animation: login-panel-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
}

/* The panel and the headline come in once the preloader has gone, not
   behind it (js/core/preloader.js marks the page). */
.pl-on:not(.pl-ready) .login-panel,
.pl-on:not(.pl-ready) .login-caption { animation-play-state: paused; }

.login-panel::before {
    content: "";
    position: absolute;
    left: -120px;
    bottom: -140px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 200, 66, 0.28), rgba(245, 200, 66, 0) 70%);
    pointer-events: none;
}

.login-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand__logo { display: block; width: auto; height: 24px; }

.login-bar__help {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--login-chalk);
    color: var(--login-ink-soft);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}

.login-bar__help:hover { color: var(--login-ink); text-decoration: none; }

.login-body { position: relative; }

.login-foot {
    position: relative;
    font-size: 12px;
    font-weight: 600;
    color: var(--login-faint);
}

/* --- the form ----------------------------------------------------------- */

.login-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.login-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.login-title {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--login-ink);
}

.login-lead { font-size: 14.5px; color: var(--login-muted); }

.login-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 4px 0 0;
    border-bottom: 2px solid var(--login-line);
    transition: border-color 0.25s;
}

.login-field:focus-within { border-bottom-color: var(--login-gold); }

.login-field__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--login-chalk);
    color: var(--login-faint);
    transition: background 0.25s, color 0.25s;
}

.login-field:focus-within .login-field__icon { background: var(--login-gold); color: var(--login-ink); }

.login-field__icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-field__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.login-field__label {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--login-faint);
}

.login-field__input {
    width: 100%;
    margin: 0;
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    font: 600 17px/1.3 var(--font-sans);
    color: var(--login-ink);
}

.login-field__input:focus-visible { box-shadow: none; }

.login-field__input:-webkit-autofill,
.login-field__input:-webkit-autofill:hover,
.login-field__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--login-ink);
    box-shadow: 0 0 0 1000px var(--login-paper) inset;
    transition: background-color 9999s ease-out;
}

.login-field__toggle {
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--login-chalk);
    font: 700 12px var(--font-sans);
    color: var(--login-ink-soft);
    cursor: var(--cursor-hand, pointer);
}

.login-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 4px;
}

.login-link { font-size: 13px; font-weight: 700; color: var(--login-gold-dark); text-decoration: none; }
.login-link:hover { color: var(--login-ink); text-decoration: none; }

/* The verification code: one field, shown as six cells once the script
   runs (js/pages/login.js adds is-cells). The field stays the one the
   server reads, laid over the cells and out of sight, so a click on a cell
   types into it. */
.login-code { position: relative; display: flex; flex-direction: column; gap: 10px; }
.login-code__cells { display: none; grid-template-columns: repeat(6, 1fr); gap: 8px; }

.login-code__cells i {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    border: 2px solid var(--login-line);
    border-radius: 14px;
    background: #fff;
    font: 700 24px var(--font-sans);
    font-variant-numeric: tabular-nums;
    color: var(--login-ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-code__cells i.is-filled { border-color: var(--login-ink); }
.login-code__cells i.is-active { border-color: var(--login-gold); box-shadow: 0 0 0 4px rgba(245, 200, 66, 0.25); }

.login-code__input {
    width: 100%;
    height: 58px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-bottom: 2px solid var(--login-line);
    border-radius: 0;
    outline: 0;
    background: transparent;
    font: 600 22px var(--font-sans);
    letter-spacing: 0.3em;
    color: var(--login-ink);
}

.login-code__input:focus { border-bottom-color: var(--login-gold); }
.login-code__input:focus-visible { box-shadow: none; }
.login-code.is-cells .login-code__cells { display: grid; }

.login-code.is-cells .login-code__input {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    border: 0;
    font-size: 16px;
    letter-spacing: 0;
    caret-color: transparent;
    cursor: text;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--login-red-soft);
    color: var(--login-red);
    font-size: 13px;
    font-weight: 600;
}

.login-alert svg {
    flex: none;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.login-alert--success { background: var(--login-green-soft); color: var(--login-green); }
.login-alert--warning { background: var(--login-gold-wash); color: var(--login-gold-dark); }
.login-alert--info { background: var(--login-chalk); color: var(--login-ink-soft); }

.login-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 56px;
    margin-top: 2px;
    padding: 0 8px 0 22px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--login-ink);
    color: #fff;
    font: 800 16px var(--font-sans);
    cursor: var(--cursor-hand, pointer);
    box-shadow: 0 16px 30px rgba(31, 31, 31, 0.25);
    transition: transform 0.1s, background 0.15s;
}

.login-submit:hover { background: #2e2e2b; }
.login-submit:active { transform: translateY(2px); }
.login-submit__label { display: flex; align-items: center; gap: 10px; }

.login-submit__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--login-gold);
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
}

.login-submit.is-loading .login-submit__spinner { display: block; }

.login-submit__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--login-gold);
    color: var(--login-ink);
}

.login-submit__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-note { display: flex; align-items: center; gap: 10px; padding: 0 2px; }

.login-note__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--login-green-soft);
    color: var(--login-green);
}

.login-note__icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-note__text { font-size: 12.5px; line-height: 1.45; color: var(--login-ink-soft); }

/* The authenticator setup key (the second step, the first time) */
.login-key {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--login-chalk);
}

.login-key__label {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--login-faint);
}

.login-key__value {
    padding: 0;
    border: 0;
    background: none;
    font: 500 15px/1.4 var(--font-mono);
    letter-spacing: 0.12em;
    color: var(--login-ink);
    overflow-wrap: anywhere;
}

.login-key__link { font-size: 13px; font-weight: 700; color: var(--login-gold-dark); text-decoration: none; }
.login-key__link:hover { color: var(--login-ink); text-decoration: none; }

/* "Need help?" and "Forgot password?" open this note above the footer */
.login-help {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 58px;
    z-index: 5;
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(120, 90, 0, 0.18);
    animation: login-rise 0.3s ease both;
}

.login-help:target,
.login-help.is-open { display: flex; }

.login-help__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--login-gold-wash);
    color: var(--login-gold-dark);
}

.login-help__icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.login-help__body { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.login-help__title { font-size: 14px; font-weight: 800; }
.login-help__text { font-size: 12.5px; line-height: 1.45; color: var(--login-ink-soft); }

.login-help__close {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--login-chalk);
    color: var(--login-ink-soft);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.login-help__close:hover { color: var(--login-ink); text-decoration: none; }

/* --- motion --------------------------------------------------------------- */

@keyframes login-panel-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

@keyframes login-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes login-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .login *,
    .login *::before,
    .login *::after { animation: none !important; transition: none !important; }
}
