:root {
    --bg: #f4efe5;
    --panel: rgba(255, 250, 243, 0.9);
    --panel-strong: #fffdf8;
    --ink: #182432;
    --muted: #6f6a61;
    --accent: #c95f2d;
    --accent-strong: #8d3f1d;
    --border: #dccdb7;
    --border-strong: #cbb899;
    --shadow: 0 18px 50px rgba(24, 36, 50, 0.08);
    --success: #2a8f59;
    --success-bg: rgba(42, 143, 89, 0.12);
    --error: #b0412e;
    --error-bg: rgba(176, 65, 46, 0.12);
    --info: #315f90;
    --info-bg: rgba(49, 95, 144, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top left, rgba(201, 95, 45, 0.16), transparent 24rem),
        linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

.shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 100vh;
}

.sidebar {
    padding: 28px 22px;
    border-right: 1px solid rgba(220, 205, 183, 0.8);
    background: rgba(255, 250, 243, 0.86);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent) 0%, #f0b97f 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand h1,
.page-header h2,
.panel-header h3,
.subpanel h4 {
    margin: 0;
    font-weight: 700;
}

.page-header h2 {
    font-size: 2rem;
}

.eyebrow,
.section-label,
.stat-label,
small,
th,
.meta-pill,
.status-pill,
.ghost-button,
button {
    font-family: "Trebuchet MS", sans-serif;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-block {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

.nav-link,
.tab-link,
.ghost-button {
    border: 1px solid transparent;
    border-radius: 14px;
    transition: 140ms ease;
}

.nav-link,
.tab-link {
    padding: 11px 13px;
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--border);
    color: var(--ink);
    font-weight: 700;
}

.nav-link:hover,
.tab-link:hover,
.ghost-button:hover,
.store-card:hover {
    transform: translateX(2px);
}

.nav-link.is-active,
.tab-link.is-active,
.store-card.is-selected {
    background: var(--panel-strong);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.sidebar-section {
    margin-top: 18px;
}

.section-label {
    margin-bottom: 8px;
    color: var(--accent-strong);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-copy,
.lede,
.panel-header p,
.helper-banner,
small,
.mini-copy {
    color: var(--muted);
    line-height: 1.5;
}

.store-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 290px);
    overflow: auto;
    padding-right: 4px;
}

.store-card {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(220, 205, 183, 0.75);
    background: rgba(255, 255, 255, 0.62);
}

.store-name {
    font-weight: 700;
}

.store-meta {
    font-size: 0.88rem;
    color: var(--muted);
}

.main {
    padding: 28px;
}

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

.page-header-copy {
    max-width: 760px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.meta-pill {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.stack {
    display: grid;
    gap: 18px;
}

.panel,
.subpanel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel-header {
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.stats-grid.compact {
    min-width: 330px;
}

.stat-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(220, 205, 183, 0.78);
    background: var(--panel-strong);
}

.stat-label {
    color: var(--accent-strong);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card strong {
    font-size: 1.02rem;
    overflow-wrap: anywhere;
}

.form-grid,
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

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

label span {
    font-weight: 700;
}

.field-card {
    align-content: start;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(220, 205, 183, 0.78);
    background: rgba(255, 255, 255, 0.76);
}

.field-card.full-width,
.full-width {
    grid-column: 1 / -1;
}

.checkbox-card {
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 10px;
}

.checkbox-card input {
    margin-top: 4px;
}

.advanced-block {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
    overflow: hidden;
}

.advanced-block summary {
    padding: 15px 18px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.advanced-block summary::-webkit-details-marker {
    display: none;
}

.advanced-grid {
    padding: 0 18px 18px;
}

input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
}

textarea {
    resize: vertical;
}

.checkbox-row {
    align-content: start;
}

.checkbox-row input {
    margin-top: 4px;
}

.form-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.table-wrap {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(220, 205, 183, 0.82);
    background: #fff;
}

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

th,
td {
    padding: 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(220, 205, 183, 0.7);
}

th {
    color: var(--accent-strong);
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.helper-banner {
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    background: rgba(201, 95, 45, 0.08);
}

.helper-banner-error {
    border-left-color: var(--error);
    background: var(--error-bg);
    color: var(--error);
}

.flash {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}

.flash-success {
    color: var(--success);
    background: var(--success-bg);
}

.flash-error {
    color: var(--error);
    background: var(--error-bg);
}

.flash-info {
    color: var(--info);
    background: var(--info-bg);
}

.result-list,
.status-list {
    display: grid;
    gap: 10px;
}

.result-row,
.status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 205, 183, 0.74);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.result-row span,
.status-row small {
    color: var(--muted);
}

.result-row strong,
.status-row strong {
    display: block;
    overflow-wrap: anywhere;
    text-align: right;
}

.status-row > div {
    display: grid;
    gap: 4px;
}

.status-pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill.is-found {
    color: var(--success);
    background: var(--success-bg);
}

.status-pill.is-missing {
    color: var(--error);
    background: var(--error-bg);
}

.mini-copy {
    margin-top: 0;
    margin-bottom: 14px;
}

.result-list-spaced {
    margin-top: 18px;
}

.message-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.message-list li + li {
    margin-top: 8px;
}

.break-cell {
    max-width: 360px;
    overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(220, 205, 183, 0.8);
    }

    .store-list {
        max-height: none;
    }

    .page-header {
        flex-direction: column;
    }

    .stats-grid.compact {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .main {
        padding: 18px;
    }

    .panel,
    .subpanel {
        padding: 18px;
    }

    .result-row,
    .status-row {
        flex-direction: column;
    }

    .result-row strong {
        text-align: left;
    }
}
