/* ===========================
   Focus — design tokens
=========================== */
:root {
  --bg: #0b0d10;
  --bg-elev: #12161b;
  --bg-elev-2: #171c22;
  --bg-hover: #1c222a;
  --border: #232a33;
  --border-strong: #2d3641;
  --text: #e7ecf2;
  --text-dim: #98a2b3;
  --text-mute: #6b7280;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --warn: #f59e0b;
  --danger: #ef4444;
  --violet: #8b5cf6;
  --blue: #3b82f6;
  --pink: #ec4899;
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ===========================
   Layout shell
=========================== */
.app { display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.logo-mark {
  width: 26px; height: 26px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--violet), var(--accent));
  border-radius: 7px;
  position: relative;
}
.logo-mark::after {
  content: ''; position: absolute; inset: 5px;
  background: var(--bg-elev); border-radius: 4px;
}
.brand-name { font-weight: 700; letter-spacing: -0.3px; }
.brand-sub { color: var(--text-mute); font-size: 11px; }

.topbar-center { flex: 1; display: flex; justify-content: center; }
.search-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  background: var(--bg);
  font-size: 13px;
  transition: all 0.15s;
}
.search-trigger:hover { border-color: var(--border-strong); color: var(--text); }
.search-trigger span { flex: 1; text-align: left; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.iconbtn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 7px;
  color: var(--text-dim);
  transition: all 0.15s;
}
.iconbtn:hover { background: var(--bg-hover); color: var(--text); }

.account-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 8px;
  background: var(--bg-elev-2);
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  display: grid; place-items: center;
  font-weight: 600; font-size: 11px;
}
.account-meta { display: flex; flex-direction: column; }
.account-name { font-size: 13px; font-weight: 500; }
.account-role { font-size: 11px; color: var(--text-mute); }

/* ===========================
   Main
=========================== */
.main { flex: 1; display: flex; min-height: 0; }

/* Sidebar */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.new-mail-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #05241a;
  font-weight: 600;
  margin-bottom: 6px;
  transition: transform 0.1s;
}
.new-mail-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.nav-group { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.nav-title {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  padding: 6px 10px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 13px;
  transition: all 0.12s;
  text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-elev-2); color: var(--text); font-weight: 500; }
.nav-item > span:nth-child(2) {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item svg { flex-shrink: 0; color: var(--text-mute); }
.nav-item.active svg { color: var(--accent); }
.nav-item.add-account { color: var(--text-mute); font-size: 12px; }

.badge {
  font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
  background: var(--accent); color: #05241a;
  min-width: 20px; text-align: center;
}
.badge.subtle { background: var(--bg-elev-2); color: var(--text-dim); font-weight: 500; }
.badge.red { background: var(--danger); color: white; }
.badge.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.account-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.account-dot.all { background: conic-gradient(from 0deg, #10b981, #8b5cf6, #f59e0b, #ec4899, #3b82f6, #10b981); }

.tag { font-size: 10px; }
.tag-green { color: var(--accent); }
.tag-amber { color: var(--warn); }
.tag-red { color: var(--danger); }
.tag-violet { color: var(--violet); }
.tag-blue { color: var(--blue); }

.sidebar-foot { margin-top: auto; padding-top: 10px; }
.quiet-card {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(139,92,246,0.04));
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius-sm);
}
.quiet-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.quiet-stat { font-size: 12px; color: var(--text-dim); }
.quiet-stat b { color: var(--accent); font-weight: 600; }

/* ===========================
   Content
=========================== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  min-width: 0;
}

.view-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 20px;
}
.view-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin: 0 0 4px; }
.view-desc { color: var(--text-dim); font-size: 13px; margin: 0; }
.view-actions { display: flex; gap: 8px; }
.view-actions button {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-dim);
  transition: all 0.12s;
}
.view-actions button:hover { border-color: var(--border-strong); color: var(--text); }

/* Briefing view */
.briefing-hero {
  background: radial-gradient(ellipse at top left, rgba(16,185,129,0.12), transparent 50%),
              linear-gradient(135deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.briefing-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(20,184,166,0.1), transparent 60%);
  pointer-events: none;
}
.briefing-greeting { font-size: 13px; color: var(--text-dim); margin: 0 0 4px; }
.briefing-title { font-size: 26px; font-weight: 700; letter-spacing: -0.6px; margin: 0 0 14px; }
.briefing-title .accent { color: var(--accent); }
.briefing-summary {
  font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 640px;
  margin-bottom: 18px;
}
.briefing-stats {
  display: flex; gap: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.briefing-stat .num { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.briefing-stat .lbl { font-size: 11.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.4px; }
.briefing-stat .num.ok { color: var(--accent); }
.briefing-stat .num.warn { color: var(--warn); }

.section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-mute);
  margin: 24px 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .count {
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0;
}

/* Priority cards — briefing */
.prio-grid { display: flex; flex-direction: column; gap: 10px; }

.prio-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  transition: all 0.15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.prio-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.prio-card.urgency-high::before { background: var(--danger); }
.prio-card.urgency-med::before { background: var(--warn); }
.prio-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.prio-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--bg-elev-2);
}

