/* Design tokens come from tokens.css (loaded before this file by
   views/login.ejs) — this page used to carry its own standalone
   forest-green palette that shared nothing with the rest of the app. The
   gradient below now uses bark-brown tones derived from the shared primary
   instead of the old forest green, so the login page reads as part of
   the same app rather than a different product. */
:root {
    --login-gradient-deep: #2A1F17;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Deep-to-light brand brown gradient */
    background: linear-gradient(135deg, var(--login-gradient-deep) 0%, var(--color-primary-strong) 60%, var(--color-primary) 100%);
    position: relative;
    overflow: hidden;
    /* Shifts card slightly above vertical center */
    padding-bottom: 8vh; 
}

/* Background Glow Circles */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Glassmorphism Card */
.login-card {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.35), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.brand-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem auto;
    background: var(--color-primary-soft-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.brand-icon svg {
    width: 28px;
    height: 28px;
}

/* Wordmark (views/partials/brand-logo.ejs), stacked and larger than its
   top-bar size in home.css. */
.login-brand { display: flex; justify-content: center; }
.login-brand .brand-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-brand-ink);
}
.login-brand .brand-logo-mark { height: 46px; width: auto; display: block; fill: currentColor; }
.login-brand .brand-logo-seed { fill: var(--color-brand-seed); }
.login-brand .brand-logo-sub {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    /* letter-spacing trails the last letter too; pull it back to centre */
    margin-right: -0.42em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

h2 {
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--color-surface-muted);
}

.input-group input:focus {
    border-color: var(--color-primary);
    background-color: var(--color-surface);
    box-shadow: 0 0 0 4px rgba(138, 106, 59, 0.18);
}

#submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--color-primary);
    color: var(--color-on-primary, #ffffff);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 0.5rem;
}

#submit-btn:hover {
    background-color: var(--color-primary-strong);
}

#submit-btn:active {
    transform: scale(0.99);
}

#submit-btn:disabled {
    background-color: var(--color-border-strong);
    cursor: not-allowed;
}

.error-banner {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid #fca5a5;
    padding: 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}