:root {
    --bg: #f3f0e8;
    --panel: #fffdf9;
    --line: #d8d0c2;
    --text: #231f1a;
    --muted: #6a6157;
    --accent: #0f766e;
    --accent-soft: #d8f2ee;
    --warn: #a16207;
    --warn-soft: #fef3c7;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --success: #166534;
    --success-soft: #dcfce7;
    --neutral-soft: #ece7de;
    --shadow: 0 4px 16px rgba(51, 41, 28, 0.07);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 30%),
        linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
}

a {
    color: inherit;
}

/* ── Layout ── */

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

.sidebar {
    padding: 20px 16px;
    border-right: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.8);
    backdrop-filter: blur(8px);
}

.content {
    padding: 20px 24px;
}

/* ── Typography ── */

.brand-block h1,
.page-header h2,
.panel h3,
.content-block h4,
.auth-brand h1,
.auth-copy h2,
.stack-main h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-block h1 {
    font-size: 17px;
}

.page-header h2 {
    font-size: 18px;
}

.panel h3 {
    font-size: 14px;
}

.eyebrow {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: var(--accent);
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.strong {
    font-weight: 700;
}

/* ── Sidebar nav ── */

.nav {
    display: grid;
    gap: 4px;
    margin-top: 20px;
}

.nav-link,
.button,
.text-link {
    text-decoration: none;
}

.nav-link {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: background 0.12s;
}

.nav-link:hover {
    background: var(--neutral-soft);
}

.nav-active,
.nav-active:hover {
    background: var(--neutral-soft);
    color: var(--primary, #2563eb);
    font-weight: 700;
}

/* ── Page header ── */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

/* ── Grids ── */

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

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 16px;
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 16px;
}

/* ── Cards & panels ── */

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid rgba(216, 208, 194, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 14px 16px;
}

.stats-grid-compact {
    margin-bottom: 0;
}

.stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.12s, transform 0.12s;
}

.stat-card-link:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.stat-card .label {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
}

