/* ELEV8.es — Brand Bible v1.0
   Paleta: Teal (#007C91) identidad · Teal Oscuro (#005F6F) autoridad ·
           Naranja (#FF6B35) CTA SIEMPRE · Negro (#111111) titulares · Base Clara (#F4F6F7)
   Tipografía: Nunito 400/900 cuerpo/titulares · DM Mono 400 precios/datos
   Regla crítica: el naranja convierte. Teal nunca como CTA principal. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;900&family=DM+Mono:wght@400;500&display=swap');

:root {
  --teal:        #007C91;
  --teal-dark:   #005F6F;
  --orange:      #FF6B35;
  --orange-hover:#E85A26;
  --black:       #111111;
  --base:        #F4F6F7;
  --card:        #FFFFFF;
  --border:      #E4E8EA;
  --text:        #111111;
  --muted:       #5B6B70;
  --good:        #16a34a;
  --warn:        #E85A26;
  --bad:         #c23616;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 40px;

  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--base);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -0.01em;
}

a { color: var(--teal); text-decoration: none; font-weight: 600; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

.mono, .num, .price { font-family: 'DM Mono', ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }

/* ----- Topbar ----- */
.topbar {
  background: var(--black);
  color: #fff;
  padding: var(--s-3) 0;
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 var(--s-4);
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-3);
}
.brand {
  color: #fff; display: flex; align-items: center; gap: var(--s-3);
  font-weight: 900; font-size: 18px; letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }
/* Logo has dark text on transparent bg; wrap in a light pill so it reads
   cleanly on the dark topbar. */
.brand-logo {
  height: 32px; width: auto; display: block;
  background: #fff; border-radius: 999px;
  padding: 3px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.brand-sub {
  opacity: 0.55; font-size: 12px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.topnav { display: flex; align-items: center; gap: var(--s-3); }
.topnav a { color: #fff; opacity: 0.75; font-weight: 600; font-size: 14px; }
.topnav a:hover { opacity: 1; text-decoration: none; }
.topnav a.cta {
  background: var(--orange); color: #fff; padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm); font-weight: 700; opacity: 1;
  transition: background 0.15s;
}
.topnav a.cta:hover { background: var(--orange-hover); text-decoration: none; }

.container { max-width: 1240px; margin: 0 auto; padding: var(--s-5) var(--s-4) 60px; }
.footer { text-align: center; color: var(--muted); padding: var(--s-4); font-size: 12px; }

/* ----- Page heads ----- */
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-4); gap: var(--s-3);
}
.page-head h1 { margin: 0; font-size: 30px; font-weight: 900; }
.page-head .page-kicker {
  display: block; font-size: 11px; color: var(--teal); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--s-1);
}

/* ----- Grids ----- */
.grid { display: grid; gap: var(--s-3); margin-bottom: var(--s-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* ----- Panels / Cards ----- */
.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-4); margin-bottom: var(--s-3);
}
.panel.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.panel h2 { margin: 0 0 var(--s-3); font-size: 18px; font-weight: 900; color: var(--black); }
.panel h3 { margin: var(--s-3) 0 var(--s-2); font-size: 13px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: 0.08em; }

