/* Staff account access: shared surfaces, with a quieter branded backdrop. */
* {
    box-sizing: border-box;
}
html, body {
    min-height: 100%;
    margin: 0;
}
body {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--page-bg);
    font-size: 0.875rem;
    line-height: 1.5;
}
a {
    color: inherit;
    text-decoration: none;
}
button, input {
    font: inherit;
}
.login-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 28px;
}
.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.aurora {
    position: absolute;
    filter: blur(70px);
    opacity: 0.35;
    border-radius: 50%;
    animation: floatAurora 16s ease-in-out infinite;
}
.aurora-1 {
    width: 420px;
    height: 420px;
    background: rgba(45, 212, 191, 0.2);
    left: -80px;
    top: 80px;
}
.aurora-2 {
    width: 540px;
    height: 540px;
    background: rgba(96, 165, 250, 0.2);
    right: 16%;
    top: -100px;
    animation-delay: -4s;
}
.aurora-3 {
    width: 480px;
    height: 480px;
    background: rgba(139, 92, 246, 0.16);
    right: -120px;
    bottom: -90px;
    animation-delay: -9s;
}
.grid-glow {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-faint) 1px, transparent 1px), linear-gradient(90deg, var(--border-faint) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent 70%);
}
.brand-top-left {
    position: absolute;
    top: 32px;
    left: 56px;
    z-index: 2;
    display: inline-flex;
}
.brand-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) opacity(0.88);
}
:root[data-theme="dark"] .brand-logo {
    filter: opacity(0.9);
}
.login-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}
.login-box {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    border-radius: 20px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(var(--shadow-ink), 0.08);
}
.login-header {
    margin-bottom: 24px;
}
.login-header h1 {
    margin: 0;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.035em;
}
.login-header p {
    margin: 10px 0 0;
    color: var(--ink-soft);
}
.login-account-email {
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.field-group {
    margin-bottom: 18px;
}
.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 6px;
}
.field-group label {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.8125rem;
}
.login-link {
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 500;
}
.login-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.login-copy {
    margin: 0 0 18px;
    color: var(--ink-soft);
}
.input-wrap {
    position: relative;
}
.input-wrap > i:first-child {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-muted);
    font-size: 0.875rem;
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    /* A standalone sign-in form benefits from the standard 40px action height. */
    height: var(--btn-height);
    padding: 0 12px 0 38px;
    border-radius: var(--control-radius);
    border: 1px solid var(--border-strong);
    background: var(--surface-soft);
    color: var(--ink);
    font-size: var(--btn-font);
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.input-wrap input::placeholder {
    color: var(--ink-muted);
    opacity: 1;
}
.input-wrap input:focus {
    border-color: var(--accent);
    background: var(--surface);
}
.input-wrap input[aria-invalid="true"] {
    border-color: var(--danger);
}
.input-wrap-password input {
    padding-right: 44px;
}
.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
}
.password-toggle:hover {
    background: var(--surface-inset);
    color: var(--ink);
}
.btn {
    width: 100%;
    min-height: var(--btn-height);
    margin-top: 4px;
    padding: var(--btn-padding);
    border: 1px solid var(--accent);
    border-radius: var(--btn-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: var(--btn-font);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink-inverse);
    cursor: pointer;
    background: var(--accent);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-secondary {
    color: var(--ink-soft);
    background: var(--surface-soft);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    color: var(--ink);
    background: var(--surface-inset);
    border-color: var(--border-strong);
}
.btn:focus-visible, .password-toggle:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.login-footer {
    margin-top: 20px;
    text-align: center;
}
.login-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.8125rem;
}
.login-error > i {
    margin-top: 3px;
    flex-shrink: 0;
}
.login-field-error {
    margin-top: 6px;
    color: var(--danger);
    font-size: 0.8125rem;
}
.login-field-error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.login-field-error li + li {
    margin-top: 4px;
}
.login-password-help {
    margin-top: 8px;
    color: var(--ink-muted);
    font-size: 0.8125rem;
}
.login-password-help summary {
    width: fit-content;
    color: var(--ink-soft);
    cursor: pointer;
}
.login-password-help summary:hover {
    color: var(--accent);
}
.login-password-help ul {
    margin: 8px 0 0;
    padding-left: 18px;
}
.login-password-help li + li {
    margin-top: 4px;
}
.login-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1rem;
}
.login-state-icon--success {
    background: var(--success-soft);
    color: var(--success);
}
.login-state-icon--warning {
    background: var(--warning-soft);
    color: var(--warning);
}
@keyframes floatAurora {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -18px, 0) scale(1.06);
    }
}
@media (prefers-reduced-motion: reduce) {
    .aurora {
        animation: none;
    }
    .input-wrap input, .btn {
        transition: none;
    }
}
@media (max-width: 640px) {
    .login-shell {
        padding: 108px 16px 36px;
    }
    .brand-top-left {
        top: 20px;
        left: 20px;
    }
    .brand-logo {
        height: 58px;
    }
    .login-box {
        padding: 24px 20px;
    }
    .login-header h1 {
        font-size: 1.5rem;
    }
    /* Avoid iOS zooming the viewport when an input receives focus. */
    .input-wrap input {
        font-size: 1rem;
    }
}