.stat-card .value {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.panel {
    padding: 16px;
    margin-bottom: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.panel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Filters ── */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.filters label {
    display: grid;
    gap: 5px;
    font-size: 13px;
}

/* ── Form elements ── */

input,
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: transparent;
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s;
}

.button:hover {
    opacity: 0.88;
}

.button-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.button-sm {
    font-size: 12px;
    padding: 5px 10px;
    font-weight: 500;
}

/* ── Table ── */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

.table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cell-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* ── Completion ── */

.completion-panel {
    border-color: rgba(15, 118, 110, 0.24);
}

.completion-score {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 86px;
}

.completion-score strong {
    font-size: 24px;
    line-height: 1;
}

.completion-score span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.completion-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.completion-step {
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.completion-step-done {
    background: var(--success-soft);
    border-color: #add8ba;
}

.completion-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* ── Specifications ── */

.spec-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.spec-column-title {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.spec-group-list,
.spec-fields {
    display: grid;
    gap: 10px;
}

.spec-group-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}

.spec-group-option-active {
    border-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

.spec-group-option input {
    width: auto;
    margin-top: 3px;
}

.spec-group-option strong {
    display: block;
    font-size: 13px;
}

.spec-group-option small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.spec-group-option em {
    align-self: start;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--neutral-soft);
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.spec-field-group {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.spec-field-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.spec-field-group h4 {
    margin: 2px 0 0;
    font-size: 15px;
}

.required-dot {
    display: inline-flex;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.spec-empty-state {
    min-height: 160px;
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
}

/* ── Badges ── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-neutral  { background: var(--neutral-soft); }
.badge-warn     { background: var(--warn-soft);    color: var(--warn); }
.badge-danger   { background: var(--danger-soft);  color: var(--danger); }
.badge-success  { background: var(--success-soft); color: var(--success); }

/* ── Detail list ── */

.detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    padding-top: 1px;
}

.detail-list dd {
    margin: 0;
}

.content-block p {
    line-height: 1.55;
    margin: 0 0 10px;
}

/* ── Platform cards ── */

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.platform-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 236, 0.98));
    border: 1px solid rgba(216, 208, 194, 0.8);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.platform-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.platform-card h4 {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.platform-type {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.platform-meta {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.platform-meta div {
    display: grid;
    gap: 2px;
}

.platform-meta dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.platform-meta dd {
    margin: 0;
    font-size: 14px;
}

.platform-notes {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.platform-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Misc ── */

.result-box {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
}

.code-block {
    margin: 0;
    padding: 12px;
    border-radius: var(--radius);
    background: #f5f2eb;
    border: 1px solid var(--line);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.5;
}

.platform-form {
    margin-top: 8px;
}

.panel-inner {
    margin-bottom: 0;
}

/* ── Settings ── */

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

.settings-grid label {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.settings-grid-wide {
    grid-column: 1 / -1;
}

.checkbox-panel {
    display: grid;
    gap: 8px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ── Flash messages ── */

.flash {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 13px;
}

.flash-success {
    background: var(--success-soft);
    border-color: #9ed3ae;
    color: var(--success);
}

.flash-error {
    background: var(--danger-soft);
    border-color: #f2b3b3;
    color: var(--danger);
}

.app-flash {
    margin-bottom: 16px;
}

/* ── Navigation helpers ── */

.page-back {
    margin-bottom: 14px;
    font-size: 13px;
}

/* ── Channel grid (product detail) ── */

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.channel-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.channel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.toggle-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    cursor: pointer;
}

.toggle-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ── Upload form ── */

.upload-form {
    max-width: 640px;
}

.upload-field-group {
    display: grid;
    gap: 18px;
}

.upload-label-block {
    display: grid;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.upload-label-block small {
    font-weight: 400;
}

.radio-group {
    display: grid;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 400;
}

.radio-option input[type="radio"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.radio-option span {
    display: grid;
    gap: 2px;
}

.radio-option small {
    color: var(--muted);
    font-size: 12px;
}

.radio-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* ── Auth / login ── */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: min(1000px, 100%);
    background: rgba(255, 253, 249, 0.97);
    border: 1px solid rgba(216, 208, 194, 0.9);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 560px;
}

.auth-visual {
    position: relative;
    overflow: hidden;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.12), transparent 30%),
        linear-gradient(180deg, #fffef9 0%, #f2eee4 100%);
    border-right: 1px solid rgba(216, 208, 194, 0.9);
}

.auth-brand {
    position: relative;
    z-index: 1;
    max-width: 320px;
}

.auth-brand h1 {
    font-size: 32px;
    line-height: 1.05;
    margin: 0 0 10px;
}

.auth-brand .muted {
    font-size: 14px;
    line-height: 1.5;
}

.auth-illustration {
    position: relative;
    z-index: 1;
    height: calc(100% - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(216, 208, 194, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stack-main {
    width: min(380px, 100%);
    padding: 20px;
}

.stack-main h2 {
    margin: 12px 0 8px;
    font-size: 20px;
}

.stack-main p {
    margin: 0;
    line-height: 1.55;
    color: var(--muted);
    font-size: 13px;
}

.stack-pill,
.auth-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stack-float {
    position: absolute;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.stack-left   { left: 24px;  bottom: 100px; }
.stack-right  { right: 20px; top: 70px; }
.stack-bottom { right: 60px; bottom: 30px; }

.shape {
    position: absolute;
    transform: rotate(45deg);
    border-radius: 6px;
    background: rgba(15, 118, 110, 0.07);
}

.shape-a { width: 18px; height: 18px; top: 54px;   right: 90px; }
.shape-b { width: 12px; height: 12px; left: 70px;  top: 200px; }
.shape-c { width: 22px; height: 22px; right: 140px; bottom: 100px; }

.auth-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-form-wrap {
    width: min(400px, 100%);
}

.auth-topline {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.auth-copy {
    margin-bottom: 20px;
}

.auth-copy h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.auth-copy p,
.auth-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-note {
    margin-top: 14px;
}

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

.auth-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.auth-button {
    width: 100%;
    justify-content: center;
    padding-block: 11px;
    font-size: 14px;
}

/* ── Platform detail page ── */

.platform-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.platform-detail-title {
    margin: 2px 0 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.settings-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.settings-three-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.settings-four-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
    align-items: start;
}

@media (max-width: 900px) {
    .settings-three-grid,
    .settings-four-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .settings-page-grid,
    .settings-three-grid,
    .settings-four-grid { grid-template-columns: 1fr; }
}

.field-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field-stack label {
    display: grid;
    gap: 5px;
    font-size: 13px;
}

.settings-panel {
    margin-bottom: 0;
}

.settings-grid-2col {
    grid-template-columns: 1fr 1fr;
}

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

.settings-inline-label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ── Panel title with info button ── */

.panel-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: border-color 0.12s, color 0.12s;
}

.info-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Info dialog ── */

.info-dialog {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(51, 41, 28, 0.14);
    padding: 0;
    max-width: 420px;
    width: calc(100vw - 48px);
    background: var(--panel);
}

.info-dialog::backdrop {
    background: rgba(35, 31, 26, 0.32);
}

.info-dialog-inner {
    padding: 20px;
}

.info-dialog h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.info-dl {
    margin: 0 0 16px;
    display: grid;
    gap: 11px;
}

.info-dl div {
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}

.info-dl div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-dl dt {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 3px;
}

.info-dl dd {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.info-close {
    width: 100%;
    justify-content: center;
}

/* ── Action stack (vertical buttons) ── */

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Result box variants ── */

.result-box-success {
    border-color: #9ed3ae;
    background: var(--success-soft);
    margin-bottom: 14px;
}

.result-box-error {
    border-color: #f2b3b3;
    background: var(--danger-soft);
    margin-bottom: 14px;
}

.result-box-meta {
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.result-box-msg {
    margin: 0;
    font-size: 13px;
}

/* ── Platforms index — inline upload section ── */

.upload-inline-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

@media (max-width: 900px) {
    .upload-inline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .upload-inline-grid {
        grid-template-columns: 1fr;
    }
}

.upload-field-col {}

.upload-field-submit .button {
    width: 100%;
}

.upload-help-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .upload-help-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .upload-help-grid {
        grid-template-columns: 1fr;
    }
}

.upload-help-item {
    padding: 10px 12px;
    background: var(--neutral-soft);
    border-radius: var(--radius);
}

.upload-help-title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.upload-help-item .muted {
    font-size: 11px;
    line-height: 1.4;
}

.platform-status-note {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

/* ── Bulk action bar ── */

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border: 1px solid #b6e4de;
    border-radius: var(--radius);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.bulk-count {
    font-size: 13px;
    font-weight: 600;
    min-width: 110px;
    color: var(--accent);
}

.bulk-select {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
}

.table th.col-check,
.table td.col-check {
    width: 36px;
    padding-right: 0;
    text-align: center;
}

.table td.col-check input[type="checkbox"],
.table th.col-check input[type="checkbox"] {
    cursor: pointer;
    width: 15px;
    height: 15px;
    margin: 0;
}

@media (max-width: 900px) {
    .spec-workspace {
        grid-template-columns: 1fr;
    }
}

/* ── Product detail (Kantana-style layout) ── */

.product-layout {
    display: grid;
    grid-template-columns: 1fr 272px;
    gap: 16px;
    align-items: start;
}

.product-main {
    min-width: 0;
}

.product-sidebar {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 10px;
}

.product-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    line-height: 1.25;
}

/* ── Tab navigation ── */

.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--line);
    margin-bottom: 14px;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: color 0.12s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-panel {
    display: none;
}

.tab-panel-active {
    display: block;
}

/* ── Section heading within tab panels ── */

.section-heading {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

/* ── Sidebar: completion ── */

.sidebar-completion-bar {
    height: 5px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
    margin: 8px 0 10px;
}

.sidebar-completion-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
}

.sidebar-step-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.sidebar-step-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neutral-soft);
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    flex-shrink: 0;
}

.sidebar-step-num-done {
    background: var(--success-soft);
    color: var(--success);
}

.sidebar-step-label {
    flex: 1;
    font-weight: 600;
    color: var(--text);
}

/* ── Sidebar: platform status rows ── */

.sidebar-platform-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
}

.sidebar-platform-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Compact detail-list for sidebar ── */

.detail-list-compact div {
    grid-template-columns: 90px 1fr;
    gap: 8px;
    padding-bottom: 5px;
}

.detail-list-compact dt {
    font-size: 11px;
}

.detail-list-compact dd {
    font-size: 12px;
}

/* ── Platform tab header ── */

.channel-platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.platform-type-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 2px;
}

.channel-platform-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ── Secondary nav (Specificaties / Auditlog links) ── */

.product-secondary-nav {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.product-secondary-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.product-secondary-link:hover {
    color: var(--accent);
}

/* ── Extra sections below the tab panel ── */

.product-extra-section {
    margin-top: 28px;
}

.product-extra-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--line);
}

.product-extra-section-header h3 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
}

/* ══════════════════════════════════════════════════
   Lightspeed-stijl channel tabs
══════════════════════════════════════════════════ */

.ls-channel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0 16px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--line);
}

.ls-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Secties ── */

.ls-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 8px;
    overflow: hidden;
}

.ls-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px 10px;
    background: var(--neutral-soft);
    border-bottom: 1px solid var(--line);
}

.ls-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text);
    margin: 0;
}

