/* ============================================================
   Amazon Pinterest Studio — Diseño SaaS moderno y minimalista
   ============================================================ */
:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e6e9f2;
    --text: #1c2333;
    --text-2: #5a6478;
    --muted: #8a94a8;
    --primary: #e60023;
    --primary-dark: #c5001e;
    --ok: #1c9d57;
    --warn: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
    --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; }
img { max-width: 100%; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .85em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: .5rem; }

/* ---------- App layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: #141a2a;
    color: #cdd4e4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo {
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    letter-spacing: .5px;
}
.brand-logo.lg { font-size: 18px; padding: 12px 16px; border-radius: 14px; }
.brand-text strong { display: block; color: #fff; font-size: 15px; }
.brand-text small { color: var(--muted); font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; flex: 1; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    color: #aab4c8; padding: 10px 12px; border-radius: 10px;
    font-size: 14px; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(230, 0, 35, .18); color: #fff; font-weight: 600; }
.nav-ico { width: 20px; text-align: center; font-size: 16px; }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff5c5c);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}
.avatar.lg { width: 52px; height: 52px; font-size: 22px; }
.user-meta { flex: 1; min-width: 0; }
.user-meta strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--muted); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout { color: #aab4c8; font-size: 18px; padding: 4px; }
.logout:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px; background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 20px; font-weight: 700; margin: 0; }
.content { padding: 24px 28px 48px; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; margin: 0; }
.card-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.highlight-card { border: 1.5px solid #ffd6d6; background: linear-gradient(180deg, #fff, #fff7f7); }
.card-sub { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.card-sub h3 { font-size: 15px; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px; display: flex; align-items: center; gap: 14px;
}
.stat-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-ico.blue { background: #e8efff; color: var(--info); }
.stat-ico.green { background: #e6f7ee; color: var(--ok); }
.stat-ico.orange { background: #fef0e0; color: var(--warn); }
.stat-ico.purple { background: #f0e9ff; color: #7c3aed; }
.stat-ico.teal { background: #e0f7f6; color: #0d9488; }
.stat-card strong { display: block; font-size: 20px; }
.stat-card small { color: var(--muted); font-size: 12px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.form-group .req { color: var(--danger); }
.form-group .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="url"], input[type="email"], input[type="password"],
input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
    font: inherit; color: var(--text); background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,0,35,.12);
}
textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
    transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ok { background: #e6f7ee; color: var(--ok); border-color: #bbf0d2; }
.btn-ok:hover { background: var(--ok); color: #fff; }
.btn-warn { background: #fef0e0; color: var(--warn); border-color: #fdd9a8; }
.btn-warn:hover { background: var(--warn); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-xs { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row.wrap { gap: 6px; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e6f7ee; color: #0f6b3a; border: 1px solid #bbf0d2; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Badges / chips ---------- */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.badge-ok { background: #e6f7ee; color: var(--ok); }
.badge-warn { background: #fef0e0; color: var(--warn); }
.badge-danger { background: #fef2f2; color: var(--danger); }
.badge-info { background: #e8efff; color: var(--info); }
.badge-muted { background: #eef0f5; color: var(--muted); }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text-2); }
.tag { background: #eef2ff; color: #4338ca; border-radius: 8px; padding: 3px 9px; font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filter { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; color: var(--text-2); background: var(--surface); }
.chip-filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-filter:hover { text-decoration: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid #f1f3f9; vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
.cell-title { display: flex; align-items: center; gap: 10px; }
.cell-title strong { display: block; }
.cell-title small { color: var(--muted); display: block; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.row-actions { white-space: nowrap; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
    width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.step p { margin: 0; color: var(--text-2); font-size: 13px; }
.step strong { color: var(--text); }

/* ---------- Product hero ---------- */
.product-hero {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; display: flex; gap: 20px; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap;
}
.product-thumb-wrap { flex-shrink: 0; }
.product-thumb { width: 130px; height: 130px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 6px; }
.product-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 40px; }
.product-info { flex: 1; min-width: 240px; }
.product-info h2 { font-size: 18px; margin-bottom: 8px; }
.product-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.product-stats { display: flex; gap: 28px; }
.pstat-value { font-size: 17px; font-weight: 700; display: block; }
.pstat small { color: var(--muted); font-size: 12px; display: block; }
.pstat .strike { text-decoration: line-through; }
.stars { color: #f59e0b; letter-spacing: 2px; }
.product-actions { min-width: 220px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
    padding: 10px 18px; border-radius: 10px 10px 0 0; font-weight: 600; font-size: 14px;
    color: var(--text-2); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { min-height: 300px; }

/* ---------- Progress ---------- */
.progress-box { margin-top: 12px; }
.progress { height: 10px; background: #eef0f5; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), #ff5c5c); border-radius: 999px; transition: width .4s ease; }
.progress-msg { font-size: 13px; color: var(--text-2); margin: 8px 0 0; }
.hidden { display: none !important; }

/* ---------- Pins grid ---------- */
.pins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pin-card {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.pin-card-head { display: flex; justify-content: space-between; align-items: center; }
.pin-num { font-weight: 800; font-size: 14px; color: var(--primary); }
.pin-thumb { aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.pin-img { width: 100%; height: 100%; object-fit: cover; }
.pin-thumb.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 30px; }
.pin-angle { font-size: 13px; color: var(--text-2); }
.pin-form .form-group { margin-bottom: 8px; }
.pin-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Images grid ---------- */
.images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.image-card { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.image-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.image-card.placeholder { aspect-ratio: 2/3; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--muted); }
.image-card figcaption { padding: 10px; }
.image-card figcaption strong { font-size: 12px; display: block; margin-bottom: 8px; }

/* ---------- Editor ---------- */
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-grid .span-2 { grid-column: span 2; }
.section-title { font-size: 15px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.benefit-block { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface-2); }
.benefit-block summary { padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.benefit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px 14px; }
.benefit-grid .span-2 { grid-column: span 2; }

/* ---------- SEO ---------- */
.seo-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
.seo-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.seo-box h4 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.mono { font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; }
.kw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kw-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.kw-box h4 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.kw-main { font-size: 17px; font-weight: 700; color: var(--primary); margin: 0; }
.kw-box ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.kw-box p { margin: 0; font-size: 14px; }
.info-note {
    background: #eef5ff; border: 1px solid #d3e3ff; color: #1e40af;
    border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-top: 16px;
}
.info-note.warn { background: #fef9ec; border-color: #fde8b0; color: #92400e; }
.info-note.small { font-size: 12px; margin-top: 10px; }

/* ---------- Affiliate ---------- */
.affiliate-box { display: flex; flex-direction: column; gap: 10px; }
.affiliate-box input { font-family: monospace; font-size: 13px; }

/* ---------- Pinterest ---------- */
.pinterest-profile { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.boards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.board-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.board-chip strong { display: block; font-size: 14px; }
.board-chip small { color: var(--muted); font-size: 12px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline-day { font-weight: 700; font-size: 13px; color: var(--text-2); margin-top: 12px; text-transform: capitalize; }
.timeline-item {
    display: flex; align-items: center; gap: 14px; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.tl-time { font-weight: 700; color: var(--primary); font-size: 14px; width: 60px; }
.tl-body { flex: 1; }
.tl-body strong { display: block; font-size: 14px; }
.tl-body small { color: var(--muted); }

/* ---------- Chart ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 220px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 22px; background: linear-gradient(180deg, var(--primary), #ff8a8a); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart-col small { font-size: 9px; color: var(--muted); transform: rotate(-40deg); white-space: nowrap; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }

/* ---------- Auth ---------- */
.auth-body { background: linear-gradient(135deg, #141a2a 0%, #2a1030 60%, #4a0f1f 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-brand { text-align: center; color: #fff; margin-bottom: 24px; }
.auth-brand h1 { font-size: 22px; margin-top: 14px; }
.auth-brand p { color: #b9c0d4; font-size: 14px; }
.auth-card { padding: 28px; }
.auth-card h2 { margin-bottom: 18px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-2); }

/* ---------- Empty / modal ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty-state h3 { margin-bottom: 8px; }
.empty-state.small { padding: 24px; }
.empty-state .btn { margin-top: 12px; }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(15, 20, 34, .55);
    display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 24px;
}
.modal h3 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Toggle de tema (sol/luna) ---------- */
.icon-btn {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: 17px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); }
.icon-btn .icon-sun { display: inline; }
.icon-btn .icon-moon { display: none; }

/* ---------- Imagen del post (adicional para Pinterest) ---------- */
.post-image-block {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.post-image-thumb {
    width: 110px; height: 165px; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0;
}

/* ============================================================
   MODO OSCURO
   ============================================================ */
[data-theme="dark"] {
    --bg: #0f1524;
    --surface: #161e30;
    --surface-2: #1c2539;
    --border: #2a3550;
    --text: #e7ebf4;
    --text-2: #aab4c8;
    --muted: #7d889e;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.5);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}
[data-theme="dark"] .icon-btn .icon-sun { display: inline; }
[data-theme="dark"] .icon-btn .icon-moon { display: none; }

[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .topbar,
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .product-hero,
[data-theme="dark"] .modal,
[data-theme="dark"] .auth-card { background: var(--surface); }
[data-theme="dark"] .highlight-card { background: linear-gradient(180deg, var(--surface), #1d1420); border-color: #3a1f2a; }
[data-theme="dark"] .table tr:hover td { background: var(--surface-2); }
[data-theme="dark"] .table td { border-bottom-color: var(--border); }
[data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="email"], [data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"], [data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] select, [data-theme="dark"] textarea {
    background: var(--surface); color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .progress { background: var(--border); }
[data-theme="dark"] .alert-success { background: #123322; color: #7be0a8; border-color: #1e4a31; }
[data-theme="dark"] .alert-error { background: #3a1416; color: #fca5a5; border-color: #5a1d20; }
[data-theme="dark"] .tag { background: #202a4d; color: #a5b4fc; }
[data-theme="dark"] .info-note { background: #15203a; border-color: #27406b; color: #9db9ff; }
[data-theme="dark"] .info-note.warn { background: #33250f; border-color: #57401a; color: #fbbf77; }
[data-theme="dark"] .chip { background: var(--surface-2); color: var(--text-2); }
[data-theme="dark"] code { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .board-chip, [data-theme="dark"] .timeline-item,
[data-theme="dark"] .seo-box, [data-theme="dark"] .kw-box,
[data-theme="dark"] .benefit-block, [data-theme="dark"] .pin-card,
[data-theme="dark"] .post-image-block { background: var(--surface-2); border-color: var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .sidebar-foot { display: none; }
    .form-grid, .editor-grid { grid-template-columns: 1fr; }
    .form-grid .span-2, .editor-grid .span-2 { grid-column: span 1; }
    .product-hero { flex-direction: column; align-items: flex-start; }
    .content { padding: 16px; }
    .topbar { padding: 14px 16px; }
}
