:root {
    --bg: #f5f1e8;
    --panel: #fffdf8;
    --line: #dbc9ab;
    --text: #1e293b;
    --muted: #6b7280;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #b45309;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: linear-gradient(180deg, #f5f1e8 0%, #f2f7f6 100%);
    color: var(--text);
}

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

.shell {
    width: min(1220px, calc(100% - 32px));
    margin: 24px auto 40px;
    display: grid;
    gap: 20px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    padding: 22px;
}

.hero,
.preview-toolbar,
.doc-header,
.block-head,
.doc-block-head,
.status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.eyebrow,
.doc-tag {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
    color: #0f2f38;
}

.subcopy,
.block-head p,
.status-note,
.doc-url {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions,
.preview-toolbar {
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.16);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.secondary-btn {
    background: #ecfdf5;
    color: var(--brand-dark);
    border-color: #b7e4d8;
}

.ghost-btn {
    background: #fff;
    color: #7c2d12;
    border-color: #e7c9b2;
}

.status-row {
    margin: 8px 0 18px;
    padding: 12px 16px;
    border: 1px dashed #cfd8dc;
    border-radius: 16px;
    color: var(--muted);
}

.reservation-form {
    display: grid;
    gap: 18px;
}

.reservation-form .cols-3,
.reservation-form .cols-1 {
    grid-template-columns: 1fr;
}

.card-block,
.doc-block {
    border: 1px solid #e8ddca;
    border-radius: 18px;
    padding: 18px;
}

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

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

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

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

label span {
    color: #4b5563;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8ccb8;
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    color: var(--text);
}

textarea {
    resize: vertical;
}

.reservation-doc {
    display: grid;
    gap: 18px;
}

.company-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.doc-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.doc-total {
    min-width: 220px;
    text-align: right;
}

.doc-total span,
.summary-card span,
.detail-row span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.doc-total strong {
    display: block;
    font-size: 26px;
    color: var(--brand-dark);
    margin-top: 6px;
}

.doc-total small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

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

.summary-card {
    border: 1px solid #e7decf;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.summary-card strong {
    display: block;
    margin-top: 8px;
    font-size: 17px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.detail-row {
    border-bottom: 1px solid #efe7db;
    padding-bottom: 10px;
}

.detail-row strong {
    display: block;
    margin-top: 6px;
    line-height: 1.45;
}

.guide-copy {
    display: grid;
    gap: 10px;
    color: #334155;
    line-height: 1.65;
}

.guide-copy p,
.guide-footer p {
    margin: 0;
}

.guide-important {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fef3c7;
    color: #78350f;
    font-weight: 700;
}

.guide-footer {
    margin-top: 16px;
    display: grid;
    gap: 4px;
    color: #475569;
}

.notes-box {
    min-height: 72px;
    white-space: pre-wrap;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .summary-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .preview-toolbar,
    .doc-header,
    .status-row {
        flex-direction: column;
    }

    .doc-total {
        text-align: left;
        min-width: 0;
    }
}

@media (max-width: 430px) {
    body {
        background: #f7f3ea;
    }

    .shell {
        width: min(100% - 18px, 100%);
        margin: 10px auto 24px;
        gap: 12px;
    }

    .panel {
        padding: 16px;
        border-radius: 18px;
    }

    .hero-actions,
    .preview-toolbar {
        width: 100%;
    }

    .primary-btn,
    .secondary-btn,
    .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .doc-logo {
        width: 54px;
        height: 54px;
    }

    .doc-total strong {
        font-size: 22px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }
}

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

    body {
        background: #fff;
    }

    .shell {
        width: 100%;
        margin: 0;
        display: block;
    }

    .print-hide {
        display: none !important;
    }

    .panel,
    .card-block,
    .doc-block,
    .summary-card {
        box-shadow: none;
        border-radius: 0;
    }

    .preview-panel {
        border: none;
        padding: 0;
    }

    .reservation-doc {
        gap: 12px;
    }

    .doc-header,
    .summary-grid,
    .details-grid {
        break-inside: avoid;
    }

    .doc-total strong {
        font-size: 22px;
    }
}
