/* login.css — shared styles for the sign-in landing (signin.html) and login form (login.html) */

:root {
    --navy-950: #06142A;
    --navy-900: #0B1F3B;
    --navy-800: #13294B;
    --orange-500: #F59E0B;
    --orange-600: #D97706;
    --orange-700: #B45309;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-2: #475569;
    --text-3: #94A3B8;
    --radius: 14px;
}

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

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

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.shell {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
}

/* ── Brand panel ── */
.brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    color: #E2E8F0;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(245, 158, 11, 0.22), transparent 60%),
        radial-gradient(700px 500px at -20% 110%, rgba(56, 120, 220, 0.25), transparent 60%),
        linear-gradient(160deg, var(--navy-800), var(--navy-950));
}

/* subtle grid texture */
.brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
    pointer-events: none;
}

.brand>* {
    position: relative;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: #fff;
}

.wordmark .logo-chip {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.wordmark img {
    width: 30px;
    height: auto;
}

.pitch {
    max-width: 34rem;
    padding: 3rem 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #FCD34D;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.pitch h1 {
    margin: 1.25rem 0 1rem;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.pitch h1 .accent {
    background: linear-gradient(90deg, #FBBF24, #F97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pitch>p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #B6C2D4;
}

.features {
    list-style: none;
    margin: 2.25rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}

.features .ico {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.14);
    color: #FBBF24;
}

.features .ico svg {
    width: 18px;
    height: 18px;
}

.features strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.features span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94A3B8;
}

.brand-foot {
    font-size: 0.8rem;
    color: #7C8BA1;
}

/* ── Sign-in panel ── */
.panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 1.5rem;
}

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

.card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card .lead {
    margin: 0 0 2rem;
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.6;
}

.signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    font: 600 1rem 'Inter', sans-serif;
    color: #fff;
    text-decoration: none;
    background: var(--navy-900);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 8px 20px -6px rgba(11, 31, 59, 0.45);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.signin-btn:hover {
    background: var(--orange-600);
    transform: translateY(-1px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), 0 12px 24px -8px rgba(217, 119, 6, 0.55);
}

.signin-btn:active {
    transform: translateY(0);
}

.signin-btn:focus-visible {
    outline: 3px solid rgba(245, 158, 11, 0.5);
    outline-offset: 2px;
}

.signin-btn svg {
    width: 18px;
    height: 18px;
}

.signin-btn .arrow {
    transition: transform 0.2s ease;
}

.signin-btn:hover .arrow {
    transform: translateX(3px);
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #F1F5F9;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-2);
}

.security-note svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: #16A34A;
}

.panel-foot {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-3);
}

.panel-foot a {
    color: var(--text-2);
    text-decoration: none;
}

.panel-foot a:hover {
    color: var(--orange-600);
    text-decoration: underline;
}

/* ── Login form (login.html) ── */
.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.input-wrap {
    position: relative;
}

.input-wrap>svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    transition: color 0.15s ease;
}

.input-wrap input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.7rem;
    font: 400 0.95rem 'Inter', sans-serif;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input::placeholder {
    color: #CBD5E1;
}

.input-wrap input:hover {
    border-color: #CBD5E1;
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--orange-600);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.input-wrap:focus-within>svg {
    color: var(--orange-600);
}

.input-wrap .toggle-pw {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--text-3);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.input-wrap .toggle-pw:hover {
    color: var(--text-2);
    background: #F1F5F9;
}

.input-wrap .toggle-pw svg {
    width: 18px;
    height: 18px;
}

.input-wrap input[type="password"],
.input-wrap input.has-toggle {
    padding-right: 3rem;
}

.text-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--orange-600);
    text-decoration: none;
}

.text-link:hover {
    color: var(--orange-700);
    text-decoration: underline;
}

.remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.25rem 0 1.5rem;
    font-size: 0.875rem;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--navy-900);
    cursor: pointer;
}

.error-message {
    margin-bottom: 1.1rem;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #B91C1C;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
}

.error-message.is-success {
    color: #166534;
    background: #F0FDF4;
    border-color: #BBF7D0;
}

button.signin-btn {
    border: none;
    cursor: pointer;
}

button.signin-btn:disabled {
    cursor: not-allowed;
    background: var(--text-3);
    box-shadow: none;
    transform: none;
}

.signin-btn .spinner img {
    display: block;
    width: 22px;
    height: 22px;
    animation: spin 1s linear infinite;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
}

.back-link:hover {
    color: var(--navy-900);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* compact brand header shown only on small screens */
.mobile-brand {
    display: none;
}

@media (max-width: 960px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .brand {
        display: none;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 2.5rem;
        font-weight: 700;
        color: var(--navy-900);
    }

    .mobile-brand img {
        width: 40px;
        height: auto;
    }

    .panel {
        justify-content: flex-start;
        padding: 3rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .signin-btn,
    .signin-btn .arrow {
        transition: none;
    }
}
