:root {
    --bg:       #f8f5ef;
    --surface:  #ffffff;
    --ink:      #191510;
    --ink-2:    #5a5248;
    --ink-3:    #9e9890;
    --line:     #e2dbd0;
    --line-hi:  #c8c0b4;
    --accent:   #c84018;
    --accent-h: #a83210;
    --accent-l: #f0dcd4;
    --error:    #c01c1c;
    --error-bg: #fdf0f0;
    --f:  'Bricolage Grotesque', sans-serif;
    --fm: 'Fira Code', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }

body {
    font-family: var(--f);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
}

/* ── Card ── */
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3.5px solid var(--accent);
    border-radius: 14px;
    padding: 40px 36px 36px;
    box-shadow: 0 4px 24px rgba(25, 21, 16, .06), 0 1px 3px rgba(25, 21, 16, .04);
    animation: enter .5s cubic-bezier(.16,1,.3,1) both;
}

@keyframes enter {
    from { opacity: 0; transform: translateY(20px); }
}

/* ── Brand ── */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.brand img {
    height: 100px;
    width: auto;
}

.brand-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1;
    gap: 0;
}

.brand-title em {
    font-style: normal;
    color: var(--accent);
}

.brand-text {
    text-align: center;
}

.brand-name {
    margin-top: 20px;
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: -.03em;
    line-height: 1.2;
}

.brand-sub {
    color: var(--ink-3);
    font-family: var(--fm);
    font-weight: 400;
    font-size: 1.2rem;
    letter-spacing: .06em;
    margin-top: 6px;
}

.brand-sub-sub {
    color: var(--ink-3);
    font-family: var(--fm);
    font-weight: 300;
    font-style: italic;
    font-size: .95rem;
    letter-spacing: .06em;
    margin-top: 6px;
}

/* ── Brand / Form divider ── */
.brand-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 28px 0 32px;
}

/* ── Heading ── */
h2 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -.02em;
    margin-bottom: 24px;
}

/* ── Flash ── */
.flash-error {
    background: var(--error-bg);
    border: 1px solid #e8c4c4;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: .85rem;
    color: var(--error);
}

/* ── Fields ── */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font-family: var(--f);
    font-size: .95rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap input::placeholder {
    color: var(--ink-3);
    font-size: .88rem;
}

.input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-l);
    background: var(--surface);
}

.input-wrap .icon {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
    transition: color .2s;
}

.input-wrap input:focus ~ .icon {
    color: var(--accent);
}

/* Password toggle */
.toggle-pw {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    padding: 2px;
    display: flex;
    transition: color .15s;
}

.toggle-pw:hover { color: var(--ink-2); }

/* ── Submit ── */
.btn-login {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    font-family: var(--f);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.btn-login:hover { background: var(--accent-h); }
.btn-login:active { transform: scale(.985); }

/* ── Footer ── */
.card-footer {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 16px;
    text-align: center;
    font-family: var(--fm);
    font-size: .7rem;
    color: var(--ink-3);
    opacity: .5;
}