:root {
    color-scheme: light;
    --ink: #242122;
    --muted: #736b6c;
    --line: #e5dfe0;
    --surface: #ffffff;
    --canvas: #f5f4f4;
    --accent: #b51e2b;
    --accent-hover: #941823;
    --error: #a9433e;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
    min-height: 100vh;
    background: var(--surface);
}

.auth-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 34px clamp(24px, 6vw, 88px) 24px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    min-height: 56px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 650;
    text-decoration: none;
}

.auth-brand img {
    display: block;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    padding: 2px;
    border: 1px solid #e1d9da;
    border-radius: 7px;
    background: #fff;
    object-fit: cover;
    object-position: center 48%;
}

.auth-body {
    width: min(100%, 390px);
    margin: auto;
    padding: 22px 0;
}

.auth-heading {
    margin-bottom: 30px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-heading h1,
.dashboard-main h1 {
    margin: 0 0 8px;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
}

.auth-heading > p:last-child,
.empty-state {
    margin: 0;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: #344250;
    font-size: 13px;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid #cbd5dd;
    border-radius: 5px;
    outline: none;
    background: var(--surface);
    color: var(--ink);
}

.form-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(37 99 166 / 14%);
}

.remember-field {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #43515e;
    font-size: 13px;
}

.remember-field input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}

.submit-button,
.logout-button {
    min-height: 44px;
    border: 0;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.submit-button:hover,
.logout-button:hover {
    background: var(--accent-hover);
}

.notice {
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid #bdd8ca;
    border-radius: 4px;
    background: #f0f8f3;
    color: #245b3b;
    font-size: 13px;
}

.notice-error {
    border-color: #e6c4c4;
    background: #fff5f4;
    color: var(--error);
}

.auth-footer {
    margin: 0;
    color: #84909a;
    font-size: 12px;
    text-align: center;
}

.auth-aside {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 48px;
    background-color: #262223;
    background-image: linear-gradient(135deg, rgb(255 255 255 / 4%) 0 1px, transparent 1px),
        linear-gradient(45deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
    background-size: 34px 34px, 34px 34px;
}

.aside-mark {
    position: absolute;
    top: 36px;
    right: 42px;
    color: rgb(227 71 82 / 12%);
    font-size: 156px;
    font-weight: 700;
    line-height: 1;
}

.invoice-preview {
    position: relative;
    width: min(100%, 420px);
    padding: 34px;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 5px;
    background: rgb(255 255 255 / 97%);
    box-shadow: 0 26px 72px rgb(4 22 17 / 30%);
    transform: rotate(-2deg);
}

.preview-header,
.preview-meta,
.preview-row,
.preview-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-logo {
    width: 34px;
    height: 34px;
    border-radius: 3px;
    background: #dce9e1;
}

.preview-label {
    color: #50665c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.preview-meta {
    margin: 32px 0 20px;
}

.preview-meta span,
.preview-row span,
.preview-row i,
.preview-total span,
.preview-total i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: #e4e9e5;
}

.preview-meta span:first-child {
    width: 34%;
}

.preview-meta span:last-child {
    width: 23%;
}

.preview-rule {
    height: 1px;
    margin-bottom: 14px;
    background: var(--line);
}

.preview-row {
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f2;
}

.preview-row span {
    width: 54%;
}

.preview-row i {
    width: 18%;
}

.preview-total {
    gap: 20px;
    margin-top: 18px;
}

.preview-total span {
    width: 32%;
    background: #acc0b6;
}

.preview-total i {
    width: 24%;
    height: 10px;
    background: var(--accent);
}

.aside-caption {
    position: absolute;
    right: 42px;
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d7e1dc;
    font-size: 13px;
    font-weight: 600;
}

.caption-line {
    width: 22px;
    height: 2px;
    background: var(--accent);
}

.dashboard-page {
    background: var(--canvas);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 12px clamp(20px, 5vw, 72px);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.logout-button {
    min-height: 38px;
    padding: 0 15px;
    font-size: 13px;
}

.dashboard-main {
    width: min(100% - 40px, 1120px);
    margin: 56px auto;
}

.dashboard-main h1 {
    margin-bottom: 24px;
}

.empty-state {
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.dashboard-action {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-action:hover {
    background: var(--accent-hover);
    color: #fff;
}

@media (max-width: 760px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-main {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 24px;
    }

    .auth-body {
        padding: 52px 0;
    }

    .auth-aside {
        display: none;
    }
}