.ls-section-desc {
    font-size: 12px;
    color: var(--muted);
    margin: 2px 0 0;
}

.ls-section-body {
    padding: 14px 16px;
}

/* ── WYSIWYG editor (CKEditor) ── */

.cke {
    border-color: var(--line) !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}
.cke_top {
    border-bottom-color: var(--line) !important;
    border-radius: 0 !important;
}
.cke_bottom {
    border-top-color: var(--line) !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}

/* ── Grid & velden ── */

.ls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ls-grid-wide {
    grid-column: 1 / -1;
}

.ls-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ls-field input[type="text"],
.ls-field input[type="number"],
.ls-field select,
.ls-field textarea {
    width: 100%;
}

.ls-field-readonly input {
    background: var(--neutral-soft);
    color: var(--muted);
    cursor: default;
}

.ls-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ls-label-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
}

.ls-label-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.ls-label-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.ls-readonly-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: var(--neutral-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 5px;
}

.ls-char-counter {
    margin-left: auto;
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
}

.ls-char-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

/* ── URL veld ── */

.ls-url-field {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.ls-url-prefix {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--neutral-soft);
    border-right: 1px solid var(--line);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.ls-url-field input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
    min-width: 0;
}

/* ── Afbeeldingen ── */

.ls-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ls-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--neutral-soft);
    cursor: grab;
}

