:root {
    --brand: #0c8d91;
    --brand-dark: #087176;
    --brand-soft: rgba(12, 141, 145, .08);
    --brand-soft-border: rgba(12, 141, 145, .25);
    --ink: #222;
    --muted: #777;
    --line: #eee;
    --page: #fafbfb;
    --danger: #b00020;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
    background: linear-gradient(135deg, #fff 0%, #f8fafa 100%);
    color: #555;
    font-family: "Open Sans", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

.shell {
    margin-left: auto;
    margin-right: auto;
    max-width: 1140px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.site-header { background: var(--brand); color: #fff; min-height: 96px; }
.site-header .shell {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 96px;
}
.site-header span {
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}
.site-logo { display: block; height: auto; width: 132px; }
.header-logout { margin: 0; }
.header-logout button {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, .82);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 0;
    text-transform: uppercase;
}
.header-logout button:hover, .header-logout button:focus { color: #fff; }

.page-band { background: #111; color: #fff; }
.page-band .shell {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 88px;
}
.page-band strong { font-size: 21px; font-weight: 300; }
.page-band span { color: rgba(255, 255, 255, .72); font-size: 13px; }

.main { padding-bottom: 70px; padding-top: 100px; }
h1, h2 { color: var(--ink); line-height: 1.35; margin-top: 0; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
.eyebrow {
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin: 0 0 7px;
    text-transform: uppercase;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 6px -6px rgba(0, 0, 0, .2);
    padding: 30px;
}
.auth-panel { margin: 0 auto; max-width: 520px; }
.layout {
    align-items: start;
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.section-heading {
    align-items: flex-start;
    border-bottom: 1px solid #eef0f2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 18px;
}
.section-heading h1 { margin-bottom: 0; }
.section-heading p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.section-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.section-actions form { margin: 0; }
.editor > h1 {
    border-bottom: 1px solid #eef0f2;
    margin-bottom: 22px;
    padding-bottom: 18px;
}

.banner-row {
    align-items: center;
    border: 1px solid var(--line);
    display: grid;
    gap: 16px;
    grid-template-columns: 34px 138px minmax(135px, 1fr) auto;
    margin-bottom: 14px;
    padding: 15px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.banner-row:last-child { margin-bottom: 0; }
.banner-row:hover { border-color: #c8d4d4; box-shadow: 0 5px 14px rgba(0, 0, 0, .04); }
.banner-row.is-dragging { opacity: .46; }
.banner-items.is-saving { pointer-events: none; }
.drag-handle {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: grab;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    touch-action: none;
    width: 34px;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; width: 17px; }
.banner-row:only-child .drag-handle { visibility: hidden; }
.banner-row > img {
    background: var(--brand-soft);
    border: 1px solid #dceaea;
    height: 68px;
    object-fit: cover;
    width: 138px;
}
.banner-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.banner-copy strong { color: var(--ink); font-size: 14px; }
.banner-copy small { color: #888; font-size: 12px; }
.status { border-radius: 2px; font-size: 11px; font-weight: 600; padding: 2px 7px; width: max-content; }
.status--live { background: #e1f5ec; color: #247353; }
.status--muted { background: #f0f2f2; color: #7b8383; }

.row-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.row-actions form { display: inline-flex; margin: 0; }
.row-actions a,
.row-actions button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--brand-soft-border);
    border-radius: 2px;
    color: var(--brand);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    justify-content: center;
    min-height: 34px;
    padding: 6px 9px;
    text-decoration: none;
}
.row-actions a:hover, .row-actions button:hover { background: var(--brand-soft); }
.row-actions button:disabled { cursor: not-allowed; opacity: .3; }
.row-actions .danger { border-color: rgba(176, 0, 32, .22); color: var(--danger); }
.row-actions .icon-action { height: 34px; min-height: 34px; padding: 0; width: 34px; }
.icon-action svg { fill: none; height: 16px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 16px; }
.overview-toggle { margin-right: 1px !important; }

.switch { align-items: center; color: #656d6d; cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 600; gap: 7px; margin: 0; }
.switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.switch span { background: #cbd2d2; border-radius: 999px; display: block; height: 20px; position: relative; transition: .18s; width: 36px; }
.switch span::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); content: ""; height: 16px; left: 2px; position: absolute; top: 2px; transition: .18s; width: 16px; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand-soft-border); outline-offset: 2px; }

label { color: #333; display: block; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
label small { color: #888; display: block; font-size: 11px; font-weight: 400; margin: 3px 0 7px; }
input, select {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0;
    color: #555;
    font: inherit;
    height: 38px;
    margin-top: 7px;
    padding: 8px 11px;
    width: 100%;
}
input[type="file"] { background: #fafbfb; height: auto; min-height: 54px; padding: 14px 11px; }
input:focus, select:focus { border-color: var(--brand); box-shadow: none; outline: 0; }
.check { align-items: center; display: flex; gap: 9px; }
.check input { accent-color: var(--brand); height: auto; margin: 0; width: auto; }
.file-picker {
    align-items: center;
    background: #fafbfb;
    border: 1px solid #ccc;
    color: #777;
    cursor: pointer;
    display: flex;
    font-weight: 400;
    margin-top: 7px;
    min-height: 54px;
    overflow: hidden;
    padding: 12px;
    width: 100%;
}
.file-picker:hover, .file-picker:focus-within { border-color: var(--brand); color: #444; }
.file-picker__input {
    clip: rect(0 0 0 0);
    height: 1px !important;
    margin: 0 !important;
    opacity: 0;
    overflow: hidden;
    padding: 0 !important;
    position: absolute;
    width: 1px !important;
}
.file-picker__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.date-grid[hidden] { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.button {
    align-items: center;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 2px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    text-decoration: none;
}
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button--small { font-size: 12px; min-height: 34px; padding: 6px 10px; }
.button--ghost { background: #fff; color: var(--brand); }
.button--ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }

.alert { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); margin-bottom: 18px; padding: 13px 16px; }
.alert--success { background: rgba(12, 141, 145, .08); color: #075f70; }
.alert--error { background: rgba(176, 0, 32, .08); border-left-color: var(--danger); color: #8e1d32; }
.empty { color: #888; padding: 34px 0; text-align: center; }
.order-status { color: #5e7778; font-size: 12px; min-height: 19px; margin: 10px 0 -10px; text-align: right; }
.order-status.is-error { color: var(--danger); }

@media (max-width: 991.98px) {
    .main { padding-top: 55px; }
    .layout { grid-template-columns: 1fr; }
    .banner-row { grid-template-columns: 34px 130px minmax(0, 1fr); }
    .banner-row > img { height: 65px; width: 130px; }
    .row-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
    .shell { padding-left: 16px; padding-right: 16px; }
    .site-header, .site-header .shell { min-height: 76px; }
    .site-logo { width: 108px; }
    .page-band .shell { align-items: flex-start; flex-direction: column; gap: 8px; min-height: 0; padding-bottom: 20px; padding-top: 20px; }
    .main { padding-bottom: 45px; padding-top: 32px; }
    .panel { padding: 22px; }
    .section-heading { align-items: stretch; flex-direction: column; }
    .section-actions { width: 100%; }
    .section-actions .button, .section-actions form { flex: 1 1 auto; }
    .section-actions form .button { width: 100%; }
    .banner-row { gap: 10px; grid-template-columns: 34px 92px minmax(0, 1fr); padding: 12px; }
    .banner-row > img { height: 62px; width: 92px; }
    .date-grid { grid-template-columns: 1fr; }
    .row-actions { gap: 6px; }
    input, select, .button { min-height: 44px; }
}
