:root {
  --bg: #0b1020;
  --bg-2: #101830;
  --panel: #141d38;
  --panel-2: #1a2545;
  --border: #24304f;
  --text: #e7ecf7;
  --muted: #8b98b8;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --sky: #38bdf8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- layout ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  font-size: 20px; font-weight: 800; letter-spacing: 0.3px;
  padding: 4px 10px 18px;
}
.brand span { color: var(--accent-2); }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  padding: 9px 12px; border-radius: 8px; color: var(--text);
  font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--panel); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }
.nav .section { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 16px 12px 6px; }

.sidebar .spacer { flex: 1; }

.userbox {
  border-top: 1px solid var(--border);
  padding-top: 12px; margin-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.userbox .who { font-size: 13px; font-weight: 600; }
.userbox .who small { display: block; color: var(--muted); font-weight: 400; }

.main { flex: 1; padding: 28px 36px; max-width: 1300px; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 24px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- cards, tables ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; }
.card .hint { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
table.grid td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tr.rowlink:hover td { background: var(--panel-2); cursor: pointer; }

/* ---------- badges, progress ---------- */

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge.s-new { background: rgba(56,189,248,0.15); color: var(--sky); }
.badge.s-coming_soon { background: rgba(251,191,36,0.15); color: var(--amber); }
.badge.s-listed { background: rgba(99,102,241,0.2); color: var(--accent-2); }
.badge.s-under_contract { background: rgba(251,146,60,0.18); color: #fb923c; }
.badge.s-closed { background: rgba(52,211,153,0.15); color: var(--green); }
.badge.s-archived { background: rgba(139,152,184,0.15); color: var(--muted); }

.badge.ai { background: rgba(129,140,248,0.12); color: var(--accent-2); font-weight: 500; }

.progress { background: var(--bg-2); border-radius: 999px; height: 8px; width: 120px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.progress-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- forms ---------- */

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'],
select, textarea {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { resize: vertical; min-height: 90px; }

.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.form-grid .wide { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none !important;
}
.btn:hover { background: var(--accent-2); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--border); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid rgba(248,113,113,0.4); }
.btn.danger:hover { background: rgba(248,113,113,0.1); }
.btn.small { padding: 5px 10px; font-size: 12px; }

.form-actions { margin-top: 16px; display: flex; gap: 10px; }

.error-box {
  background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.4);
  color: var(--red); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}

.readiness-banner {
  background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.22);
  border-left: 3px solid var(--amber); border-radius: 8px;
  padding: 11px 16px; font-size: 13px; line-height: 1.5; margin-bottom: 16px;
  color: var(--text);
}
.readiness-banner strong { color: var(--amber); font-weight: 600; }
.readiness-banner .rb-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a {
  padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
}
.chips a:hover { text-decoration: none; background: var(--panel-2); }
.chips a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- void analysis ---------- */
.void-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.void-radius-wrap { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.void-radius-wrap input[type="range"] { flex: 1; accent-color: var(--accent); }
.void-radius-val { font-size: 13px; font-weight: 600; color: var(--text); width: 68px; flex-shrink: 0; text-align: right; }
.void-summary { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.void-summary strong { color: var(--text); }
.void-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.void-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); font-size: 13px;
}
.void-row.is-void { border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.07); }
.void-row .vcount { font-weight: 700; font-size: 13px; }
.void-row.is-void .vcount { color: var(--red); }
.void-row:not(.is-void) .vcount { color: var(--green); }

/* ---------- tasks ---------- */

.phase-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin: 18px 0 8px; }

