/* MARIÁN — shared LUMA vertical module shell */
body.luma-marian-vertical {
  --navy: #14243a;
  --navy2: #102033;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --ink: #14243a;
  --muted: #64748b;
  --line: #dbe4ee;
  --bg: #f4f7fb;
  --surface: #fff;
  --purple: #7c3aed;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

body.luma-marian-vertical *,
body.luma-marian-vertical *::before,
body.luma-marian-vertical *::after { box-sizing: border-box; }

body.luma-marian-vertical a { color: inherit; text-decoration: none; }
body.luma-marian-vertical a:hover { color: var(--blue); }

.luma-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.luma-sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  padding: 22px 18px;
  color: #e7eef8;
  background: linear-gradient(180deg, var(--navy), var(--navy2));
}
.luma-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.luma-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; color: #fff; font-weight: 800; font-size: 19px; background: linear-gradient(135deg, #3b82f6, #60a5fa); box-shadow: 0 7px 18px rgba(37,99,235,.28); }
.luma-brand strong { display: block; letter-spacing: .11em; font-size: 15px; }
.luma-brand small { display: block; margin-top: 3px; color: #9fb2ca; font-size: 9px; letter-spacing: .17em; }
.luma-nav { padding-top: 21px; }
.luma-nav-label { margin: 0 10px 9px; color: #8fa5bf; font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.luma-nav a { display: flex; align-items: center; min-height: 37px; margin: 3px 0; padding: 9px 11px; border-radius: 9px; color: #d8e4f1; font-size: 13px; }
.luma-nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.luma-nav a.active { color: #fff; font-weight: 700; background: var(--blue); box-shadow: 0 6px 16px rgba(37,99,235,.28); }
.luma-nav .nav-section { margin-top: 18px; }

.luma-main { min-width: 0; padding: 30px clamp(20px, 4vw, 52px) 44px; }
.luma-main-inner { width: min(1180px, 100%); margin: 0 auto; }
.luma-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 26px 28px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 28px rgba(15, 35, 58, .05); }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.luma-top h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -.035em; }
.subtitle { max-width: 760px; margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.top-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; min-width: 215px; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border: 1px solid #cdd9e7; border-radius: 999px; color: #334155; background: #f8fafc; font-size: 10px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.badge.blue { border-color: #bfdbfe; color: #1d4ed8; background: var(--blue-soft); }
.badge.purple { border-color: #ddd6fe; color: #6d28d9; background: #f5f3ff; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; padding: 15px 17px; border: 1px solid #c7d7ec; border-radius: 13px; color: #304966; background: #eef5ff; line-height: 1.5; }
.notice strong { display: block; margin-bottom: 3px; color: var(--ink); }
.notice p { margin: 0; }
.notice-mark { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; color: #1d4ed8; background: #dbeafe; font-weight: 800; }

.panel { margin-top: 18px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 22px rgba(15, 35, 58, .045); }
.panel h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.015em; }
.panel-intro { margin: 0 0 16px; color: var(--muted); line-height: 1.45; }
.login-card { max-width: 710px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; color: #334155; font-size: 13px; font-weight: 700; }
.field.wide { grid-column: 1 / -1; }
body.luma-marian-vertical input,
body.luma-marian-vertical select,
body.luma-marian-vertical textarea { width: 100%; border: 1px solid #cbd7e4; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; padding: 11px 12px; outline: none; }
body.luma-marian-vertical input:focus,
body.luma-marian-vertical select:focus,
body.luma-marian-vertical textarea:focus { border-color: #6da0f7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
body.luma-marian-vertical input[type="password"] { letter-spacing: .04em; }
body.luma-marian-vertical button { border: 0; border-radius: 9px; font: inherit; cursor: pointer; }
.btn { min-height: 42px; padding: 10px 16px; color: #fff; background: var(--blue); font-weight: 750; box-shadow: 0 5px 12px rgba(37,99,235,.2); }
.btn:hover { background: #1d4ed8; }
.btn.secondary { color: #1e40af; background: #eff6ff; box-shadow: none; }
.btn.secondary:hover { background: #dbeafe; }
.btn.ghost { color: #475569; background: #f8fafc; border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { color: var(--blue); border-color: #b8c8db; background: #fff; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.action { min-height: 43px; padding: 10px 12px; color: #1e3a8a; border: 1px solid #c9daf4; background: #f3f7ff; font-size: 12px; font-weight: 700; text-align: left; }
.action:hover { border-color: #8eb4ee; background: #e8f1ff; }
.action.owner { color: #6d28d9; border-color: #ddd6fe; background: #faf8ff; }
.action.owner:hover { background: #f3e8ff; }
.action.danger { color: #475569; border-color: var(--line); background: #f8fafc; }

.scope-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(180px, .8fr) minmax(180px, .8fr); gap: 18px; align-items: end; }
.scope-copy { color: var(--muted); line-height: 1.45; }
.scope-copy strong { display: block; margin-bottom: 3px; color: var(--ink); }
.scope-copy span { overflow-wrap: anywhere; }
.scope-copy small { display: block; margin-top: 3px; color: #7a8ba1; font-size: 12px; overflow-wrap: anywhere; }
.scope-select { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 750; }
.conversation-panel { display: grid; gap: 16px; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.chat-form textarea { min-height: 48px; max-height: 180px; resize: vertical; }
.messages { display: grid; gap: 12px; }
.promotion-summary { margin: 0 0 14px; padding: 11px 13px; border: 1px solid #c9daf4; border-radius: 10px; color: #334155; background: #f5f8ff; font-size: 13px; }
.learning-filter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e1e8f3; border-radius: 10px; background: #fbfcff; color: #334155; font-size: 13px; font-weight: 700; }
.learning-filter-row select { min-width: 220px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1e293b; font: inherit; font-weight: 600; }
.surveillance-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.surveillance-metric { padding: 12px; border: 1px solid #e1e8f3; border-radius: 10px; background: #fbfcff; color: #1e293b; }
.surveillance-metric strong { display: block; font-size: 20px; color: #14243a; }
.surveillance-metric small { color: #64748b; }
.surveillance-finding { padding: 10px 12px; border: 1px solid #e1e8f3; border-radius: 10px; background: #fff; margin: 8px 0; }
.surveillance-finding.info { border-left: 4px solid #60a5fa; }
.surveillance-finding.medium { border-left: 4px solid #f59e0b; }
.surveillance-finding.high { border-left: 4px solid #ef4444; }
.promotion-list { display: grid; gap: 10px; }
.promotion-list-empty { margin: 0; padding: 16px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; background: #f8fafc; }
.promotion-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid #e1e8f3; border-radius: 12px; background: #fff; }
.promotion-copy { min-width: 0; }
.promotion-copy strong { display: block; color: #1e293b; font-size: 13px; }
.promotion-copy p { margin: 4px 0 3px; color: #6d28d9; font-size: 12px; font-weight: 700; }
.promotion-copy small { display: block; color: #64748b; line-height: 1.4; }
.promotion-btn { flex: 0 0 auto; min-width: 145px; }
.promotion-btn:disabled { cursor: not-allowed; opacity: .58; }
.answer { margin: 0; padding: 14px 15px; border: 1px solid #dbe4ee; border-radius: 11px; color: #263b52; background: #f8fafc; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.answer strong { color: var(--ink); }
.diagnostic { white-space: normal; }
.diagnostic-summary { margin: 8px 0 0; color: #475569; line-height: 1.55; }
.diagnostic details { margin-top: 12px; border-top: 1px solid #e2e8f0; padding-top: 9px; }
.diagnostic details summary { color: #1d4ed8; cursor: pointer; font-size: 12px; font-weight: 750; }
.diagnostic pre { max-height: 360px; margin: 9px 0 0; padding: 11px; overflow: auto; border-radius: 8px; color: #334155; background: #eef2f7; font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-line { min-height: 23px; margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.footer-note { margin: 18px 3px 0; color: #718096; font-size: 12px; line-height: 1.5; }
.marian-link { color: #6d28d9; font-weight: 750; }
[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .luma-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .luma-sidebar { padding-inline: 13px; }
  .luma-main { padding-inline: 24px; }
  .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .luma-shell { display: block; }
  .luma-sidebar { min-height: 0; position: relative; padding: 14px 16px; }
  .luma-brand { padding-bottom: 13px; }
  .luma-nav { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 12px; }
  .luma-nav-label, .luma-nav .nav-section { width: 100%; margin: 7px 4px 0; }
  .luma-nav a { min-height: 34px; margin: 0; padding: 7px 9px; }
  .luma-main { padding: 18px 14px 32px; }
  .luma-top { display: block; padding: 21px 19px; }
  .top-badges { justify-content: flex-start; min-width: 0; margin-top: 15px; }
  .form-grid, .scope-panel, .chat-form { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
}
@media (max-width: 500px) {
  .actions { grid-template-columns: 1fr; }
  .promotion-row { align-items: stretch; flex-direction: column; }
  .promotion-btn { width: 100%; }
  .learning-filter-row { align-items: stretch; flex-direction: column; }
  .learning-filter-row select { min-width: 0; width: 100%; }
  .surveillance-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel { padding: 17px 15px; }
  .luma-top h1 { font-size: 30px; }
}
