:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --ink: #162024;
    --muted: #5f6d73;
    --line: #d8e0e4;
    --soft: #edf4f3;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --danger: #b42318;
    --ok: #167647;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    padding: 18px 0 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
}

h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: 2.4rem; line-height: 1.05; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; margin-bottom: 8px; }

.contact { color: var(--brand-dark); font-weight: 700; }

.section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    margin-top: 16px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 8px;
    color: var(--ink);
    font: inherit;
    background: #fff;
}

input:invalid, select:invalid, textarea:invalid { border-color: #d7aaa5; }
textarea { resize: vertical; margin-top: 8px; }

label span, td span, .field-error {
    display: block;
    min-height: 18px;
    color: var(--danger);
    font-size: 0.74rem;
    font-weight: 650;
}

.top-error { margin: 10px 0 0; }

.table-wrap {
    overflow-x: visible;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.items {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.items th, .items td {
    border-bottom: 1px solid var(--line);
    padding: 6px;
    vertical-align: top;
}

.items th {
    background: var(--soft);
    color: var(--muted);
    text-align: left;
    font-size: 0.74rem;
}

.items tr:last-child td { border-bottom: 0; }
.items .lp { width: 42px; color: var(--muted); font-weight: 700; }

button {
    border: 0;
    border-radius: 6px;
    min-height: 42px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.primary { background: var(--brand); color: #fff; margin-top: 18px; }
.primary:hover { background: var(--brand-dark); }
.secondary { background: #e3eeec; color: var(--brand-dark); margin-top: 14px; }
.icon { width: 36px; min-height: 36px; padding: 0; background: #f4e7e5; color: var(--danger); font-size: 1.3rem; }

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    font-weight: 700;
    margin-top: 12px;
}
.notice.success { color: var(--ok); background: #e8f5ee; }
.notice.error { color: var(--danger); background: #fbecea; }

.checkbox {
    display: flex;
    grid-template-columns: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    color: var(--ink);
    font-weight: 650;
}
.checkbox input { width: auto; min-height: auto; margin-top: 4px; }

.summary {
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    margin-top: 16px;
}
.summary p { margin: 0 0 8px; }
.summary ul { margin: 0; padding-left: 20px; }

.captcha-note { margin: 14px 0 0; color: var(--muted); font-size: 0.9rem; font-weight: 650; }
.trap { position: absolute; left: -9999px; }

.map-panel {
    height: 520px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
inpost-geowidget { display: block; width: 100%; height: 100%; }

@media (max-width: 1100px) {
    .table-wrap { overflow-x: auto; }
    .items { min-width: 1180px; table-layout: auto; }
}

@media (max-width: 760px) {
    .shell { width: min(100% - 20px, 1180px); padding-top: 12px; }
    .topbar, .section-head { align-items: stretch; flex-direction: column; }
    .grid { grid-template-columns: 1fr; }
    .section { padding: 14px; }
    h1 { font-size: 1.85rem; }
}
