:root {
    --a2l-black: #0f0f0f;
    --a2l-white: #ffffff;
    --a2l-gray: #f5f5f5;
    --a2l-border: #e7e7e7;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--a2l-gray);
    color: var(--a2l-black);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.navbar-brand img {
    object-fit: contain;
}

.login-page,
.verify-page {
    background:
        radial-gradient(circle at top left, rgba(0, 0, 0, 0.06), transparent 35%),
        var(--a2l-gray);
}

.login-card,
.card {
    border-radius: 1.15rem;
}

.login-logo {
    max-width: 150px;
    height: auto;
}

.verify-logo {
    max-width: 220px;
    height: auto;
}

.form-control,
.form-select,
.btn {
    border-radius: .75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #111;
    box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .12);
}

.btn-dark {
    background: #111;
    border-color: #111;
}

.btn-dark:hover {
    background: #000;
    border-color: #000;
}

.btn-outline-dark:hover {
    background: #111;
    border-color: #111;
}

.stat-card {
    background: var(--a2l-white);
    border: 1px solid var(--a2l-border);
    border-radius: 1.15rem;
    padding: 1.25rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.stat-card strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
    margin-top: .25rem;
}

.stat-label {
    color: #666;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .75rem;
    font-weight: 700;
}

.table thead th {
    background: #fafafa;
    color: #555;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.item-table td,
.item-table th {
    vertical-align: middle;
}

.code-badge,
.code-input {
    letter-spacing: .12em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.check-circle {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #198754;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.totals-box {
    background: #fafafa;
    border: 1px solid var(--a2l-border);
    border-radius: 1rem;
    padding: 1rem;
}

.verification-result {
    border-width: 1px;
}

.footer {
    margin-top: auto;
}

@media print {
    .navbar,
    .footer,
    .btn,
    form {
        display: none !important;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none !important;
    }
}

.preview-document {
    max-width: 920px;
    border: 1px solid var(--a2l-border);
    border-radius: 1rem;
    padding: clamp(1rem, 2.5vw, 2rem);
}

.preview-logo {
    max-width: 210px;
    height: auto;
}

.preview-table th {
    width: 180px;
    background: #fafafa;
    color: #111;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    font-size: .86rem;
}

.preview-table td,
.preview-table th,
.preview-items-table td,
.preview-items-table th {
    border-color: #dddddd;
}

.preview-items-table thead th {
    background: #111;
    color: #fff;
    text-transform: none;
    letter-spacing: normal;
    font-size: .9rem;
}

.preview-qr-placeholder {
    width: 130px;
    height: 130px;
    border: 2px dashed #999;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: .75rem;
    color: #555;
    background: #fafafa;
}

.preview-qr-placeholder span {
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1;
}

.preview-qr-placeholder small {
    display: block;
    max-width: 100px;
    margin-top: .35rem;
    font-size: .72rem;
}