.prio-body { flex: 1; min-width: 0; }
.prio-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
  font-size: 12px;
}
.prio-sender { font-weight: 600; color: var(--text); }
.prio-when { color: var(--text-mute); }
.prio-account-tag {
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  display: flex; align-items: center; gap: 5px;
}
.prio-account-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dot, var(--accent));
}
.prio-subject { font-size: 14px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.15px; }
.prio-summary {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 10px;
  display: flex; align-items: flex-start; gap: 7px;
}
.prio-summary::before {
  content: '✨';
  font-size: 11px;
  margin-top: 2px;
  opacity: 0.75;
}
.prio-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.action-chip {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all 0.12s;
  display: inline-flex; align-items: center; gap: 5px;
}
.action-chip:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }
.action-chip.primary { background: rgba(16,185,129,0.15); color: var(--accent); border-color: rgba(16,185,129,0.3); }
.action-chip.primary:hover { background: rgba(16,185,129,0.25); }

/* Focus list — simpler rows */
.mail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  border: 1px solid transparent;
}
.mail-row:hover { background: var(--bg-elev); border-color: var(--border); }
.mail-row.selected { background: var(--bg-elev); border-color: var(--accent); }
.mail-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  flex-shrink: 0;
}
.mail-sender { width: 180px; font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mail-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mail-subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mail-subject b { font-weight: 500; color: var(--text); }
.mail-subject .preview { color: var(--text-mute); margin-left: 8px; }
.mail-time { color: var(--text-mute); font-size: 11.5px; flex-shrink: 0; }

/* Noise view */
.noise-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px;
}
.noise-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.noise-stat .num { font-size: 28px; font-weight: 700; letter-spacing: -0.8px; }
.noise-stat .lbl { font-size: 12px; color: var(--text-mute); }

.unsub-list { display: flex; flex-direction: column; gap: 8px; }
.unsub-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.unsub-info { flex: 1; min-width: 0; }
.unsub-sender { font-weight: 500; font-size: 13px; }
.unsub-meta { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; }
.unsub-bar {
  width: 120px; height: 4px;
  background: var(--bg-elev-2);
  border-radius: 2px;
  overflow: hidden;
}
.unsub-bar-fill { height: 100%; background: var(--danger); }
.unsub-btn {
  padding: 6px 11px;
  border-radius: 6px;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  font-size: 12px;
  border: 1px solid var(--border);
  transition: all 0.12s;
}
.unsub-btn:hover { background: var(--danger); color: white; border-color: var(--danger); }

/* Email detail */
.email-detail {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 720px; margin: 0 auto;
}
.detail-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-size: 12px;
  padding: 6px 0;
}
.detail-back:hover { color: var(--text); }
.detail-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.detail-subject { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; margin: 0 0 10px; }
.detail-sender-row { display: flex; align-items: center; gap: 12px; }
.detail-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elev-2);
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px;
  color: var(--text-dim);
}
.detail-sender-info { flex: 1; }
.detail-sender-name { font-weight: 500; font-size: 13px; }
.detail-sender-email { color: var(--text-mute); font-size: 12px; }
.detail-time { color: var(--text-mute); font-size: 12px; }

.ai-actions {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(139,92,246,0.06));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.ai-actions-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--accent);
  margin-bottom: 10px;
}
.ai-actions-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-btn {
  padding: 7px 12px;
  border-radius: 7px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12.5px;
  transition: all 0.12s;
  display: inline-flex; align-items: center; gap: 6px;
}
.ai-btn:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.ai-btn.primary { background: var(--accent); color: #05241a; border-color: var(--accent); font-weight: 500; }
.ai-btn.primary:hover { filter: brightness(1.05); }

.detail-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  padding: 14px 2px;
}
.detail-body p { margin: 0 0 12px; }
.detail-body .sig { color: var(--text-mute); font-size: 13px; margin-top: 18px; }

/* ===========================
   Chat (right sidebar)
=========================== */
.chat {
  width: 360px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; }
.chat-sub { font-size: 11px; color: var(--text-mute); font-weight: 400; }
.chat-orb {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: conic-gradient(from 45deg, var(--accent), var(--accent-2), var(--violet), var(--accent));
  position: relative;
  animation: orb-spin 8s linear infinite;
}
.chat-orb::after {
  content: ''; position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--bg-elev);
}
@keyframes orb-spin { to { transform: rotate(360deg); } }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.msg.user { align-self: flex-end; }
.msg-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.msg.user .msg-bubble {
  background: var(--accent);
  color: #05241a;
  border-bottom-right-radius: 4px;
}
.msg.claude .msg-bubble {
  background: var(--bg-elev-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-bubble ul { margin: 6px 0; padding-left: 18px; }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble b { color: var(--accent); font-weight: 600; }

.chat-suggest {
  padding: 8px 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--border);
}
.suggest-chip {
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 11.5px;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all 0.12s;
}
.suggest-chip:hover { background: var(--bg-hover); color: var(--text); border-color: var(--accent); }

.chat-input-wrap {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; align-items: flex-end;
}
#chatInput {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 120px;
  outline: none;
  transition: border 0.15s;
}
#chatInput:focus { border-color: var(--accent); }
.send-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #05241a;
  display: grid; place-items: center;
  transition: filter 0.15s;
  flex-shrink: 0;
}
.send-btn:hover { filter: brightness(1.1); }

