:root {
    color-scheme: light;
    --bg: #f4f1ea;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --ink: #18231f;
    --muted: #68736e;
    --line: #dedbd2;
    --green-950: #112f28;
    --green-900: #173f35;
    --green-800: #205446;
    --green-700: #2b6a57;
    --green-100: #e7f0ec;
    --gold: #c99043;
    --danger: #a43a35;
    --danger-bg: #f9e8e6;
    --success: #25634f;
    --success-bg: #e5f2ec;
    --shadow: 0 14px 36px rgba(24, 35, 31, .08);
    --radius: 18px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 0%, rgba(201, 144, 67, .12), transparent 28rem),
        var(--bg);
}

body, button, input, select, textarea { font: inherit; }

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-950); }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-strong);
    color: var(--ink);
    padding: .78rem .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
    border-color: var(--green-700);
    box-shadow: 0 0 0 3px rgba(43, 106, 87, .14);
}

label {
    display: grid;
    gap: .42rem;
    color: #34423d;
    font-size: .88rem;
    font-weight: 650;
}

small {
    display: block;
    margin-top: .2rem;
    color: var(--muted);
    font-weight: 450;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.25rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 38%),
        var(--green-950);
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .35rem .35rem 1.6rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px 14px 14px 4px;
    color: var(--green-950);
    background: #f3d7a7;
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand small { color: rgba(255, 255, 255, .62); }

.main-nav {
    display: grid;
    gap: .35rem;
}

