@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500&family=Archivo:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --brand-start: #134e4a;
    --brand-end: #0d9488;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --danger-bg: #fdecec;
    --danger-text: #b3261e;
    --danger-border: #f6c4c1;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Archivo', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-dark);
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px;
}

.login-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 920px;
    min-height: 560px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(30, 41, 90, 0.35);
    background: var(--card-bg);
    border: 1px solid var(--border);
    animation: rise-in .6s cubic-bezier(.16, 1, .3, 1) backwards;
}

.login-brand {
    background: linear-gradient(160deg, var(--brand-start), var(--brand-end));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
}

.login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.12), transparent 55%);
}

.login-brand-inner {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.brand-logo svg {
    width: 30px;
    height: 30px;
}

.login-brand h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    margin: 0 0 8px;
}

.login-brand p {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    margin: 0 0 32px;
    opacity: 0.85;
    font-size: 16px;
}

.brand-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 14px;
    opacity: 0.95;
}

.brand-points li {
    padding-left: 24px;
    position: relative;
}

.brand-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #a5f3d0;
}

.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}

.login-card {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
}

.login-card > * {
    animation: rise-in .45s cubic-bezier(.16, 1, .3, 1) backwards;
}

.login-card > *:nth-child(1) { animation-delay: .12s; }
.login-card > *:nth-child(2) { animation-delay: .17s; }
.login-card > *:nth-child(3) { animation-delay: .22s; }
.login-card > *:nth-child(4) { animation-delay: .27s; }
.login-card > *:nth-child(5) { animation-delay: .32s; }
.login-card > *:nth-child(n+6) { animation-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
    .login-shell,
    .login-card > * {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

.login-card h2 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 26px;
}

.login-subtitle {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.login-card label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

/*
 * Matches every text-like input by exclusion rather than by listing each
 * type="...". The list form silently left new fields unstyled the moment
 * one was added - type="tel" and type="email" on the parent signup form
 * rendered as bare browser inputs - so the default is now "styled", and
 * only the controls that must not look like a text box opt out.
 */
.login-card input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]) {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    margin-bottom: 18px;
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-card input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
    background: var(--card-bg);
}

/* Sits directly under its input, so the input's own bottom margin is pulled back. */
.login-card .field-hint {
    margin: -12px 0 16px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: -9px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
}

.toggle-password:hover {
    color: var(--accent);
}

.btn-login {
    margin-top: 8px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
}

.btn-login:hover {
    background: var(--accent-hover);
}

.btn-login:active {
    transform: scale(0.99);
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.login-footer {
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .login-brand {
        padding: 32px;
    }
    .brand-points {
        display: none;
    }
}
