/* MCB Suite — InMobiles for MIC1 (Alfa)
   Theme matches Portal_6.x screenshots embedded in the technical proposal.
   Palette: dark sidebar #1F2937, pink accent #EC4862, surface #FFFFFF on #F9FAFB. */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #F9FAFB;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }

/* === Layout shell === */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
}
#sidebar {
  grid-row: 1 / 3;
  background: #1F2937;
  color: #D1D5DB;
  padding: 14px 0;
  overflow-y: auto;
}
#topbar {
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
#content {
  padding: 22px 22px 40px;
  overflow: hidden;
}

/* === Sidebar === */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 18px;
}
.brand-mark {
  width: 28px; height: 28px;
  background: #EC4862;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text .name { font-size: 13px; font-weight: 700; color: #fff; }
.brand-text .sub { font-size: 9px; color: #9CA3AF; letter-spacing: 0.4px; }

.nav-section {
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 1px;
  padding: 14px 18px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 22px;
  font-size: 12px;
  color: #D1D5DB;
  cursor: pointer;
  border-left: 3px solid transparent;
  margin-left: -3px;
}
.nav-item:hover { background: #1B232E; color: #fff; }
.nav-item.active {
  background: #374151;
  color: #EC4862;
  border-left-color: #EC4862;
  font-weight: 600;
}

/* === Topbar === */
.crumb {
  font-size: 11px;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumb .sep { color: #9CA3AF; }
.page-title { font-size: 18px; font-weight: 700; color: #111827; margin: 2px 0 0; }
.page-meta { font-size: 11px; color: #6B7280; margin-top: 1px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-pill {
  display: flex; align-items: center; gap: 10px;
}
.user-pill .who { text-align: right; }
.user-pill .who .name { font-size: 11px; font-weight: 600; color: #111827; }
.user-pill .who .role { font-size: 9px; color: #6B7280; }
.avatar {
  width: 30px; height: 30px;
  background: #DBEAFE;
  color: #1E40AF;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}

/* === Page header (inside content) === */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-head .titles { max-width: 70%; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; color: #111827; }
.page-head p  { font-size: 12px; color: #6B7280; margin: 0; }
.page-head .actions { display: flex; gap: 8px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
}
.btn-secondary {
  background: #FFFFFF;
  border-color: #E5E7EB;
  color: #111827;
}
.btn-secondary:hover { background: #F3F4F6; }
.btn-primary {
  background: #EC4862;
  color: #FFFFFF;
  font-weight: 600;
}
.btn-primary:hover { background: #DB2C49; }
.btn-ghost {
  background: transparent;
  color: #EC4862;
  font-weight: 600;
  padding: 6px 10px;
}
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-danger { background: #DC2626; color: #fff; }

/* === Cards === */
.card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
}
.card-head h2 { font-size: 14px; margin: 0; color: #111827; }
.card-head .sub { font-size: 11px; color: #6B7280; }
.card-body { padding: 16px; }

/* === Filter bar === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
}
.filter {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
}
.filter label {
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.6px;
}
.filter select, .filter input[type=text], .filter input[type=date] {
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 11px;
  background: #FFFFFF;
  color: #111827;
  min-width: 130px;
  font-family: inherit;
}
.filter input[type=text]:focus, .filter select:focus, .filter input[type=date]:focus {
  outline: 2px solid #EC4862;
  outline-offset: -1px;
  border-color: #EC4862;
}
.filter .search { min-width: 240px; }
.filter-spacer { flex: 1; }

/* === Tables === */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.data thead {
  background: #F9FAFB;
}
table.data th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.6px;
  padding: 10px 14px;
  border-bottom: 1px solid #E5E7EB;
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
  color: #111827;
  font-size: 11px;
  vertical-align: middle;
}
table.data tr:hover td { background: #FAFBFC; }
table.data td .mono { font-family: Consolas, "Courier New", monospace; font-size: 10.5px; color: #374151; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .strong { font-weight: 600; }

/* === Badges === */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-amber  { background: #FEF3C7; color: #92400E; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-grey   { background: #F3F4F6; color: #374151; }
.badge-purple { background: #F3E8FF; color: #6B21A8; }
.badge-indigo { background: #E0E7FF; color: #3730A3; }
.badge-pink   { background: #FCE7F3; color: #9D174D; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot-red   { background: #DC2626; }
.dot-amber { background: #F59E0B; }
.dot-green { background: #10B981; }
.dot-grey  { background: #9CA3AF; }

/* === Stat tiles === */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.tile {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  padding: 14px 16px;
}
.tile .label { font-size: 10px; font-weight: 700; color: #6B7280; letter-spacing: 0.7px; text-transform: uppercase; }
.tile .value { font-size: 24px; font-weight: 700; color: #111827; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .delta { font-size: 10px; margin-top: 3px; color: #6B7280; }
.tile .delta.up   { color: #047857; }
.tile .delta.down { color: #B91C1C; }
.tile.accent .value { color: #EC4862; }

/* === Chart placeholder === */
.chart {
  position: relative;
  height: 240px;
  background: #FFFFFF;
}
.chart svg { width: 100%; height: 100%; display: block; }

/* === Modals === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #FFFFFF;
  border-radius: 8px;
  width: 520px;
  max-width: 92vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  overflow: hidden;
}
.modal h3 {
  margin: 0;
  padding: 16px 20px;
  font-size: 15px;
  border-bottom: 1px solid #F3F4F6;
}
.modal .body { padding: 20px; }
.modal .row { display: flex; gap: 12px; margin-bottom: 14px; }
.modal .col { flex: 1; }
.modal label { display: block; font-size: 10px; font-weight: 700; color: #6B7280; letter-spacing: 0.5px; margin-bottom: 4px; text-transform: uppercase; }
.modal input[type=text], .modal select, .modal textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}
.modal textarea { min-height: 90px; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 11px; }
.modal .footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  background: #F9FAFB;
  border-top: 1px solid #F3F4F6;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #E5E7EB;
  padding: 0 16px;
}
.tab {
  padding: 10px 16px;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tab.active {
  color: #EC4862;
  border-bottom-color: #EC4862;
  font-weight: 600;
}
.tab:hover:not(.active) { color: #111827; }

/* === Two-column grid (for detail page) === */
.grid-2 {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 11.5px; }
.kv .k { color: #6B7280; }
.kv .v { color: #111827; font-weight: 500; }

.alert-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #FEF2F2;
  border-left: 3px solid #DC2626;
  font-size: 12px;
  color: #7F1D1D;
  border-radius: 5px 5px 0 0;
}

/* === Drill-down breadcrumb === */
.drill-crumb {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 12px;
}
.drill-crumb .step { color: #EC4862; font-weight: 600; }
.drill-crumb .sep  { color: #9CA3AF; }
.drill-crumb .cur  { color: #111827; font-weight: 700; }

/* === Misc === */
.muted { color: #6B7280; }
.right { text-align: right; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.flex-row { display: flex; gap: 12px; align-items: center; }
.flex-row.between { justify-content: space-between; }
.hr { border: 0; border-top: 1px solid #F3F4F6; margin: 12px 0; }
.code-line { font-family: Consolas, "Courier New", monospace; font-size: 11px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.footnote {
  text-align: center;
  font-size: 10px;
  color: #9CA3AF;
  padding: 18px 0 30px;
}

/* === Wizard step indicator === */
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  margin-bottom: 16px;
}
.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 11px;
  color: #6B7280;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
}
.wizard-step .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #6B7280;
  border: 1px solid #D1D5DB;
  font-size: 10px;
  font-weight: 700;
}
.wizard-step.done {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}
.wizard-step.done .n {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
}
.wizard-step.active {
  background: #FCE7F3;
  border-color: #EC4862;
  color: #9D174D;
  font-weight: 600;
}
.wizard-step.active .n {
  background: #EC4862;
  color: #FFFFFF;
  border-color: #EC4862;
}
.wizard-step .edit-link {
  margin-left: 4px;
  font-size: 10px;
  color: #EC4862;
  font-weight: 600;
}
.wizard-sep {
  color: #D1D5DB;
  font-size: 11px;
  padding: 0 2px;
}

/* === Progress bars (campaign progress, live monitor) === */
.progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: #FBE7EB;
  border-radius: 4px;
  overflow: hidden;
}
.progress .bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: #EC4862;
  border-radius: 4px;
}
.progress.thin { height: 6px; }
.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}
.progress-row .pct {
  font-size: 11px;
  color: #374151;
  font-variant-numeric: tabular-nums;
  width: 36px;
  text-align: right;
}

/* === Compact data table (dense rows for live monitor) === */
table.data.compact th { padding: 7px 10px; }
table.data.compact td { padding: 6px 10px; font-size: 10.5px; }

/* === Checklist (compliance) === */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checklist .item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #111827;
}
.checklist .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}
.checklist .mark.ok   { background: #D1FAE5; color: #065F46; }
.checklist .mark.fail { background: #FEE2E2; color: #991B1B; }
.checklist .note { font-size: 10px; color: #6B7280; margin-left: auto; }

/* === Section banner (segregation-of-duties) === */
.banner-info {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #92400E;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 11.5px;
  margin-bottom: 12px;
}

/* === Inline form rows in cards === */
.form-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 10px;
}
.form-row label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.form-row input[type=text], .form-row select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: #FFFFFF;
}
.form-row .grow { flex: 1; }

.result-line {
  font-size: 11px;
  color: #374151;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  padding: 8px 10px;
  font-family: Consolas, "Courier New", monospace;
}

/* === Pink-accented numeric cell (e.g. members count on roles table) === */
.num-accent {
  color: #EC4862;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* === Generic utility: hide === */
.hidden { display: none !important; }

/* === Tab panels (used by settings) === */
.tab-content {
  padding: 18px 16px;
}

/* === Range row (slider + numeric readout, used by settings retention) === */
.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-row input[type=range] {
  flex: 1;
  accent-color: #EC4862;
}
.range-row .range-out {
  min-width: 90px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
.range-row .range-min,
.range-row .range-max {
  font-size: 10px;
  color: #6B7280;
  min-width: 30px;
}

/* === Inline list of pill-tags inside a cell (e.g. roles with access, export formats) === */
.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag-list .tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 9.5px;
  font-weight: 600;
  background: #F3F4F6;
  color: #374151;
  border: 1px solid #E5E7EB;
}

/* === Small avatar inline (table row user cell) === */
.avatar-sm {
  width: 22px; height: 22px;
  background: #DBEAFE;
  color: #1E40AF;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 9.5px;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.user-cell {
  display: flex;
  align-items: center;
}
.user-cell .who-name { font-weight: 600; color: #111827; font-size: 11.5px; }
.user-cell .who-email { font-size: 10px; color: #6B7280; }

/* === Toggle switch (settings page) === */
.toggle {
  position: relative;
  display: inline-block;
  width: 34px; height: 18px;
  vertical-align: middle;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #D1D5DB; border-radius: 18px;
  transition: 0.2s;
}
.toggle .slider:before {
  position: absolute; content: "";
  height: 14px; width: 14px;
  left: 2px; top: 2px;
  background: #FFFFFF; border-radius: 50%;
  transition: 0.2s;
}
.toggle input:checked + .slider { background: #EC4862; }
.toggle input:checked + .slider:before { transform: translateX(16px); }

/* === Settings form layout (label + input grid) === */
.setting-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 12px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .lbl { color: #374151; font-weight: 500; }
.setting-row .lbl .hint { display: block; font-size: 10px; color: #6B7280; font-weight: 400; margin-top: 2px; }
.setting-row .ctrl select,
.setting-row .ctrl input[type=text],
.setting-row .ctrl input[type=number],
.setting-row .ctrl input[type=time] {
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  background: #FFFFFF;
  min-width: 200px;
}

/* === Section divider with title inside card-body === */
.section-title {
  font-size: 10px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title:first-child { margin-top: 0; }

/* === Horizontally-scrolling wrapper for very wide tables (CDR Explorer) === */
.table-scroll {
  overflow-x: auto;
  width: 100%;
}
.table-scroll table.data { min-width: 1800px; }
.table-scroll table.data th,
.table-scroll table.data td { white-space: nowrap; }

/* === Saved-view chips strip (filter shortcuts under filter bar) === */
.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid #F3F4F6;
  background: #FFFFFF;
}
.chips-label {
  font-size: 9px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.6px;
  margin-right: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 500;
  color: #374151;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  cursor: pointer;
}
.chip:hover { background: #E5E7EB; }
.chip.active {
  background: #FCE7F3;
  color: #9D174D;
  border-color: #FBCFE8;
  font-weight: 600;
}

/* === Table pager === */
.pager {
  padding: 10px 16px;
  border-top: 1px solid #F3F4F6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #6B7280;
}
.pager .pages { display: flex; gap: 4px; }
.pager .pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #374151;
  border-radius: 4px;
  cursor: pointer;
}
.pager .pg:hover { background: #F3F4F6; }
.pager .pg.active {
  background: #EC4862;
  color: #FFFFFF;
  border-color: #EC4862;
  font-weight: 600;
}
.pager .pg.disabled { color: #D1D5DB; cursor: not-allowed; }

/* === Toggle switch (filter bar boolean flags) === */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.toggle input { display: none; }
.toggle .track {
  width: 28px;
  height: 16px;
  border-radius: 10px;
  background: #E5E7EB;
  position: relative;
  transition: background 0.15s;
}
.toggle .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  transition: left 0.15s;
}
.toggle input:checked + .track { background: #EC4862; }
.toggle input:checked + .track::after { left: 14px; }

/* === Call playback bar (CDR drill-in audio control) === */
.playback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
}
.playback .play-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #EC4862;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  border: 0;
}
.playback .bar {
  flex: 1;
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.playback .bar .fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 38%;
  background: #EC4862;
  border-radius: 2px;
}
.playback .time {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  color: #374151;
  min-width: 90px;
  text-align: right;
}
.playback audio { display: none; }

/* === Reports catalogue card === */
.report-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.report-card:hover { border-color: #FBA8B7; }
.report-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.report-desc {
  font-size: 11px;
  color: #6B7280;
  line-height: 1.45;
  margin: 0;
  min-height: 32px;
}
.report-meta {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 3px 8px;
  font-size: 10.5px;
}
.report-meta .k { color: #6B7280; }
.report-meta .v { color: #111827; font-weight: 500; }
.report-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid #F3F4F6;
  padding-top: 8px;
  margin-top: 4px;
  align-items: center;
}
.report-actions a {
  font-size: 11px;
  font-weight: 600;
  color: #EC4862;
  cursor: pointer;
  padding: 2px 4px;
}
.report-actions a:hover { color: #DB2C49; }
.report-actions .sep { color: #D1D5DB; font-weight: 400; padding: 2px 0; }

.snapshot {
  background: #FAFBFC;
  border: 1px solid #F3F4F6;
  border-radius: 5px;
  padding: 4px;
}
.snapshot svg { display: block; width: 100%; height: auto; }

/* === Flow Library template card === */
.flow-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.flow-card:hover { border-color: #FBA8B7; }
.flow-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.flow-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.flow-card .ver {
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  color: #6B7280;
}
.flow-card .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  font-size: 10px;
  border-top: 1px solid #F3F4F6;
  padding-top: 8px;
}
.flow-card .stats .stat { display: flex; flex-direction: column; }
.flow-card .stats .stat .lab { color: #6B7280; font-size: 9px; letter-spacing: 0.4px; text-transform: uppercase; }
.flow-card .stats .stat .val { color: #111827; font-size: 12px; font-weight: 600; margin-top: 2px; }
.flow-card .diagram {
  background: #FAFBFC;
  border: 1px solid #F3F4F6;
  border-radius: 5px;
  padding: 4px;
}
.flow-card .diagram svg { display: block; width: 100%; height: auto; }
.flow-card .actions {
  display: flex;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid #F3F4F6;
  align-items: center;
}
.flow-card .actions a {
  font-size: 11px;
  font-weight: 600;
  color: #EC4862;
  cursor: pointer;
  padding: 2px 4px;
}
.flow-card .actions .sep { color: #D1D5DB; font-weight: 400; padding: 2px 0; }

/* === Demo toast (prototype feedback layer, driven by assets/app.js) === */
.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  min-width: 220px;
  max-width: 360px;
  background: #111827;
  color: #F9FAFB;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  border-left: 3px solid #EC4862;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.out  { opacity: 0; transform: translateY(8px); }

/* === Login / auth screen === */
.auth-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  padding: 20px;
}
.auth-card {
  width: 380px;
  max-width: 100%;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 30px 30px 26px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.auth-brand .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 9px; }
.auth-brand .name { font-size: 17px; font-weight: 700; color: #111827; }
.auth-brand .sub { font-size: 10px; color: #9CA3AF; letter-spacing: 0.5px; }
.auth-card h1 { font-size: 17px; margin: 0 0 4px; color: #111827; }
.auth-card .lede { font-size: 12px; color: #6B7280; margin: 0 0 20px; }
.auth-field { margin-bottom: 14px; }
.auth-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #6B7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #111827;
}
.auth-field input:focus {
  outline: 2px solid #EC4862;
  outline-offset: -1px;
  border-color: #EC4862;
}
.auth-btn { width: 100%; margin-top: 4px; padding: 11px; font-size: 13px; }
.auth-error {
  display: none;
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  margin-bottom: 14px;
}
.auth-error.show { display: block; }
.auth-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #F3F4F6;
  font-size: 11px;
  color: #6B7280;
  text-align: center;
}
.auth-hint code { background: #F3F4F6; padding: 1px 5px; border-radius: 4px; color: #374151; font-family: Consolas, "Courier New", monospace; }

/* Sign-out button in topbar */
.signout-btn {
  background: transparent;
  border: 1px solid #E5E7EB;
  color: #6B7280;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
}
.signout-btn:hover { background: #F3F4F6; color: #111827; }