.nav-link {
    padding: .78rem .9rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .76);
    font-weight: 620;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.nav-link.active { box-shadow: inset 3px 0 #f3d7a7; }

.nav-caption {
    margin: 1.1rem .9rem .2rem;
    color: rgba(255, 255, 255, .42);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-divider {
    display: block;
    height: 0;
    margin: .95rem .45rem .65rem;
    border-top: 1px solid rgba(243, 215, 167, .62);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}

.sidebar-user {
    margin-top: auto;
    padding: 1rem .35rem .25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-user strong { font-size: .9rem; }
.sidebar-user small { color: rgba(255, 255, 255, .56); }

.link-button {
    margin: .55rem 0 0;
    padding: 0;
    border: 0;
    color: #f3d7a7;
    background: none;
    cursor: pointer;
}

.content-shell { min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 96px;
    padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.topbar h1 {
    margin: .12rem 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-left: auto;
}

.topbar-actions form { margin: 0; }

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
}

.main-content {
    display: grid;
    gap: 1.25rem;
    padding: 0 clamp(1rem, 4vw, 3rem) 3rem;
}

.eyebrow {
    margin: 0;
    color: var(--gold);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 210px;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 26px;
    color: #fff;
    background:
        linear-gradient(110deg, rgba(17, 47, 40, .98), rgba(32, 84, 70, .92)),
        var(--green-900);
    box-shadow: var(--shadow);
}

.hero-panel h2 {
    max-width: 630px;
    margin: .45rem 0 .65rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4vw, 3.15rem);
    line-height: 1.05;
}

.hero-panel p:not(.eyebrow) { margin: 0; color: rgba(255, 255, 255, .68); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card, .panel, .order-summary {
    border: 1px solid rgba(222, 219, 210, .78);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, .92);
    box-shadow: var(--shadow);
}

.stat-card {
    display: grid;
    gap: .45rem;
    padding: 1.3rem 1.45rem;
}

.stat-card span { color: var(--muted); font-size: .83rem; font-weight: 700; }
.stat-card strong { font-family: Georgia, serif; font-size: 2.1rem; }
.stat-card small { margin: 0; }

.panel { padding: clamp(1rem, 2.5vw, 1.55rem); }

.panel-heading, .order-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.panel-heading h2, .order-title h2 {
    margin: .2rem 0 0;
    font-family: Georgia, serif;
    font-size: 1.45rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .68rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--surface-strong);
    font-weight: 750;
    cursor: pointer;
    transition: transform .12s, background .12s, border-color .12s;
}

.button:hover { transform: translateY(-1px); border-color: #beb9ae; }
.button-primary { border-color: var(--green-800); color: #fff; background: var(--green-800); }
.button-primary:hover { color: #fff; background: var(--green-950); }
.button-light { border-color: rgba(255,255,255,.25); color: var(--green-950); background: #f3d7a7; }
.button-wide { width: 100%; }
.button-small { min-height: 34px; padding: .4rem .65rem; font-size: .78rem; }

.alert {
    padding: .9rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 650;
}

.alert-success { color: var(--success); border-color: #bcd9cd; background: var(--success-bg); }
.alert-error { color: var(--danger); border-color: #e8c0bc; background: var(--danger-bg); }
.alert-warning { color: #76510c; border-color: #ead29a; background: #fff6dc; }

.table-wrap { width: 100%; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

th, td {
    padding: .9rem .72rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

tbody tr:hover { background: rgba(231, 240, 236, .4); }
tfoot th { color: var(--ink); font-size: .82rem; background: var(--green-100); }
.number { text-align: right; white-space: nowrap; }
.strong-link { color: var(--green-800); font-weight: 800; white-space: nowrap; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: .26rem .58rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-nowe { color: #7b4f13; background: #faecd4; }
.status-potwierdzone { color: #285e83; background: #e3f0f8; }
.status-gotowe { color: #26614d; background: #e0f1ea; }
.status-dostarczone { color: #fff; background: var(--green-700); }
.status-anulowane { color: #8f3431; background: #f7e3e1; }

.payment-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: .26rem .58rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.payment-paid { color: #26614d; background: #e0f1ea; }
.payment-unpaid { color: #8f3431; background: #f7e3e1; }
.payment-form { margin: 0; }

.filters, .month-picker, .status-form {
    display: flex;
    align-items: end;
    gap: .7rem;
    margin-bottom: 1rem;
}

.filters input { min-width: 250px; }
.filters select { width: 190px; }
.month-picker { justify-content: flex-end; }
.month-picker input { width: 190px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field-wide { grid-column: 1 / -1; }
.order-form { display: grid; gap: 1.25rem; }

.order-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 36px;
    gap: .75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.order-item:first-child { border-top: 0; }

.item-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 850;
}

.item-fields {
    display: grid;
    grid-template-columns: 150px minmax(260px, 1fr) 120px 120px;
    gap: .75rem;
}

.item-description { grid-column: 2 / -1; }
.item-ribbon { grid-column: 1 / -1; }
.item-ribbon textarea { min-height: 128px; resize: vertical; }
.item-notes { grid-column: 1 / -1; }
.item-photos,
.item-photo-preview,
.item-existing-photos { grid-column: 1 / -1; }
.item-photos small { display: block; margin-top: .35rem; color: var(--muted); }
.calculated-amount {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: .75rem .85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--green-100);
    font-weight: 800;
}

.remove-item {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: var(--danger);
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
}

.remove-item:hover { background: var(--danger-bg); }

.form-hint { margin: .6rem 0 0; color: var(--muted); font-size: .82rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; }

.order-summary { padding: clamp(1.2rem, 3vw, 2rem); }

.details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
}

.details-grid > div {
    padding: 1rem;
    border-radius: 12px;
    background: var(--green-100);
}

.details-grid span { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .75rem; }
.details-grid strong { font-size: .95rem; }
.detail-wide { grid-column: span 2; }
.order-notes { padding: 1rem; border-left: 3px solid var(--gold); background: #fbf3e7; }
.order-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.status-form { margin: 0; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.photo-grid figure { margin: 0; }
.photo-grid figcaption { margin-top: .35rem; color: var(--muted); font-size: .75rem; }

.photo-grid a {
    display: grid;
    gap: .4rem;
    color: var(--ink);
    text-decoration: none;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--green-100);
}

.compact-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 160px));
    margin-top: 1rem;
}

.item-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 110px));
    gap: .45rem;
    min-width: 110px;
}

.item-photo-grid img {
    border-radius: 8px;
}

.catalog-link { white-space: nowrap; }
.location-tabs { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, .65fr);
    align-items: start;
    gap: 1.25rem;
}

.compact-panel form { display: grid; gap: .9rem; }

.empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
}

.empty-state h2, .empty-state h3 { margin: 0; color: var(--ink); font-family: Georgia, serif; }

.settlement-result {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    background: var(--green-900);
}

.settlement-result strong { font-family: Georgia, serif; font-size: 1.25rem; }
.selected-month-row { background: var(--green-100); }
.selected-month-row .strong-link { color: var(--green-900); }
.settlement-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.settlement-toolbar .month-picker { margin: 0; }
.settlement-print-heading { display: none; }
.company-settlement-filter {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}
.company-settlement-filter form {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    margin: 0;
}
.company-settlement-filter label {
    flex: 1;
    min-width: 220px;
    margin: 0;
}
.payment-range-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}
.payment-range-panel h2,
.payment-range-panel p { margin: 0; }
.payment-range-panel .muted { margin-top: .35rem; }
.payment-range-panel form {
    display: flex;
    align-items: flex-end;
    gap: .75rem;
    margin: 0;
}
.payment-range-panel label {
    min-width: 155px;
    margin: 0;
}
.company-settlement-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}
.company-settlement-card {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: var(--paper);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}
.company-settlement-card span { font-weight: 800; }
.company-settlement-card strong { color: var(--muted); font-size: .84rem; }
.company-settlement-card:hover,
.company-settlement-card.is-active {
    border-color: var(--green-700);
    color: #fff;
    background: var(--green-800);
}
.company-settlement-card:hover strong,
.company-settlement-card.is-active strong { color: #dbece5; }

.payment-actions {
    min-width: 150px;
}

.payment-actions {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .55rem;
}

.inline-edit {
    display: block;
}

.inline-edit > summary {
    list-style: none;
    cursor: pointer;
}

.inline-edit > summary::-webkit-details-marker { display: none; }

.inline-edit[open] > form {
    display: grid;
    width: min(360px, 76vw);
    margin-top: .65rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
}

.inline-edit[open] > form label {
    display: grid;
    gap: .28rem;
}

.danger-link { color: #a83232; }

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.chart-legend i {
    width: .8rem;
    height: .8rem;
    border-radius: 3px;
}

.legend-income { background: #287d67; }
.legend-cost { background: #cf8352; }

.turnover-chart {
    display: grid;
    gap: .8rem;
}

.turnover-chart-row {
    display: grid;
    grid-template-columns: 105px minmax(280px, 1fr) 150px;
    align-items: center;
    gap: 1rem;
}

.turnover-chart-bars {
    display: grid;
    gap: .28rem;
}

.turnover-chart-bar {
    position: relative;
    min-height: 1.25rem;
    border-radius: 999px;
    background: #edf0eb;
    overflow: hidden;
}

.turnover-chart-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    min-width: 2px;
    border-radius: inherit;
}

.turnover-chart-bar em {
    position: relative;
    z-index: 1;
    display: block;
    padding: .16rem .55rem;
    color: #102e27;
    font-size: .74rem;
    font-style: normal;
    font-weight: 800;
}

.bar-income span { background: #7bc2ae; }
.bar-cost span { background: #efba92; }

.result-positive { color: #0b7559; }
.result-negative { color: #b13b3b; }

.login-page {
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 12% 16%, rgba(201, 144, 67, .22), transparent 30rem),
        var(--green-950);
}

.login-shell {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    width: min(940px, 100%);
    min-height: 540px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .26);
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 7vw, 5rem);
    color: #fff;
    background:
        linear-gradient(140deg, rgba(23, 63, 53, .96), rgba(17, 47, 40, .91)),
        var(--green-900);
}

.login-brand .brand-mark { margin-bottom: 2rem; }
.login-brand h1 { margin: .5rem 0 1rem; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: .98; }
.login-brand p:last-child { max-width: 430px; color: rgba(255, 255, 255, .68); line-height: 1.6; }

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4.5rem);
}

.login-card h2 { margin: 0; font-family: Georgia, serif; font-size: 2rem; }
.login-card form { display: grid; gap: 1rem; margin-top: 1.3rem; }
.muted { color: var(--muted); }

@media (max-width: 1100px) {
    .item-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-description, .item-ribbon, .item-notes { grid-column: 1 / -1; }
    .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        width: 270px;
        box-shadow: 20px 0 60px rgba(0,0,0,.25);
        transition: transform .2s ease;
    }
    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(5, 17, 14, .42);
        z-index: 20;
    }
    .menu-button { display: inline-grid; place-items: center; }
    .topbar { min-height: 82px; }
    .topbar-action { display: none; }
    .stats-grid, .two-column { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { min-height: 300px; }
}

@media (max-width: 600px) {
    .main-content { padding-bottom: 1.5rem; }
    .hero-panel { align-items: flex-start; flex-direction: column; min-height: 0; }
    .form-grid, .item-fields, .details-grid { grid-template-columns: 1fr; }
    .field-wide, .item-description, .item-ribbon, .item-notes, .detail-wide { grid-column: auto; }
    .order-item { grid-template-columns: 30px minmax(0, 1fr) 28px; gap: .4rem; }
    .filters, .month-picker, .status-form, .order-actions { align-items: stretch; flex-direction: column; }
    .settlement-toolbar { align-items: stretch; flex-direction: column; }
    .company-settlement-filter form { align-items: stretch; flex-direction: column; }
    .payment-range-panel,
    .payment-range-panel form {
        align-items: stretch;
        flex-direction: column;
    }
    .payment-range-panel label { min-width: 0; }
    .turnover-chart-row { grid-template-columns: 1fr; gap: .35rem; }
    .turnover-chart-row > b { text-align: right; }
    .filters input, .filters select, .month-picker input { width: 100%; min-width: 0; }
    .form-actions { position: sticky; bottom: 0; padding: .8rem; border-radius: 12px; background: rgba(244, 241, 234, .94); backdrop-filter: blur(10px); }
    .form-actions .button { flex: 1; }
    th, td { padding: .78rem .6rem; }
    .login-page { padding: 0; }
    .login-shell { min-height: 100vh; border-radius: 0; }
    .login-brand { min-height: 250px; }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body {
        color: #111;
        background: #fff;
    }

    .sidebar,
    .topbar,
    .order-actions,
    .form-actions,
    .print-hidden,
    .payment-form,
    [data-add-item],
    .remove-item,
    .catalog-link,
    input[type="file"],
    .menu-button,
    .alert {
        display: none !important;
    }

    .settlement-print-heading {
        display: block;
        margin: 0 0 8mm;
        padding-bottom: 4mm;
        border-bottom: 2px solid #184d40;
    }

    .settlement-print-heading p,
    .settlement-print-heading span {
        margin: 0;
        color: #555;
        font-size: 10pt;
    }

    .settlement-print-heading h1 {
        margin: 1mm 0;
        color: #111;
        font-size: 24pt;
    }

    .app-shell,
    .main-content,
    .content {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .order-summary,
    .panel {
        margin: 0 0 8mm;
        padding: 5mm;
        border: 1px solid #bbb;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
    }

    .order-form input,
    .order-form select,
    .order-form textarea,
    .calculated-amount {
        min-height: 0;
        padding: 1mm 0;
        border: 0;
        border-radius: 0;
        color: #111;
        background: transparent;
        box-shadow: none;
        appearance: none;
        -webkit-appearance: none;
    }

    .order-form textarea {
        overflow: visible;
        resize: none;
    }

    .order-item {
        break-inside: avoid;
    }

    .details-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .table-wrap {
        overflow: visible;
    }

    table {
        width: 100%;
        font-size: 9pt;
    }

    th,
    td {
        padding: 2.5mm 2mm;
    }

    tr,
    img {
        break-inside: avoid;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-grid img {
        width: 100%;
        max-height: 105mm;
        object-fit: contain;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}
.password-editor {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(14, 62, 51, 0.14);
}

.password-editor summary {
  color: var(--green-700);
  cursor: pointer;
  font-weight: 700;
}

.password-editor form {
  margin-top: 0.75rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: .12rem;
    accent-color: var(--green-700);
}

.integration-details {
    margin: 1.25rem 0;
}

.integration-code-panel ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
    line-height: 1.7;
}

.integration-code {
    width: 100%;
    min-height: 34rem;
    padding: 1rem;
    border: 1px solid rgba(14, 62, 51, 0.2);
    border-radius: 0.8rem;
    color: #edf7f3;
    background: #102f28;
    font: 0.82rem/1.55 Consolas, "Courier New", monospace;
    resize: vertical;
}
