/* SEZ Hub - sign-in screen */
:root {
    --auth-ink: #0f1b33;
    --auth-ink-2: #16264a;
    --auth-accent: #2f6bff;
    --auth-accent-dark: #1f50d6;
    --auth-text: #1c2434;
    --auth-muted: #667085;
    --auth-line: #d9dee8;
    --auth-bg: #f4f6fa;
    --auth-danger: #c0362c;
    --auth-danger-bg: #fdecea;
    --auth-warn: #8a5a00;
    --auth-warn-bg: #fff4d6;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.auth {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- brand panel ---------- */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 64px;
    color: #e8eefc;
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(47, 107, 255, .35), transparent 60%),
        linear-gradient(160deg, var(--auth-ink-2) 0%, var(--auth-ink) 70%);
    overflow: hidden;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    pointer-events: none;
}

.auth-brand > * { position: relative; }

.auth-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; letter-spacing: .2px; color: #fff; }
.auth-logo svg { flex: none; }

.auth-hero h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.15; font-weight: 700; color: #fff; max-width: 520px; }
.auth-hero p { margin: 0 0 32px; font-size: 16px; line-height: 1.6; color: #b6c4e6; max-width: 480px; }

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 480px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points .ico {
    flex: none; width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
}
.auth-points strong { display: block; font-size: 15px; color: #fff; margin-bottom: 2px; }
.auth-points span { font-size: 14px; color: #a9b9de; line-height: 1.45; }

.auth-brand-foot { font-size: 13px; color: #8a9bc4; }

/* ---------- sign-in panel ---------- */
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }

.auth-card {
    width: 100%; max-width: 420px;
    background: #fff; border: 1px solid var(--auth-line); border-radius: 16px;
    padding: 40px 36px 32px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
}

.auth-mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 24px; color: var(--auth-ink); }

.auth-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: var(--auth-ink); }
.auth-sub { margin: 0 0 24px; font-size: 14px; color: var(--auth-muted); }

.auth-alert {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 0 0 18px; padding: 12px 14px; border-radius: 10px;
    font-size: 14px; line-height: 1.4;
    background: var(--auth-danger-bg); color: var(--auth-danger); border: 1px solid #f5c2bd;
}
.auth-alert[hidden] { display: none; }
.auth-alert.is-warn { background: var(--auth-warn-bg); color: var(--auth-warn); border-color: #f2d98b; }
.auth-alert button {
    margin-left: auto; flex: none; border: 0; background: transparent; font: inherit; font-weight: 600;
    color: inherit; text-decoration: underline; cursor: pointer; padding: 0;
}

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--auth-text); }

.auth-input { position: relative; }
.auth-input > svg.lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.auth-input input {
    width: 100%; height: 46px; padding: 0 44px 0 42px;
    font: inherit; font-size: 15px; color: var(--auth-text);
    background: #fff; border: 1px solid var(--auth-line); border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input input::placeholder { color: #98a2b3; }
.auth-input input:hover { border-color: #b8c0d0; }
.auth-input input:focus { outline: none; border-color: var(--auth-accent); box-shadow: 0 0 0 4px rgba(47, 107, 255, .16); }
.auth-input input.is-invalid { border-color: var(--auth-danger); box-shadow: 0 0 0 4px rgba(192, 54, 44, .10); }

.auth-reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #667085; cursor: pointer;
    display: grid; place-items: center;
}
.auth-reveal:hover { background: #eef1f6; color: var(--auth-ink); }
.auth-reveal:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 1px; }

.auth-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--auth-warn); display: none; }
.auth-hint.on { display: block; }
.auth-field-error { margin: 6px 0 0; font-size: 12.5px; color: var(--auth-danger); display: none; }
.auth-field-error.on { display: block; }

.auth-btn {
    width: 100%; height: 48px; margin-top: 6px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-size: 15px; font-weight: 600; color: #fff;
    background: var(--auth-accent); border: 0; border-radius: 10px; cursor: pointer;
    transition: background .15s, transform .05s;
}
.auth-btn:hover { background: var(--auth-accent-dark); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible { outline: 3px solid rgba(47, 107, 255, .35); outline-offset: 2px; }
.auth-btn[disabled] { opacity: .75; cursor: progress; }
.auth-spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: auth-rot .7s linear infinite; display: none; }
.auth-btn.loading .auth-spin { display: inline-block; }
@keyframes auth-rot { to { transform: rotate(360deg); } }

.auth-links { margin-top: 18px; text-align: center; font-size: 14px; }
.auth-links a { color: var(--auth-accent-dark); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

.auth-secure { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid #eef1f6; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--auth-muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-mobile-brand { display: flex; }
    .auth-panel { padding: 24px 16px; }
    .auth-card { padding: 32px 24px 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-spin { animation-duration: 2s; }
    .auth-input input, .auth-btn { transition: none; }
}
