:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1f2937;
  --line: #243042;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --risk: #ef4444;
  --violet: #8b5cf6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111b33 0%, #0b1120 50%, #09111d 100%);
  color: var(--text);
}
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: rgba(10, 16, 30, 0.92);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(16px);
}
.brand { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 700; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav button {
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: 0.2s ease;
  font-size: 14px;
  cursor: pointer;
}
.nav button.active, .nav button:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}
.sidebar-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.content { padding: 28px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.topbar h2 { margin: 0; font-size: 30px; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(12, 18, 31, 0.92));
  border: 1px solid rgba(53, 70, 95, 0.7);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 50px rgba(0,0,0,0.25);
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-header h3 { margin: 0; font-size: 16px; }
.card-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.status {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status.ok { color: var(--ok); background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.18); }
.status.warn { color: var(--warn); background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.18); }
.status.risk { color: var(--risk); background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.18); }
.status.violet { color: var(--violet); background: rgba(139,92,246,.08); border-color: rgba(139,92,246,.18); }
.metric { font-size: 38px; font-weight: 700; margin: 8px 0 6px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.5; }
.list { display: flex; flex-direction: column; gap: 12px; }
.item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.item strong { display: block; margin-bottom: 6px; }
.item small, .item p { margin: 0; color: var(--muted); line-height: 1.5; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.16);
}
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.timeline-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.time { color: var(--muted); font-size: 12px; }
.empty {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.1);
  color: var(--muted);
}
.progress-wrap { margin-top: 16px; }
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 999px; }
.progress-fill.ok { background: linear-gradient(90deg, #166534, #22c55e); }
.progress-fill.warn { background: linear-gradient(90deg, #b45309, #f59e0b); }
.progress-fill.risk { background: linear-gradient(90deg, #991b1b, #ef4444); }
.progress-fill.violet { background: linear-gradient(90deg, #5b21b6, #8b5cf6); }
.progress-label {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.bar-chart { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 8px; }
.bar-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.bar-track {
  height: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 999px; }
.bar-fill.ok { background: linear-gradient(90deg, #166534, #22c55e); }
.bar-fill.warn { background: linear-gradient(90deg, #b45309, #f59e0b); }
.bar-fill.risk { background: linear-gradient(90deg, #991b1b, #ef4444); }
.bar-fill.violet { background: linear-gradient(90deg, #5b21b6, #8b5cf6); }
.radar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.radar-cell {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.radar-cell span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.radar-cell strong { display: block; font-size: 20px; margin-bottom: 8px; }
.note-summary-grid {
  display: grid;
  gap: 12px;
}
.note-priority {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}
.note-priority.ok { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.16); }
.note-priority.warn { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.16); }
.note-priority.risk { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.16); }
.note-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.note-priority-badge {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.note-priority-badge.ok { color: var(--ok); background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.18); }
.note-priority-badge.warn { color: var(--warn); background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.18); }
.note-priority-badge.risk { color: var(--risk); background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.18); }
.notes-form {
  display: grid;
  gap: 14px;
}
.form-field {
  display: grid;
  gap: 8px;
}
.form-field span {
  font-size: 13px;
  color: var(--muted);
}
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.form-actions button {
  border: 0;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
}
.form-actions small { color: var(--muted); }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .span-8, .span-6, .span-4, .span-3 { grid-column: span 12; }
  .timeline-entry { grid-template-columns: 1fr; }
}

.voice-box { display:grid; gap:12px; }
.voice-box input[type=file] { width:100%; padding:12px; border-radius:14px; border:1px dashed rgba(255,255,255,.12); background:rgba(255,255,255,.03); color:var(--text); }
.voice-box button { border:0; background:linear-gradient(90deg, #7c3aed, #2563eb); color:white; padding:12px 18px; border-radius:14px; font-weight:600; cursor:pointer; }
.voice-result { min-height:96px; padding:14px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--muted); line-height:1.5; }

.note-summary-row { display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; }
.note-priority.top { min-height:88px; align-items:flex-start; flex-direction:column; gap:8px; }
.note-priority.top strong { font-size:32px; }
.toolbar-row { display:flex; justify-content:flex-start; }
.primary-btn { border:0; background:linear-gradient(90deg, #0ea5e9, #2563eb); color:white; padding:12px 18px; border-radius:14px; font-weight:600; cursor:pointer; }
.modal-overlay { position:fixed; inset:0; background:rgba(2,6,23,.72); display:flex; align-items:center; justify-content:center; padding:20px; z-index:50; }
.modal-overlay.hidden { display:none; }
.modal-card { width:min(680px, 100%); background:linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(12, 18, 31, 0.98)); border:1px solid rgba(53, 70, 95, 0.7); border-radius:24px; padding:20px; box-shadow:0 30px 60px rgba(0,0,0,.35); }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.modal-head h3 { margin:0; }
.icon-btn { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); width:38px; height:38px; border-radius:12px; cursor:pointer; }
@media (max-width: 980px) { .note-summary-row { grid-template-columns: 1fr; } }

.note-summary-row.four { grid-template-columns: repeat(4, 1fr); }
.note-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mini-btn { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.04); color:var(--text); padding:6px 10px; border-radius:10px; cursor:pointer; font-size:12px; }
.note-item.done { opacity:.8; border-color:rgba(139,92,246,.22); }
.note-item.done strong { text-decoration: line-through; }
@media (max-width: 980px) { .note-summary-row.four { grid-template-columns: 1fr 1fr; } }

.settings-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:14px; }
.setting-box { padding:16px; border-radius:16px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); }
.setting-box span { display:block; color:var(--muted); font-size:12px; margin-bottom:6px; }
.setting-box strong { display:block; font-size:20px; margin-bottom:8px; }
.setting-box p { margin:0; color:var(--muted); line-height:1.5; }
.settings-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:18px; }
@media (max-width: 980px) { .settings-grid { grid-template-columns: 1fr; } }

.compact-card { padding:14px; border-radius:18px; }
.compact-head { margin-bottom:12px; }
.compact-head h3 { font-size:15px; }
.compact-head p { font-size:12px; }
.compact-list { gap:10px; }
.note-priority.compact { min-height:72px; padding:12px; }
.note-priority.compact strong { font-size:26px; }
.toolbar-inline { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.settings-table { display:grid; gap:8px; }
.settings-row { display:flex; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.05); font-size:14px; }
.settings-row span { color:var(--muted); }
.compact-actions { margin-top:14px; }
.compact-modal { width:min(560px, 100%); padding:16px; }
.form-field input, .form-field textarea { padding:10px 12px; border-radius:12px; }
.form-field textarea { min-height:100px; }

.one-line { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tab-row { display:flex; gap:8px; margin-bottom:12px; }
.tab-btn { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); padding:8px 12px; border-radius:10px; cursor:pointer; font-size:13px; }
.tab-btn.active { background:rgba(56,189,248,.1); border-color:rgba(56,189,248,.2); }
.one-row-table { display:grid; gap:8px; }
.one-row-table .settings-row { grid-template-columns: 2fr 1.2fr 1.4fr 1.6fr 1fr 1fr; display:grid; align-items:center; }
.one-row-table .settings-row.header { background:transparent; border:none; color:var(--muted); font-size:12px; padding:0 6px 4px; }
.one-row-table .settings-row.header strong { font-size:12px; }
@media (max-width: 980px) { .one-row-table .settings-row { grid-template-columns: 1fr; } .one-row-table .settings-row.header { display:none; } }

.planner-toolbar { margin-bottom:12px; }
.planner-header { grid-template-columns: 1.5fr .8fr .9fr 1.2fr 1.1fr .8fr 1.2fr !important; }
.row-actions { display:flex; gap:8px; flex-wrap:wrap; }
.one-row-table .settings-row { grid-template-columns: 1.5fr .8fr .9fr 1.2fr 1.1fr .8fr 1.2fr; }

.form-field select { width:100%; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); border-radius:12px; padding:10px 12px; font:inherit; outline:none; }
.form-field select option { background:#111827; color:#e5e7eb; }

.mini-btn.danger { border-color: rgba(239,68,68,.18); color: #fca5a5; background: rgba(239,68,68,.06); }

.icon-actions { gap:6px; }
.icon-action { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); border-radius:10px; cursor:pointer; font-size:14px; }
.icon-action:hover { background:rgba(56,189,248,.08); border-color:rgba(56,189,248,.18); }
.icon-action.danger:hover { background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.18); }

.row-actions.icon-actions { display:flex; gap:6px; flex-wrap:nowrap; white-space:nowrap; }
.icon-action { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); border-radius:8px; cursor:pointer; font-size:13px; padding:0; line-height:1; }
.icon-action:hover { background:rgba(56,189,248,.08); border-color:rgba(56,189,248,.18); }
.icon-action.danger:hover { background:rgba(239,68,68,.08); border-color:rgba(239,68,68,.18); }

.icon-action svg { width:16px; height:16px; display:block; }
.icon-action { font-size:0; }

:root[data-theme='light'] {
  --text: #0f172a;
  --muted: #64748b;
}
:root[data-theme='light'] body {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #0f172a;
}
:root[data-theme='light'] .sidebar {
  background: rgba(255,255,255,0.92);
  border-right: 1px solid #dbe3ee;
}
:root[data-theme='light'] .card,
:root[data-theme='light'] .compact-card,
:root[data-theme='light'] .modal-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98));
  border: 1px solid #dbe3ee;
  box-shadow: 0 18px 38px rgba(15,23,42,.08);
}
:root[data-theme='light'] .item,
:root[data-theme='light'] .setting-box,
:root[data-theme='light'] .settings-row,
:root[data-theme='light'] .radar-cell,
:root[data-theme='light'] .note-priority {
  background: rgba(15,23,42,.03);
  border-color: rgba(15,23,42,.06);
}
:root[data-theme='light'] .form-field input,
:root[data-theme='light'] .form-field textarea,
:root[data-theme='light'] .form-field select,
:root[data-theme='light'] .icon-btn,
:root[data-theme='light'] .mini-btn,
:root[data-theme='light'] .icon-action,
:root[data-theme='light'] .tab-btn {
  background: white;
  color: #0f172a;
  border-color: #dbe3ee;
}

:root[data-theme='light'] .tab-btn.active {
  background: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.28);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
}
:root[data-theme='light'] .tab-btn:hover {
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.18);
}
:root[data-theme='light'] .badge {
  background: white;
  border-color: #dbe3ee;
  color: #0f172a;
}
:root[data-theme='light'] .nav button.active,
:root[data-theme='light'] .nav button:hover {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.14);
}
.theme-toggle {
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}
.icon-action.edit { color: #38bdf8; }
.icon-action.toggle { color: #8b5cf6; }
.icon-action.danger { color: #f87171; }
:root[data-theme='light'] .icon-action.edit { color: #0284c7; }
:root[data-theme='light'] .icon-action.toggle { color: #7c3aed; }
:root[data-theme='light'] .icon-action.danger { color: #dc2626; }

.topnav-layout { display:block; min-height:100vh; }
.topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(10,16,30,.88);
  backdrop-filter: blur(16px);
}
.topnav-left { display:flex; align-items:center; gap:18px; min-width:0; }
.brand-inline { display:flex; align-items:baseline; gap:8px; white-space:nowrap; }
.brand-inline strong { font-size:15px; }
.brand-inline span { color:var(--muted); font-size:13px; }
.topmenu { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.topmenu button {
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  transition: .2s ease;
  font-size: 13px;
  cursor:pointer;
}
.topmenu button.active, .topmenu button:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}
.topnav-right { display:flex; align-items:center; gap:12px; }
.top-time {
  min-width: 52px;
  text-align:center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
}
.theme-switch { position: relative; display:inline-flex; width:46px; height:26px; cursor:pointer; }
.theme-switch input { opacity:0; width:0; height:0; }
.theme-slider {
  position:absolute; inset:0; border-radius:999px;
  background: rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.08);
  transition:.2s ease;
}
.theme-slider::before {
  content:''; position:absolute; width:18px; height:18px; left:4px; top:3px;
  border-radius:50%; background:white; transition:.2s ease;
}
.theme-switch input:checked + .theme-slider { background: rgba(37,99,235,.28); }
.theme-switch input:checked + .theme-slider::before { transform: translateX(19px); }
.compact-content { padding: 16px 18px 20px; }
.compact-topbar { margin-bottom: 14px; }
.compact-topbar h2 { font-size: 22px; }
.compact-topbar p { font-size: 12px; }
.sidebar { display:none !important; }
:root[data-theme='light'] .topnav {
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid #dbe3ee;
}
:root[data-theme='light'] .topmenu button.active,
:root[data-theme='light'] .topmenu button:hover {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.14);
}
@media (max-width: 980px) {
  .topnav { flex-direction:column; align-items:stretch; }
  .topnav-left, .topnav-right { justify-content:space-between; }
}

.flat-block { border: 1px solid rgba(255,255,255,.05); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,.02); }
.section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.section-head h3 { margin:0; font-size:14px; }
.summary-row { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:8px; }
.summary-chip { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border:1px solid rgba(255,255,255,.06); border-radius:12px; background:transparent; }
.summary-chip span { color: var(--muted); font-size:12px; }
.summary-chip strong { font-size:18px; }
.notes-list { display:grid; gap:8px; }
.note-row { display:grid; grid-template-columns: 1fr auto; gap:12px; align-items:start; padding:10px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.note-row:last-child { border-bottom:none; }
.note-title-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:4px; }
.note-row p { margin:0; color:var(--muted); font-size:13px; line-height:1.45; }
.note-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.controls-row { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap:8px; }
.controls-row input, .controls-row select { width:100%; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:var(--text); border-radius:10px; padding:9px 10px; font:inherit; }
.compact-topbar p { display:none; }
.badge-row { gap:6px; }
.badge { padding:6px 10px; }
.topmenu button { padding:7px 10px; font-size:12px; }
:root[data-theme='light'] .flat-block { border-color:#dbe3ee; background:rgba(255,255,255,.72); }
:root[data-theme='light'] .summary-chip { border-color:#dbe3ee; }
:root[data-theme='light'] .note-row { border-bottom:1px solid #e5e7eb; }
@media (max-width: 980px) {
  .summary-row { grid-template-columns: 1fr 1fr; }
  .controls-row { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 1fr; }
}

:root[data-theme='dark'] body {
  background: linear-gradient(180deg, #050706 0%, #0a0f0c 100%);
}
:root[data-theme='dark'] .topnav {
  background: rgba(6,10,8,.92);
  border-bottom: 1px solid rgba(34,197,94,.10);
}
:root[data-theme='dark'] .flat-block,
:root[data-theme='dark'] .card,
:root[data-theme='dark'] .modal-card {
  background: rgba(10, 14, 12, 0.82);
  border: 1px solid rgba(34,197,94,.08);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}
:root[data-theme='dark'] .primary-btn {
  background: linear-gradient(90deg, #15803d, #22c55e);
}
:root[data-theme='dark'] .summary-chip.ok,
:root[data-theme='dark'] .note-priority-badge.ok,
:root[data-theme='dark'] .icon-action.edit,
:root[data-theme='dark'] .icon-action.toggle {
  color: #4ade80;
}
:root[data-theme='dark'] .topmenu button.active,
:root[data-theme='dark'] .topmenu button:hover {
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.16);
}
.summary-chip { border-radius: 10px; }
.controls-row.minimal { grid-template-columns: 1fr auto auto; align-items:start; }
.filters-wrap { position:relative; }
.filters-popover {
  position:absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 220px;
  display:grid;
  gap:8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(10,14,12,.98);
  border: 1px solid rgba(34,197,94,.10);
  box-shadow: 0 18px 36px rgba(0,0,0,.28);
}
:root[data-theme='light'] .filters-popover {
  background: rgba(255,255,255,.98);
  border-color: #dbe3ee;
}
.secondary-btn, .ghost-btn {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}
:root[data-theme='light'] .secondary-btn,
:root[data-theme='light'] .ghost-btn {
  background: white;
  border-color: #dbe3ee;
}
@media (max-width: 980px) {
  .controls-row.minimal { grid-template-columns: 1fr; }
  .filters-popover { position:static; width:100%; }
}

:root[data-theme='light'] body {
  background: linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}
:root[data-theme='light'] .topnav {
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #e5eaf2;
}
:root[data-theme='light'] .brand-inline strong,
:root[data-theme='light'] .topmenu button,
:root[data-theme='light'] .top-time,
:root[data-theme='light'] .section-head h3,
:root[data-theme='light'] .note-title-row strong {
  color: #0f172a;
}
:root[data-theme='light'] .brand-inline span,
:root[data-theme='light'] .summary-chip span,
:root[data-theme='light'] .note-row p,
:root[data-theme='light'] .settings-row span,
:root[data-theme='light'] .compact-topbar p {
  color: #64748b;
}
:root[data-theme='light'] .flat-block,
:root[data-theme='light'] .modal-card,
:root[data-theme='light'] .filters-popover {
  background: rgba(255,255,255,.98);
  border: 1px solid #e5eaf2;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
:root[data-theme='light'] .summary-chip {
  background: #fbfcfe;
  border: 1px solid #e6ebf2;
}
:root[data-theme='light'] .summary-chip.risk { border-left: 3px solid #ef4444; }
:root[data-theme='light'] .summary-chip.warn { border-left: 3px solid #f59e0b; }
:root[data-theme='light'] .summary-chip.ok { border-left: 3px solid #22c55e; }
:root[data-theme='light'] .summary-chip.violet { border-left: 3px solid #8b5cf6; }
:root[data-theme='light'] .controls-row input,
:root[data-theme='light'] .controls-row select,
:root[data-theme='light'] .form-field input,
:root[data-theme='light'] .form-field textarea,
:root[data-theme='light'] .form-field select,
:root[data-theme='light'] .secondary-btn,
:root[data-theme='light'] .ghost-btn,
:root[data-theme='light'] .icon-btn,
:root[data-theme='light'] .mini-btn,
:root[data-theme='light'] .tab-btn,
:root[data-theme='light'] .theme-toggle {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #dbe3ee;
}
:root[data-theme='light'] .primary-btn {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 6px 14px rgba(37,99,235,.18);
}
:root[data-theme='light'] .note-row {
  background: #ffffff;
  border: 1px solid #e9edf4;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
:root[data-theme='light'] .notes-list { gap: 0; }
:root[data-theme='light'] .note-row p { margin-top: 6px; }
:root[data-theme='light'] .note-priority-badge.ok { color: #15803d; background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.18); }
:root[data-theme='light'] .note-priority-badge.warn { color: #b45309; background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.18); }
:root[data-theme='light'] .note-priority-badge.risk { color: #b91c1c; background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.18); }
:root[data-theme='light'] .note-priority-badge.violet { color: #6d28d9; background: rgba(139,92,246,.08); border-color: rgba(139,92,246,.18); }
:root[data-theme='light'] .badge {
  background: #ffffff;
  border: 1px solid #e5eaf2;
  color: #334155;
}
:root[data-theme='light'] .topmenu button.active {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.14);
}

:root[data-theme='light'] .topmenu button,
:root[data-theme='light'] .badge,
:root[data-theme='light'] .secondary-btn,
:root[data-theme='light'] .ghost-btn,
:root[data-theme='light'] .tab-btn,
:root[data-theme='light'] .mini-btn,
:root[data-theme='light'] .icon-action,
:root[data-theme='light'] .form-field input,
:root[data-theme='light'] .form-field textarea,
:root[data-theme='light'] .form-field select,
:root[data-theme='light'] .controls-row input,
:root[data-theme='light'] .controls-row select {
  box-shadow: none;
}
:root[data-theme='light'] .flat-block,
:root[data-theme='light'] .modal-card {
  border-radius: 16px;
}
:root[data-theme='light'] .section-head {
  margin-bottom: 12px;
}
:root[data-theme='light'] .topmenu button {
  border-radius: 9px;
}
:root[data-theme='light'] .topmenu button.active {
  background: rgba(37,99,235,.10);
  color: #1d4ed8;
}
:root[data-theme='light'] .summary-chip {
  border-radius: 12px;
  padding: 12px 14px;
}
:root[data-theme='light'] .summary-chip strong {
  font-size: 20px;
}
:root[data-theme='light'] .controls-row.minimal {
  align-items: center;
}
:root[data-theme='light'] .note-row {
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
:root[data-theme='light'] .note-row:hover {
  border-color: #d9e2ef;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
  transform: translateY(-1px);
}
:root[data-theme='light'] .filters-popover {
  box-shadow: 0 16px 32px rgba(15,23,42,.08);
}
:root[data-theme='light'] .primary-btn {
  border-radius: 10px;
}
:root[data-theme='light'] .theme-slider {
  background: #e5e7eb;
  border-color: #d1d5db;
}
:root[data-theme='light'] .theme-switch input:checked + .theme-slider {
  background: rgba(37,99,235,.24);
}
:root[data-theme='light'] .top-time {
  color: #475569;
}

:root[data-theme='dark'] .summary-chip {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
}
:root[data-theme='dark'] .summary-chip.risk { border-left: 3px solid #ef4444; }
:root[data-theme='dark'] .summary-chip.warn { border-left: 3px solid #f59e0b; }
:root[data-theme='dark'] .summary-chip.ok { border-left: 3px solid #22c55e; }
:root[data-theme='dark'] .summary-chip.violet { border-left: 3px solid #8b5cf6; }
:root[data-theme='dark'] .primary-btn {
  background: linear-gradient(90deg, #16a34a, #22c55e);
  color: #06110a;
  box-shadow: 0 8px 18px rgba(34,197,94,.18);
}
:root[data-theme='dark'] .primary-btn:hover {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

:root {
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --border-soft: rgba(15,23,42,.08);
  --surface-1: rgba(255,255,255,.92);
  --surface-2: rgba(248,250,252,.96);
  --surface-dark-1: rgba(10,14,12,.82);
  --surface-dark-2: rgba(14,18,16,.9);
  --accent-green: #16a34a;
  --accent-green-strong: #15803d;
  --accent-green-soft: rgba(34,197,94,.10);
}
.flat-block, .modal-card, .summary-chip, .note-row, .settings-row, .filters-popover {
  border-radius: var(--radius-md);
}
.primary-btn {
  border: 0;
  background: linear-gradient(90deg, var(--accent-green-strong), var(--accent-green));
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}
.primary-btn:hover { filter: brightness(1.03); }
.secondary-btn, .ghost-btn, .mini-btn, .icon-action, .tab-btn,
.controls-row input, .controls-row select,
.form-field input, .form-field textarea, .form-field select {
  border-radius: var(--radius-sm);
}
:root[data-theme='light'] .flat-block,
:root[data-theme='light'] .modal-card,
:root[data-theme='light'] .filters-popover {
  background: var(--surface-1);
}
:root[data-theme='dark'] .flat-block,
:root[data-theme='dark'] .modal-card,
:root[data-theme='dark'] .filters-popover {
  background: var(--surface-dark-1);
}
:root[data-theme='dark'] .note-row,
:root[data-theme='dark'] .summary-chip,
:root[data-theme='dark'] .settings-row {
  background: rgba(255,255,255,.02);
}

.section-head h3, .toolbar-inline h3, .planner-toolbar h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.section-head p, .toolbar-inline p, .planner-toolbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.settings-table.one-row-table {
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-md);
  overflow: hidden;
}
:root[data-theme='light'] .settings-table.one-row-table {
  border-color: #e5eaf2;
}
.one-row-table .settings-row {
  min-height: 48px;
}
.one-row-table .settings-row:not(.header) {
  border-top: 1px solid rgba(255,255,255,.04);
}
:root[data-theme='light'] .one-row-table .settings-row:not(.header) {
  border-top: 1px solid #edf1f6;
}
.one-row-table .settings-row.header {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.note-row {
  align-items: center;
}
.note-main {
  min-width: 0;
}
.note-title-row strong {
  font-size: 14px;
  line-height: 1.35;
}
.note-meta small {
  white-space: nowrap;
}
.controls-row.minimal {
  gap: 10px;
}
.filters-popover select,
.filters-popover .ghost-btn {
  width: 100%;
}
.filters-popover .ghost-btn {
  justify-self: stretch;
}
.modal-head h3 {
  font-size: 15px;
}
.notes-form {
  gap: 12px;
}

.module-section-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.module-section-head h3 {
  margin:0;
  font-size:14px;
  font-weight:600;
}
.module-section-head p {
  margin:3px 0 0;
  color:var(--muted);
  font-size:12px;
}

.calendar-upcoming {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(56,189,248,.18);
  border-radius: var(--radius-md);
  background: rgba(56,189,248,.06);
}
.calendar-upcoming-label {
  display:block;
  margin-bottom:4px;
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.calendar-upcoming strong { display:block; font-size: 15px; }
.calendar-upcoming p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.calendar-meet-btn { white-space: nowrap; align-self: center; }
.calendar-groups { display:grid; gap:12px; }
.calendar-day-group {
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
:root[data-theme='light'] .calendar-day-group { border-top-color: #edf1f6; }
.calendar-day-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.calendar-day-head h4 {
  margin:0;
  font-size: 13px;
  text-transform: capitalize;
}
.calendar-day-head span { color: var(--muted); font-size: 12px; }
.calendar-day-list { display:grid; gap:8px; }
.calendar-event-row {
  display:grid;
  grid-template-columns: minmax(0, 1.4fr) 220px 220px;
  gap:12px;
  align-items:center;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
:root[data-theme='light'] .calendar-event-row { border-color:#e5eaf2; background:rgba(255,255,255,.78); }
.calendar-event-row strong { display:block; margin-bottom:4px; }
.calendar-meet-inline { display:inline-block; font-size: 12px; color: var(--accent); }

.icon-action.preview { color: #f59e0b; }
:root[data-theme='light'] .icon-action.preview { color: #d97706; }

.icon-action.run { color: #22c55e; }
:root[data-theme='light'] .icon-action.run { color: #16a34a; }

.icon-action.deliver { color: #38bdf8; }
:root[data-theme='light'] .icon-action.deliver { color: #0284c7; }

.icon-action, .theme-switch, [data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: rgba(15,23,42,.96);
  border: 1px solid rgba(255,255,255,.08);
  opacity: 0;
  pointer-events: none;
  transition: .16s ease;
  z-index: 50;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
:root[data-theme='light'] [data-tooltip]::after {
  color: #0f172a;
  background: rgba(255,255,255,.98);
  border-color: #dbe3ee;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.icon-action {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.icon-action svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}
.icon-action.edit { color: #14b8a6; }
.icon-action.toggle { color: #8b5cf6; }
.icon-action.preview { color: #f59e0b; }
.icon-action.deliver { color: #0ea5e9; }
.icon-action.run { color: #22c55e; }
.icon-action.danger { color: #ef4444; }
:root[data-theme='light'] .icon-action.edit { color: #0f766e; }
:root[data-theme='light'] .icon-action.toggle { color: #7c3aed; }
:root[data-theme='light'] .icon-action.preview { color: #d97706; }
:root[data-theme='light'] .icon-action.deliver { color: #0284c7; }
:root[data-theme='light'] .icon-action.run { color: #16a34a; }
:root[data-theme='light'] .icon-action.danger { color: #dc2626; }

.icon-action { width:34px; height:34px; }
.icon-action svg { width:18px; height:18px; stroke-width:2.1; }

.icon-action.edit { color: #0f766e; }
.icon-action.toggle { color: #7c3aed; }
.icon-action.preview { color: #ca8a04; }
.icon-action.deliver { color: #0284c7; }
.icon-action.run { color: #16a34a; }
.icon-action.danger { color: #dc2626; }
.icon-action:hover { transform: translateY(-1px); }

.summary-row {
  gap: 12px;
}
.summary-chip {
  min-height: 88px;
  padding: 14px 16px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}
.summary-chip strong {
  display:block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1;
}
:root[data-theme='light'] .summary-chip {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.note-row {
  min-height: 72px;
  padding: 12px 14px;
}
.note-title-row {
  margin-bottom: 6px;
}
.note-title-row strong {
  font-size: 15px;
}
.note-priority-badge {
  padding: 5px 9px;
  font-size: 11px;
}
.note-meta {
  min-width: 132px;
  justify-content: flex-end;
}
.row-actions.icon-actions {
  gap: 8px;
}
.icon-action {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.06);
}
:root[data-theme='light'] .icon-action {
  border-color: #dbe3ee;
  background: #ffffff;
}
.icon-action svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.icon-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
:root[data-theme='dark'] .icon-action {
  color: #22c55e !important;
}
:root[data-theme='light'] .icon-action {
  color: #16a34a !important;
}
:root[data-theme='dark'] .icon-action.danger,
:root[data-theme='light'] .icon-action.danger {
  color: #16a34a !important;
}

.summary-chip.risk,
.summary-chip.warn,
.summary-chip.ok,
.summary-chip.violet {
  border-left: none !important;
}
:root[data-theme='light'] .summary-chip.risk {
  background: linear-gradient(135deg, rgba(239,68,68,.08), rgba(255,255,255,1));
}
:root[data-theme='light'] .summary-chip.warn {
  background: linear-gradient(135deg, rgba(245,158,11,.08), rgba(255,255,255,1));
}
:root[data-theme='light'] .summary-chip.ok {
  background: linear-gradient(135deg, rgba(34,197,94,.08), rgba(255,255,255,1));
}
:root[data-theme='light'] .summary-chip.violet {
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(255,255,255,1));
}
:root[data-theme='dark'] .summary-chip.risk {
  background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(10,14,12,.9));
}
:root[data-theme='dark'] .summary-chip.warn {
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(10,14,12,.9));
}
:root[data-theme='dark'] .summary-chip.ok {
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(10,14,12,.9));
}
:root[data-theme='dark'] .summary-chip.violet {
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(10,14,12,.9));
}

:root[data-theme='light'] .summary-chip,
:root[data-theme='dark'] .summary-chip {
  border: 1px solid rgba(255,255,255,.06);
}
:root[data-theme='light'] .summary-chip {
  border-color: #e5eaf2 !important;
}
:root[data-theme='dark'] .summary-chip {
  border-color: rgba(255,255,255,.05) !important;
}
.summary-chip.risk,
.summary-chip.warn,
.summary-chip.ok,
.summary-chip.violet {
  border-left: none !important;
  border-right-color: inherit !important;
  border-top-color: inherit !important;
  border-bottom-color: inherit !important;
}

.topmenu button,
.primary-btn,
.secondary-btn,
.ghost-btn,
.mini-btn {
  font-weight: 500;
  letter-spacing: -0.01em;
}
.controls-row.minimal .primary-btn,
.controls-row.minimal .secondary-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
}
.controls-row.minimal input {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
}
.primary-btn {
  box-shadow: none;
}
:root[data-theme='dark'] .primary-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #04130a;
}
:root[data-theme='light'] .primary-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}
.secondary-btn,
.ghost-btn {
  background: rgba(255,255,255,.02);
}
:root[data-theme='light'] .secondary-btn,
:root[data-theme='light'] .ghost-btn {
  background: #fff;
}

.note-meta.compact {
  min-width: 120px;
  gap: 8px;
}
.note-meta.compact small {
  font-size: 11px;
  color: var(--muted);
}
.note-inline-actions {
  display:flex;
  align-items:center;
  gap:8px;
}
.note-menu-wrap {
  position: relative;
}
.icon-action.more {
  color: var(--muted) !important;
}
.icon-action.more svg {
  width: 14px;
  height: 14px;
}
.note-menu {
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  min-width:140px;
  display:grid;
  gap:4px;
  padding:6px;
  border-radius:12px;
  background: rgba(10,14,12,.98);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 36px rgba(0,0,0,.24);
  z-index:40;
}
.note-menu.hidden { display:none; }
.menu-item {
  text-align:left;
  border:0;
  background:transparent;
  color:var(--text);
  padding:8px 10px;
  border-radius:8px;
  cursor:pointer;
  font:inherit;
}
.menu-item:hover {
  background: rgba(255,255,255,.05);
}
.menu-item.danger { color: #ef4444; }
:root[data-theme='light'] .note-menu {
  background: rgba(255,255,255,.98);
  border-color: #dbe3ee;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
:root[data-theme='light'] .menu-item:hover {
  background: rgba(15,23,42,.04);
}

.note-row {
  grid-template-columns: 1fr 120px;
}
.note-main p {
  max-width: 92%;
}
.note-inline-actions .mini-btn {
  height: 30px;
  padding: 0 10px;
}
.menu-item {
  font-size: 13px;
  font-weight: 500;
}

:root[data-theme='dark'] body {
  background: linear-gradient(180deg, #111315 0%, #15181b 100%);
  color: #e6e9ee;
}
:root[data-theme='dark'] .topnav {
  background: rgba(18, 20, 23, 0.88);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
:root[data-theme='dark'] .brand-inline strong,
:root[data-theme='dark'] .topmenu button,
:root[data-theme='dark'] .top-time,
:root[data-theme='dark'] .section-head h3,
:root[data-theme='dark'] .module-section-head h3,
:root[data-theme='dark'] .note-title-row strong {
  color: #f3f4f6;
}
:root[data-theme='dark'] .brand-inline span,
:root[data-theme='dark'] .top-time,
:root[data-theme='dark'] .summary-chip span,
:root[data-theme='dark'] .note-row p,
:root[data-theme='dark'] .module-section-head p,
:root[data-theme='dark'] .section-head p,
:root[data-theme='dark'] .settings-row span,
:root[data-theme='dark'] .compact-topbar p {
  color: #9ca3af;
}
:root[data-theme='dark'] .flat-block,
:root[data-theme='dark'] .modal-card,
:root[data-theme='dark'] .filters-popover,
:root[data-theme='dark'] .note-row,
:root[data-theme='dark'] .settings-row,
:root[data-theme='dark'] .summary-chip {
  background: rgba(24, 27, 31, 0.92);
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: none;
}
:root[data-theme='dark'] .summary-chip.risk {
  background: linear-gradient(180deg, rgba(30,23,24,.96), rgba(24,27,31,.96));
}
:root[data-theme='dark'] .summary-chip.warn {
  background: linear-gradient(180deg, rgba(32,27,22,.96), rgba(24,27,31,.96));
}
:root[data-theme='dark'] .summary-chip.ok {
  background: linear-gradient(180deg, rgba(21,30,24,.96), rgba(24,27,31,.96));
}
:root[data-theme='dark'] .summary-chip.violet {
  background: linear-gradient(180deg, rgba(26,24,33,.96), rgba(24,27,31,.96));
}
:root[data-theme='dark'] .topmenu button.active,
:root[data-theme='dark'] .topmenu button:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.06);
}
:root[data-theme='dark'] .primary-btn {
  background: #1f9d55;
  color: #ffffff;
  box-shadow: none;
}
:root[data-theme='dark'] .primary-btn:hover {
  background: #18864a;
}
:root[data-theme='dark'] .secondary-btn,
:root[data-theme='dark'] .ghost-btn,
:root[data-theme='dark'] .mini-btn,
:root[data-theme='dark'] .icon-action,
:root[data-theme='dark'] .tab-btn,
:root[data-theme='dark'] .controls-row input,
:root[data-theme='dark'] .controls-row select,
:root[data-theme='dark'] .form-field input,
:root[data-theme='dark'] .form-field textarea,
:root[data-theme='dark'] .form-field select {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  color: #f3f4f6;
}
:root[data-theme='dark'] .note-row:hover,
:root[data-theme='dark'] .icon-action:hover,
:root[data-theme='dark'] .mini-btn:hover {
  box-shadow: none;
}
:root[data-theme='dark'] .badge {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.06);
  color: #d1d5db;
}

.summary-chip {
  border: none !important;
  box-shadow: none !important;
}
:root[data-theme='light'] .summary-chip.risk {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe4e6 45%, #ffffff 100%);
}
:root[data-theme='light'] .summary-chip.warn {
  background: linear-gradient(135deg, #fff9ed 0%, #ffedd5 45%, #ffffff 100%);
}
:root[data-theme='light'] .summary-chip.ok {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 45%, #ffffff 100%);
}
:root[data-theme='light'] .summary-chip.violet {
  background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 45%, #ffffff 100%);
}
:root[data-theme='dark'] .summary-chip.risk {
  background: linear-gradient(135deg, rgba(58,25,29,.96) 0%, rgba(34,28,31,.96) 55%, rgba(24,27,31,.96) 100%);
}
:root[data-theme='dark'] .summary-chip.warn {
  background: linear-gradient(135deg, rgba(61,43,23,.96) 0%, rgba(36,31,24,.96) 55%, rgba(24,27,31,.96) 100%);
}
:root[data-theme='dark'] .summary-chip.ok {
  background: linear-gradient(135deg, rgba(21,48,30,.96) 0%, rgba(24,34,28,.96) 55%, rgba(24,27,31,.96) 100%);
}
:root[data-theme='dark'] .summary-chip.violet {
  background: linear-gradient(135deg, rgba(43,32,59,.96) 0%, rgba(31,29,40,.96) 55%, rgba(24,27,31,.96) 100%);
}

:root[data-theme='light'] .flat-block {
  border: none !important;
  box-shadow: none !important;
}
:root[data-theme='dark'] .flat-block {
  border: none !important;
  box-shadow: none !important;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.summary-section-flat {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.summary-chip {
  min-height: 96px;
  padding: 16px 16px;
  border-radius: 16px;
}
.summary-chip span {
  font-size: 12px;
  opacity: .9;
}
.summary-chip strong {
  font-size: 24px;
  margin-top: 10px;
}
:root[data-theme='light'] .summary-chip.risk {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 55%, #fff1f2 100%);
}
:root[data-theme='light'] .summary-chip.warn {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 55%, #fff7ed 100%);
}
:root[data-theme='light'] .summary-chip.ok {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 55%, #f0fdf4 100%);
}
:root[data-theme='light'] .summary-chip.violet {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 55%, #f5f3ff 100%);
}
:root[data-theme='dark'] .summary-chip.risk {
  background: linear-gradient(135deg, #4a2328 0%, #6a2b35 60%, #382126 100%);
}
:root[data-theme='dark'] .summary-chip.warn {
  background: linear-gradient(135deg, #5a3d20 0%, #7a5125 60%, #3f2e1f 100%);
}
:root[data-theme='dark'] .summary-chip.ok {
  background: linear-gradient(135deg, #1f4d31 0%, #256a3a 60%, #183727 100%);
}
:root[data-theme='dark'] .summary-chip.violet {
  background: linear-gradient(135deg, #3a2b56 0%, #513879 60%, #2c233d 100%);
}
@media (max-width: 980px) {
  .summary-strip { grid-template-columns: 1fr 1fr; }
}

.summary-standalone {
  padding: 0 !important;
  margin: 0 0 8px 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.summary-headless {
  margin-bottom: 8px;
  padding: 0 2px;
}
.summary-headless h3 {
  margin: 0;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.employee-card {
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(24, 27, 31, 0.92);
  color: var(--text);
  border-radius: 16px;
  padding: 18px 16px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.employee-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.18);
}
.employee-card strong {
  font-size: 15px;
  line-height: 1.35;
}
.employee-card span:last-child {
  color: var(--muted);
  font-size: 13px;
}
.employee-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,197,94,.18);
  color: #d1fae5;
  font-weight: 700;
}
.employee-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 18px;
}
.employee-modal-card {
  width: min(560px, 100%);
}
.employee-modal-body {
  display: grid;
  gap: 16px;
}
.employee-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}
.employee-hero strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}
.employee-hero span:last-child {
  color: var(--muted);
}
.employee-about {
  color: var(--text);
  line-height: 1.55;
}
.employee-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.employee-detail {
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.02);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 4px;
}
.employee-detail span {
  color: var(--muted);
  font-size: 12px;
}
.employee-detail strong {
  font-size: 14px;
}
:root[data-theme='light'] .employee-card {
  background: #ffffff;
  border-color: #e5eaf2;
}
:root[data-theme='light'] .employee-card:hover {
  border-color: #cfe3d4;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
:root[data-theme='light'] .employee-avatar {
  background: rgba(34,197,94,.14);
  color: #166534;
}
:root[data-theme='light'] .employee-detail {
  background: #ffffff;
  border-color: #e5eaf2;
}
@media (max-width: 980px) {
  .employee-grid {
    grid-template-columns: 1fr;
  }
  .employee-details {
    grid-template-columns: 1fr;
  }
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.docs-table .setting-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.docs-table .setting-box span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.docs-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(59,130,246,.18);
  background: rgba(59,130,246,.08);
}
.docs-note p {
  margin: 6px 0 0;
  color: var(--muted);
}
:root[data-theme='light'] .docs-table .setting-box {
  background: #fff;
  border-color: #d7e3f3;
}
@media (max-width: 860px) {
  .docs-grid { grid-template-columns: 1fr; }
}

.docs-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.docs-section-head {
  display: grid;
  gap: 4px;
}
.docs-section-head strong {
  font-size: 15px;
}
.docs-section-head span {
  color: var(--muted);
  font-size: 12px;
}
.docs-list {
  display: grid;
  gap: 10px;
}
.docs-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.docs-row span {
  color: var(--muted);
  line-height: 1.45;
}
:root[data-theme='light'] .docs-row {
  background: #fff;
  border-color: #d7e3f3;
}

.docs-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.docs-nav-btn {
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  color: var(--text);
}
.docs-nav-btn span {
  color: var(--muted);
  font-size: 12px;
}
.docs-nav-btn.active {
  border-color: rgba(34,197,94,.32);
  background: rgba(34,197,94,.08);
}
.docs-content {
  display: grid;
  gap: 12px;
}
:root[data-theme='light'] .docs-nav-btn {
  background: #fff;
  border-color: #d7e3f3;
}
:root[data-theme='light'] .docs-nav-btn.active {
  background: #ecfdf5;
  border-color: #86efac;
}
@media (max-width: 860px) {
  .docs-nav { grid-template-columns: 1fr; }
}

.settings-stack { display:grid; gap:12px; }
.settings-grid { display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.settings-form { display:grid; gap:12px; }
.settings-hint { margin:0; color:var(--muted); font-size:12px; }

.expenses-summary { margin-bottom: 16px; }
.expenses-note { margin-bottom: 18px; }
.expenses-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.expenses-table { overflow: hidden; }
.expenses-header { grid-template-columns: 1.1fr 1.4fr .9fr .7fr .8fr 1.6fr; }
.expenses-table .settings-row { grid-template-columns: 1.1fr 1.4fr .9fr .7fr .8fr 1.6fr; align-items: center; }
.expenses-table .settings-row strong { color: #f5f7fb; }
.expense-money { color: #7ef0b8; font-weight: 700; }
.expense-source-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.expense-source-badge.tracked { background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.24); }
.expense-source-badge.manual { background: rgba(148,163,184,.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,.24); }
.compact-subhead { padding: 14px 16px 10px; border-bottom: 1px solid rgba(148,163,184,.14); margin-bottom: 0; }
.compact-subhead h4 { margin: 0; font-size: 14px; }
.compact-subhead p { margin: 4px 0 0; font-size: 12px; color: #94a3b8; }
@media (max-width: 1100px) { .expenses-layout { grid-template-columns: 1fr; } }

.expenses-layout.clean { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.expense-panel { border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: rgba(255,255,255,.02); overflow: hidden; }
.expense-panel.wide { grid-column: 1 / -1; min-width: 0; }
.expense-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.expense-panel-head h4 { margin: 0; font-size: 15px; }
.expense-panel-head p { margin: 4px 0 0; font-size: 12px; color: #94a3b8; }
.expense-list { display: grid; gap: 0; }
.expense-list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.05); }
.expense-list-row:first-child { border-top: 0; }
.expense-list-row > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.expense-list-row > div:last-child { align-items: flex-end; text-align: right; }
.expense-list-row strong { color: #f8fafc; font-size: 14px; }
.expense-list-row span { color: #94a3b8; font-size: 12px; }
:root[data-theme='light'] .expense-panel { border-color: #dbe3ee; background: rgba(255,255,255,.78); }
:root[data-theme='light'] .expense-panel-head,
:root[data-theme='light'] .expense-list-row { border-color: #e2e8f0; }
:root[data-theme='light'] .expense-list-row strong { color: #0f172a; }
:root[data-theme='light'] .expense-list-row span,
:root[data-theme='light'] .expense-panel-head p { color: #64748b; }
@media (max-width: 980px) { .expenses-layout.clean { grid-template-columns: 1fr; } .expense-panel.wide { grid-column: auto; } }

.costs-controls { grid-template-columns: 1fr 1fr 1fr auto auto; align-items: center; }
.costs-controls input[type='month'], .costs-controls input[type='date'] { min-width: 0; }
.modal-card .notes-form textarea { min-height: 92px; }
@media (max-width: 980px) { .costs-controls { grid-template-columns: 1fr; } }

.expenses-summary { margin-bottom: 16px; }
.expenses-layout.clean { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.expense-panel { border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: rgba(255,255,255,.02); overflow: hidden; min-width: 0; }
.expense-panel.wide { grid-column: 1 / -1; min-width: 0; }
.expense-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.expense-panel-head h4 { margin: 0; font-size: 15px; }
.expense-panel-head p { margin: 4px 0 0; font-size: 12px; color: #94a3b8; }
.expense-panel-actions { display: flex; align-items: center; gap: 8px; }
.expense-list { display: grid; gap: 0; }
.expense-list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.05); }
.expense-list-row:first-child { border-top: 0; }
.expense-list-row > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.expense-list-row > div:last-child { align-items: flex-end; text-align: right; }
.expense-row-actions { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px !important; }
.expense-list-row strong { color: #f8fafc; font-size: 14px; }
.expense-list-row span { color: #94a3b8; font-size: 12px; }
.expense-money { color: #7ef0b8; font-weight: 700; }
.expense-source-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.expense-source-badge.tracked { background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.24); }
.expense-source-badge.manual { background: rgba(148,163,184,.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,.24); }
.small-btn { padding: 8px 12px; font-size: 12px; }
:root[data-theme='light'] .expense-panel { border-color: #dbe3ee; background: rgba(255,255,255,.78); }
:root[data-theme='light'] .expense-panel-head,
:root[data-theme='light'] .expense-list-row { border-color: #e2e8f0; }
:root[data-theme='light'] .expense-list-row strong { color: #0f172a; }
:root[data-theme='light'] .expense-list-row span,
:root[data-theme='light'] .expense-panel-head p { color: #64748b; }
@media (max-width: 980px) { .expenses-layout.clean { grid-template-columns: 1fr; } .expense-panel.wide { grid-column: auto; } .expense-panel-head { flex-direction: column; } }

.expenses-month-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 16px; }
.expenses-month-pill { min-width: 180px; text-align: center; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); font-weight: 700; text-transform: capitalize; }
:root[data-theme='light'] .expenses-month-pill { border-color: #dbe3ee; background: rgba(255,255,255,.78); color: #0f172a; }

.expenses-filters { display: grid; gap: 12px; margin: 0 0 16px; }
.expenses-range-bar { display: flex; align-items: end; justify-content: center; gap: 10px; flex-wrap: wrap; }
.expenses-range-bar label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #94a3b8; }
.expenses-range-bar input { min-width: 150px; }
:root[data-theme='light'] .expenses-range-bar label { color: #64748b; }

.expenses-filters { border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; background: rgba(255,255,255,.02); }
.expenses-range-bar { display: flex; align-items: flex-end; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.expenses-range-bar label { display: flex; flex-direction: column; gap: 6px; width: 150px; flex: 0 0 150px; font-size: 12px; color: #94a3b8; }
.expenses-range-bar input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: rgba(15,23,42,.55); color: #f8fafc; }
.expenses-range-bar .small-btn { height: 40px; }
:root[data-theme='light'] .expenses-filters { border-color: #dbe3ee; background: rgba(255,255,255,.78); }
:root[data-theme='light'] .expenses-range-bar label { color: #64748b; }
:root[data-theme='light'] .expenses-range-bar input { border-color: #dbe3ee; background: #fff; color: #0f172a; }

.docs-layout { padding-bottom: 8px; }
.docs-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.docs-sidebar { display: grid; gap: 10px; position: sticky; top: 16px; align-self: start; }
.docs-sidebar-title { padding: 14px 16px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: rgba(255,255,255,.03); display: grid; gap: 4px; }
.docs-sidebar-title strong { color: #f8fafc; font-size: 14px; }
.docs-sidebar-title span { color: #94a3b8; font-size: 12px; }
.docs-nav-btn { text-align: left; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: start; }
.docs-nav-index { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.06); color: #cbd5e1; font-size: 11px; font-weight: 700; }
.docs-nav-copy { display: grid; gap: 4px; }
.docs-article { border: 1px solid rgba(255,255,255,.06); border-radius: 16px; background: rgba(255,255,255,.02); overflow: hidden; min-width: 0; }
.docs-article-head { padding: 20px 22px 16px; border-bottom: 1px solid rgba(255,255,255,.06); display: grid; gap: 6px; }
.docs-article-head h3 { margin: 0; font-size: 22px; }
.docs-article-head p { margin: 0; color: #94a3b8; line-height: 1.5; }
.docs-article-toc { padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.06); display: grid; gap: 8px; background: rgba(255,255,255,.015); }
.docs-article-toc strong { font-size: 13px; color: #e2e8f0; }
.docs-article-toc span { color: #94a3b8; font-size: 13px; }
.docs-article-body { padding: 22px; display: grid; gap: 22px; }
.docs-article-section { display: grid; gap: 10px; }
.docs-article-section h4 { margin: 0; font-size: 18px; color: #f8fafc; }
.docs-article-section p { margin: 0; color: #cbd5e1; line-height: 1.7; font-size: 14px; }
.docs-article-section code { padding: 2px 6px; border-radius: 8px; background: rgba(15,23,42,.65); color: #93c5fd; font-size: 12px; }
:root[data-theme='light'] .docs-sidebar-title,
:root[data-theme='light'] .docs-article { border-color: #dbe3ee; background: rgba(255,255,255,.82); }
:root[data-theme='light'] .docs-article-head,
:root[data-theme='light'] .docs-article-toc { border-color: #e2e8f0; }
:root[data-theme='light'] .docs-sidebar-title strong,
:root[data-theme='light'] .docs-article-head h3,
:root[data-theme='light'] .docs-article-section h4 { color: #0f172a; }
:root[data-theme='light'] .docs-sidebar-title span,
:root[data-theme='light'] .docs-article-head p,
:root[data-theme='light'] .docs-article-toc span,
:root[data-theme='light'] .docs-article-section p { color: #475569; }
:root[data-theme='light'] .docs-nav-index { background: #e2e8f0; color: #334155; }
:root[data-theme='light'] .docs-article-section code { background: #eff6ff; color: #1d4ed8; }
@media (max-width: 1100px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
}

.projects-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
.project-card { border:1px solid rgba(255,255,255,.06); border-radius:14px; background:rgba(255,255,255,.02); padding:16px; display:grid; gap:12px; }
.project-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.project-card-head strong { display:block; font-size:16px; color:#f8fafc; }
.project-card-head span { color:#94a3b8; font-size:12px; }
.project-card p { margin:0; color:#cbd5e1; font-size:13px; line-height:1.6; }
.project-meta-row { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#94a3b8; font-size:12px; }
.project-header { grid-template-columns: 1.1fr .9fr .7fr 1.6fr .8fr !important; }
:root[data-theme='light'] .project-card { border-color:#dbe3ee; background:rgba(255,255,255,.82); }
:root[data-theme='light'] .project-card-head strong { color:#0f172a; }
:root[data-theme='light'] .project-card-head span,
:root[data-theme='light'] .project-card p,
:root[data-theme='light'] .project-meta-row { color:#475569; }

.project-card { padding: 18px; gap: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.project-title-stack { display:grid; gap:4px; min-width:0; }
.project-title-row { display:flex; align-items:center; gap:10px; min-width:0; }
.project-glyph { width:30px; height:30px; display:inline-flex; align-items:center; justify-content:center; border-radius:10px; background:rgba(139,92,246,.12); color:#c4b5fd; font-size:14px; flex:0 0 30px; }
.project-slug { color:#94a3b8; font-size:12px; text-transform:none; }
.project-status-badge { display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:999px; font-size:11px; font-weight:700; text-transform:uppercase; border:1px solid transparent; }
.project-status-badge.active { background:rgba(34,197,94,.12); color:#86efac; border-color:rgba(34,197,94,.22); }
.project-status-badge.planned { background:rgba(139,92,246,.12); color:#c4b5fd; border-color:rgba(139,92,246,.22); }
.project-status-badge.paused { background:rgba(245,158,11,.12); color:#fcd34d; border-color:rgba(245,158,11,.22); }
.project-status-badge.archived { background:rgba(148,163,184,.12); color:#cbd5e1; border-color:rgba(148,163,184,.22); }
.project-card .icon-action svg { width:16px; height:16px; }
.project-card .row-actions { opacity:.92; }
:root[data-theme='light'] .project-card { box-shadow: 0 8px 24px rgba(15,23,42,.04); }
:root[data-theme='light'] .project-glyph { background:#f3e8ff; color:#7c3aed; }
:root[data-theme='light'] .project-slug { color:#64748b; }

.project-open-card { text-align:left; cursor:pointer; }
.project-open-card .project-meta-row { align-items:center; }
.project-open-hint { color:#60a5fa; font-weight:600; }
.project-open-card .row-actions { display:none !important; }
.project-switcher-wrap { display:flex; align-items:center; gap:10px; }
.project-switcher-label { color:#94a3b8; font-size:12px; }
.project-switcher { height:38px; min-width:220px; padding:0 12px; border-radius:10px; border:1px solid rgba(255,255,255,.08); background:rgba(15,23,42,.55); color:#f8fafc; }
:root[data-theme='light'] .project-open-hint { color:#2563eb; }
:root[data-theme='light'] .project-switcher-label { color:#64748b; }
:root[data-theme='light'] .project-switcher { border-color:#dbe3ee; background:#fff; color:#0f172a; }

#project-switcher-slot { display:flex; align-items:center; }
.menu-toggle { display:none !important; }
.topnav-right { gap: 12px; }
.project-switcher-wrap { margin-right: 2px; }
.project-switcher { min-width: 240px; }
@media (max-width: 900px) {
  .project-switcher-label { display:none; }
  .project-switcher { min-width: 160px; max-width: 180px; }
}

.project-shell-layout { display:grid; grid-template-columns: 280px minmax(0, 1fr); gap:20px; align-items:start; }
.project-shell-sidebar { align-self:start; }
.project-shell-card { border:1px solid rgba(255,255,255,.06); border-radius:16px; background:rgba(255,255,255,.02); padding:16px; display:grid; gap:14px; }
.project-shell-title { display:grid; gap:4px; }
.project-shell-title strong { color:#f8fafc; font-size:18px; }
.project-shell-title span { color:#94a3b8; font-size:12px; }
.project-shell-tabs { display:grid; gap:8px; }
.project-shell-tabs .tab-btn { width:100%; justify-content:flex-start; }
.project-panel-main { border:1px solid rgba(255,255,255,.06); border-radius:16px; background:rgba(255,255,255,.02); padding:20px; display:grid; gap:16px; min-height:420px; }
.project-shell-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.project-shell-head h3 { margin:0; font-size:22px; }
.project-shell-head p { margin:4px 0 0; color:#94a3b8; }
.project-placeholder { min-height:220px; border:1px dashed rgba(148,163,184,.24); border-radius:16px; display:flex; align-items:center; justify-content:center; color:#94a3b8; background:rgba(255,255,255,.02); }
:root[data-theme='light'] .project-shell-card,
:root[data-theme='light'] .project-panel-main { border-color:#dbe3ee; background:rgba(255,255,255,.84); }
:root[data-theme='light'] .project-shell-title strong,
:root[data-theme='light'] .project-shell-head h3 { color:#0f172a; }
:root[data-theme='light'] .project-shell-title span,
:root[data-theme='light'] .project-shell-head p,
:root[data-theme='light'] .project-placeholder { color:#64748b; }
:root[data-theme='light'] .project-placeholder { background:#f8fafc; border-color:#dbe3ee; }
@media (max-width: 980px) {
  .project-shell-layout { grid-template-columns: 1fr; }
  .project-shell-head { flex-direction:column; }
}

#app-grid.project-mode-grid { display:block !important; }
#app-grid.project-mode-grid > * { width:100%; }

.topmenu.hidden { display: none !important; }


.ai-providers-table .settings-row {
  grid-template-columns: 1.4fr .9fr 1.1fr 1.1fr 1.2fr 1fr 1fr .8fr !important;
}
.ai-providers-header {
  grid-template-columns: 1.4fr .9fr 1.1fr 1.1fr 1.2fr 1fr 1fr .8fr !important;
}
.ai-providers-table .row-actions.icon-actions {
  justify-content: flex-end;
}
@media (max-width: 980px) {
  .ai-providers-table .settings-row {
    grid-template-columns: 1fr !important;
  }
}


.dashboard-modern-shell {
  padding: 18px;
}
.dashboard-modern-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.dashboard-modern-head h3 {
  margin:0;
  font-size:16px;
}
.dashboard-modern-head p {
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
}
.dashboard-badge-modern {
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7dd3fc;
  background:rgba(14,165,233,.12);
  border:1px solid rgba(14,165,233,.18);
}
.dashboard-kpi-row {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-bottom:14px;
}
.dashboard-kpi-card {
  position:relative;
  overflow:hidden;
  border-radius:16px;
  padding:16px;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.dashboard-kpi-card::after {
  content:'';
  position:absolute;
  inset:auto -20px -30px auto;
  width:90px;
  height:90px;
  border-radius:50%;
  opacity:.14;
  background:currentColor;
}
.dashboard-kpi-card span,
.dashboard-kpi-card small {
  display:block;
  color:var(--muted);
}
.dashboard-kpi-card strong {
  display:block;
  margin:8px 0 6px;
  font-size:20px;
  line-height:1.2;
}
.dashboard-kpi-card.violet { color:#a78bfa; }
.dashboard-kpi-card.cyan { color:#67e8f9; }
.dashboard-kpi-card.emerald { color:#34d399; }
.dashboard-kpi-card.risk { color:#f87171; }
.dashboard-modern-grid {
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr .9fr;
  gap:12px;
}
.dashboard-modern-panel {
  border-radius:16px;
  padding:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(15,23,42,.42);
}
.dashboard-modern-panel.primary {
  background:linear-gradient(180deg, rgba(29,78,216,.16), rgba(15,23,42,.5));
}
.dashboard-highlight-card {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  min-height:160px;
}
.dashboard-eyebrow {
  display:block;
  font-size:11px;
  letter-spacing:.08em;
  color:var(--muted);
  margin-bottom:10px;
}
.dashboard-highlight-card strong {
  display:block;
  font-size:24px;
  line-height:1.15;
  margin-bottom:8px;
}
.dashboard-highlight-card p,
.dashboard-modern-copy p {
  margin:0;
  color:var(--muted);
}
.dashboard-modern-copy strong {
  display:block;
  font-size:18px;
  margin-bottom:6px;
}
.mini-bar-chart {
  display:grid;
  gap:8px;
  margin-top:16px;
}
.mini-bar-row {
  display:grid;
  grid-template-columns:minmax(96px, auto) 1fr auto;
  gap:14px;
  align-items:center;
}
.mini-bar-row span,
.mini-bar-row strong {
  font-size:12px;
}
.mini-bar-row span {
  display:block;
  margin-right:6px;
}
.mini-bar-track {
  position:relative;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}
.mini-bar-track i {
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #60a5fa, #a78bfa);
}
.mini-bar-chart.warn .mini-bar-track i {
  background:linear-gradient(90deg, #f59e0b, #fb7185);
}
.tiny-spark {
  display:flex;
  align-items:flex-end;
  gap:6px;
  min-width:90px;
  justify-content:flex-end;
}
.tiny-spark span {
  width:10px;
  border-radius:999px 999px 3px 3px;
  background:linear-gradient(180deg, #60a5fa, #a78bfa);
  opacity:.92;
}
.tiny-spark.risk span {
  background:linear-gradient(180deg, #fb7185, #ef4444);
}

.dashboard-hero-actions {
  margin-top: 14px;
}
.dashboard-hero-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(96,165,250,.24);
  background:linear-gradient(180deg, rgba(96,165,250,.22), rgba(167,139,250,.18));
  color:#eef2ff;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}
.dashboard-hero-btn.secondary {
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.12);
  color:var(--text);
}
:root[data-theme='light'] .dashboard-hero-btn {
  color:#1e3a8a;
  background:linear-gradient(180deg, rgba(96,165,250,.18), rgba(167,139,250,.12));
  border-color:rgba(96,165,250,.24);
}
:root[data-theme='light'] .dashboard-hero-btn.secondary {
  background:#fff;
  border-color:#dbe6f3;
  color:#0f172a;
}
.dashboard-brief-list {
  display:grid;
  gap:8px;
  margin-top:12px;
}
.dashboard-brief-note {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:10px 0 0;
  border-top:1px solid rgba(255,255,255,.06);
}
:root[data-theme='light'] .dashboard-modern-panel,
:root[data-theme='light'] .dashboard-kpi-card {
  background:#fff;
  border-color:#e7edf5;
}
:root[data-theme='light'] .dashboard-modern-panel.primary {
  background:linear-gradient(180deg, rgba(59,130,246,.1), #fff);
}
:root[data-theme='light'] .mini-bar-track {
  background:#e8eef7;
}

@media (max-width: 980px) {
  .dashboard-two-col { grid-template-columns: 1fr; }
  .dashboard-panel.wide { grid-column: auto; }
  .dashboard-row, .dashboard-note { grid-template-columns: 1fr; }
}


.project-fb-header, .project-fb-table .settings-row { grid-template-columns: 1.5fr 1.2fr .9fr .8fr .9fr .8fr .8fr !important; }
.project-import-card { margin-bottom: 16px; }
.project-fb-row strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }


.project-shell-stack { display:grid; gap:16px; }
.project-shell-topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:16px 18px; border:1px solid rgba(255,255,255,.06); border-radius:18px; background:rgba(255,255,255,.02); }
.project-top-tabs { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.project-fb-header, .project-fb-table .settings-row { grid-template-columns: 1.4fr 1.1fr .9fr .8fr .8fr .9fr .9fr !important; }
.totp-code-badge { display:inline-flex; align-items:center; justify-content:center; min-width:74px; padding:6px 10px; border-radius:10px; background:rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.18); color:#86efac; font-weight:700; letter-spacing:.08em; }
.muted-inline { color: var(--muted); }


.project-fb-table { overflow-x: auto; display:block; }
.project-fb-header.wide, .project-fb-table .settings-row.wide { min-width: 2800px; grid-template-columns: 1.1fr 1.3fr 1fr .9fr .7fr .7fr .7fr .6fr .8fr .8fr .8fr .9fr .9fr .8fr .8fr .7fr .7fr !important; }
.project-fb-table .settings-row.header.wide { position: sticky; top: 0; z-index: 2; background: rgba(15,23,42,.98); }
.cell-with-copy, .totp-code-wrap { display:flex; align-items:center; gap:6px; min-width:0; }
.cell-with-copy strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.icon-action.copy { font-size:12px; }
.icon-action.copy.copied { border-color: rgba(34,197,94,.28); background: rgba(34,197,94,.10); color: #86efac; }
.project-panel-main { width:100%; }


#app-grid.project-mode-grid { display:block !important; }
.project-shell-stack, .project-panel-main, .project-import-card, .project-fb-table { width: 100% !important; max-width: none !important; }
.project-shell-topbar { width: 100% !important; }
.content { overflow-x: hidden; }
.project-panel-main { overflow-x: visible !important; }
.project-fb-table { overflow-x: auto !important; padding-bottom: 8px; }
.project-fb-table .settings-row.header.wide, .project-fb-table .settings-row.wide { width: max-content !important; }


.project-fb-table-wrap { width: 100%; overflow-x: auto; border: 1px solid rgba(255,255,255,.06); border-radius: 16px; background: rgba(255,255,255,.02); }
.project-fb-table-head, .project-fb-table-row { min-width: 2800px; display: grid; grid-template-columns: 1.1fr 1.3fr 1fr .9fr .7fr .7fr .7fr .6fr .8fr .8fr .8fr .9fr .9fr .8fr .8fr .7fr .7fr; gap: 0; align-items: center; }
.project-fb-table-head { position: sticky; top: 0; z-index: 3; background: #101827; border-bottom: 1px solid rgba(255,255,255,.08); }
.project-fb-table-head span, .project-fb-table-row span { padding: 12px 10px; border-right: 1px solid rgba(255,255,255,.04); }
.project-fb-table-row { border-bottom: 1px solid rgba(255,255,255,.05); }
.project-fb-table-row:last-child { border-bottom: 0; }
.project-fb-table-body { display: block; }


#app-grid.project-mode-grid { width: calc(100vw - 320px) !important; max-width: none !important; margin-left: 0 !important; }
.fullbleed-project-shell { width: 100% !important; max-width: none !important; }
.project-header-menu { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.project-header-menu .tab-btn, .project-header-menu .secondary-btn { height: 34px; }
.compact-project-main { padding: 12px !important; }
.project-shell-head.compact h3 { font-size: 20px; margin: 0; }
.project-shell-head.compact p, .docs-note.compact p { font-size: 12px; margin: 4px 0 0; }
.compact-info-row { gap: 8px !important; }
.compact-info-row .summary-chip { padding: 8px 10px !important; min-height: auto !important; }
.project-fb-table-head, .project-fb-table-row { font-size: 11px !important; line-height: 1.2 !important; }
.project-fb-table-head span, .project-fb-table-row span { padding: 8px 8px !important; }
.totp-code-badge { min-width: 64px !important; padding: 4px 8px !important; font-size: 11px !important; }
.project-fb-table-wrap { width: calc(100vw - 360px) !important; max-width: none !important; }
.project-import-card, .project-panel-main { max-width: none !important; width: 100% !important; }


.project-fb-table-wrap { width: 100% !important; max-width: calc(100vw - 360px) !important; }
.project-fb-table-head, .project-fb-table-row { min-width: max-content !important; width: max-content !important; grid-template-columns: 180px 220px 180px 120px 110px 110px 90px 70px 110px 110px 110px 150px 150px 130px 130px 120px 120px !important; }
.project-header-menu { margin-right: 12px; }
.summary-row.compact-info-row { grid-template-columns: repeat(3, minmax(140px, 180px)); align-items:start; }
.docs-note.compact { max-width: 720px; }

/* project mode rebuild: founder shell header + full-width facebook accounts table */
.topnav-left { min-width: 0; }
.topnav-right { flex: 0 0 auto; }
#project-switcher-slot { min-width: 0; }
.project-header-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}
.project-header-context {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-right: 4px;
}
.project-header-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.project-header-context strong {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
.project-header-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.topmenu.hidden {
  display: none !important;
}
.content.compact-content {
  width: 100%;
  max-width: none;
}
#app-grid.project-mode-grid {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
#app-grid.project-mode-grid > * {
  width: 100%;
  max-width: none;
}
#app-grid.project-mode-grid .flat-block,
#app-grid.project-mode-grid .project-panel-main,
#app-grid.project-mode-grid .project-import-card,
#app-grid.project-mode-grid .project-fb-table-wrap {
  width: 100% !important;
  max-width: none !important;
}

.project-shell-stack {
  display: grid;
  gap: 16px;
}
.project-panel-main {
  width: 100%;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  padding: 18px;
}
.project-panel-main.project-panel-wide {
  gap: 14px;
}
.project-shell-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.project-shell-slug {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
}
.project-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 220px));
  gap: 10px;
}
.project-overview-stats--compact .summary-chip {
  min-height: 76px;
  padding: 12px 14px;
}
.project-import-card {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  padding: 14px;
}
.project-fb-grid-shell {
  width: 100%;
}
.project-fb-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(15,23,42,.3);
}
.project-fb-table-head,
.project-fb-table-row {
  display: grid;
  grid-template-columns: 180px 210px 180px 120px 90px 100px 80px 100px 90px 100px 100px 100px 150px 150px 120px 120px 120px 160px;
  min-width: 2370px;
  width: max-content;
}
.project-fb-table-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.project-fb-table-head span,
.project-fb-table-row > span {
  padding: 8px 10px;
  border-right: 1px solid rgba(255,255,255,.05);
  font-size: 11px;
  line-height: 1.25;
}
.project-fb-table-head span {
  font-size: 10px;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.project-fb-table-row {
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.project-fb-table-row:last-child {
  border-bottom: 0;
}
.project-fb-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.project-fb-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.project-fb-cell--identity {
  justify-content: space-between;
}
.project-fb-cell strong,
.project-fb-cell a,
.project-fb-cell .truncate-inline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-fb-cell a {
  color: #93c5fd;
  text-decoration: none;
}
.project-fb-cell small,
.muted-inline {
  color: var(--muted);
}
.cell-with-copy,
.totp-code-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.truncate-inline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.totp-code-badge {
  min-width: 68px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
}
.icon-action.copy {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  font-size: 11px;
}
body.project-mode-active .topmenu {
  display: none !important;
}
body.project-mode-active .content {
  padding-right: 18px !important;
}
body.project-mode-active #app-grid.project-mode-grid {
  width: 100% !important;
}
:root[data-theme='light'] .project-panel-main,
:root[data-theme='light'] .project-import-card,
:root[data-theme='light'] .project-fb-table-wrap {
  background: #fff;
  border-color: #dbe3ee;
}
:root[data-theme='light'] .project-fb-table-head {
  background: #f8fafc;
}
:root[data-theme='light'] .project-fb-cell a {
  color: #2563eb;
}
@media (max-width: 1100px) {
  .project-header-menu {
    align-items: flex-start;
  }
  .project-header-tabs {
    width: 100%;
  }
  .project-overview-stats {
    grid-template-columns: 1fr;
  }
}


.project-summary-row { display:flex !important; flex-wrap:nowrap !important; gap:12px !important; align-items:stretch !important; overflow-x:auto; }
.project-summary-row .summary-chip { min-width: 220px; flex: 0 0 220px; }


.project-fb-grid-shell { width:100%; overflow-x:auto; }
.project-fb-table-wrap { min-width:max-content; overflow:visible !important; }
.project-fb-table-head, .project-fb-table-row { white-space: nowrap; }
.project-fb-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-fb-cell--check { width: 44px; min-width:44px; text-align:center; }
.project-fb-cell--index { width: 54px; min-width:54px; text-align:center; }
.project-fb-bulkbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 4px 12px; }
.project-fb-bulk-actions { display:flex; gap:8px; flex-wrap:wrap; }
.project-fb-table-row.selected { background: rgba(56,189,248,.06); }


.project-fb-table-row {
  grid-auto-rows: 1fr !important;
  align-items: center !important;
  min-height: 44px !important;
  max-height: 44px !important;
}
.project-fb-cell,
.project-fb-cell *,
.project-fb-main,
.project-fb-main *,
.cell-with-copy,
.cell-with-copy * {
  white-space: nowrap !important;
}
.project-fb-main {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden !important;
}
.project-fb-main small {
  display: inline !important;
  margin: 0 !important;
}
.project-fb-cell {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 44px !important;
  max-height: 44px !important;
}
.project-fb-cell--identity {
  overflow: hidden !important;
}
.project-fb-cell--identity strong,
.project-fb-cell--identity small,
.project-fb-cell .truncate-inline {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}


.project-fb-table-row {
  overflow: hidden !important;
  position: relative !important;
}
.project-fb-cell {
  position: relative !important;
  overflow: hidden !important;
}
.totp-code-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.totp-code-badge {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 24px !important;
  line-height: 24px !important;
  padding: 0 8px !important;
  overflow: hidden !important;
}
.project-fb-cell input[type='checkbox'] {
  margin: 0 auto !important;
  transform: none !important;
  position: static !important;
}
.icon-action.copy {
  position: static !important;
  transform: none !important;
  flex: 0 0 auto !important;
}


:root {
  --project-fb-grid-columns: 44px 54px 120px 220px 144px 144px 150px 150px 120px 120px 220px 180px 140px 110px 110px 90px 80px 110px 110px 110px;
}
.project-fb-table-head,
.project-fb-table-row {
  grid-template-columns: var(--project-fb-grid-columns) !important;
}

.project-fb-cell .icon-action.copy { border-left: 0 !important; box-shadow: none !important; }
.project-fb-cell { border-right: 0 !important; }


.project-fb-cell {
  padding: 10px 12px !important;
  box-sizing: border-box !important;
}
.project-fb-table-head span,
.project-fb-table-row span {
  border-right: 1px solid rgba(255,255,255,.03) !important;
}
.project-fb-table-row .project-fb-cell:last-child,
.project-fb-table-head span:last-child {
  border-right: 0 !important;
}
.totp-code-wrap {
  justify-content: space-between !important;
  width: 100% !important;
  gap: 8px !important;
  padding-right: 4px !important;
}
.totp-code-badge {
  margin-left: 2px !important;
}
.project-fb-cell .icon-action.copy {
  margin-right: 2px !important;
}
.project-fb-cell .cell-with-copy {
  width: 100% !important;
  justify-content: space-between !important;
  gap: 8px !important;
}


.project-fb-cell .cell-with-copy,
.project-fb-cell .totp-code-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.project-fb-cell .icon-action.copy {
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  justify-self: end !important;
  overflow: hidden !important;
}
.project-fb-cell .truncate-inline,
.project-fb-cell a,
.project-fb-cell strong,
.project-fb-cell small {
  min-width: 0 !important;
  max-width: 100% !important;
}


.project-fb-cell--status select { width: 100%; min-width: 96px; background: rgba(15,23,42,.85); color: inherit; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 4px 8px; }
/* legacy status-active disabled */
.project-fb-table-row.status-active { background: rgba(34,197,94,.07); }
/* legacy status-reserve disabled */
.project-fb-table-row.status-reserve { background: rgba(59,130,246,.07); }
/* legacy status-warm disabled */
.project-fb-table-row.status-warm { background: rgba(234,179,8,.08); }
/* legacy status-banned disabled */
.project-fb-table-row.status-banned { background: rgba(239,68,68,.08); }
/* legacy status-hold disabled */
.project-fb-table-row.status-hold { background: rgba(168,85,247,.08); }


.totp-code-wrap {
  grid-template-columns: minmax(72px, 1fr) 24px !important;
}
.project-fb-cell:has(.totp-code-wrap) {
  min-width: 144px !important;
}
.totp-code-badge {
  min-width: 72px !important;
  max-width: 72px !important;
}


.project-fb-table-row { background: var(--row-status-tint, transparent) !important; border-left: 2px solid var(--row-status-border, transparent) !important; }
.project-status-editor { margin-top: 12px; }
.project-status-list { display:grid; gap:8px; }
.project-status-row { display:grid; grid-template-columns: 1fr 1fr 70px; gap:8px; }


.project-status-row {
  display: grid !important;
  grid-template-columns: minmax(140px, 180px) minmax(180px, 1fr) 72px !important;
  align-items: center !important;
}
.project-status-row input[type='color'] {
  width: 56px !important;
  min-width: 56px !important;
  height: 38px !important;
  padding: 2px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  background: transparent !important;
}


.project-fb-table-row {
  transition: background-color .18s ease, border-color .18s ease;
}
.project-fb-table-row:hover {
  filter: brightness(1.02);
}


.project-fb-cell,
.project-fb-table-row span,
.project-fb-table-row .project-fb-cell {
  background: transparent !important;
}
.project-fb-table-row {
  background-clip: padding-box !important;
}


.project-fb-filters { display:flex; gap:10px; align-items:center; padding: 0 0 12px; flex-wrap:wrap; }
.project-fb-filters input, .project-fb-filters select, .project-fb-bulk-actions select { min-height: 34px; border-radius: 10px; }


.project-fb-bulkbar,
.project-fb-filters {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  border-radius: 14px !important;
  background: rgba(15,23,42,.72) !important;
  backdrop-filter: blur(10px);
}
.project-fb-bulkbar { margin-bottom: 10px; justify-content: space-between; }
.project-fb-filters { margin-bottom: 14px; }
.project-fb-bulk-actions,
.project-fb-filters {
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}
.project-fb-bulkbar strong { color:#f8fafc; }
.project-fb-filters input,
.project-fb-filters select,
.project-fb-bulk-actions select {
  appearance: none;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  background: rgba(2,6,23,.72) !important;
  color: #e2e8f0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.project-fb-filters input {
  min-width: 320px;
}
.project-fb-bulk-actions .secondary-btn {
  height: 38px !important;
  border-radius: 12px !important;
}


.project-fb-bulk-summary { display:flex; align-items:center; gap:8px; color:#cbd5e1; }
.project-fb-inline-control { display:flex; align-items:center; gap:8px; color:#94a3b8; font-size:12px; }
.project-fb-inline-control span { white-space:nowrap; }


.project-fb-bulk-label { color:#e2e8f0; font-weight:600; white-space:nowrap; }
#fb-apply-bulk-status { min-width: 150px; font-weight: 600; }


.project-fb-bulkbar {
  justify-content: flex-start !important;
}
.project-fb-bulk-actions {
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
}
.project-fb-bulk-summary {
  margin-right: 8px;
}


.project-share-access { margin-top: 16px; padding-top: 8px; }
.project-share-list { display:grid; gap:8px; margin-top:10px; }
.project-share-row { display:grid; grid-template-columns: 140px 1fr 180px; gap:10px; padding:10px 12px; border:1px solid rgba(255,255,255,.06); border-radius:12px; background:rgba(15,23,42,.5); }


.project-overview-stats--compact .summary-chip strong { white-space: nowrap !important; }


.project-asset-styler { gap: 18px; }
.project-asset-grid { display:grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap:18px; align-items:start; }
.project-asset-column { display:grid; gap:16px; }
.style-strict-card { border:1px solid rgba(59,130,246,.2); background:rgba(37,99,235,.08); color:#bfdbfe; border-radius:16px; padding:14px 16px; display:grid; gap:6px; }
.style-strict-card strong { color:#eff6ff; }
.style-job-list, .style-asset-list { display:grid; gap:10px; }
.style-job-card { border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.03); color:var(--text); border-radius:14px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:14px; text-align:left; cursor:pointer; }
.style-job-card.active { border-color:rgba(59,130,246,.5); background:rgba(37,99,235,.12); }
.style-job-card strong { display:block; }
.style-job-card span, .style-job-card small { color:var(--muted); }
.style-job-meta { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
.style-job-meta div { border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.025); border-radius:14px; padding:12px 14px; display:grid; gap:4px; }
.style-job-meta span { color:var(--muted); font-size:12px; }
.style-asset-row { display:grid; grid-template-columns: 48px minmax(0,1fr) auto; gap:12px; align-items:center; border:1px solid rgba(255,255,255,.06); background:rgba(255,255,255,.025); border-radius:14px; padding:12px 14px; }
.style-asset-row.styled { border-color:rgba(34,197,94,.25); background:rgba(34,197,94,.08); }
.style-asset-index { width:34px; height:34px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.06); color:var(--muted); font-weight:700; }
.style-asset-main { min-width:0; display:grid; gap:4px; }
.style-asset-main strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.style-asset-main span, .style-asset-state { color:var(--muted); font-size:12px; }
.style-job-actions { display:flex; gap:10px; flex-wrap:wrap; }
@media (max-width: 1100px) { .project-asset-grid { grid-template-columns: 1fr; } .style-job-meta { grid-template-columns: 1fr; } }
.project-advertisers-shell { gap: 18px; }
.advertiser-import-card { margin-bottom: 6px; }
.advertiser-ingest-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.advertisers-modern-table-shell { border:1px solid rgba(255,255,255,.06); border-radius:22px; background:linear-gradient(180deg, rgba(15,23,42,.88), rgba(15,23,42,.72)); box-shadow:0 18px 50px rgba(2,6,23,.28); overflow:hidden; }
.advertisers-modern-head, .advertiser-row-modern { display:grid; grid-template-columns: minmax(220px,1.2fr) minmax(260px,1.4fr) minmax(180px,1fr) minmax(140px,.8fr) minmax(160px,.9fr) minmax(320px,1.6fr); gap:0; align-items:stretch; }
.advertisers-modern-head { background:rgba(255,255,255,.04); backdrop-filter:blur(8px); color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.advertisers-modern-head span { padding:16px 18px; border-right:1px solid rgba(255,255,255,.05); }
.advertisers-modern-head span:last-child { border-right:0; }
.advertisers-modern-body { display:grid; }
.advertiser-row-modern { border-top:1px solid rgba(255,255,255,.05); transition:background .18s ease, transform .18s ease; }
.advertiser-row-modern:first-child { border-top:0; }
.advertiser-row-modern:hover { background:rgba(255,255,255,.03); }
.advertiser-cell { padding:16px 18px; border-right:1px solid rgba(255,255,255,.05); min-width:0; display:flex; align-items:flex-start; }
.advertiser-cell:last-child { border-right:0; }
.advertiser-main { display:grid; gap:6px; }
.advertiser-main strong { display:block; font-size:14px; color:#f8fafc; }
.advertiser-main span, .advertiser-notes { color:var(--muted); font-size:12px; line-height:1.5; }
.advertiser-link-cell a { color:#93c5fd; text-decoration:none; word-break:break-all; }
.advertiser-link-cell a:hover { text-decoration:underline; }
.advertiser-notes { display:block; max-height:88px; overflow:auto; }
@media (max-width: 1200px) { .advertiser-ingest-grid { grid-template-columns: 1fr; } .advertisers-modern-table-shell { overflow-x:auto; } .advertisers-modern-head, .advertiser-row-modern { min-width: 1180px; } }
