/* ============================================================
   Summerhill Technologies — "Midnight Glass" login
   Styling only. Scoped under .sht-login. No new dependencies.
   Fonts: Space Grotesk (display) + Inter (body) via <link>.
   ============================================================ */

.sht-login {
    --cyan: #00b8d9;
    --cyan-bright: #22d3ee;
    --cyan-hover: #0095b3;
    --ink: #050506;
    --panel: rgba(18, 20, 23, 0.55);
    --hair: rgba(0, 184, 217, 0.18);
    --text: #f5f5f5;
    --muted: #8b929c;

    position: fixed;
    inset: 0;
    display: flex;
    overflow: auto;
    z-index: 1;
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(680px 460px at 14% 18%, rgba(0, 184, 217, 0.18), transparent 60%),
        radial-gradient(560px 520px at 88% 82%, rgba(34, 211, 238, 0.12), transparent 62%),
        var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* Drifting aurora */
.sht-login .sht-aurora {
    position: absolute;
    inset: -20%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(40% 40% at 30% 32%, rgba(0, 184, 217, 0.28), transparent 70%),
        radial-gradient(34% 34% at 72% 66%, rgba(34, 211, 238, 0.18), transparent 70%);
    filter: blur(36px);
    animation: sht-drift 20s ease-in-out infinite alternate;
}
@keyframes sht-drift {
    from { transform: translate3d(-3%, -2%, 0) scale(1); }
    to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

/* Fine grid, faded toward edges */
.sht-login .sht-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 55%, transparent 100%);
    mask-image: radial-gradient(circle at 50% 42%, #000 55%, transparent 100%);
}

/* ---------- Hero (left) ---------- */
.sht-hero {
    flex: 1 1 56%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 5vw;
    gap: 26px;
}
.sht-mark {
    width: clamp(84px, 8vw, 128px);
    height: auto;
    filter: drop-shadow(0 0 26px rgba(0, 184, 217, 0.45));
}
.sht-mark path {
    stroke: #ffffff;
    stroke-width: 7;
    fill: transparent;
    stroke-dasharray: 2600;
    stroke-dashoffset: 2600;
    animation:
        sht-draw 1.7s cubic-bezier(.6,.05,.2,1) forwards .25s,
        sht-fill 0.9s ease forwards 1.55s;
}
@keyframes sht-draw { to { stroke-dashoffset: 0; } }
@keyframes sht-fill { to { fill: #ffffff; } }

.sht-brand {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: 0.12em;
    margin: 0;
    animation: sht-up .8s cubic-bezier(.2,.7,.2,1) both .9s;
}
.sht-brand span {
    display: block;
    font-size: 0.34em;
    font-weight: 500;
    letter-spacing: 0.5em;
    color: var(--cyan-bright);
    margin-top: 12px;
    padding-left: 4px;
}
.sht-tag {
    max-width: 30ch;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
    animation: sht-up .8s cubic-bezier(.2,.7,.2,1) both 1.05s;
}
.sht-tag b { color: var(--text); font-weight: 600; }

.sht-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: sht-up .8s cubic-bezier(.2,.7,.2,1) both 1.2s;
}
.sht-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid var(--hair);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    color: var(--muted);
    transition: transform .2s, border-color .2s, color .2s, box-shadow .3s;
}
.sht-chip svg { width: 16px; height: 16px; stroke: var(--cyan); flex: none; }
.sht-chip:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(0, 184, 217, 0.3), 0 12px 34px -12px rgba(0, 184, 217, 0.6);
}

/* ---------- Auth card (right) ---------- */
.sht-auth {
    flex: 1 1 44%;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 4vw;
}
.sht-card {
    width: min(420px, 100%);
    padding: 40px 36px;
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid var(--hair);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 70px -24px rgba(0, 184, 217, 0.4);
    animation: sht-rise .85s cubic-bezier(.2,.7,.2,1) both .35s;
}
@keyframes sht-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes sht-up   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.sht-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.55rem;
    letter-spacing: 0.01em;
    color: #fff;
    margin: 0 0 4px;
}
.sht-card .sht-sub {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 26px;
}

/* Fields — override bootstrap .form-control inside the card */
.sht-field { position: relative; margin-bottom: 15px; }
.sht-field .sht-ic {
    position: absolute;
    left: 15px; top: 50%;
    width: 18px; height: 18px;
    transform: translateY(-50%);
    stroke: var(--muted);
    pointer-events: none;
    transition: stroke .2s;
}
.sht-login .form-control {
    height: 52px !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: 0 16px 0 46px !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .25s, background .2s;
}
.sht-login .form-control::-webkit-input-placeholder { color: #6b7280; }
.sht-login .form-control::placeholder { color: #6b7280; }
.sht-login .form-control:focus {
    border-color: var(--cyan) !important;
    background: rgba(0, 184, 217, 0.06) !important;
    box-shadow: 0 0 0 4px rgba(0, 184, 217, 0.16), 0 0 30px -8px rgba(0, 184, 217, 0.6) !important;
    outline: none;
}
.sht-field:focus-within .sht-ic { stroke: var(--cyan); }

/* Visually-hidden labels (kept for a11y) */
.sht-login .control-label {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* Primary button */
.sht-login .sht-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 52px;
    float: none !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #00b8d9, #22d3ee) !important;
    color: #04121a !important;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.98rem !important;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 12px 32px -8px rgba(0, 184, 217, 0.6);
    transition: transform .15s, box-shadow .25s, filter .2s;
}
.sht-login .sht-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 18px 42px -8px rgba(0, 184, 217, 0.78);
}
.sht-login .sht-btn:active { transform: translateY(0); }
.sht-login .sht-btn svg { width: 18px; height: 18px; }

/* Alt actions / links */
.sht-alt { margin-top: 20px; text-align: center; font-size: 0.86rem; color: var(--muted); }
.sht-login .sht-link {
    color: var(--cyan) !important;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: color .2s;
}
.sht-login .sht-link:hover { color: var(--cyan-bright) !important; }
.sht-divider {
    height: 1px;
    margin: 6px 0 22px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* Messages */
.sht-login .help-block,
.sht-login .color-red { color: #fb7185 !important; font-size: 0.8rem; display: block; margin: -4px 0 10px; }
.sht-login .alert-danger {
    background: rgba(251, 113, 133, 0.10);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    margin-bottom: 14px;
}
.sht-login .alert-danger .close { color: #fecdd3; opacity: .7; }

/* Pane swap */
#reset_pane { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sht-login { flex-direction: column; position: absolute; min-height: 100vh; }
    .sht-hero { flex: none; align-items: center; text-align: center; padding: 9vh 8vw 3vh; }
    .sht-tag { margin-inline: auto; }
    .sht-chips { justify-content: center; }
    .sht-auth { flex: none; padding: 2vh 6vw 9vh; }
}
@media (max-width: 480px) {
    .sht-card { padding: 30px 22px; }
    .sht-brand span { letter-spacing: 0.35em; }
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .sht-login .sht-aurora,
    .sht-mark path,
    .sht-brand, .sht-tag, .sht-chips,
    .sht-card { animation: none !important; }
    .sht-mark path { stroke-dashoffset: 0; fill: #fff; }
    .sht-brand, .sht-tag, .sht-chips, .sht-card { opacity: 1; transform: none; }
    .sht-login * { transition: none !important; }
}