.ls-image-item.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary, #2563eb);
}

.ls-image-drag-handle {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.4);
    border-radius: 3px;
    padding: 1px 3px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    user-select: none;
}

.ls-image-item:hover .ls-image-drag-handle {
    opacity: 1;
}

.ls-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ls-image-delete-form {
    position: absolute;
    top: 4px;
    right: 4px;
}

.ls-image-delete {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0;
}

.ls-image-item:hover .ls-image-delete {
    opacity: 1;
}

.ls-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ls-upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.ls-upload-area input[type="file"] {
    display: none;
}

.ls-upload-icon {
    font-size: 22px;
    color: var(--muted);
    line-height: 1;
}

.ls-upload-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.ls-upload-hint {
    font-size: 11px;
    color: var(--muted);
}

/* ── Category picker ─────────────────────────────────────────────────────── */
.cat-path-prefix { color: var(--muted); }

.cat-selected-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.cat-selected-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    padding: 4px 8px 6px;
    border-bottom: 1px solid var(--border);
}
.cat-selected-table tbody tr {
    border-bottom: 1px solid var(--border);
}
.cat-selected-table tbody tr:last-child { border-bottom: none; }
.cat-path-cell { padding: 8px 8px; }
.cat-remove-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.cat-remove-btn:hover { color: var(--error, #b91c1c); background: #fef2f2; }

/* Overlay */
.cat-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 400;
    opacity: 0;
    transition: opacity .2s;
}
.cat-panel-overlay.cat-panel-overlay-open { opacity: 1; }

/* Slide-in panel */
.cat-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(540px, 100vw);
    background: #fff;
    z-index: 401;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .2s ease;
    display: none;
}
.cat-panel.cat-panel-open { transform: translateX(0); }

.cat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cat-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.cat-panel-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cat-search-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.cat-search-input:focus { border-color: var(--accent); }

.cat-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.cat-panel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 20px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.cat-panel-row:last-child { border-bottom: none; }
.cat-panel-row:hover { background: var(--neutral-soft, #f8f8f8); }
.cat-panel-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.cat-panel-path { line-height: 1.4; }
