:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #eef3f0;
    --text: #16201c;
    --muted: #66736d;
    --line: #d8dfda;
    --primary: #126b56;
    --primary-dark: #0d4d3f;
    --accent: #c47a2c;
    --danger: #b42318;
    --warning: #8a5a00;
    --success: #1f7a42;
    --radius: 8px;
    --shadow: 0 12px 28px rgba(22, 32, 28, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--text);
    font-weight: 800;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: flex-end;
    font-size: 0.94rem;
}

.page-shell {
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 44px;
}

.hero-band,
.admin-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.hero-band {
    padding: 22px 0 6px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    max-width: 760px;
    font-size: 2rem;
    line-height: 1.12;
}

h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
}

.hero-band p:last-child {
    max-width: 720px;
    color: var(--muted);
}

.form-card,
.result-card,
.panel {
    margin-bottom: 18px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.narrow {
    max-width: 520px;
    margin-inline: auto;
}

.form-section {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.grid {
    display: grid;
    gap: 14px;
}

.two-columns {
    grid-template-columns: 1fr;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.wide-form {
    max-width: 900px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid #cbd5cf;
    border-radius: var(--radius);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(18, 107, 86, 0.18);
    border-color: var(--primary);
}

.hint,
small {
    color: var(--muted);
}

.service-grid,
.metric-grid {
    display: grid;
    gap: 12px;
}

.service-card,
.metric-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #fbfcfb;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.service-card input {
    width: 18px;
    min-height: 18px;
    margin: 0;
}

.service-card:has(input:checked) {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.service-title {
    font-weight: 800;
}

.service-description,
.service-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.package-panel {
    margin-top: 14px;
    padding: 14px;
    background: var(--surface-muted);
    border-radius: var(--radius);
}

.checkbox-grid {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-grid label,
.inline-check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}

.checkbox-grid input,
.inline-check input {
    width: 18px;
    min-height: 18px;
}

.compact {
    margin: 0;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
}

.button:hover {
    text-decoration: none;
    border-color: var(--primary);
}

.button.primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.button.primary:hover {
    background: var(--primary-dark);
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
}

.alert.error {
    color: var(--danger);
    border-color: #efb4ad;
    background: #fff4f2;
}

.alert.warning {
    color: var(--warning);
    border-color: #f0d28a;
    background: #fff8e5;
}

.alert.success {
    color: var(--success);
    border-color: #9bd7b1;
    background: #effaf2;
}

.summary-grid,
.detail-list {
    display: grid;
    gap: 12px;
}

.summary-grid {
    grid-template-columns: 1fr;
    margin: 20px 0;
}

.summary-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfcfb;
}

.summary-grid span,
.detail-list dt {
    color: var(--muted);
    font-size: 0.85rem;
}

.summary-grid strong,
.detail-list dd {
    margin: 0;
    font-weight: 800;
}

.status-pill,
.filter-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--primary-dark);
    font-weight: 800;
}

.price-box {
    display: grid;
    gap: 4px;
    margin: 18px 0;
    padding: 16px;
    border-left: 4px solid var(--primary);
    background: var(--surface-muted);
}

.price-box strong {
    font-size: 1.7rem;
}

.bonus-list {
    display: grid;
    gap: 8px;
    padding-left: 20px;
}

.actions-row,
.panel-title-row,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.filter-bar {
    justify-content: flex-start;
    margin-bottom: 16px;
}

.filter-chip {
    border: 1px solid transparent;
}

.filter-chip.active {
    color: #fff;
    background: var(--primary);
}

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

table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.metric-card {
    color: var(--text);
}

.metric-card span {
    color: var(--muted);
}

.metric-card strong {
    font-size: 2rem;
}

.split-panel {
    display: grid;
    gap: 22px;
}

.readonly-textarea {
    min-height: 260px;
    background: #fbfcfb;
}

.hidden {
    display: none !important;
}

.footer {
    padding: 28px 18px;
    color: var(--muted);
    text-align: center;
}

@media (min-width: 720px) {
    .page-shell {
        width: min(1180px, calc(100% - 48px));
        padding-top: 34px;
    }

    h1 {
        font-size: 2.6rem;
    }

    .form-card,
    .result-card,
    .panel {
        padding: 24px;
    }

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

    .service-grid,
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .split-panel {
        grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
    }
}

@media (max-width: 719px) {
    .topbar,
    .admin-heading,
    .hero-band,
    .panel-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .button {
        width: 100%;
    }
}
