/* CRĒO Email Assistant — extends the CRM brand system so the two apps read as
   one product. base.css is copied verbatim from the CRM; everything below is
   specific to the review queue, and mobile-first because this is used on a
   phone more than a desk. */
@import url('base.css');

/* ---------- Layout: single column on phones, sidebar on desktop ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--teal); color: var(--beige);
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .logo {
  font-family: var(--font-head); font-weight: 500; font-size: 17px;
  letter-spacing: .28em; color: #fff;
}
.topbar .who {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--sky);
  display: flex; align-items: center; gap: 12px;
}
.topbar button {
  background: none; border: none; color: var(--sky);
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
}
.topbar button:hover { color: #fff; }

.content { flex: 1; padding: 16px 14px 80px; max-width: 780px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .content { padding: 26px 28px 60px; } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
.tab {
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.tab.active { background: var(--teal); border-color: var(--teal); color: var(--beige); }
.tab .n {
  font-family: var(--font-mono); font-size: 11px; margin-left: 6px; opacity: .8;
}

/* ---------- Mailbox filter ---------- */
.mailbox-pick { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.mailbox-pick button {
  background: none; border: none; border-bottom: 2px solid transparent;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); padding: 4px 2px;
}
.mailbox-pick button.active { color: var(--terracotta); border-bottom-color: var(--terracotta); }

/* ---------- Queue cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 15px; margin-bottom: 10px;
  cursor: pointer; border-left: 3px solid transparent;
}
.card:hover { border-color: var(--teal); }
.card.low { border-left-color: var(--terracotta); }
.card.suspicious { border-left-color: var(--bad); background: #FDF6F5; }

.card .row1 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.card .who { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.card .when {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap;
}
.card .subj {
  font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.badge {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 4px;
  background: var(--beige); color: var(--brown);
}
.badge.teal { background: var(--sky); color: var(--teal); }
.badge.warn { background: #F4E2D8; color: var(--terracotta-dark); }
.badge.bad { background: #F2D9D9; color: var(--bad); }
.badge.good { background: #DCEBE1; color: var(--good); }

/* Blocking — something must be supplied before this can go. */
.needs {
  margin-top: 9px; padding: 9px 11px; border-radius: 7px;
  background: #FBF3EE; border-left: 2px solid var(--terracotta);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
}
/* Advisory — worth knowing, doesn't stop anything. Deliberately quieter, so
   the eye separates the two without reading them. */
.note {
  margin-top: 9px; padding: 9px 11px; border-radius: 7px;
  background: #F4F1EA; border-left: 2px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); line-height: 1.45;
}

/* ---------- Queue sections ---------- */
.section-head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal);
  margin: 22px 0 2px; display: flex; align-items: center; gap: 8px;
}
.section-head:first-child { margin-top: 4px; }
.section-head .n {
  background: var(--teal); color: var(--beige); border-radius: 999px;
  padding: 1px 7px; font-size: 10px;
}
.section-hint { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }

.card.ready { border-left-color: var(--good); }

/* ---------- Daily brief ---------- */
.brief-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 6px 0 4px;
}
.brief-title { font-family: var(--font-head); font-size: 22px; color: var(--teal); }

