:root {
    --bg: #f5efe6;
    --surface: #fffaf3;
    --surface-strong: #ffffff;
    --line: #d7c8b5;
    --text: #2a2018;
    --muted: #715b4a;
    --accent: #c55f31;
    --accent-dark: #93401c;
    --success: #2b7f57;
    --error: #b03d37;
    --shadow: 0 18px 48px rgba(66, 38, 17, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(197, 95, 49, 0.12), transparent 22%),
        linear-gradient(180deg, #f8f2ea 0%, #f2e9dd 100%);
}

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

.shell {
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto 56px;
}

.card {
    background: rgba(255, 250, 243, 0.92);
    border: 1px solid rgba(113, 91, 74, 0.12);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
    backdrop-filter: blur(8px);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.hero h1,
.card h2,
.card h3 {
    margin: 0 0 8px;
    font-weight: 600;
}

.lead,
.muted,
.card p,
li,
td,
th,
label span,
input,
select,
textarea,
button {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 700;
}

.login-box,
.grid-form,
.embedded-form {
    display: grid;
    gap: 14px;
}

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

.field-span {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
}

input,
select,
textarea,
button {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    font-size: 0.96rem;
    color: var(--text);
    background: var(--surface-strong);
}

textarea {
    resize: vertical;
}

button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

.primary-button {
    background: linear-gradient(135deg, var(--accent) 0%, #da824d 100%);
    color: #fff;
    border: none;
}

.secondary-button {
    background: transparent;
    color: var(--accent-dark);
    border: 1px solid rgba(147, 64, 28, 0.22);
}

.inline-button {
    width: auto;
    padding-inline: 18px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.tabs a,
.pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(113, 91, 74, 0.12);
    color: var(--muted);
}

.tabs a.active,
.pill.accent {
    background: rgba(197, 95, 49, 0.12);
    color: var(--accent-dark);
    border-color: rgba(197, 95, 49, 0.24);
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.notice.success {
    color: var(--success);
    background: rgba(43, 127, 87, 0.08);
}

.notice.error {
    color: var(--error);
    background: rgba(176, 61, 55, 0.08);
}

.stats-grid,
.two-col,
.three-col {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

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

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

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

.three-col {
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    align-items: start;
    margin-top: 22px;
}

.stat h2,
.stat h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.stat.soft {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    padding: 18px;
}

.section-head,
.page-actions,
.split,
.hero-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(113, 91, 74, 0.12);
}

.feature-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.variant-block {
    margin-bottom: 24px;
}

.embedded-form {
    background: rgba(255, 255, 255, 0.62);
}

.offer-preview {
    margin-top: 20px;
    border-top: 1px solid rgba(113, 91, 74, 0.12);
    padding-top: 18px;
}

.import-details {
    margin-bottom: 18px;
}

.import-raw {
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(113, 91, 74, 0.12);
    border-radius: 14px;
    padding: 14px;
    max-height: 280px;
    overflow: auto;
    font-size: 0.88rem;
}

.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.checkbox-row input {
    width: 20px;
    height: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-action {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(197, 95, 49, 0.1);
    color: var(--accent-dark);
    border: 1px solid rgba(197, 95, 49, 0.18);
}

@media (max-width: 980px) {
    .hero,
    .section-head,
    .page-actions,
    .split,
    .hero-meta {
        flex-direction: column;
    }

    .stats-grid,
    .stats-grid.compact,
    .two-col,
    .three-col,
    .grid-form {
        grid-template-columns: 1fr;
    }
}
