:root {
    --ink: #242321;
    --ink-soft: #4d4945;
    --muted: #68625c;
    --paper: #ffffff;
    --canvas: #f4f1ec;
    --brand: #701d18;
    --brand-deep: #52100d;
    --success: #29775b;
    --success-soft: #e7f2ed;
    --danger: #b43b33;
    --danger-soft: #f8e7e5;
    --font-ui: Tahoma, "Segoe UI", Arial, sans-serif;
    --font-heading: "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.eyebrow {
    margin: 0;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.eyebrow.light { color: #e0c17b; }
.muted { color: var(--muted); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 6px 14px rgba(112,29,24,.16);
}
.button-primary:hover { background: var(--brand-deep); }
.button-large { min-height: 46px; }
.button-block { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .5; }

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 10px;
}
.flash button {
    color: inherit;
    background: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
}
.flash-success {
    color: var(--success);
    background: var(--success-soft);
    border-color: #c6dfd3;
}
.flash-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #e9c9c5;
}
.flash-warning {
    color: #80560b;
    background: #fff7e4;
    border-color: #ead6a5;
}

input {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #ccc4ba;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.45;
    transition: .15s ease;
}
input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(112,29,24,.09);
}
label {
    display: block;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}
label input {
    margin-top: 5px;
    color: var(--ink);
    font-weight: 400;
}

.login-body { min-height: 100vh; background: var(--brand-deep); }
.login-shell {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    min-height: 100vh;
}
.login-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(28px, 4vw, 64px);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(155deg, rgba(62,12,9,.96), rgba(112,29,24,.92)), radial-gradient(circle at 20% 70%, #a95548, transparent 38%);
}
.login-story::before, .login-story::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.08);
    transform: rotate(28deg);
}
.login-story::before {
    right: -190px;
    bottom: -250px;
    width: 560px;
    height: 560px;
}
.login-story::after {
    right: -90px;
    bottom: -170px;
    width: 390px;
    height: 390px;
}
.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-brand img {
    width: 52px;
    height: 52px;
    padding: 3px;
    object-fit: contain;
    background: #fff;
    border-radius: 9px;
}
.login-brand strong, .login-brand small { display: block; }
.login-brand strong {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: .01em;
}
.login-brand small {
    color: rgba(255,255,255,.66);
    font-size: 12px;
}
.login-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: auto 0;
    padding: 50px 0;
}
.login-copy h1 {
    margin: 12px 0 18px;
    font-family: var(--font-heading);
    font-size: clamp(38px, 5vw, 68px);
    font-weight: 700;
    letter-spacing: -.012em;
    line-height: 1.08;
}
.login-copy > p:last-child {
    max-width: 620px;
    color: rgba(255,255,255,.72);
    font-size: clamp(14px, 1.3vw, 18px);
    line-height: 1.6;
}
.seven-stages {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 7px;
}
.seven-stages span {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #e8cc8c;
    border: 1px solid rgba(232,204,140,.4);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}
.login-panel {
    display: grid;
    place-items: center;
    padding: 40px;
    background: #f4f1ec;
}
.login-form-wrap { width: min(400px, 100%); }
.login-form-wrap h2 {
    margin: 3px 0 2px;
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.012em;
}
.login-form-wrap > .muted { margin: 0 0 24px; }
.stack-form { display: grid; gap: 14px; }
.demo-account {
    display: grid;
    gap: 2px;
    margin-top: 20px;
    padding: 12px 14px;
    background: #ebe5dc;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
}
.demo-account code { color: var(--brand); font-weight: 700; }
.demo-account small { color: var(--muted); }

@media (max-width: 760px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-story { min-height: 45vh; padding: 28px; }
    .login-copy { padding: 50px 0 35px; }
    .login-panel { padding: 38px 24px 50px; }
}

@media (max-width: 620px) {
    body { font-size: 14px; }
}

@media (max-width: 520px) {
    .seven-stages { gap: 4px; }
    .seven-stages span { width: 27px; height: 27px; }
}

@media print {
    .button { display: none!important; }
}