.event { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: none; }
.event-time {
  font-family: var(--font-mono); font-size: 12px; color: var(--terracotta);
  min-width: 62px; padding-top: 1px;
}
.event-subject { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.event-where { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.stat { font-size: 14px; color: var(--ink-2); padding: 5px 0; }
.stat strong { color: var(--teal); font-size: 17px; }

.voice-hint {
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
  margin: 8px 0 2px;
}
.voice-hint strong { color: var(--ink-2); font-weight: 600; }
.voice-hint a { color: var(--terracotta); }

.voice-list {
  margin-top: 9px; padding: 10px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.9;
}
.voice-list .using { color: var(--teal); font-weight: 600; }
.voice-list span { color: var(--ink-3); }
.voice-list-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  font-family: var(--font-body); font-size: 12px; color: var(--ink-2); line-height: 1.5;
}

/* ---------- Hands-free ---------- */
.btn-car {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--teal); color: var(--beige); border: none;
  border-radius: var(--radius); padding: 15px 17px; margin: 14px 0 4px;
}
.btn-car:hover { background: var(--teal-soft); }
.btn-car .car-icon { font-size: 26px; }
.btn-car strong { display: block; font-size: 15px; color: #fff; }
.btn-car small { display: block; font-size: 12px; color: var(--sky); margin-top: 2px; }

/* Full-screen while driving: nothing else on the page, one enormous target. */
.car-shell {
  position: fixed; inset: 0; background: var(--teal); color: var(--beige);
  display: flex; flex-direction: column; padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
  z-index: 100;
}
.car-head { text-align: center; padding: 10px 0 18px; }
.car-status { font-size: 26px; font-weight: 600; color: #fff; line-height: 1.25; }
.car-sub {
  font-family: var(--font-mono); font-size: 13px; color: var(--sky);
  margin-top: 8px; min-height: 34px; line-height: 1.4;
}
.car-draft { flex: 1; overflow-y: auto; }
.car-from { font-size: 19px; font-weight: 600; color: #fff; }
.car-subject { font-size: 15px; color: var(--sky); margin: 3px 0 14px; }
.car-body { font-size: 17px; line-height: 1.65; white-space: pre-wrap; color: var(--beige); }

.car-stop {
  background: var(--terracotta); color: #fff; border: none; border-radius: 12px;
  padding: 22px; font-size: 19px; font-weight: 600; margin-top: 16px;
  font-family: var(--font-head);
}

.subject-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; color: var(--ink); background: #fff;
}
.subject-input:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

.btn.tiny {
  padding: 3px 11px; font-size: 11.5px; border-radius: 999px;
  margin-left: auto;
}

/* ---------- Detail ---------- */
.back {
  background: none; border: none; color: var(--teal); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 0; margin-bottom: 12px;
}
.detail-head { margin-bottom: 14px; }
.detail-head h2 { font-family: var(--font-head); font-size: 17px; color: var(--teal); margin-bottom: 4px; }
.detail-head .from { font-size: 13px; color: var(--ink-2); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; margin-bottom: 14px;
}
.panel h3 {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px;
}
.panel .body { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: var(--ink-2); }

textarea.reply {
  width: 100%; min-height: 260px; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 13px; font-size: 14px; line-height: 1.6; color: var(--ink);
  background: #fff; resize: vertical;
}
textarea.reply:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

/* Actions pinned to the bottom on phones — reachable with a thumb. */
.actions {
  position: sticky; bottom: 0; background: var(--surface);
  padding: 12px 0 14px; display: flex; gap: 9px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 4px;
}
.actions .btn, .actions .btn-primary { flex: 1; min-width: 120px; text-align: center; }

.flash {
  padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px;
  background: #DCEBE1; color: var(--good); border: 1px solid #BBD9C6;
}
.flash.err { background: #F7E4E4; color: var(--bad); border-color: #E7C5C5; }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty .big { font-size: 30px; margin-bottom: 10px; }

/* ---------- Voice ---------- */
.voice-panel { background: #FBF7F1; }
.voice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.voice-row .btn { flex: 1; min-width: 130px; }
.voice-note {
  margin-top: 9px; font-size: 12px; color: var(--ink-3); line-height: 1.45;
}
/* Reserves its own line so the panel doesn't jump about as text appears. */
.voice-status {
  margin-top: 10px; min-height: 20px; font-size: 13px; color: var(--terracotta-dark);
  line-height: 1.45; font-style: italic;
}

/* The send-safety guarantee, stated in the product itself. */
.footnote {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em;
  color: var(--ink-3); text-align: center; line-height: 1.7;
}
