/* ══════════════════════════════════════════════
   Ranch Dashboard — Navy Sidebar + Light Content
   ══════════════════════════════════════════════ */

:root {
  /* Sidebar (dark navy) */
  --sidebar-bg: #1e2a3a;
  --sidebar-bg-hover: #263347;
  --sidebar-bg-active: rgba(56, 189, 248, 0.12);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #38bdf8;
  --sidebar-border: #2a3a4e;

  /* Main content (light) */
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9fb;
  --bg-hover: #f1f3f7;
  --bg-active: #e8edf2;
  --border: #e2e8f0;
  --border-light: #cbd5e1;

  /* Text (dark on light) */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;

  /* Accents */
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --accent-dim: rgba(26, 115, 232, 0.08);
  --green: #16a34a;
  --green-dim: rgba(22, 163, 74, 0.08);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.08);
  --yellow: #ca8a04;
  --yellow-dim: rgba(202, 138, 4, 0.08);
  --blue: #2563eb;
  --blue-dim: rgba(37, 99, 235, 0.08);
  --teal: #0891b2;
  --teal-dim: rgba(8, 145, 178, 0.08);

  /* Misc */
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 240px;
  --transition: 150ms ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Legacy aliases for finance module etc. */
  --card-bg: var(--bg-secondary);
  --bg: var(--bg-primary);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter',system-ui,-apple-system,sans-serif; background:var(--bg-primary); color:var(--text-primary); display:flex; height:100vh; overflow:hidden; font-size:14px; }

/* Scrollbar */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:#94a3b8; }

/* ══════════ SIDEBAR ══════════ */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar-logo {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--sidebar-border);
}
.logo-text { font-weight: 600; font-size: 15px; letter-spacing: -0.3px; color: #fff; }
.nav-items { flex:1; padding:12px 10px; overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 500;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { background: var(--sidebar-bg-hover); color: #e2e8f0; }
.nav-item.active {
  background: var(--sidebar-bg-active);
  color: var(--sidebar-text-active);
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #506680;
  padding: 18px 14px 6px;
}
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sidebar-border);
}
.agent-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.4);
}