.stat-card {
  display: flex; flex-direction: column; gap: var(--s-1);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3) var(--s-4); text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.05s;
}
.stat-card:hover { border-color: var(--teal); text-decoration: none; }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.stat-value { font-family: 'DM Mono', monospace; font-size: 32px; font-weight: 500; color: var(--black); line-height: 1.1; }
.stat-scale { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.stat-verdict {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
  background: #EEF1F3; color: var(--muted);
  margin-top: 2px;
}
.stat-verdict--bad   { background: #FCE8E4; color: var(--bad); }
.stat-verdict--warn  { background: #FFE8DC; color: var(--warn); }
.stat-verdict--good  { background: #DCF3E4; color: var(--good); }
.stat-verdict--great { background: #D9EDF1; color: var(--teal-dark); }
.stat-verdict--none  { background: #EEF1F3; color: var(--muted); }
.stat-hint { color: var(--muted); font-size: 11px; line-height: 1.35; margin-top: 2px; }

/* ----- Package recommendation panel ----- */
.pack-panel { border-left: 4px solid var(--teal); }
.pack-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-3); margin-bottom: var(--s-2);
}
.pack-head h2 { margin: 0; }
.pack-price {
  display: flex; flex-direction: column; align-items: flex-end;
  white-space: nowrap;
}
.pack-price-amount {
  font-family: 'DM Mono', monospace; font-size: 28px; font-weight: 500;
  color: var(--orange); line-height: 1;
}
.pack-price-billing { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.pack-name { margin: var(--s-2) 0 var(--s-1); font-size: 16px; color: var(--teal-dark); text-transform: none; letter-spacing: 0; }
.pack-pitch { margin: var(--s-2) 0; line-height: 1.5; }
.pack-override {
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap;
}
.pack-override select { flex: 1; min-width: 200px; }

/* ----- Tables ----- */
.data-table, .mini-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td, .mini-table td {
  padding: var(--s-2) var(--s-2); text-align: left; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.data-table th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.num { text-align: right; font-family: 'DM Mono', monospace; font-variant-numeric: tabular-nums; }

/* ----- Status pills (pipeline) ----- */
.status {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--base); color: var(--teal-dark);
}
.status-discovered { background: #E8ECEE; color: #4b5563; }
.status-audited    { background: #FFE4D6; color: #B84718; }
.status-contacted  { background: #D4EEF3; color: var(--teal-dark); }
.status-opened     { background: #FFD9C5; color: #B84718; }
.status-replied    { background: #D6F1DC; color: #0F6B2A; }
.status-meeting    { background: #FFC8A8; color: #8A3410; }
.status-deal       { background: #0F6B2A; color: #fff; }
.status-lost       { background: #F5D7D1; color: #7A1F0E; }

/* ----- Forms ----- */
.form { display: flex; flex-direction: column; gap: var(--s-2); }
.form label { font-size: 11px; color: var(--muted); margin-bottom: -2px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.form input, .form select, .form textarea {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal);
}
.form textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.form-error { color: var(--bad); margin: var(--s-1) 0; font-weight: 600; }
.form-inline { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.form-inline input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ----- Buttons — REGLA: CTA siempre naranja ----- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; cursor: pointer; border: 0; text-decoration: none;
  font-family: inherit; letter-spacing: 0.01em;
  transition: background 0.15s, opacity 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* CTA principal — SIEMPRE naranja */
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); color: #fff; text-decoration: none; }
/* Secundario — teal oscuro */
.btn-secondary { background: var(--teal-dark); color: #fff; }
.btn-secondary:hover { background: var(--teal); color: #fff; text-decoration: none; }
/* Fantasma — contorno teal */
.btn-ghost { background: transparent; color: var(--teal-dark); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; text-decoration: none; }

/* ----- Misc ----- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.email-body {
  background: var(--base); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--s-3); white-space: pre-wrap; font-family: 'Nunito', sans-serif; font-size: 14px;
  margin: var(--s-2) 0; line-height: 1.6;
}
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: var(--s-3); font-size: 14px; font-weight: 600;
}
.flash-success { background: #D6F1DC; color: #0F6B2A; }
.flash-error   { background: #F5D7D1; color: #7A1F0E; }
.flash-info    { background: #D4EEF3; color: var(--teal-dark); }

/* ----- Filter chips ----- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-3); }
.chip {
  padding: 6px 14px; border-radius: 999px; background: #fff;
  border: 1px solid var(--border); font-size: 12px; color: var(--text); font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--teal); text-decoration: none; }
.chip-active { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

/* ----- Progress ----- */
.progress {
  width: 100%; height: 8px; background: var(--base); border-radius: 999px;
  overflow: hidden; margin: var(--s-3) 0 var(--s-2);
  border: 1px solid var(--border);
}
.progress-bar {
  height: 100%; background: var(--teal);
  transition: width 0.4s ease;
}

/* ----- Timeline ----- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: var(--s-2) 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }

.row { display: flex; align-items: center; gap: var(--s-2); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: var(--base); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--teal-dark);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ============================================================
   HQ — kanban + top strip + NBA badges
   ============================================================ */
.hq-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3); margin-bottom: var(--s-4);
}
@media (max-width: 900px) { .hq-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hq-strip { grid-template-columns: 1fr; } }
.hq-strip-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  display: flex; flex-direction: column; gap: 4px;
}
.hq-strip-label {
  font-size: 10px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.hq-strip-value {
  font-family: 'DM Mono', monospace; font-size: 30px; font-weight: 500;
  color: var(--black); line-height: 1.05;
}
.hq-strip-unit { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.hq-strip-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.hq-strip .progress { margin: 6px 0 2px; height: 6px; }
.hq-strip-reminders a { display: inline-block; margin-top: auto; color: var(--orange); font-weight: 700; }

/* Kanban */
.kanban {
  display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  overflow-x: auto;
  padding-bottom: var(--s-2);
}
@media (max-width: 1200px) {
  .kanban { grid-template-columns: repeat(6, 240px); }
}
.kan-col {
  background: #EFF2F4; border-radius: var(--radius);
  padding: var(--s-2); display: flex; flex-direction: column;
  min-height: 400px;
  border-top: 3px solid var(--border);
}
.kan-col--teal      { border-top-color: #B3D7DE; }
.kan-col--teal-dark { border-top-color: var(--teal); }
.kan-col--orange    { border-top-color: var(--orange); }
.kan-col--green     { border-top-color: #16a34a; }

.kan-col-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px; padding: var(--s-1) var(--s-2) var(--s-2);
  border-bottom: 1px solid var(--border); margin-bottom: var(--s-2);
}
.kan-col-title {
  font-weight: 900; font-size: 14px; color: var(--black);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kan-col-count {
  font-family: 'DM Mono', monospace; font-weight: 500; font-size: 12px;
  background: #fff; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px;
}
.kan-col-hint { flex-basis: 100%; font-size: 11px; color: var(--muted); line-height: 1.35; }

.kan-dropzone {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  padding: 4px;
  border-radius: var(--radius-sm);
  min-height: 80px;
  transition: background 0.15s;
}
.kan-dropzone.is-over { background: #fff; outline: 2px dashed var(--teal); outline-offset: -4px; }
.kan-zone-label {
  font-size: 10px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; padding: 4px 6px;
}
.kan-dropzone--perdido { border-top: 1px dashed var(--border); margin-top: var(--s-2); padding-top: var(--s-2); }

.kan-empty { color: var(--muted); font-size: 12px; text-align: center; padding: var(--s-3) 0; margin: 0; }

.kan-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
.kan-card:hover { border-color: var(--teal); box-shadow: 0 2px 8px rgba(0,124,145,0.10); }
.kan-card:active { cursor: grabbing; }
.kan-card.is-dragging { opacity: 0.45; }
.kan-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.kan-card-title { font-weight: 700; color: var(--black); font-size: 14px; line-height: 1.25; }
.kan-card-title:hover { color: var(--teal-dark); text-decoration: none; }
.kan-card-meta { color: var(--muted); font-size: 12px; margin: 0 0 6px; line-height: 1.3; }
.kan-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.kan-card-age { font-family: 'DM Mono', monospace; }

/* Next-best-action badge */
.nba {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.3;
  background: #EEF1F3; color: var(--muted);
}
.nba--high { background: var(--orange); color: #fff; }
.nba--med  { background: #FFE8DC; color: var(--warn); }
.nba--low  { background: #EEF1F3; color: var(--muted); }
.nba--done { background: #DCF3E4; color: var(--good); }

/* ----- Modal (edit-then-send) ----- */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  padding: var(--s-5) var(--s-3);
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(2px);
}
.modal-dialog {
  position: relative;
  background: var(--card); border-radius: var(--radius);
  width: 100%; max-width: 680px;
  max-height: calc(100vh - var(--s-5) * 2);
  overflow-y: auto;
  padding: var(--s-4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.15s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close {
  background: transparent; border: 0; font-size: 24px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 0 var(--s-1);
  font-weight: 400;
}
.modal-close:hover { color: var(--black); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: var(--s-2);
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.modal textarea { font-family: 'Nunito', sans-serif; font-size: 14px; line-height: 1.55; }

/* ----- Manual touch form — channel chips ----- */
.touch-channels {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2); margin-bottom: var(--s-2);
}
@media (max-width: 640px) {
  .touch-channels { grid-template-columns: repeat(2, 1fr); }
}
.touch-opt {
  position: relative; display: block;
  text-transform: none; letter-spacing: 0;
  margin: 0;
}
.touch-opt input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.touch-opt span {
  display: block; padding: 12px var(--s-2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); text-align: center;
  font-weight: 600; font-size: 13px; color: var(--text);
  cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.touch-opt:hover span { border-color: var(--teal); }
.touch-opt input[type="radio"]:checked + span {
  border-color: var(--teal); background: var(--teal);
  color: #fff;
}
.touch-opt input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--orange); outline-offset: 2px;
}

/* Score pill (renewal score, lead score) */
.score {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-family: 'DM Mono', monospace; font-weight: 500; font-size: 13px;
  background: var(--base); color: var(--black); border: 1px solid var(--border);
}
.score-high { background: var(--orange); color: #fff; border-color: var(--orange); }
.score-mid  { background: var(--teal); color: #fff; border-color: var(--teal); }
.score-low  { background: var(--base); color: var(--muted); }

/* ============================================================
   Template picker (send modal) + templates library
   ============================================================ */
.tpl-picker {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.tpl-picker select { flex: 1; min-width: 0; }

.tag-opener         { background: var(--teal); color: #fff; border-color: var(--teal); }
.tag-bump           { background: #f5e9d7; color: #7a4f18; border-color: #e3c691; }
.tag-after_open     { background: #e1f4e8; color: #1f6a3a; border-color: #b5dfc3; }
.tag-audit_delivery { background: var(--orange); color: #fff; border-color: var(--orange); }
.tag-breakup        { background: #f3dcdc; color: #8a2a2a; border-color: #e0b0b0; }
.tag-manual         { background: var(--base); color: var(--muted); }

tr.is-archived { opacity: 0.5; }
tr.is-archived td strong { text-decoration: line-through; }

/* ----- Snooze ----- */
.snooze-presets {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin: var(--s-2) 0;
}
.snooze-active {
  background: #fff7ea; border: 1px solid #f2d48f;
  color: #7a4f18; padding: var(--s-2) var(--s-3);
  border-radius: var(--radius); font-size: 14px;
  margin-bottom: var(--s-2);
}
.kan-card--snoozed { opacity: 0.55; }

/* ============================================================
   Mi día — focus list at the top of HQ
   ============================================================ */
.midia-panel {
  background: var(--card); border: 2px solid var(--teal);
  border-radius: var(--radius); padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  box-shadow: 0 4px 18px rgba(0, 124, 145, 0.08);
}
.midia-head h2 { margin: 0 0 4px 0; }
.midia-head p { margin: 0 0 var(--s-3) 0; }
.midia-list { list-style: none; counter-reset: midia; padding: 0; margin: 0; }
.midia-item {
  counter-increment: midia;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); padding: var(--s-2) 0;
  border-bottom: 1px solid var(--border);
}
.midia-item:last-child { border-bottom: 0; }
.midia-item-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.midia-item-main::before {
  content: counter(midia, decimal-leading-zero);
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted);
}
.midia-item-title { font-weight: 700; color: var(--black); text-decoration: none; }
.midia-item-title:hover { color: var(--teal-dark); }
.midia-item-reason { font-size: 13px; color: var(--muted); }
.midia-item-meta { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.midia-item--high  { border-left: 3px solid var(--orange); padding-left: var(--s-2); }
.midia-item--med   { border-left: 3px solid var(--teal);   padding-left: var(--s-2); }
.midia-item--low   { border-left: 3px solid var(--border); padding-left: var(--s-2); }
.midia-empty {
  text-align: center; color: var(--muted);
  padding: var(--s-4); font-size: 16px;
}

/* ============================================================
   Conversation view (inbox-in-app on lead_detail)
   ============================================================ */
.convo-panel { }
.convo { list-style: none; padding: 0; margin: var(--s-3) 0 0 0; }
.convo-msg {
  margin-bottom: var(--s-3); padding: var(--s-3);
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card);
}
.convo-msg--outbound {
  background: #f1fafc; border-color: #bfdce3;
  margin-right: var(--s-4);
}
.convo-msg--inbound {
  background: #fff7ea; border-color: #f2d48f;
  margin-left: var(--s-4);
}
.convo-head {
  display: flex; gap: var(--s-2); align-items: baseline;
  margin-bottom: 4px; flex-wrap: wrap;
}
.convo-dir { font-weight: 700; font-size: 13px; }
.convo-time { margin-left: auto; }
.convo-subj { font-size: 14px; margin-bottom: var(--s-2); }
.convo-body {
  white-space: pre-wrap; word-wrap: break-word;
  background: transparent; border: 0; padding: 0;
  font-family: inherit; font-size: 14px; line-height: 1.55;
  color: var(--black); margin: 0;
  max-height: 420px; overflow-y: auto;
}
.convo-reply {
  margin-top: var(--s-3); padding-top: var(--s-3);
  border-top: 1px dashed var(--border);
}
.convo-reply h3 { margin-bottom: var(--s-2); }

/* ============================================================
   Keyboard shortcuts — focus ring + help overlay + trigger button
   ============================================================ */
.kan-card.is-focused {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
}

.kbd {
  display: inline-block; padding: 2px 8px;
  font-family: 'DM Mono', monospace; font-size: 12px;
  background: var(--base); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 4px;
  color: var(--black); line-height: 1.3;
}
.kbd-mini { padding: 0 5px; font-size: 10px; margin-left: 4px; opacity: 0.6; }

.kbd-help {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.kbd-help.is-open { display: flex; }
.kbd-help .modal-dialog {
  position: relative; z-index: 1;
  max-width: 480px;
}
.kbd-table { width: 100%; margin-top: var(--s-3); font-size: 14px; }
.kbd-table td { padding: 6px 0; }
.kbd-table td:first-child { white-space: nowrap; width: 30%; }

.kbd-help-trigger {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 0;
}
.kbd-help-trigger:hover { background: var(--base); }

/* ============================================================
   Login page
   ============================================================ */
.login-body {
  background: linear-gradient(135deg, #f3f8f9 0%, #e7f3f5 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif;
}
.login-wrap { width: 100%; max-width: 420px; padding: var(--s-4); }
.login-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s-5) var(--s-5);
  box-shadow: 0 10px 40px rgba(0, 124, 145, 0.10);
}
.login-brand {
  text-align: center;
  margin: 0 0 var(--s-4) 0; display: flex; flex-direction: column;
  align-items: center; gap: var(--s-1);
}
.login-logo {
  width: 180px; height: auto; display: block;
}
.login-subtitle {
  font-family: 'DM Mono', monospace; font-size: 11px;
  letter-spacing: 0.16em; color: var(--muted);
  text-transform: uppercase; font-weight: 500;
}
.login-form label { margin-top: var(--s-2); }
.login-form input[type=email],
.login-form input[type=password] { width: 100%; }
.login-remember {
  display: flex; align-items: center; gap: var(--s-2);
  margin: var(--s-3) 0; font-size: 14px; color: var(--muted);
  cursor: pointer;
}
.login-submit { width: 100%; margin-top: var(--s-2); }
.login-footer { text-align: center; margin-top: var(--s-4); }

/* Playful daily greeting on the login card */
.login-greeting {
  text-align: center;
  margin: calc(-1 * var(--s-2)) 0 var(--s-4) 0;
  padding: var(--s-3) var(--s-3);
  font-size: 14px; line-height: 1.45;
  color: #5a3a12;
  background: linear-gradient(135deg, #fff7ea 0%, #ffe9d0 100%);
  border: 1px solid #f2d48f;
  border-radius: var(--radius);
}

/* Daily motivation banner at the top of HQ */
.motivation-banner {
  display: flex; align-items: center; gap: var(--s-3);
  margin: 0 0 var(--s-4) 0;
  padding: var(--s-3) var(--s-4);
  background: linear-gradient(135deg, #fff7ea 0%, #ffe9d0 100%);
  border: 1px solid #f2d48f;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  color: #5a3a12;
  font-size: 15px; line-height: 1.4;
}
.motivation-banner-icon { font-size: 18px; flex: 0 0 auto; }
.motivation-banner-text { font-weight: 500; }

/* Topbar user widget */
.topnav-user {
  display: flex; align-items: center; gap: var(--s-2);
  padding-left: var(--s-3); border-left: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}
.topnav-user a.logout { color: var(--muted); }
.topnav-user a.logout:hover { color: var(--orange); }
.kan-card-snooze {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #7a4f18;
  background: #fff7ea; border: 1px solid #f2d48f;
  padding: 2px 6px; border-radius: 4px;
}