/* ===========================
   Palette (⌘K)
=========================== */
.palette {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: grid; place-items: start center;
  padding-top: 15vh;
}
.palette.hidden { display: none; }
.palette-inner {
  width: min(620px, 92vw);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
#paletteInput {
  width: 100%;
  padding: 16px 20px;
  border: none; outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.palette-results { max-height: 360px; overflow-y: auto; padding: 6px; }
.palette-item {
  padding: 9px 12px;
  border-radius: 6px;
  display: flex; align-items: center; gap: 11px;
  font-size: 13px;
  cursor: pointer;
}
.palette-item:hover, .palette-item.active { background: var(--bg-hover); }
.palette-item-icon {
  width: 26px; height: 26px;
  background: var(--bg-elev-2);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-dim);
}
.palette-item-meta { flex: 1; min-width: 0; }
.palette-item-title { font-weight: 500; }
.palette-item-sub { font-size: 11.5px; color: var(--text-mute); }
.palette-item-kbd { font-size: 10px; color: var(--text-mute); }
.palette-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  display: flex; gap: 14px;
  font-size: 11px;
  color: var(--text-mute);
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Responsive — sub 1200 hide chat */
@media (max-width: 1280px) {
  .chat { width: 320px; }
}
@media (max-width: 1100px) {
  .sidebar { width: 220px; }
  .chat { display: none; }
}

/* ===========================
   Voice note mic FAB
=========================== */
.mic-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06231a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(16,185,129,0.35), 0 2px 8px rgba(0,0,0,0.4);
  z-index: 1500;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.mic-fab:hover { transform: scale(1.06); }
.mic-fab.recording {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  animation: micpulse 1.2s ease-in-out infinite;
}
.mic-fab.processing {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  animation: spin 1.2s linear infinite;
}
@keyframes micpulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(239,68,68,0.6), 0 0 0 0 rgba(239,68,68,0.5); }
  50%      { box-shadow: 0 6px 24px rgba(239,68,68,0.6), 0 0 0 14px rgba(239,68,68,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.mic-status {
  position: fixed;
  bottom: 90px;
  right: 22px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text);
  max-width: 360px;
  box-shadow: var(--shadow);
  z-index: 1499;
}
.mic-status.hidden { display: none; }
.mic-status.ok    { border-color: var(--accent); }
.mic-status.err   { border-color: var(--danger); }
.mic-status-title { font-weight: 600; margin-bottom: 4px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }

/* ===========================
   Secretaría (tasks)
=========================== */
.tasks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1400px) { .tasks-grid { grid-template-columns: 1fr; } }

.task-col {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.task-col-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.task-col-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.task-col-head .count { color: var(--text-mute); font-size: 12px; }

.task-card {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 100ms ease;
}
.task-card:hover { border-color: var(--border-strong); }
.task-card[data-priority=high] { border-left: 3px solid var(--danger); }
.task-card[data-priority=normal] { border-left: 3px solid var(--accent); }
.task-card[data-priority=low] { border-left: 3px solid var(--text-mute); }
.task-card[data-overdue=true] .task-due { color: var(--danger); font-weight: 600; }
.task-card .task-spacer { display: none; }
.task-title { font-weight: 500; font-size: 13.5px; line-height: 1.35; color: var(--text); }
.task-body { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.4; }
.task-meta { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--text-mute); margin-top: 6px; }
.task-chip {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.task-chip.assignee { background: rgba(16,185,129,0.12); color: var(--accent); }
.task-chip.notion   { background: rgba(139,92,246,0.15); color: var(--violet); }
.task-due { font-family: 'JetBrains Mono', monospace; }
.task-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.task-btn {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.task-btn:hover { color: var(--text); background: var(--bg-elev-2); }
.task-btn.done { color: var(--accent); border-color: var(--accent); }

.secretaria-hero {
  padding: 24px 4px 8px;
}
.secretaria-hero h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.secretaria-hero p { margin: 0; color: var(--text-dim); font-size: 13px; }
.secretaria-stats { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.sec-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-width: 110px;
}
.sec-stat .num { font-size: 22px; font-weight: 600; color: var(--text); }
.sec-stat .lbl { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.sec-stat .num.warn { color: var(--warn); }
.sec-stat .num.danger { color: var(--danger); }

.task-group-head {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 14px 0 6px;
}
.task-group-head:first-child { margin-top: 0; }
