/* Standalone stylesheet for the admin sign-in page. */
:root {
    --bp-primary: #4263eb;
    --bp-primary-dark: #3451c6;
    --bp-primary-soft: #edf1ff;
    --bp-ink: #1c2434;
    --bp-text: #374151;
    --bp-muted: #6b7686;
    --bp-border: #dfe4ec;
    --bp-surface: #ffffff;
    --bp-bg: #f2f5fa;
    --bp-danger: #d6455d;
    --bp-danger-soft: #fdf0f2;
    --bp-success: #1f9d6b;
    --bp-success-soft: #ecf8f2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--bp-text);
    background: var(--bp-bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    color: #e6ebf7;
    background: linear-gradient(155deg, #1b2440 0%, #24346a 55%, #2f4a9c 100%);
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand::before {
    width: 520px;
    height: 520px;
    right: -180px;
    top: -160px;
    background: radial-gradient(circle, rgba(122, 162, 255, 0.28) 0%, rgba(122, 162, 255, 0) 70%);
}

.auth-brand::after {
    width: 460px;
    height: 460px;
    left: -160px;
    bottom: -200px;
    background: radial-gradient(circle, rgba(94, 213, 196, 0.2) 0%, rgba(94, 213, 196, 0) 70%);
}

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-decoration: none;
}

.auth-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #5b7cff 0%, #45c4b0 100%);
}

.auth-pitch h1 {
    margin: 0 0 12px;
    max-width: 440px;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.auth-pitch p {
    margin: 0 0 26px;
    max-width: 400px;
    font-size: 15px;
    color: #b9c4e0;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dbe2f4;
}

.auth-points svg {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.1);
    stroke: #a9c1ff;
}

.auth-brand-foot {
    font-size: 12px;
    color: #8f9cc0;
}

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

.auth-card {
    width: 100%;
    max-width: 380px;
}

.auth-card .auth-logo {
    display: none;
    margin-bottom: 28px;
    color: var(--bp-ink);
}

.auth-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--bp-ink);
}

.auth-sub {
    margin: 0 0 24px;
    color: var(--bp-muted);
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #f3c9d0;
    border-radius: 10px;
    font-size: 13px;
    color: #a12d43;
    background: var(--bp-danger-soft);
}

.auth-alert.is-success {
    border-color: #bfe6d3;
    color: #17734f;
    background: var(--bp-success-soft);
}

.auth-alert svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.auth-field {
    margin-bottom: 16px;
}

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

.auth-input {
    position: relative;
}

.auth-input > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    stroke: #98a2b3;
    pointer-events: none;
    transition: stroke 0.15s ease;
}

.auth-input input {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    font: inherit;
    color: var(--bp-ink);
    background: var(--bp-surface);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input input::placeholder {
    color: #a3acba;
}

.auth-input input:hover {
    border-color: #c7cfdb;
}

.auth-input input:focus {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 4px rgba(66, 99, 235, 0.14);
}

.auth-input:focus-within > svg {
    stroke: var(--bp-primary);
}

.auth-input.has-toggle input {
    padding-right: 44px;
}

.auth-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #8590a2;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-toggle:hover,
.auth-toggle:focus-visible {
    color: var(--bp-primary);
    background: var(--bp-primary-soft);
    outline: none;
}

.auth-toggle svg {
    width: 17px;
    height: 17px;
}

.auth-toggle .icon-hide,
.auth-toggle[aria-pressed="true"] .icon-show {
    display: none;
}

.auth-toggle[aria-pressed="true"] .icon-hide {
    display: block;
}

.auth-caps {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #b7791f;
}

.auth-caps.is-visible {
    display: block;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    color: #ffffff;
    background: var(--bp-primary);
    box-shadow: 0 6px 16px -6px rgba(66, 99, 235, 0.55);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.auth-submit:hover {
    background: var(--bp-primary-dark);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(66, 99, 235, 0.25);
}

.auth-submit[disabled] {
    opacity: 0.75;
    cursor: progress;
}

.auth-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

.auth-submit[disabled] .auth-spinner {
    display: inline-block;
}

.auth-note {
    margin: 20px 0 0;
    font-size: 12px;
    text-align: center;
    color: var(--bp-muted);
}

.auth-note a,
.auth-link {
    font-weight: 500;
    color: var(--bp-primary);
    text-decoration: none;
}

.auth-note a:hover,
.auth-link:hover,
.auth-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.auth-link {
    margin-top: 8px;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 13px;
    background: none;
    cursor: pointer;
}

.auth-sub strong {
    font-weight: 600;
    color: var(--bp-ink);
    overflow-wrap: anywhere;
}

.auth-input input[disabled] {
    background: var(--bp-bg);
    cursor: not-allowed;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .auth {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    }

    .auth-brand {
        padding: 32px;
    }
}

@media (max-width: 860px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-brand {
        display: none;
    }

    .auth-main {
        align-items: flex-start;
        padding-top: 12vh;
    }

    .auth-card .auth-logo {
        display: inline-flex;
    }
}

@media (max-height: 620px) and (min-width: 861px) {
    .auth-points {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.01ms !important;
    }
}