/* Cost widget in sidebar */
.cost-widget {
  padding: 8px 12px;
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
}
.cost-widget-header { display:flex; align-items:center; gap:5px; margin-bottom:4px; }
.cost-widget-label { font-size:0.72em; font-weight:600; color:#94a3b8; }
.cost-widget-toggle { display:flex; gap:2px; margin-left:auto; }
.cost-toggle {
  font-size: 0.62em;
  padding: 1px 6px;
  border: 1px solid var(--sidebar-border);
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.cost-toggle:hover { border-color: var(--sidebar-text-active); color: #94a3b8; }
.cost-toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.cost-widget-value { font-size: 1.2em; font-weight: 700; color: #fff; }
.cost-widget-tokens { font-size: 0.68em; color: #64748b; }

/* User info in sidebar */
.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-top: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.user-info.hidden { display: none; }
.user-info-details { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info-details i { color: var(--sidebar-text-active); font-size: 14px; }
.logout-btn { color: #64748b; font-size: 14px; text-decoration: none; padding: 4px; border-radius: 4px; transition: color 0.2s; flex-shrink: 0; }
.logout-btn:hover { color: #f87171; }

/* ══════════ MAIN CONTENT ══════════ */
#content { flex:1; overflow-y:auto; padding:0; height:100vh; background: var(--bg-primary); }
.page { padding: 32px; max-width: 1400px; animation: fadeIn 200ms ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 4px; color: var(--text-primary); }
.page-header p { color: var(--text-tertiary); font-size: 13px; }

/* ══════════ CARDS ══════════ */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.card-title { font-weight: 600; font-size: 14px; color: var(--text-primary); }

/* ══════════ BUTTONS ══════════ */
.btn {
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-light); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-dim); }

/* ══════════ INPUTS ══════════ */
input, textarea, select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border var(--transition);
  width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea { resize: vertical; min-height: 80px; }

/* ══════════ BADGES ══════════ */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-gray { background: var(--bg-hover); color: var(--text-tertiary); }

/* ══════════ TABLES ══════════ */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); border-bottom: 2px solid var(--border); background: var(--bg-tertiary); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-hover); }

/* ══════════ MODAL ══════════ */
#modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.4); backdrop-filter:blur(4px); display:flex; align-items:center; justify-content:center; z-index:100; }
.hidden { display: none !important; }
#modal-overlay.hidden { display: none; }
#modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 150ms ease;
}
#modal .modal-actions {
  position: sticky;
  bottom: -24px;
  margin: 20px -24px -24px -24px;
  padding: 14px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
#modal.modal-wide {
  max-width: 1100px;
  width: 92vw;
  max-height: 88vh;
  overflow: auto;
}

/* ── Ads Wizard ── */
.wiz-label {
  display: block;
  font-size: 0.78em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wiz-label-sm {
  display: block;
  font-size: 0.72em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}
.wiz-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9em;
  font-family: inherit;
  box-sizing: border-box;
}
.wiz-input:focus { outline: none; border-color: #3b82f6; }
.wiz-input[type="number"] { font-variant-numeric: tabular-nums; }
.wiz-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
}
.wiz-section-title {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wiz-pick {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85em;
  transition: all 100ms;
}
.wiz-pick:hover { border-color: #3b82f6; }
.wiz-pick.active { border-color: #3b82f6; background: #3b82f622; }
.wiz-pin {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
}
.wiz-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #3b82f622;
  border: 1px solid #3b82f655;
  color: var(--text-primary);
  border-radius: 12px;
  padding: 3px 4px 3px 10px;
  font-size: 0.78em;
  white-space: nowrap;
}
.wiz-chip-meta { opacity: 0.6; font-size: 0.85em; margin-left: 4px; }
.wiz-chip button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.wiz-chip button:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.wiz-search-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--text-primary);
  font-size: 0.82em;
  cursor: pointer;
  font-family: inherit;
}
.wiz-search-row:first-child { border-top-left-radius: 6px; border-top-right-radius: 6px; }
.wiz-search-row:last-child { border-bottom: 1px solid var(--border); border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.wiz-search-row:hover { background: var(--bg-secondary); border-color: #3b82f6; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn:hover { color: #ef4444; border-color: #ef4444; }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }

/* ══════════ CHAT ══════════ */
.chat-layout { display:flex; height:calc(100vh - 0px); position:relative; }
.chat-main { flex:1; display:flex; flex-direction:column; }
.chat-header-bar { padding:14px 20px; border-bottom:1px solid var(--border); background:var(--bg-secondary); display:flex; align-items:center; }
.chat-header-status { display:flex; align-items:center; gap:10px; font-weight:600; font-size:15px; }
.chat-header-status .status-dot { width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 6px rgba(34,197,94,0.4); }
.chat-messages { flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; gap:8px; scroll-behavior:smooth; }
.chat-msg { max-width:70%; display:flex; flex-direction:column; gap:2px; }
.chat-msg.user { align-self:flex-end; }
.chat-msg.agent { align-self:flex-start; }
.chat-msg-bubble { padding:10px 14px; border-radius:var(--radius-lg); font-size:13px; line-height:1.5; white-space:pre-wrap; word-wrap:break-word; }
.chat-msg.user .chat-msg-bubble { background:var(--accent); color:white; border-bottom-right-radius:4px; }
.chat-msg.agent .chat-msg-bubble { background:var(--bg-tertiary); border:1px solid var(--border); border-bottom-left-radius:4px; }
.chat-msg-time { font-size:10px; color:var(--text-tertiary); padding:0 4px; }
.chat-msg.user .chat-msg-time { text-align:right; }
.chat-empty-state { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--text-tertiary); gap:12px; }
.chat-empty-icon { font-size:48px; }
.chat-empty-text { font-size:15px; }
.chat-input-bar { display:flex; align-items:center; gap:8px; padding:12px 16px; border-top:1px solid var(--border); background:var(--bg-secondary); }
.chat-input-bar input[type="text"] { flex:1; border-radius:20px; padding:10px 16px; }
.chat-send-btn { border-radius:50%; width:38px; height:38px; padding:0; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.chat-attach-btn { cursor:pointer; display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:50%; color:var(--text-tertiary); transition:all var(--transition); flex-shrink:0; }
.chat-attach-btn:hover { color:var(--text-primary); background:var(--bg-hover); }
.chat-typing { display:flex; align-items:center; gap:4px; padding:0 24px 8px; }
.chat-typing span { width:6px; height:6px; border-radius:50%; background:var(--text-tertiary); animation:chatBounce 1.4s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay:0.2s; }
.chat-typing span:nth-child(3) { animation-delay:0.4s; }
.chat-typing .chat-typing-text { font-size:12px; color:var(--text-tertiary); margin-left:6px; animation:none; width:auto; height:auto; border-radius:0; background:none; }
@keyframes chatBounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }
.chat-attachment { margin-top:8px; }
.chat-attachment img.chat-img-preview { max-width:240px; max-height:180px; border-radius:var(--radius); }
.chat-attachment a { color:var(--accent); text-decoration:none; }
.chat-attachment a:hover { text-decoration:underline; }
.chat-attachment i { margin-right:4px; }
.chat-drop-overlay { position:absolute; inset:0; background:rgba(26,115,232,0.08); border:2px dashed var(--accent); border-radius:var(--radius-lg); display:none; align-items:center; justify-content:center; z-index:20; }
.chat-drop-overlay.active { display:flex; }
.chat-drop-content { display:flex; flex-direction:column; align-items:center; gap:8px; color:var(--accent); font-size:16px; }
.chat-drop-content i { font-size:32px; }

/* ══════════ BOARD ══════════ */
.board-columns { display:flex; gap:16px; height:calc(100vh - 140px); }
.board-col { flex:1; background:var(--bg-secondary); border:1px solid var(--border); border-radius:var(--radius-lg); display:flex; flex-direction:column; min-width:0; box-shadow: var(--shadow-sm); }
.board-col-header { padding:12px 16px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; }
.board-col-title { font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; color: var(--text-secondary); }
.board-col-count { font-size:11px; color:var(--text-tertiary); background:var(--bg-hover); padding:2px 8px; border-radius:99px; }
.board-col-body { flex:1; overflow-y:auto; padding:8px; display:flex; flex-direction:column; gap:8px; }
.board-card { background:var(--bg-tertiary); border:1px solid var(--border); border-radius:var(--radius); padding:12px; cursor:grab; transition:all var(--transition); }
.board-card:hover { border-color:var(--border-light); box-shadow: var(--shadow-sm); }
.board-card.dragging { opacity:0.5; }
.board-card-title { font-size:13px; font-weight:500; margin-bottom:4px; }
.board-card-desc { font-size:12px; color:var(--text-tertiary); line-height:1.4; }
.board-card-priority { margin-top:6px; }
.board-col-body.drag-over { background:var(--accent-dim); border-radius:var(--radius); }

/* ══════════ SKILLS ══════════ */
.skills-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
.skill-card { display:flex; align-items:center; gap:14px; }
.skill-icon { width:40px; height:40px; border-radius:var(--radius); background:var(--accent-dim); display:flex; align-items:center; justify-content:center; color:var(--accent); font-size:16px; flex-shrink:0; }
.skill-info { flex:1; min-width:0; }
.skill-name { font-size:13px; font-weight:600; margin-bottom:2px; }
.skill-desc { font-size:12px; color:var(--text-tertiary); }
.skill-toggle { position:relative; width:36px; height:20px; flex-shrink:0; }
.skill-toggle input { display:none; }
.skill-toggle .slider { position:absolute; inset:0; background:var(--bg-hover); border:1px solid var(--border); border-radius:99px; cursor:pointer; transition:all var(--transition); }
.skill-toggle .slider::before { content:''; position:absolute; width:14px; height:14px; border-radius:50%; background:var(--text-tertiary); top:2px; left:2px; transition:all var(--transition); }
.skill-toggle input:checked + .slider { background:var(--accent-dim); border-color:var(--accent); }
.skill-toggle input:checked + .slider::before { transform:translateX(16px); background:var(--accent); }

/* ══════════ MEMORY ══════════ */
.memory-layout { display:flex; gap:0; height:calc(100vh - 0px); margin:-32px; }
.memory-sidebar { width:260px; min-width:260px; border-right:1px solid var(--border); background:var(--bg-secondary); padding:16px; display:flex; flex-direction:column; }
.memory-files { flex:1; overflow-y:auto; margin-top:12px; display:flex; flex-direction:column; gap:2px; }
.memory-file { padding:8px 12px; border-radius:var(--radius); cursor:pointer; font-size:13px; color:var(--text-secondary); transition:all var(--transition); display:flex; align-items:center; gap:8px; }
.memory-file:hover { background:var(--bg-hover); color:var(--text-primary); }
.memory-file.active { background:var(--accent-dim); color:var(--accent); }
.memory-file i { font-size:12px; }
.memory-content { flex:1; overflow-y:auto; padding:32px; }
.memory-content h1,.memory-content h2,.memory-content h3 { margin:20px 0 8px; }
.memory-content h1 { font-size:22px; }
.memory-content h2 { font-size:18px; color:var(--text-primary); }
.memory-content h3 { font-size:15px; color:var(--text-secondary); }
.memory-content p { margin:8px 0; color:var(--text-secondary); line-height:1.6; }
.memory-content ul,.memory-content ol { margin:8px 0 8px 20px; color:var(--text-secondary); }
.memory-content li { margin:4px 0; line-height:1.5; }
.memory-content code { background:var(--bg-tertiary); padding:2px 6px; border-radius:4px; font-size:12px; border: 1px solid var(--border); }
.memory-content pre { background:var(--bg-tertiary); border:1px solid var(--border); border-radius:var(--radius); padding:14px; overflow-x:auto; margin:12px 0; }
.memory-content pre code { background:none; padding:0; border: none; }
.memory-content strong { color:var(--text-primary); }
.memory-content hr { border:none; border-top:1px solid var(--border); margin:16px 0; }

/* ══════════ ACTIVITY ══════════ */
.activity-filters { display:flex; gap:6px; margin-bottom:16px; }
.filter-btn {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { background: var(--bg-hover); }
.filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.activity-item { display:flex; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.activity-item:last-child { border-bottom:none; }
.activity-icon { width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.activity-icon.task { background:var(--blue-dim); color:var(--blue); }
.activity-icon.system { background:var(--green-dim); color:var(--green); }
.activity-icon.agent { background:var(--accent-dim); color:var(--accent); }
.activity-icon.chat { background:var(--yellow-dim); color:var(--yellow); }
.activity-text { font-size:13px; line-height:1.4; }
.activity-time { font-size:11px; color:var(--text-tertiary); margin-top:2px; }

/* ══════════ STATS ══════════ */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
.stat-card { display:flex; align-items:center; gap:14px; }
.stat-icon { width:42px; height:42px; border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:18px; }
.stat-label { font-size:12px; color:var(--text-tertiary); margin-bottom:2px; }
.stat-value { font-size:15px; font-weight:600; }

/* ══════════ SETTINGS ══════════ */
.settings-section { margin-bottom:32px; }
.settings-section-title { font-size:16px; font-weight:600; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.rule-item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border); }
.rule-item:last-child { border-bottom:none; }
.rule-text { flex:1; font-size:13px; }
.rule-actions { display:flex; gap:4px; }

/* ══════════ HEARTBEAT ══════════ */
.hb-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-bottom:24px; }
.hb-stat { text-align:center; padding:16px; }
.hb-stat-value { font-size:24px; font-weight:700; margin-bottom:4px; }
.hb-stat-label { font-size:12px; color:var(--text-tertiary); }

/* ══════════ PROJECT PAGES ══════════ */
.project-icon-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}
.project-tabs { display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--border); padding-bottom:0; }
.project-tab { padding:8px 16px; font-size:13px; font-weight:500; color:var(--text-secondary); background:none; border:none; border-bottom:2px solid transparent; cursor:pointer; transition:all var(--transition); font-family:inherit; }
.project-tab:hover { color:var(--text-primary); }
.project-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.project-tab-content.hidden { display:none; }
.research-file { margin-bottom:24px; }
.research-file-name { font-size:12px; font-weight:500; color:var(--text-tertiary); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.research-content { background:var(--bg-secondary); border:1px solid var(--border); border-radius:var(--radius-lg); padding:24px 28px; box-shadow: var(--shadow-sm); }
.research-content h1,.research-content h2,.research-content h3 { margin:20px 0 8px; }
.research-content h1 { font-size:22px; }
.research-content h2 { font-size:18px; color:var(--text-primary); }
.research-content h3 { font-size:15px; color:var(--text-secondary); }
.research-content p { margin:8px 0; color:var(--text-secondary); line-height:1.7; }
.research-content ul,.research-content ol { margin:8px 0 8px 20px; color:var(--text-secondary); }
.research-content li { margin:4px 0; line-height:1.6; }
.research-content a { color:var(--accent); text-decoration:none; }
.research-content a:hover { text-decoration:underline; }
.research-content blockquote { border-left:3px solid var(--accent); padding:8px 16px; margin:12px 0; color:var(--text-secondary); background:var(--bg-tertiary); border-radius:0 var(--radius) var(--radius) 0; }
.research-content code { background:var(--bg-tertiary); padding:2px 6px; border-radius:4px; font-size:12px; }
.research-content strong { color:var(--text-primary); }
.research-empty { color:var(--text-tertiary); font-size:13px; padding:20px; display:flex; align-items:center; gap:8px; }
.project-notes-textarea { min-height:300px; font-size:14px; line-height:1.7; resize:vertical; }
.notes-status { font-size:12px; color:var(--green); margin-top:8px; height:16px; }

/* ══════════ FINANCE ══════════ */
.finance-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding: 0 32px 8px; }
#fin-header { padding: 32px 32px 8px; }
#fin-header .page-header { margin-bottom: 0; }
#fin-content { padding: 0 32px 32px; max-width: 1400px; }
.fin-tab { background: none; border: none; color: var(--text-secondary); padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.fin-tab:hover { background: var(--bg-secondary); color: var(--text-primary); }
.fin-tab.active { background: var(--accent); color: #fff; }
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.fin-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: var(--shadow-sm); }
.fin-card.compact { padding: 14px; }
.fin-card-header { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--text-primary); }
.fin-card-equity { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.fin-acct-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; color: var(--text-secondary); }
.fin-acct-row.cc { color: var(--text-secondary); }
.fin-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.fin-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-weight: 600; }
.fin-pnl-entity { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.fin-pnl-entity h4 { margin-bottom: 12px; font-size: 16px; }
.fin-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin: 12px 0 6px; font-weight: 600; }
.fin-line { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.fin-line.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; font-weight: 600; }
.fin-line.net { border-top: 2px solid var(--border); margin-top: 8px; padding-top: 8px; font-weight: 700; font-size: 15px; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fin-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); background: var(--bg-tertiary); }
.fin-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.fin-table tr:hover td { background: var(--bg-hover); }
.fin-cat-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--bg-tertiary); border: 1px solid var(--border); }
.fin-filter { margin-bottom: 12px; }
.fin-filter select { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary); padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.fin-meta { font-size: 12px; color: var(--text-secondary); margin-top: 20px; }
.positive { color: #16a34a; }
.negative { color: #dc2626; }
.fin-top-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.fin-top-bar .finance-tabs { flex: 1; }
.fin-card-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.btn-xs { font-size: 11px; padding: 4px 10px; border-radius: 5px; background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 0.15s; }
.btn-xs:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-warn { border-color: #f59e0b; color: #f59e0b; }
.btn-warn:hover { background: #f59e0b; color: #fff; }
.fin-month-select { margin-top: 16px; font-size: 13px; }
.fin-month-select select { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary); padding: 4px 8px; border-radius: 4px; }
.fin-overview-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.fin-month-picker select { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 14px; border-radius: 6px; font-size: 15px; font-weight: 600; }
.fin-meta-inline { font-size: 12px; color: var(--text-secondary); }
.fin-drilldown { cursor: pointer; border-radius: 4px; padding: 4px 8px !important; margin: 0 -8px; transition: background 0.15s; }
.fin-drilldown:hover { background: var(--bg-hover); }
.fin-drilldown.selected { background: var(--accent-dim); border-left: 3px solid var(--accent); }
.fin-pnl-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: nowrap; }
.fin-pnl-left { flex: 0 0 440px; }
.fin-pnl-right { flex: 1; min-width: 300px; position: sticky; top: 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
.fin-card-sync { font-size: 11px; color: var(--text-tertiary); font-weight: 400; margin-top: 2px; }
.fin-tab-badge { display: inline-flex; align-items: center; justify-content: center; background: #f59e0b; color: #fff; font-size: 10px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; margin-left: 6px; }
.fin-accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.fin-account-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: var(--shadow-sm); }
.fin-account-card.disconnected { border-color: #f59e0b; }
.fin-account-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.fin-account-name { font-weight: 600; font-size: 14px; }
.fin-account-status { font-size: 12px; }
.fin-account-status.connected { color: var(--text-tertiary); }
.fin-account-status.disconnected { color: #f59e0b; }
.fin-account-detail { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.fin-account-detail:last-of-type { border-bottom: none; }
.fin-account-error { font-size: 12px; color: #f59e0b; margin-top: 8px; padding: 6px 10px; background: rgba(245,158,11,0.08); border-radius: 6px; }
.fin-reconnect-btn { margin-top: 12px; display: inline-block; text-decoration: none; text-align: center; }
.fin-bf-badge { display: inline-block; font-size: 9px; font-weight: 700; background: rgba(139,92,246,0.12); color: #7c3aed; padding: 1px 5px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.fin-drilldown-placeholder { color: var(--text-secondary); font-size: 13px; text-align: center; padding: 40px 20px; opacity: 0.5; border: 1px dashed var(--border); border-radius: 10px; }
.fin-drilldown-box { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: var(--shadow-sm); }
.fin-drilldown-box h4 { margin-bottom: 12px; font-size: 14px; }
@media (max-width: 900px) { .fin-pnl-layout { flex-direction: column; } .fin-pnl-left { flex: 1; min-width: 0; } .fin-pnl-right { position: static; max-height: none; } }
.fin-pnl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.fin-pnl-header h3 { margin: 0; }
.fin-pnl-header select, .fin-period-sel input[type="date"] { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-primary); padding: 6px 12px; border-radius: 6px; font-size: 14px; }
.fin-period-sel { display: flex; align-items: center; gap: 8px; }
.fin-sub-header-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 0 32px; }
.fin-sub-header-bar h3 { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; }
.fin-health-warning { background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.2); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.fin-health-title { font-weight: 600; color: #ca8a04; margin-bottom: 8px; font-size: 14px; }
.fin-health-account { font-size: 13px; color: var(--text-secondary); padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.fin-health-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.fin-health-dot.connected { background: #16a34a; }
.fin-health-dot.disconnected { background: #dc2626; }
.fin-health-dot.error { background: #ca8a04; }
.fin-health-note { font-size: 12px; color: var(--text-tertiary); margin-top: 8px; font-style: italic; }
.fin-card-health-warn { background: rgba(251, 191, 36, 0.06); border-radius: 4px; padding: 6px 10px; font-size: 11px; color: #ca8a04; margin-bottom: 8px; }
.fin-card.has-health-warning { border-color: rgba(251, 191, 36, 0.3); }
.fin-line.subtotal { border-top: 1px dashed var(--border-light); padding-top: 6px; margin-top: 4px; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.fin-filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-filters select { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px; min-width: 140px; }
.fin-filters select:focus { outline: none; border-color: var(--accent); }
.fin-table th:first-child, .fin-table td:first-child { white-space: nowrap; min-width: 110px; }

/* ══════════ LOGIN ══════════ */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100vw; background: var(--sidebar-bg); }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 48px 40px; text-align: center; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg); }
.login-logo { font-size: 48px; margin-bottom: 16px; }
.login-title { font-size: 22px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: var(--text-tertiary); margin-bottom: 32px; }
.login-btn { display: inline-flex; align-items: center; gap: 12px; padding: 12px 28px; background: #fff; color: #333; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; transition: box-shadow 0.2s, transform 0.1s; box-shadow: 0 2px 8px rgba(0,0,0,0.12); border: 1px solid var(--border); }
.login-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); transform: translateY(-1px); }

/* ══════════ RANCH OFFICE v2 ══════════ */
.ro-location-tabs { display: flex; gap: 4px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; margin-bottom: 20px; }
.ro-location-tab { padding: 8px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all var(--transition); border: none; background: none; font-family: inherit; }
.ro-location-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.ro-location-tab.active { background: var(--accent); color: #fff; }
.ro-floor-tabs { display: flex; gap: 2px; margin-bottom: 16px; }
.ro-floor-tab { padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-tertiary); cursor: pointer; transition: all var(--transition); border: 1px solid transparent; background: none; font-family: inherit; }
.ro-floor-tab:hover { color: var(--text-primary); border-color: var(--border); }
.ro-floor-tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.ro-floorplan-grid { display: flex; justify-content: center; align-items: center; padding: 16px; min-height: 300px; position: relative; }
.ro-svg-floorplan { max-height: 500px; width: 100%; }
.fp-office rect { transition: fill 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease; }
.fp-office:hover rect { filter: brightness(1.1); stroke-width: 2.5; }
.fp-office:hover { filter: drop-shadow(0 0 6px rgba(0,0,0,0.15)); }
.ro-tooltip { position: fixed; z-index: 1000; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; font-size: 12px; max-width: 280px; box-shadow: var(--shadow-lg); pointer-events: none; opacity: 0; transition: opacity 0.15s ease; line-height: 1.5; }
.ro-tooltip.visible { opacity: 1; }
.ro-tooltip .tt-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.ro-tooltip .tt-company { color: var(--accent); font-size: 12px; }
.ro-tooltip .tt-detail { color: var(--text-secondary); font-size: 11px; margin-top: 4px; }
.ro-tooltip .tt-vacant { color: var(--red); font-weight: 500; }

/* Task feed (Ranch Office sub-page) */
.ro-task-feed { display: flex; flex-direction: column; gap: 10px; max-height: 500px; overflow-y: auto; padding-right: 4px; }
.ro-task-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; border-left: 3px solid var(--text-tertiary); transition: all var(--transition); box-shadow: var(--shadow-sm); }
.ro-task-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.ro-task-card[data-type="lead"] { border-left-color: var(--blue); }
.ro-task-card[data-type="maintenance"] { border-left-color: var(--yellow); }
.ro-task-card[data-type="member-issue"] { border-left-color: var(--red); }
.ro-task-card[data-type="invoice"] { border-left-color: #ea580c; }
.ro-task-card[data-type="follow-up"] { border-left-color: #7c3aed; }
.ro-task-card[data-type="general"] { border-left-color: var(--text-tertiary); }
.ro-task-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ro-task-title { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.ro-task-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; }
.ro-task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ro-task-member { font-size: 11px; color: var(--accent); }
.ro-task-time { font-size: 11px; color: var(--text-tertiary); }
.ro-type-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.ro-type-lead { background: var(--blue-dim); color: var(--blue); }
.ro-type-maintenance { background: var(--yellow-dim); color: var(--yellow); }
.ro-type-member-issue { background: var(--red-dim); color: var(--red); }
.ro-type-invoice { background: rgba(234,88,12,0.08); color: #ea580c; }
.ro-type-follow-up { background: rgba(124,58,237,0.08); color: #7c3aed; }
.ro-type-general { background: var(--bg-tertiary); color: var(--text-tertiary); }
.ro-pri-urgent { color: #dc2626; font-weight: 700; }
.ro-pri-high { color: #ea580c; font-weight: 600; }
.ro-pri-medium { color: #ca8a04; }
.ro-pri-low { color: var(--text-tertiary); }
.ro-priority-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ro-priority-dot.urgent { background: #dc2626; box-shadow: 0 0 6px rgba(220,38,38,0.4); }
.ro-priority-dot.high { background: #ea580c; box-shadow: 0 0 6px rgba(234,88,12,0.3); }
.ro-priority-dot.medium { background: #ca8a04; }
.ro-priority-dot.low { background: var(--text-tertiary); }
.ro-task-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ro-action-btn { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-secondary); cursor: pointer; transition: all var(--transition); font-family: inherit; }
.ro-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.ro-action-btn.done-btn { color: var(--green); border-color: rgba(22,163,74,0.3); }
.ro-action-btn.done-btn:hover { background: var(--green-dim); }
.ro-fab { position: fixed; bottom: 28px; right: 28px; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 22px; cursor: pointer; box-shadow: 0 4px 16px rgba(26,115,232,0.3); transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; z-index: 50; }
.ro-fab:hover { background: var(--accent-hover); transform: scale(1.08); }
.ro-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ro-stat-mini { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; text-align: center; box-shadow: var(--shadow-sm); }
.ro-stat-mini .stat-num { font-size: 22px; font-weight: 700; }
.ro-stat-mini .stat-lbl { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ══════════ TODO ══════════ */
.todo-list { padding: 4px 0; }
.todo-item { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--border); transition: opacity 0.2s, background 0.15s; border-radius: 6px; cursor: default; }
.todo-item:last-of-type { border-bottom: none; }
.todo-item.todo-done { opacity: 0.38; }
.todo-item.todo-done .todo-text { text-decoration: line-through; }
.todo-item.todo-dragging { opacity: 0.4; background: var(--bg-secondary); }
.todo-drag-handle { color: var(--text-tertiary); font-size: 11px; cursor: grab; padding: 0 2px; opacity: 0.35; flex-shrink: 0; transition: opacity 0.15s; }
.todo-item:hover .todo-drag-handle { opacity: 0.7; }
.todo-check { cursor: pointer; font-size: 16px; color: var(--text-tertiary); flex-shrink: 0; transition: color 0.15s; }
.todo-check:hover { color: var(--accent); }
.todo-item.todo-done .todo-check { color: var(--green); }
.todo-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; flex: 1; }
.todo-active-btn { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.2; transition: opacity 0.15s; position: relative; }
.todo-item:hover .todo-active-btn { opacity: 0.6; }
.todo-active-btn.is-active { opacity: 1; }
.todo-pulse { display: block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.todo-active-btn.is-active .todo-pulse { animation: todoPulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(22,163,74,0.6); }
@keyframes todoPulse { 0%{box-shadow:0 0 0 0 rgba(22,163,74,0.55)} 60%{box-shadow:0 0 0 7px rgba(22,163,74,0)} 100%{box-shadow:0 0 0 0 rgba(22,163,74,0)} }
.todo-item.todo-active { background: rgba(22,163,74,0.04); border-radius: 6px; }
.todo-add-row { padding: 6px 4px 2px; }
.todo-inline-input { width: 100%; background: transparent; border: none; border-bottom: 1px dashed var(--border); color: var(--text-tertiary); font-size: 13px; padding: 5px 2px; outline: none; transition: border-color 0.15s, color 0.15s; }
.todo-inline-input:focus { border-bottom-color: var(--accent); color: var(--text-primary); }
.todo-inline-input::placeholder { color: var(--text-tertiary); opacity: 0.5; }
.todo-tabs { display: flex; gap: 4px; padding: 8px 4px 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.todo-tab { background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--text-tertiary); cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
.todo-tab:hover { color: var(--text-primary); background: var(--bg-secondary); }
.todo-tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.todo-tab-count { background: var(--bg-secondary); border-radius: 10px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.todo-tab.active .todo-tab-count { background: var(--accent-dim); color: var(--accent); }
.todo-delete-btn { flex-shrink: 0; width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-tertiary); font-size: 11px; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.todo-item:hover .todo-delete-btn { opacity: 0.5; }
.todo-delete-btn:hover { opacity: 1 !important; color: var(--red); }

/* ══════════ SMS ══════════ */
.sms-contact { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; }
.sms-contact:hover { background: var(--bg-hover); }
.sms-contact.active { background: var(--accent-dim); border-left: 3px solid var(--accent); }

/* ══════════ AUTOMATIONS ══════════ */
.auto-tree { display:flex; flex-direction:column; align-items:center; padding:20px 0; }
.auto-root { display:flex; flex-direction:column; align-items:center; width:100%; }
.auto-connector { width:2px; height:24px; background:var(--border); }
.auto-node { background:var(--bg-secondary); border:1px solid var(--border); border-radius:12px; padding:16px 24px; text-align:center; position:relative; box-shadow: var(--shadow-sm); }
.auto-orchestrator { border-color:var(--accent); background:var(--accent-dim); min-width:280px; }
.auto-orchestrator .auto-node-name { font-size:1.4em; font-weight:700; }
.auto-orchestrator .auto-node-role { color:var(--accent); font-size:0.85em; margin-top:2px; }
.auto-orchestrator .auto-node-model { color:var(--text-tertiary); font-size:0.8em; margin-top:6px; }
.auto-heartbeat { border-color:var(--green); background:var(--green-dim); }
.auto-heartbeat .auto-node-name { font-size:1.1em; font-weight:600; }
.auto-heartbeat .auto-node-model { color:var(--text-tertiary); font-size:0.8em; margin-top:4px; }
.auto-heartbeat .auto-task-schedule { color:var(--text-secondary); font-size:0.8em; margin-top:2px; }
.auto-status { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; flex-shrink:0; }
.auto-node-name { display:inline; }
.auto-categories { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:16px; width:100%; max-width:1200px; margin-top:8px; }
.auto-category { background:var(--bg-secondary); border:1px solid var(--border); border-radius:12px; overflow:hidden; box-shadow: var(--shadow-sm); }
.auto-cat-header { padding:12px 16px; font-weight:600; font-size:0.95em; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:8px; }
.auto-cat-header i { color:var(--accent); }
.auto-cat-count { background:var(--bg-tertiary); color:var(--text-tertiary); font-size:0.75em; padding:1px 7px; border-radius:10px; margin-left:auto; font-weight:400; }
.auto-cat-tasks { padding:8px; display:flex; flex-direction:column; gap:6px; }
.auto-task { background:var(--bg-tertiary); border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
.auto-task-error { border-color:rgba(220,38,38,0.3); }
.auto-task-header { display:flex; align-items:center; gap:4px; margin-bottom:4px; }
.auto-task-name { font-weight:500; font-size:0.88em; }
.auto-task-schedule { color:var(--text-tertiary); font-size:0.78em; display:flex; align-items:center; gap:4px; }
.auto-task-tag { color:var(--text-tertiary); font-size:0.75em; background:var(--bg-tertiary); padding:2px 8px; border-radius:4px; display:inline-block; margin-top:4px; }
.auto-task-error-msg { color:var(--red); font-size:0.75em; margin-top:4px; display:flex; align-items:center; gap:4px; }
.model-select { width:100%; margin-top:6px; padding:4px 8px; font-size:0.78em; background:var(--bg-secondary); color:var(--text-primary); border:1px solid var(--border); border-radius:6px; cursor:pointer; transition:border-color 0.3s; }
.model-select:hover { border-color:var(--accent); }
.model-select:focus { outline:none; border-color:var(--accent); }
.auto-legend { display:flex; gap:16px; justify-content:center; margin-top:20px; font-size:0.82em; color:var(--text-secondary); }
.auto-legend > span { display:flex; align-items:center; gap:4px; }

/* ══════════ WORKFLOW ══════════ */
.wf-split { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:900px) { .wf-split { grid-template-columns:1fr; } }
.wf-col { min-width:0; }
.wf-freq { font-size:0.68em; padding:1px 7px; border-radius:10px; margin-left:auto; font-weight:500; white-space:nowrap; }
.wf-freq-daily { background:rgba(26,115,232,0.08); color:var(--accent); }
.wf-freq-weekly { background:rgba(37,99,235,0.08); color:var(--blue); }
.wf-freq-monthly { background:rgba(124,58,237,0.08); color:#7c3aed; }
.wf-freq-annual { background:rgba(202,138,4,0.08); color:var(--yellow); }
.wf-freq-reminder { background:rgba(107,114,128,0.08); color:var(--text-tertiary); }

/* ══════════ MEMORY TREE ══════════ */
.mem-tree { display:flex; flex-direction:column; gap:4px; }
.mem-section { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.mem-section-header { display:flex; align-items:center; gap:8px; padding:10px 12px; cursor:pointer; background:var(--bg-secondary); transition:background 0.15s; }
.mem-section-header:hover { background:var(--bg-hover); }
.mem-chevron { font-size:0.7em; color:var(--text-tertiary); transition:transform 0.2s; }
.mem-collapsed .mem-chevron { transform:rotate(-90deg); }
.mem-collapsed .mem-section-body { display:none; }
.mem-section-title { font-weight:600; font-size:0.9em; }
.mem-section-count { margin-left:auto; font-size:0.75em; color:var(--text-tertiary); background:var(--bg-tertiary); padding:1px 7px; border-radius:10px; }
.mem-section-body { padding:6px 12px 10px 28px; font-size:0.85em; }
.mem-subsection { font-weight:600; color:var(--text-secondary); padding:4px 0 2px; display:flex; align-items:center; gap:6px; }
.mem-item { color:var(--text-secondary); padding:2px 0; line-height:1.4; }
.mem-bullet { color:var(--text-tertiary); margin-right:4px; }
.mem-pointer { color:var(--accent); }
.mem-pointer code { color:var(--accent); }

/* ══════════ TASKS MODULE (NEW) ══════════ */
.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tasks-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tasks-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.tasks-filter-bar select {
  width: auto;
  min-width: 140px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.tasks-filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.task-card-new {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.task-card-new:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}
.task-card-body { flex: 1; min-width: 0; }
.task-card-title { font-weight: 600; font-size: 14px; color: var(--text-primary); margin-bottom: 4px; }
.task-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.task-card-desc .more-link { color: var(--accent); cursor: pointer; font-size: 12px; }
.task-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-tertiary);
}
.task-assignee-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.task-assignee-pill.andrew { background: #dbeafe; color: #1d4ed8; }
.task-assignee-pill.jay { background: #ede9fe; color: #6d28d9; }
.task-assignee-pill.jake { background: #d1fae5; color: #047857; }
.task-assignee-pill.michael { background: #fee2e2; color: #b91c1c; }
.task-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: flex-start;
}
.task-action-btn {
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  font-family: inherit;
}
.task-action-btn.start { color: var(--teal); }
.task-action-btn.start:hover { background: var(--teal-dim); }
.task-action-btn.complete { color: var(--green); }
.task-action-btn.complete:hover { background: var(--green-dim); }
.task-action-btn.edit { color: var(--accent); }
.task-action-btn.edit:hover { background: var(--accent-dim); }
.task-action-btn.dismiss { color: var(--red); }
.task-action-btn.dismiss:hover { background: var(--red-dim); }
.task-transfer-notification {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-transfer-notification button {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  font-family: inherit;
}
.task-transfer-notification .accept-btn { background: #d1fae5; color: #047857; border-color: #6ee7b7; }
.task-transfer-notification .decline-btn { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

/* New Task / Edit Task modal overrides */
.task-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.task-modal-transfer {
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 12px;
}
.transfer-link {
  color: var(--teal);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
.transfer-link:hover { text-decoration: underline; }

/* Task card states */
.task-card-new.task-done { opacity: 0.45; }
.task-card-new.task-done .task-card-title s { color: var(--text-tertiary); }
.tasks-list { display: flex; flex-direction: column; gap: 12px; }
.tasks-page .tasks-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.tasks-page .tasks-header h1 { margin: 0; }

/* ══════════════════════════════════════════════
   German Voice Tutor
   ══════════════════════════════════════════════ */

.de-tutor {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
  gap: 12px;
  padding: 4px 2px;
}

.de-topbar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.de-topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.de-title { font-size: 18px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.de-title i { color: var(--accent); }
.de-title-sub { font-size: 12px; font-weight: 500; color: var(--text-tertiary); margin-left: 4px; }
.de-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.de-badge-level { background: var(--accent-dim); color: var(--accent-hover); border-color: transparent; }
.de-badge strong { color: var(--text-primary); font-weight: 700; }

.de-mode-selector { display: flex; gap: 4px; background: var(--bg-tertiary); padding: 3px; border-radius: 8px; border: 1px solid var(--border); }
.de-mode {
  border: none; background: transparent;
  padding: 6px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.de-mode:hover { background: var(--bg-hover); color: var(--text-primary); }
.de-mode.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }

.de-body {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.de-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.de-transcripts {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.de-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.de-panel-header {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.de-panel-de .de-panel-header { background: linear-gradient(90deg, rgba(26,115,232,0.08), transparent); }
.de-panel-en .de-panel-header { background: linear-gradient(90deg, rgba(22,163,74,0.08), transparent); }
.de-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.de-empty, .de-empty-sm {
  color: var(--text-tertiary);
  text-align: center;
  padding: 32px 16px;
  font-style: italic;
  font-size: 13px;
}
.de-empty-sm { padding: 12px 8px; font-size: 12px; }

.de-utterance {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border-left: 3px solid var(--border-light);
}
.de-ut-michael { border-left-color: var(--accent); background: rgba(26,115,232,0.04); }
.de-ut-jake { border-left-color: var(--teal); background: rgba(8,145,178,0.04); }
.de-ut-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; margin-bottom: 4px;
}
.de-ut-speaker { font-weight: 600; color: var(--text-primary); }
.de-ut-time { color: var(--text-tertiary); }
.de-ut-text { color: var(--text-primary); }

.de-err { background: var(--red-dim); color: var(--red); padding: 1px 4px; border-radius: 3px; font-weight: 500; }
.de-correction {
  margin-top: 6px; font-size: 13px; color: var(--text-secondary);
  padding: 6px 10px;
  background: var(--green-dim);
  border-radius: 6px;
  border-left: 2px solid var(--green);
}
.de-correct { color: var(--green); font-weight: 600; }
.de-rule { color: var(--text-tertiary); font-size: 11px; margin-left: 6px; font-style: italic; }
.de-explanation { color: var(--text-secondary); font-size: 12px; margin-top: 3px; line-height: 1.4; }

.de-bottombar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}
.de-mic {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  transition: all 200ms ease;
  box-shadow: 0 4px 14px rgba(26,115,232,0.35);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.de-mic:hover { background: var(--accent-hover); transform: scale(1.05); }
.de-mic.recording {
  background: var(--red);
  box-shadow: 0 4px 20px rgba(220,38,38,0.45);
  animation: de-pulse 1.2s ease-in-out infinite;
}
@keyframes de-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(220,38,38,0.45); }
  50% { box-shadow: 0 4px 30px rgba(220,38,38,0.8), 0 0 0 8px rgba(220,38,38,0.15); }
}

.de-status {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.de-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-tertiary);
  transition: var(--transition);
}
.de-status[data-status="listening"] .de-status-dot { background: var(--red); animation: de-pulse-dot 1s ease-in-out infinite; }
.de-status[data-status="processing"] .de-status-dot { background: var(--yellow); animation: de-pulse-dot 0.7s ease-in-out infinite; }
.de-status[data-status="speaking"] .de-status-dot { background: var(--green); animation: de-pulse-dot 0.8s ease-in-out infinite; }
.de-status[data-status="error"] .de-status-dot { background: var(--red); }
@keyframes de-pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.de-end-btn { background: var(--bg-tertiary); }
.de-end-btn:hover { background: var(--red-dim); color: var(--red); }

/* Side panel */
.de-sidepanel {
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow-y: auto;
  transition: width 250ms ease, padding 250ms ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.de-sidepanel.collapsed { width: 36px; padding: 8px 0; }
.de-sidepanel.collapsed .de-side-section { display: none; }
.de-side-toggle {
  position: absolute;
  top: 12px; right: 12px;
  width: 24px; height: 24px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 10px;
  z-index: 2;
}
.de-sidepanel.collapsed .de-side-toggle { right: 6px; top: 6px; }
.de-side-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

.de-side-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.de-side-section:last-child { border-bottom: none; margin-bottom: 0; }
.de-side-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.de-side-title i { color: var(--accent); font-size: 11px; }
.de-side-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.de-count {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent-hover);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.de-vocab-list, .de-mistakes-list { max-height: 240px; overflow-y: auto; padding-right: 4px; }
.de-vocab-item {
  padding: 8px 10px; margin-bottom: 6px;
  background: var(--bg-tertiary);
  border-radius: 6px; border-left: 2px solid var(--accent);
}
.de-vocab-word { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.de-vocab-meaning { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.de-gender {
  display: inline-block;
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  font-weight: 700; text-transform: lowercase;
  margin-right: 2px;
}
.de-gender-der { background: rgba(37,99,235,0.15); color: #1e40af; }
.de-gender-die { background: rgba(220,38,38,0.12); color: var(--red); }
.de-gender-das { background: rgba(22,163,74,0.12); color: var(--green); }

.de-mistake-item {
  padding: 8px 10px; margin-bottom: 6px;
  background: var(--bg-tertiary);
  border-radius: 6px; border-left: 2px solid var(--red);
}
.de-mistake-wrong { font-size: 12px; color: var(--red); }
.de-mistake-right { font-size: 12px; color: var(--green); margin-top: 2px; }
.de-mistake-rule { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; font-style: italic; }

.de-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.de-summary-stat {
  padding: 12px; background: var(--bg-tertiary); border-radius: 8px; text-align: center;
}
.de-summary-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.de-summary-value { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-top: 4px; }

.de-lesson-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

@media (max-width: 900px) {
  .de-transcripts { grid-template-columns: 1fr; }
  .de-sidepanel { width: 100%; }
  .de-body { flex-direction: column; }
}

/* ── Villa FF ── */
.vff-period-bar { display: flex; gap: 6px; align-items: center; margin-bottom: 16px; padding: 0 32px; flex-wrap: wrap; }
.vff-input { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; color: var(--text-primary); font-size: 13px; }
.vff-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; padding: 0 32px 16px; }
.vff-summary-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.vff-summary-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.vff-summary-value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.vff-summary-value-sm { font-size: 14px; font-weight: 500; margin-top: 4px; color: var(--text-secondary); }
.vff-source-note { padding: 0 32px 12px; color: var(--text-tertiary); font-size: 12px; }
.vff-os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 32px; }
.vff-os-split { grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.15fr); align-items: start; }
.vff-os-left, .vff-os-right { min-width: 0; }
.vff-os-section { margin-top: 12px; }
.vff-os-section-title { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin: 10px 0 4px; }
.vff-all-lines { width: 100%; text-align: left; padding: 9px 10px; margin: 4px 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); cursor: pointer; font-weight: 600; }
.vff-all-lines:hover, .vff-all-lines.selected { background: var(--bg-hover); border-color: var(--accent); }
.vff-tbl tr.vff-row { cursor: pointer; }
.vff-tbl tr.vff-row:hover td, .vff-tbl tr.vff-row.selected td { background: var(--bg-hover); }
.vff-tbl tr.vff-row.selected td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.vff-tbl .vff-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vff-tbl .vff-row-count { color: var(--text-tertiary); font-size: 11px; margin-left: 4px; }
.vff-tbl tr.vff-total td { font-weight: 700; border-top: 2px solid var(--border); }
.vff-net-table { margin-top: 12px; }
.vff-line-wrap { max-height: 62vh; overflow-y: auto; }
.vff-dd-meta { padding: 0 0 12px; color: var(--text-secondary); font-size: 13px; }
.vff-stmt-body { max-height: 70vh; overflow-y: auto; }
.vff-stmt-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; padding: 12px; background: var(--bg-tertiary); border-radius: 8px; font-size: 13px; }
.vff-attn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; padding: 0 32px; }
.vff-attn-card { background: var(--bg-secondary); border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 14px 16px; }
.vff-attn-card.vff-pri-high { border-left-color: #dc2626; }
.vff-attn-card.vff-pri-medium, .vff-attn-card.vff-pri-normal { border-left-color: #ca8a04; }
.vff-attn-card.vff-pri-low { border-left-color: #6b7280; }
.vff-attn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.vff-attn-title { font-weight: 600; color: var(--text-primary); }
.vff-attn-table .vff-attn-row.vff-pri-high td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
.vff-attn-table .vff-attn-row.vff-pri-medium td:first-child,
.vff-attn-table .vff-attn-row.vff-pri-normal td:first-child { box-shadow: inset 4px 0 0 #ca8a04; }
.vff-attn-table .vff-attn-row.vff-pri-low td:first-child { box-shadow: inset 4px 0 0 #6b7280; }
.vff-attn-pri { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); font-weight: 700; }
.vff-attn-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 8px; }
.vff-attn-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-tertiary); }
.vff-tbl, .vff-os-grid .fin-card { font-size: 13px; }
@media (max-width: 900px) {
  .vff-os-grid, .vff-os-split { grid-template-columns: 1fr; }
  .vff-attn-list { grid-template-columns: 1fr; }
  .vff-period-bar, .vff-summary, .vff-source-note, .vff-os-grid, .vff-attn-list { padding-left: 16px; padding-right: 16px; }
}

/* ══════════ AGENTIC INDUSTRIES ══════════ */
.ag-pill { display:inline-block; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:600; letter-spacing:0.04em; text-transform:capitalize; }
.ag-doc-badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:3px 9px; border-radius:6px;
  font-size:11px; font-weight:600; letter-spacing:0.04em;
  font-family: 'JetBrains Mono', monospace;
}
.ag-doc-badge i { font-size:10px; }

/* Hub layout: documents list left, profile + chat sidebar right. */
.ag-hub-grid { display:grid; grid-template-columns: 1fr 360px; gap:18px; padding:18px 28px 32px; align-items:flex-start; }
.ag-hub-main { min-width:0; }
.ag-hub-side { display:flex; flex-direction:column; gap:14px; position:sticky; top:18px; }
.ag-profile-card .empty { color:var(--text-secondary); font-size:12px; padding:6px 0; }
.ag-hub-chat-card { min-height: 120px; }
@media (max-width: 1100px) {
  .ag-hub-grid { grid-template-columns: 1fr; }
  .ag-hub-side { position: static; }
}

/* +Add dropdown */
.ag-add-wrap { position:relative; }
.ag-add-menu {
  position:absolute; left:0; top:calc(100% + 6px);
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(6,8,15,0.12);
  min-width: 320px;
  max-width: calc(100vw - var(--sidebar-w) - 48px);
  z-index: 200;
  overflow: hidden;
}
.ag-add-item {
  display:flex; align-items:flex-start; gap:12px;
  width: 100%;
  padding: 12px 14px;
  border:none; background:transparent; text-align:left;
  cursor:pointer;
  border-bottom: 1px solid var(--border);
}
.ag-add-item:last-child { border-bottom:none; }
.ag-add-item:hover { background: var(--bg-tertiary, #f8faff); }
.ag-add-item i { font-size: 18px; color: var(--accent); margin-top: 2px; width: 20px; text-align:center; }
.ag-add-item div { display:flex; flex-direction:column; gap:2px; }
.ag-add-item strong { font-size: 13px; color: var(--text-primary); }
.ag-add-item span { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }

/* Deliverable picker (modal) */
.ag-deliv-picker {
  max-height: 360px; overflow-y:auto;
  border:1px solid var(--border); border-radius:8px;
  background: var(--bg-tertiary, #f8faff);
  padding: 4px;
}
.ag-deliv-row {
  display:flex; align-items:center; gap:12px;
  padding: 10px 12px;
  border-radius: 6px;
  border-bottom: 1px solid transparent;
  transition: background 100ms;
}
.ag-deliv-row + .ag-deliv-row { border-top: 1px solid var(--border); border-bottom-color: transparent; }
.ag-deliv-row:hover { background: var(--bg-secondary); }
.ag-deliv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ag-deliv-info input.ag-deliv-title {
  font-weight: 600;
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  color: var(--text-primary);
}
.ag-deliv-info input.ag-deliv-title:hover,
.ag-deliv-info input.ag-deliv-title:focus {
  background: var(--bg-secondary);
  border-color: var(--border);
  outline: none;
}
.ag-deliv-info textarea.ag-deliv-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 4px 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  resize: vertical;
  min-height: 36px;
  font-family: inherit;
}
.ag-deliv-info textarea.ag-deliv-desc:hover,
.ag-deliv-info textarea.ag-deliv-desc:focus {
  background: var(--bg-secondary);
  border-color: var(--border);
  outline: none;
}
.ag-deliv-price { display:flex; gap:6px; flex-shrink:0; align-items:center; }
.ag-deliv-price input { font-size: 12px; padding: 4px 6px; width: 92px; }
.ag-deliv-cb-wrap {
  display:flex; align-items:center; justify-content:center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  cursor: pointer;
}
.ag-deliv-cb-wrap input[type=checkbox] {
  width: 18px; height: 18px;
  cursor: pointer;
  margin: 0;
}

/* Pricing-mode segmented toggle — stable, no overlap */
.ag-pmode-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-tertiary, #f8faff);
}
.ag-pmode-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ag-pmode-toggle label {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: all 120ms;
  user-select: none;
  border-right: 1px solid var(--border);
  margin: 0;
}
.ag-pmode-toggle label:last-of-type { border-right: none; }
.ag-pmode-toggle input[type="radio"]:checked + label {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.ag-pmode-toggle label:hover { color: var(--text-primary); }
.ag-pmode-toggle input[type="radio"]:checked + label:hover { color: #fff; }

/* Import-from-draft chip row above the deliverable picker */
.ag-import-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ag-import-chip {
  font-size: 11.5px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-family: 'JetBrains Mono', monospace;
}
.ag-import-chip.active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* Cadence select in deliverable picker */
.ag-deliv-cad {
  width: 80px;
  padding: 6px 4px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.ag-deliv-price {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* Send/sign tracking badges in the docs table */
.ag-track-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  margin-left: 4px;
  font-size: 10px;
  cursor: help;
  vertical-align: middle;
}
.ag-track-sent {
  background: #0ea5e914;
  color: #0ea5e9;
  border: 1px solid #0ea5e933;
}
.ag-track-signed {
  background: #10b98114;
  color: #10b981;
  border: 1px solid #10b98133;
}

/* Send dropdown menu — positioned via JS (fixed) so it escapes any
   overflow:hidden ancestors like .fin-card. */
.ag-send-wrap { display: inline-block; }
.ag-send-menu {
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  padding: 4px;
  overflow: hidden;
}
.ag-send-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  border-radius: 4px;
  white-space: nowrap;
}
.ag-send-item:hover { background: var(--bg-tertiary, #f1f5f9); }
.ag-send-item i { width: 14px; color: var(--text-secondary); }

/* Catalog editor rows */
.ag-cat-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ag-cat-row:last-child { border-bottom: none; }
.ag-cat-row input.ag-cat-title {
  font-weight: 600;
  font-size: 13px;
}
.ag-cat-row textarea.ag-cat-desc {
  font-size: 12.5px;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
}

/* Custom deliverable card inside the modal. */
.ag-deliv-custom {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-top: 6px;
  background: var(--bg-tertiary, #f8faff);
}
.ag-deliv-custom textarea, .ag-deliv-custom input { font-size: 12px; }
.ag-detail-grid { display:grid; grid-template-columns: 1fr 360px; gap:18px; padding:18px 28px 32px; align-items:flex-start; }
.ag-detail-main { display:flex; flex-direction:column; gap:14px; min-width:0; }
.ag-detail-side { position:sticky; top:18px; }
.ag-card .fin-card-header { display:flex; align-items:center; padding:12px 18px; }
.ag-chip {
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px 6px 12px;
  background: var(--accent-dim); border:1px solid rgba(26,115,232,0.25);
  border-radius:999px; font-size:13px;
}
.ag-chip-x { background:none; border:none; color:var(--text-secondary); cursor:pointer; padding:0 4px; font-size:16px; line-height:1; }
.ag-chip-x:hover { color:var(--red); }

.ag-deliverable {
  display:flex; gap:10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  transition: box-shadow 120ms;
}
.ag-deliverable:hover { box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.04)); }
.ag-deliverable.dragging { opacity:0.5; }
.ag-del-handle { color: var(--text-tertiary); cursor: grab; padding-top:6px; }
.ag-del-handle:active { cursor: grabbing; }
.ag-del-body { flex:1; display:flex; flex-direction:column; gap:6px; }
.ag-del-body input, .ag-del-body textarea { font-size: 13px; }
.ag-del-title { font-weight:600; font-size:14px !important; }
.ag-del-desc { resize:vertical; min-height:42px; }

.ag-version-row { display:flex; align-items:center; padding:10px 4px; border-bottom:1px solid var(--line-soft, #eef1f6); }
.ag-version-row:last-child { border-bottom:none; }
.ag-version-row > div:first-child { flex:1; }

.ag-chat-card { display:flex; flex-direction:column; max-height: calc(100vh - 100px); }
.ag-chat-msgs { flex:1; overflow-y:auto; padding: 14px 16px; display:flex; flex-direction:column; gap:8px; min-height: 240px; max-height: 60vh; }
.ag-chat-msg { display:flex; flex-direction:column; max-width: 85%; }
.ag-chat-msg.user { align-self:flex-end; align-items:flex-end; }
.ag-chat-msg.jake { align-self:flex-start; }
.ag-chat-msg.system { align-self:center; color: var(--text-tertiary); font-size:12px; opacity:0.85; }
.ag-chat-bubble { padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.ag-chat-msg.user .ag-chat-bubble { background: var(--accent); color:#fff; border-bottom-right-radius:4px; }
.ag-chat-msg.jake .ag-chat-bubble { background: var(--bg-tertiary); border:1px solid var(--border); border-bottom-left-radius:4px; }
.ag-chat-meta { font-size:10px; color: var(--text-tertiary); margin-top:2px; }
.ag-chat-input { display:flex; gap:8px; align-items:flex-end; padding: 10px 12px; border-top:1px solid var(--border); background: var(--bg-secondary); }
.ag-chat-input textarea { flex:1; resize:none; font-size:13px; }
.ag-chat-input .btn-primary { padding:8px 12px; }

.ag-banner {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink, #06080f); color:#fff;
  padding: 12px 18px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-size: 13px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 200ms, transform 200ms;
  z-index: 200; max-width: 360px;
}
.ag-banner.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .ag-detail-grid { grid-template-columns: 1fr; }
  .ag-detail-side { position: static; }
}

/* Setup checklist rows */
.setup-row.setup-done { background: var(--surface-2); }
.setup-row.setup-done strong { text-decoration: line-through; color: var(--text-secondary); }

/* ===== Settings: sidebar-style internal nav ===== */
.settings-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  align-items: start;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  position: sticky;
  top: 18px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms ease;
  user-select: none;
}
.settings-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-tertiary);
}
.settings-nav-item:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}
.settings-nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.settings-nav-item.active i { color: var(--accent); }
.settings-body { min-width: 0; }

@media (max-width: 700px) {
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
  }
  .settings-nav-item { flex: 0 0 auto; padding: 8px 10px; }
  .settings-nav-item span { display: none; }
}

/* ===== Cron Jobs cards ===== */
.cron-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.cron-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 150ms ease;
}
.cron-card:hover { border-color: var(--border-light); }
.cron-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}
.cron-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cron-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cron-meta code {
  background: var(--bg-primary);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}
.cron-meta-sep { color: var(--text-tertiary); opacity: 0.6; }
.cron-status-col {
  text-align: right;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.cron-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.cron-status .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cron-status-ok    { background: rgba(34,197,94,0.12); color: #15803d; }
.cron-status-ok .dot { background: #22c55e; }
.cron-status-error { background: rgba(239,68,68,0.12); color: #b91c1c; }
.cron-status-error .dot { background: #ef4444; }
.cron-status-never { background: var(--bg-primary); color: var(--text-tertiary); }
.cron-status-never .dot { background: #94a3b8; }
.cron-lastrun { font-size: 11px; color: var(--text-tertiary); }
.cron-summary {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}
.cron-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
  align-items: center;
}
.cron-expand {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}
.cron-expand:hover { background: var(--accent-dim); }
.cron-recent { margin-top: 10px; overflow-x: auto; }
.cron-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cron-recent-table th,
.cron-recent-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.cron-recent-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* ===== Heartbeat panels ===== */
.hb-stat-card { padding: 12px 14px; }
.hb-stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.hb-stat-value { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.hb-tasks { display: flex; flex-direction: column; gap: 4px; }
.hb-task {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  overflow: hidden;
}
.hb-task summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.hb-task summary::-webkit-details-marker { display: none; }
.hb-task-chev { transition: transform 150ms ease; color: var(--text-tertiary); font-size: 11px; }
.hb-task[open] .hb-task-chev { transform: rotate(90deg); }
.hb-task-body {
  margin: 0;
  padding: 8px 14px 12px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  max-height: 280px;
  overflow-y: auto;
}
.hb-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.hb-check {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.hb-check-key {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.hb-check-val { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ── Lease Generator: polished rent schedule table ── */
.lease-rent-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-tertiary, var(--bg-secondary));
  margin-top: 4px;
}
.lease-rent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lease-rent-table thead th {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  text-align: left;
}
.lease-rent-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 120ms ease;
}
.lease-rent-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}
.lease-rent-table tbody tr:hover {
  background: var(--accent-dim, rgba(99,102,241,0.06));
}
.lease-rent-table tbody td {
  padding: 6px 10px;
  vertical-align: middle;
}
.lease-rent-table input[type="date"],
.lease-rent-table input[type="number"] {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 120ms ease, background 120ms ease;
}
.lease-rent-table input:focus {
  border-color: var(--accent, #6366f1);
  background: var(--bg-secondary);
  outline: none;
}
.lease-rent-table tfoot td {
  padding: 10px;
  background: var(--bg-secondary);
  border-top: 2px solid var(--border);
  font-size: 13px;
}
.l-rent-delete {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  transition: all 120ms ease;
}
.l-rent-delete:hover {
  background: rgba(239,68,68,0.12);
  color: var(--red, #ef4444);
  border-color: rgba(239,68,68,0.25);
}
