﻿:root {
    font-family:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: #17212b;
    background: #f5f6f7;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f5f6f7;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #172b3a;
    color: #ffffff;
}

.topbar__inner {
    width: min(100% - 28px, 760px);
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: grid;
    text-decoration: none;
}

.brand__company {
    color: #efc47d;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.brand__name {
    font-size: 1.15rem;
    font-weight: 850;
}

.shell {
    width: min(100% - 28px, 760px);
    margin: 0 auto;
    padding: 28px 0 56px;
}

.auth-shell {
    min-height: calc(100vh - 124px);
    display: grid;
    align-items: center;
}

.card {
    padding: 22px;
    border: 1px solid #dde2e6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(23, 43, 58, 0.06);
}

.auth-card {
    width: min(100%, 430px);
    margin: 0 auto;
}

h1,
h2 {
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(1.75rem, 8vw, 2.4rem);
}

h2 {
    margin-bottom: 8px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #9b6318;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.muted {
    margin-top: 0;
    color: #66727c;
}

.form-stack,
.sale-form,
.product-lines {
    display: grid;
    gap: 18px;
}

.form-stack {
    margin-top: 26px;
}

.field {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    min-height: 50px;
    padding: 11px 12px;
    border: 1px solid #aeb9c1;
    border-radius: 10px;
    background: #ffffff;
    color: #17212b;
}

.field input:focus,
.field select:focus {
    outline: 3px solid rgba(155, 99, 24, 0.18);
    border-color: #9b6318;
}

.button {
    min-height: 48px;
    padding: 11px 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.button--full {
    width: 100%;
}

.button--large {
    min-height: 56px;
    font-size: 1rem;
}

.button--primary {
    background: #172b3a;
    color: #ffffff;
}

.button--outline {
    border-color: #bdc6cd;
    background: #ffffff;
    color: #172b3a;
}

.button--quiet {
    min-height: 40px;
    border-color: rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #ffffff;
}

.button--disabled,
button:disabled {
    cursor: not-allowed;
    background: #e4e8eb;
    color: #7b858d;
}

.alert,
.notice {
    padding: 13px 14px;
    border-radius: 10px;
}

.alert {
    border: 1px solid #d77b7b;
    background: #fff4f4;
    color: #842d2d;
}

.sale-alert {
    margin-bottom: 18px;
}

.notice {
    background: #f4f0e8;
    color: #654a20;
}

.fixture-note {
    margin: 14px 0 0;
    color: #7a848c;
    font-size: 0.82rem;
    text-align: center;
}

.page-heading {
    margin-bottom: 24px;
}

.business-grid {
    display: grid;
    gap: 16px;
}

.business-card {
    min-height: 230px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid #dde2e6;
    border-radius: 16px;
    background: #ffffff;
}

.back-row {
    margin-bottom: 22px;
    font-weight: 750;
}

.form-section {
    display: grid;
    gap: 22px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #172b3a;
    color: #ffffff;
    font-weight: 850;
}

.product-line {
    padding: 18px;
    display: grid;
    gap: 18px;
    border: 1px solid #dfe4e8;
    border-radius: 13px;
    background: #fafbfb;
}

.product-line__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.remove-line {
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #9c3434;
    cursor: pointer;
    font-weight: 800;
}

.stock-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stock-status > div {
    padding: 12px;
    border-radius: 10px;
    background: #eef4ef;
}

.stock-status strong,
.stock-label {
    display: block;
}

.stock-label {
    margin-bottom: 4px;
    color: #64726a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stock-warning {
    padding: 11px 12px;
    border-radius: 10px;
    background: #fff1f1;
    color: #9a2f2f;
    font-size: 0.9rem;
    font-weight: 800;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.input-unit strong {
    color: #5d6871;
}

.preview-card {
    margin-top: 24px;
}

.preview-customer {
    margin: 14px 0;
    padding: 12px 0;
    display: grid;
    gap: 4px;
    border-bottom: 1px solid #e3e7ea;
}

.preview-customer span {
    color: #68737c;
    font-size: 0.82rem;
}

.preview-line {
    padding: 16px 0;
    border-bottom: 1px solid #e3e7ea;
}

.preview-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
}

.preview-grid strong {
    text-align: right;
}

.danger-text {
    color: #a32929;
}

.preview-card .notice {
    margin: 18px 0;
}

@media (max-width: 520px) {
    .shell,
    .topbar__inner {
        width: min(100% - 20px, 760px);
    }

    .shell {
        padding-top: 20px;
    }

    .card,
    .business-card {
        padding: 18px;
        border-radius: 14px;
    }

    .two-column,
    .stock-status {
        grid-template-columns: 1fr;
    }

    .product-line {
        padding: 15px;
    }

    .product-line__header {
        align-items: flex-start;
    }
}