.phase-acc { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.phase-acc summary {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer;
  background: var(--bg-2); list-style: none; font-weight: 600; font-size: 14px;
}
.phase-acc summary::-webkit-details-marker { display: none; }
.phase-acc .ph-name { flex: 1; }
.phase-acc .ph-count { font-size: 12px; font-weight: 500; color: var(--muted); }
.phase-acc .ph-count .stuck { color: var(--red); }
.phase-acc .ph-chev { color: var(--muted); font-size: 13px; transition: transform 0.15s; flex-shrink: 0; }
.phase-acc[open] > summary .ph-chev { transform: rotate(90deg); }
.phase-acc[open] > summary { border-bottom: 1px solid var(--border); }
.phase-acc .ph-ring { position: relative; width: 30px; height: 30px; flex-shrink: 0; }
.phase-acc .ph-ring svg { transform: rotate(-90deg); }
.phase-acc .ph-ring .bg { stroke: var(--border); }
.phase-acc .ph-ring .fg { stroke: var(--green); }
.phase-acc .ph-ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }
.phase-acc .ph-body { padding: 4px 16px 6px; }
.phase-acc .ph-body .task-row:last-child { border-bottom: none; }
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; background: var(--bg-2);
}
.task-row.off { opacity: 0.45; }
.task-row .code { font-size: 11px; color: var(--muted); width: 64px; flex-shrink: 0; font-family: ui-monospace, monospace; }
.task-row .tname { flex: 1; font-size: 14px; }
.task-row select { width: 165px; padding: 6px 8px; font-size: 13px; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: var(--border); transition: 0.15s;
}
.switch .slider:before {
  content: ''; position: absolute; height: 14px; width: 14px; border-radius: 50%;
  left: 3px; top: 3px; background: #fff; transition: 0.15s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(16px); }

.tstatus { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tstatus.t-not_started { background: rgba(139,152,184,0.15); color: var(--muted); }
.tstatus.t-in_progress { background: rgba(56,189,248,0.15); color: var(--sky); }
.tstatus.t-blocked { background: rgba(248,113,113,0.15); color: var(--red); }
.tstatus.t-awaiting_approval { background: rgba(251,191,36,0.15); color: var(--amber); }
.tstatus.t-approved { background: rgba(52,211,153,0.15); color: var(--green); }
.tstatus.t-done { background: rgba(52,211,153,0.25); color: var(--green); }

/* ---------- photos ---------- */

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photo-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.photo-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.photo-card img { width: 100%; height: 130px; object-fit: cover; display: block; background: #000; }
.photo-card .pbody { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.photo-card .pbody form { display: flex; gap: 6px; }

/* ---------- login ---------- */

.login-wrap { min-height: 100vh; display: flex; }
.login-left {
  flex: 1.15; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 60px;
  background:
    radial-gradient(1100px 520px at 12% 8%, rgba(99,102,241,0.22) 0%, transparent 55%),
    linear-gradient(135deg, #0b1020 0%, #131a33 48%, #1b1b45 100%);
}
.login-hero { position: relative; z-index: 2; max-width: 540px; }
.login-hero .brand-lockup { font-size: 22px; font-weight: 800; letter-spacing: 0.4px; margin-bottom: 30px; }
.login-hero .brand-lockup span { color: var(--accent-2); }
.login-hero h1 {
  font-size: 42px; line-height: 1.08; margin: 0 0 18px; font-weight: 800; letter-spacing: -0.6px;
  background: linear-gradient(180deg, #ffffff 0%, #c3cdef 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-hero .lede { color: #c2cbe6; font-size: 18px; line-height: 1.6; margin: 0 0 28px; }
.login-hero .lede strong { color: #fff; font-weight: 700; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feature-list li { display: flex; align-items: center; gap: 12px; color: #dbe1f2; font-size: 15px; }
.feature-list li::before {
  content: "\2713"; flex: 0 0 auto;
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 13px; font-weight: 800; color: var(--accent-2);
  background: rgba(129,140,248,0.12); border: 1px solid rgba(129,140,248,0.4);
}
.skyline { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 46%; z-index: 1; pointer-events: none; }

.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px;
  background: radial-gradient(700px 500px at 80% 20%, rgba(99,102,241,0.08) 0%, transparent 60%);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 28px; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.login-card h2 { margin: 0 0 20px; font-size: 22px; }
.login-card .f { margin-bottom: 14px; }
@media (max-width: 860px) { .login-left { display: none; } }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; font-size: 13px; }
.mt0 { margin-top: 0; }
.inline-form { display: inline; }
details.expander summary { cursor: pointer; font-size: 12px; color: var(--accent-2); }
details.expander form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- PHP port tweaks: keep inline task/photo forms on one row ---------- */
.task-row form.inline-form { display: flex; align-items: center; }
.task-row .switch { margin: 0; }
.photo-card .pbody form.inline-form { display: inline-flex; }
fieldset[disabled] { opacity: 0.85; }

/* ---------- company dashboard ---------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
@media (max-width: 900px) { .module-grid { grid-template-columns: 1fr; } }
.module-tile {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  background: var(--bg-2); cursor: pointer; position: relative;
}
.module-tile input { position: absolute; top: 12px; right: 12px; width: auto; }
.module-tile.soon { opacity: 0.8; }
.module-tile .mtitle { font-weight: 600; font-size: 14px; padding-right: 24px; }
.module-tile .mdesc { font-size: 12px; color: var(--muted); }

.agent-list { display: flex; flex-direction: column; gap: 8px; }
.agent-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2);
}
.agent-row.off { opacity: 0.55; }
.agent-edit { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; flex: 1; }
.agent-edit input, .agent-edit select { padding: 6px 8px; font-size: 13px; }

.task-default {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 6px; background: var(--bg-2); font-size: 14px; cursor: pointer;
}
.task-default input { width: auto; }
.task-default .code { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); width: 64px; }
.task-default span:nth-child(3) { flex: 1; }

/* ---------- property class toggle ---------- */
.class-toggle { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* ---------- upload progress overlay ---------- */
.uploader-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,10,24,0.72);
}
.uploader-overlay[hidden] { display: none; }
.uploader-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 30px; width: 320px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.uploader-spinner {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent-2);
  animation: ri-spin 0.8s linear infinite;
}
@keyframes ri-spin { to { transform: rotate(360deg); } }
.uploader-title { font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.uploader-track { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.uploader-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.15s ease; }
.uploader-overlay.indeterminate .uploader-fill { width: 100% !important; animation: ri-pulse 1.1s ease-in-out infinite; }
@keyframes ri-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.uploader-sub { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- color picker field ---------- */
.color-field { display: flex; gap: 6px; align-items: center; }
.color-field input[type="color"] {
  -webkit-appearance: none; appearance: none;
  width: 40px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: transparent; cursor: pointer; flex: 0 0 auto;
}
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.color-field input[type="color"]::-webkit-color-swatch { border: none; border-radius: 5px; }
.color-field input[type="color"]::-moz-color-swatch { border: none; border-radius: 5px; }
.color-field input[type="text"] { flex: 1; font-family: ui-monospace, monospace; text-transform: lowercase; }

/* ---------- modal ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(6,10,24,0.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); padding: 20px 22px; max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-section { margin: 16px 0; }
.modal-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 8px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.logo-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); cursor: pointer; }
.logo-pick input { position: absolute; opacity: 0; pointer-events: none; }
.logo-pick img { max-width: 90px; max-height: 70px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px; }
.logo-pick .src { font-size: 11px; color: var(--muted); }
.logo-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.palette-row { display: flex; gap: 8px; flex-wrap: wrap; }
.palette-swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; transition: transform 0.15s; }
.palette-swatch:hover { transform: scale(1.06); }
.palette-swatch.applied { box-shadow: 0 0 0 2px var(--accent-2); }

/* ---------- per-company co-brand lockup ---------- */
.cobrand { padding: 6px 10px 18px; }
.cobrand-logo { display: block; max-width: 100%; max-height: 48px; object-fit: contain; margin-bottom: 8px; background: #fff; padding: 6px 8px; border-radius: 6px; }
.cobrand-name { font-size: 17px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.cobrand-pb { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.cobrand-pb strong { color: var(--text); font-weight: 800; letter-spacing: 0.3px; text-transform: none; }
.cobrand-pb strong span { color: var(--accent-2); }
.cobrand-preview { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; background: rgba(251,191,36,0.15); color: var(--amber); font-weight: 700; }

/* stat cards on admin billing overview */
.stat-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px; text-align: center; }
.stat-card .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat-card .stat-value { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* Hero (Featured) photo indicator on the photo grid */
.photo-card.hero { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber); }
.photo-card { position: relative; }
.hero-corner { position: absolute; top: 8px; left: 8px; background: var(--amber); color: #1a1e2c; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; box-shadow: 0 2px 6px rgba(0,0,0,0.35); }

/* AI generation status pills — animated for queued/running */
.gen-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.gen-queued  { background: rgba(251,191,36,0.15); color: var(--amber); animation: gen-pulse 1.4s ease-in-out infinite; }
.gen-running { background: rgba(99,102,241,0.22); color: var(--accent-2); }
.gen-complete{ background: rgba(52,211,153,0.18); color: var(--green); }
.gen-failed  { background: rgba(248,113,113,0.18); color: var(--red); }
.gen-spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15); border-top-color: currentColor; animation: gen-spin 0.8s linear infinite; }
@keyframes gen-spin { to { transform: rotate(360deg); } }
@keyframes gen-pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* "Edit with AI" expander */
details.ai-edit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-2); user-select: none; }
details.ai-edit summary:hover { color: #fff; }
details.ai-edit[open] summary { color: #fff; }

/* AI generation refine panel + QC warnings */
.refine-panel { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; }
.gen-warn { font-size: 12px; color: var(--amber); margin-top: 4px; padding: 4px 8px; background: rgba(251,191,36,0.10); border-left: 2px solid var(--amber); border-radius: 3px; }

/* ---------- Build Marketing Collateral ---------- */
.mc-card {
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  position: relative; overflow: hidden;
}
.mc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--sky));
}
.mc-head { margin-bottom: 4px; }
.mc-title { font-size: 21px; letter-spacing: -0.3px; margin-bottom: 4px; }
.mc-card .hint { margin-top: 0; }

.mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.mc-tile {
  display: flex; flex-direction: column;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.mc-tile.ready {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 6px 22px -8px rgba(99, 102, 241, 0.35);
}
.mc-tile.ready:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 28px -8px rgba(99, 102, 241, 0.5); }
.mc-tile.blocked { border-style: dashed; }
.mc-tile.locked { opacity: 0.62; }

.mc-tile-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.mc-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(99, 102, 241, 0.14); color: var(--accent-2);
}
.mc-tile.locked .mc-icon { background: var(--bg-2); color: var(--muted); }
.mc-icon svg { width: 21px; height: 21px; }

.mc-status {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap; margin-top: 3px;
}
.mc-status.ok { color: var(--green); background: rgba(52, 211, 153, 0.15); }
.mc-status.wait { color: var(--amber); background: rgba(251, 191, 36, 0.15); }
.mc-status.lock { color: var(--muted); background: rgba(139, 152, 184, 0.15); }

.mc-tile-name { font-size: 16px; font-weight: 700; letter-spacing: -0.1px; margin-bottom: 6px; }
.mc-pitch { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 10px; flex: 1; }

.mc-missing {
  margin: 0 0 12px; padding: 8px 10px 8px 26px;
  background: rgba(251, 191, 36, 0.08); border-radius: 8px;
  font-size: 12px; color: #f2d38a; list-style: '\2192\00A0\00A0';
}
.mc-missing li { margin-bottom: 3px; }
.mc-missing li:last-child { margin-bottom: 0; }

.mc-tile-foot { margin-top: auto; }
.mc-form { display: flex; gap: 8px; align-items: center; }
.mc-size-select { padding: 8px 10px; font-size: 12px; width: auto; flex: 1; }
.mc-build { width: 100%; justify-content: center; font-size: 13px; }
.mc-form .mc-build { width: auto; flex-shrink: 0; }
.mc-form:has(.mc-size-select) .mc-build { flex: 0 0 auto; }
.mc-empty { padding: 6px 2px 2px; }
.mc-history-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 4px 0 10px; font-weight: 700; }
