/* ═══════════════════════════════════════════════════════════════
   SATOKIE IT DASHBOARD — Styles v3
   Design direction: Control Room / Mission-critical SaaS
   Fonts: Space Mono (mono/labels) + DM Sans (body)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap');

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:          #060A0F;
  --bg2:         #080D14;
  --surface:     #0D1219;
  --surface2:    #111820;
  --surface3:    #162030;
  --border:      rgba(255,255,255,0.06);
  --border2:     rgba(255,255,255,0.11);
  --border3:     rgba(255,255,255,0.16);
  --accent:      #1D6FE8;
  --accent-hi:   #4D9FFF;
  --accent-glow: rgba(29,111,232,0.10);
  --accent-ring: rgba(29,111,232,0.22);
  --text:        #B8C6D4;
  --text-hi:     #E2ECF6;
  --text-muted:  #4E5E70;
  --text-dim:    #2A3848;
  --green:       #22C55E;
  --yellow:      #EAB308;
  --red:         #EF4444;
  --purple:      #8B5CF6;
  --teal:        #14B8A6;
  --orange:      #F97316;
  --hover:       rgba(255,255,255,0.04);

  --r:       4px;
  --r-lg:    8px;
  --sidebar: 64px;
  --topbar:  44px;
  --font:    'DM Sans', sans-serif;
  --mono:    'Space Mono', monospace;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}
button { cursor: pointer; font-family: var(--font); }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
select { font-family: var(--mono); }
.hidden { display: none !important; }

/* ── Login ───────────────────────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}
#login-canvas { position: absolute; inset: 0; pointer-events: none; }
.login-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 44px 40px;
  width: 360px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 0 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(29,111,232,0.08);
}
.login-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(29,111,232,0.4);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--mono); font-weight: 700;
  font-size: 15px; letter-spacing: 0.16em;
  color: var(--text-hi); text-transform: uppercase;
}
.login-card h1 {
  font-family: var(--mono); font-weight: 700;
  font-size: 24px; color: var(--text-hi); letter-spacing: 0.02em;
  text-transform: uppercase;
}
.login-sub {
  font-size: 11px; color: var(--text-muted);
  font-family: var(--mono); margin-bottom: 6px;
  text-align: center; line-height: 1.6;
}
#login-btn {
  display: flex; align-items: center; gap: 9px; justify-content: center;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--r);
  padding: 11px 24px; font-size: 13px; font-weight: 600;
  width: 100%; margin-top: 8px;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 4px 24px rgba(29,111,232,0.3);
  letter-spacing: 0.02em;
}
#login-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ── App Shell ───────────────────────────────────────────────── */
#main-app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center;
  padding: 10px 0 10px;
  height: 100vh;
  overflow: hidden;
  gap: 1px;
  background-image: none;
  z-index: 10;
}

.sidebar-brand {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.sidebar-brand .brand-icon {
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 10px; box-shadow: 0 0 14px rgba(29,111,232,0.3);
}
.sidebar-brand .brand-name { display: none; }

#tab-bar {
  display: flex; flex-direction: column; gap: 1px;
  width: 100%; align-items: center; padding: 0 8px;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 52px;
  padding: 8px 4px;
  background: transparent; border: none;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: background .12s, color .12s;
  position: relative;
  cursor: pointer;
  gap: 4px;
}
.tab:hover { background: var(--surface2); color: var(--text); }
.tab:hover svg { stroke: var(--text); }
.tab.active { background: rgba(29,111,232,0.14); color: var(--accent-hi); }
.tab.active svg { stroke: var(--accent-hi); opacity: 1; }
.tab.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.tab svg { opacity: 0.55; flex-shrink: 0; stroke: var(--text-muted); transition: stroke .12s; }

.tab span:not(.tab-badge) {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.7;
}
.tab.active span:not(.tab-badge) { opacity: 1; }

.tab-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--accent); color: #fff;
  font-size: 8px; font-family: var(--mono); font-weight: 700;
  width: 14px; height: 14px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.tab-badge:not(:empty) { display: flex; }

.tab-sep { width: 32px; height: 1px; background: var(--border); margin: 3px 0; }

.sidebar-bottom {
  margin-top: auto;
  padding: 10px 8px 0;
  border-top: 1px solid var(--border);
  width: 100%;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.sidebar-user { display: flex; justify-content: center; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface3); color: var(--accent-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 9px;
  border: 1px solid var(--border2); cursor: default;
}
.user-meta { display: none; }
#logout-btn {
  width: 30px; height: 30px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s, border-color .12s;
}
#logout-btn:hover {
  background: rgba(239,68,68,.08);
  color: var(--red);
  border-color: rgba(239,68,68,.25);
}
#logout-btn span { display: none; }

/* ── Top bar ─────────────────────────────────────────────────── */
.content-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,13,20,0.95);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.page-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--text-hi); letter-spacing: 0.10em; text-transform: uppercase;
}
.breadcrumb-sep { color: var(--text-dim); font-size: 11px; }
.page-sub {
  font-family: var(--mono); font-size: 10px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ── Content ─────────────────────────────────────────────────── */
#content { display: flex; flex-direction: column; height: 100vh; background: transparent; overflow: hidden; }
.panel { flex: 1; overflow-y: auto; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 9px; font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}
.b-blue   { background: rgba(29,111,232,0.12);  color: #4D9FFF;  border-left: 2px solid #1D6FE8; }
.b-green  { background: rgba(34,197,94,0.10);   color: #4ADE80;  border-left: 2px solid #22C55E; }
.b-yellow { background: rgba(234,179,8,0.10);   color: #FCD34D;  border-left: 2px solid #EAB308; }
.b-gray   { background: rgba(255,255,255,0.04); color: #4E5E70;  border-left: 2px solid #2A3848; }
.b-red    { background: rgba(239,68,68,0.10);   color: #F87171;  border-left: 2px solid #EF4444; }
.b-purple { background: rgba(139,92,246,0.10);  color: #A78BFA;  border-left: 2px solid #8B5CF6; }
.b-teal   { background: rgba(20,184,166,0.10);  color: #2DD4BF;  border-left: 2px solid #14B8A6; }

/* ── Stat row ────────────────────────────────────────────────── */
.ov-stats-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  height: 56px;
  background: rgba(0,0,0,0.2);
}
.stat-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.stat-val {
  font-family: var(--mono); font-size: 22px; font-weight: 700;
  color: var(--text-hi); line-height: 1;
}
.stat-label {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-dim);
}
.ov-greeting {
  margin-left: auto; padding: 0 20px;
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--text-muted);
}
#ov-greeting-text { color: var(--accent-hi); font-weight: 700; }
.ov-date { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

/* ── Overview layout ─────────────────────────────────────────── */
#overview { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.ov-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ov-left {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.ov-right {
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ── Widgets ─────────────────────────────────────────────────── */
.widget { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); }
.widget-tall { flex: 1; min-height: 0; overflow: hidden; }
.widget:last-child { border-bottom: none; }
.widget-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; height: 34px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}
.widget-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim);
}
.widget-title-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px rgba(77,159,255,0.6);
  flex-shrink: 0;
}
.widget-meta { font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.widget-controls { display: flex; align-items: center; gap: 6px; }
.widget-bd { overflow-y: auto; flex: 1; }
.widget-loading { padding: 20px 14px; text-align: center; color: var(--text-muted); font-size: 11px; font-family: var(--mono); }

.see-all-btn {
  background: transparent; border: none;
  color: var(--accent); font-size: 10px; font-family: var(--mono);
  cursor: pointer; transition: color .12s; white-space: nowrap;
  letter-spacing: 0.04em;
}
.see-all-btn:hover { color: var(--accent-hi); }

.mini-select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 3px 8px;
  border-radius: var(--r); font-size: 10px; font-family: var(--mono);
  cursor: pointer; appearance: none;
  transition: border-color .12s;
}
.mini-select:focus { border-color: var(--accent); outline: none; }

/* ── Overview: Calendar widget ───────────────────────────────── */
.ov-event {
  display: grid;
  grid-template-columns: 44px 2px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .1s;
  border-radius: 0;
}
.ov-event:last-child { border-bottom: none; }
.ov-event:hover { background: var(--surface2); }
.ov-event-time { font-family: var(--mono); font-size: 10px; color: var(--text-muted); text-align: right; line-height: 1.4; }
.ov-event-line { width: 2px; height: 28px; border-radius: 1px; background: var(--accent); align-self: center; }
.ov-event-title { font-size: 12px; font-weight: 500; color: var(--text-hi); line-height: 1.3; }
.ov-event-sub { font-size: 10px; color: var(--text-muted); margin-top: 1px; font-family: var(--mono); }
.ov-no-events { padding: 18px 14px; text-align: center; color: var(--text-muted); font-size: 11px; font-family: var(--mono); }

/* ── Overview: Teams widget ──────────────────────────────────── */
.ov-chat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.ov-chat-item:hover { background: var(--surface2); }
.ov-chat-item:last-child { border-bottom: none; }
.ov-chat-avatar {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--surface3); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 9px;
  color: var(--accent-hi); flex-shrink: 0;
}
.ov-chat-name { font-size: 12px; font-weight: 500; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-chat-type { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }
.ov-unread-badge {
  margin-left: auto; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 9px; font-family: var(--mono); font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Overview: Jira widget ───────────────────────────────────── */
.ov-jira-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: rgba(0,0,0,0.15);
  flex-wrap: wrap;
}
.ov-jira-search {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 4px 10px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); flex: 1; min-width: 120px;
  transition: border-color .12s;
}
.ov-jira-search::placeholder { color: var(--text-dim); }
.ov-jira-search:focus { border-color: var(--accent); outline: none; }

.ov-ticket {
  display: grid;
  grid-template-columns: 3px 72px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.ov-ticket:last-child { border-bottom: none; }
.ov-ticket:hover { background: var(--surface2); }

.prio-dot {
  width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; align-self: center;
}
.prio-high    { background: var(--red);    box-shadow: 0 0 5px rgba(239,68,68,.4); }
.prio-medium  { background: var(--yellow); }
.prio-low     { background: var(--green);  }
.prio-default { background: var(--text-dim); }

.ov-ticket-key { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent-hi); white-space: nowrap; }
.ov-ticket-summary { font-size: 12px; color: var(--text-hi); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-ticket-sub { font-size: 10px; color: var(--text-muted); margin-top: 1px; font-family: var(--mono); }
.ov-ticket-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ov-ticket-main { min-width: 0; }

/* ── Panel title bar ─────────────────────────────────────────── */
.panel-title-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-heading {
  font-family: var(--mono); font-weight: 700;
  font-size: 18px; color: var(--text-hi);
  letter-spacing: 0.02em; text-transform: uppercase;
}
.panel-meta-txt { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }

/* ── Planner ─────────────────────────────────────────────────── */
#planner { padding: 20px 24px; overflow-y: auto; background: transparent; }

.planner-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.planner-sort-group {
  display: flex; align-items: center; gap: 5px;
}
.sort-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.08em; margin-right: 2px;
}
.sort-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 4px 11px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono);
  transition: all .15s; cursor: pointer;
}
.sort-btn:hover { border-color: var(--border2); color: var(--text); }
.sort-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 8px; }
.task-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, transform .1s;
  position: relative; overflow: hidden; cursor: pointer;
}
.task-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0;
  transition: opacity .15s;
}
.task-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.task-card:hover::before { opacity: 1; }
.task-card.done { opacity: .35; }
.task-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.task-title { font-size: 13px; font-weight: 500; color: var(--text-hi); line-height: 1.4; }
.progress-bar { height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 1px; transition: width .3s; }
.progress-fill.done { background: var(--green); }
.task-footer { display: flex; justify-content: space-between; align-items: center; }
.task-due { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }
.task-due.overdue { color: var(--red); }
.task-detail-hint {
  font-size: 9px; color: var(--text-dim); font-family: var(--mono);
  opacity: 0; transition: opacity .15s;
}
.task-card:hover .task-detail-hint { opacity: 1; }

/* ── Task detail modal ───────────────────────────────────────── */
.task-modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  animation: modal-in .15s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.task-modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r-lg); width: 520px; max-width: 94vw;
  max-height: 80vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.9);
  overflow: hidden;
}
.task-modal-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.task-modal-title {
  font-size: 15px; font-weight: 600; color: var(--text-hi); line-height: 1.3;
}
.task-modal-plan {
  font-size: 10px; color: var(--text-muted); font-family: var(--mono);
  margin-top: 3px;
}
.task-modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 14px; padding: 0 2px; line-height: 1;
  transition: color .12s; flex-shrink: 0; margin-left: 12px;
}
.task-modal-close:hover { color: var(--text-hi); }
.task-modal-body {
  overflow-y: auto; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.td-row { display: flex; gap: 20px; flex-wrap: wrap; }
.td-field { display: flex; flex-direction: column; gap: 5px; }
.td-lbl { font-size: 9px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .10em; color: var(--text-dim); }
.td-val { font-size: 13px; color: var(--text-muted); font-family: var(--mono); }
.td-overdue { color: var(--red); }
.td-progress-wrap { display: flex; align-items: center; gap: 10px; }
.td-progress-bar { height: 4px; width: 160px; background: var(--border); border-radius: 2px; overflow: hidden; }
.td-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.td-progress-fill.done { background: var(--green); }
.td-pct { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.td-section { display: flex; flex-direction: column; gap: 6px; }
.td-section-lbl { font-size: 9px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .10em; color: var(--text-dim); }
.td-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; border-left: 2px solid var(--border2); padding-left: 10px; }
.td-checklist { display: flex; flex-direction: column; gap: 5px; }
.td-check-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
}
.td-check-item.checked { color: var(--text-dim); text-decoration: line-through; }
.td-check-box {
  width: 14px; height: 14px; border-radius: 2px;
  border: 1px solid var(--border2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--green); background: var(--surface2);
}
.td-check-item.checked .td-check-box { background: rgba(34,197,94,.12); border-color: var(--green); }

/* ── Calendar ────────────────────────────────────────────────── */
#calendar { padding: 20px 24px; overflow-y: auto; background: transparent; }

.cal-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cal-title-block { display: flex; align-items: baseline; gap: 10px; }
.cal-legend { display: flex; align-items: center; gap: 6px; }
.cal-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px rgba(77,159,255,0.5);
}
.cal-legend-txt { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }

.cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 400px;
}
.cal-day-col {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  background: var(--surface);
  transition: background .1s;
}
.cal-day-col:last-child { border-right: none; }
.cal-day-col.today {
  background: rgba(29,111,232,0.05);
  border-right: 1px solid rgba(29,111,232,0.15);
}

.cal-day-hd {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex-shrink: 0;
}
.cal-day-col.today .cal-day-hd {
  background: rgba(29,111,232,0.10);
  border-bottom-color: rgba(29,111,232,0.2);
}
.cal-day-name {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-dim);
}
.cal-day-col.today .cal-day-name { color: var(--accent-hi); }
.cal-day-num {
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  color: var(--text-muted); line-height: 1;
}
.cal-day-num.today-num {
  color: var(--accent-hi);
  text-shadow: 0 0 14px rgba(77,159,255,0.4);
}
.cal-month-abbr {
  font-size: 9px; font-family: var(--mono);
  color: var(--text-dim); text-transform: uppercase;
}

.cal-day-events {
  flex: 1; padding: 8px 6px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
}
.cal-no-events {
  color: var(--text-dim); font-size: 11px;
  font-family: var(--mono); text-align: center;
  padding-top: 12px;
}
.cal-event-block {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r); padding: 6px 8px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .12s, background .1s;
  cursor: default;
}
.cal-event-block:hover { background: var(--surface3); border-color: var(--border2); }
/* Clickable calendar events */
.cal-event-block.clickable { cursor: pointer; }
.cal-event-block.clickable:hover {
  background: var(--surface3);
  border-left-color: var(--accent-hi);
  border-color: var(--border2);
}
.cal-event-hint {
  font-size: 9px; color: var(--text-muted);
  margin-top: 2px; opacity: 0;
  transition: opacity .15s;
  font-family: var(--mono);
}
.cal-event-block.clickable:hover .cal-event-hint { opacity: 1; }

.cal-event-time {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--accent-hi); letter-spacing: 0.03em;
}
.cal-event-title {
  font-size: 11px; font-weight: 500; color: var(--text-hi);
  line-height: 1.3; word-break: break-word;
}
.cal-event-loc {
  font-size: 9px; color: var(--text-muted); font-family: var(--mono);
}
.cal-event-atts {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: 1px;
}
.att-chip {
  font-size: 9px; padding: 1px 5px; border-radius: 2px;
  background: var(--surface3); color: var(--text-muted);
  border: 1px solid var(--border); font-family: var(--mono);
}

/* ── Teams panel ─────────────────────────────────────────────── */
#teams { display: flex; flex-direction: column; height: 100%; }
.teams-panel-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: rgba(0,0,0,0.15);
}
.teams-panel-heading {
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  color: var(--text-hi); letter-spacing: .04em; text-transform: uppercase;
}
.teams-layout {
  display: grid; grid-template-columns: 260px 1fr;
  flex: 1; overflow: hidden;
}
.chat-list-col { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); display: flex; flex-direction: column; }

.chat-list-toolbar {
  padding: 8px 10px 6px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: rgba(0,0,0,0.2);
  display: flex; flex-direction: column; gap: 6px;
}
.chat-search-input {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 5px 10px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); width: 100%;
  transition: border-color .12s;
}
.chat-search-input::placeholder { color: var(--text-dim); }
.chat-search-input:focus { border-color: var(--accent); outline: none; }
.chat-filter-row { display: flex; gap: 4px; }
.chat-filter-btn {
  flex: 1; padding: 3px 6px; border-radius: var(--r);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 9px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: all .12s; cursor: pointer;
}
.chat-filter-btn:hover { border-color: var(--border2); color: var(--text); }
.chat-filter-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent-hi); }
.chat-empty-state {
  padding: 20px 14px; text-align: center;
  color: var(--text-muted); font-size: 11px; font-family: var(--mono);
}

.chat-row {
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
  position: relative;
}
.chat-row:hover { background: var(--surface2); }
.chat-row.active { background: var(--accent-glow); border-left: 2px solid var(--accent); }
.chat-row-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface3); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 10px;
  color: var(--accent-hi); flex-shrink: 0;
  overflow: hidden;
}
img.chat-row-avatar.photo {
  object-fit: cover; border: 1px solid var(--border2);
  display: block;
}
.chat-row-name { font-size: 12px; font-weight: 500; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-type { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }

.msg-col { display: flex; flex-direction: column; background: var(--bg); overflow: hidden; height: 100%; }
.msg-col-hd {
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface); font-size: 11px; font-weight: 500;
  color: var(--text-hi); flex-shrink: 0; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.msg-empty { display: flex; align-items: center; justify-content: center; flex: 1; color: var(--text-muted); font-size: 11px; font-family: var(--mono); }
.msg-list { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; flex: 1; }
.msg-item { display: flex; flex-direction: column; gap: 3px; }
.msg-hd { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-size: 12px; font-weight: 600; color: var(--text-hi); font-family: var(--mono); }
.msg-time { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }
.msg-body-txt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.msg-empty-inline { padding: 24px 18px; color: var(--text-muted); font-size: 11px; font-family: var(--mono); }

.msg-item.outgoing .msg-body-txt { color: var(--text-hi); }
.msg-item.outgoing .msg-author-you { color: var(--accent-hi); }

.chat-row.unread .chat-row-name { color: var(--text-hi); font-weight: 600; }
.unread-dot {
  margin-left: auto; flex-shrink: 0;
  background: var(--accent); color: #fff;
  font-size: 9px; font-family: var(--mono); font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.reply-box {
  flex-shrink: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 7px;
}
.reply-ta {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 8px 12px; border-radius: var(--r);
  font-size: 13px; font-family: var(--font); resize: none;
  transition: border-color .15s; line-height: 1.5;
  min-height: 52px; max-height: 120px;
}
.reply-ta::placeholder { color: var(--text-dim); }
.reply-ta:focus { border-color: var(--accent); outline: none; }
.reply-actions {
  display: flex; align-items: center; justify-content: space-between;
}
.reply-hint { font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.reply-send-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff; border: none;
  padding: 6px 14px; border-radius: var(--r);
  font-size: 11px; font-weight: 600; font-family: var(--mono);
  transition: opacity .15s;
}
.reply-send-btn:hover { opacity: .85; }
.reply-send-btn:disabled { opacity: .3; cursor: not-allowed; }

mark.search-highlight {
  background: rgba(234,179,8,0.25); color: var(--yellow);
  border-radius: 2px; padding: 0 2px;
}

/* ── Meetings panel ──────────────────────────────────────────── */
#meetings { padding: 20px 24px; overflow-y: auto; background: transparent; }

.meetings-toolbar {
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.meetings-toolbar-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.meetings-toolbar-actions { margin-left: auto; display: flex; gap: 6px; }
.mtg-tool-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 5px 12px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono);
  transition: all .15s; cursor: pointer;
}
.mtg-tool-btn:hover { border-color: var(--border2); color: var(--text); }

.mtg-search-input {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); width: 100%;
  transition: border-color .15s;
}
.mtg-search-input::placeholder { color: var(--text-dim); }
.mtg-search-input:focus { border-color: var(--accent); outline: none; }

.meetings-list { display: flex; flex-direction: column; gap: 8px; }
.meeting-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s;
  position: relative;
}
.meeting-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: 0; transition: opacity .15s;
}
.meeting-card:hover { border-color: var(--border2); }
.meeting-card.open::before { opacity: 1; }
.meeting-hd {
  padding: 12px 16px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  cursor: pointer; user-select: none;
}
.meeting-title-block { display: flex; flex-direction: column; gap: 4px; }
.meeting-title-txt { font-size: 13px; font-weight: 500; color: var(--text-hi); }
.meeting-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meeting-date-txt, .meeting-dur { font-size: 10px; color: var(--text-muted); font-family: var(--mono); }
.meeting-chevron { color: var(--text-dim); font-size: 14px; transition: transform .2s; flex-shrink: 0; }
.meeting-card.open .meeting-chevron { transform: rotate(180deg); }
.meeting-body { display: none; padding: 0 16px 16px; flex-direction: column; gap: 12px; }
.meeting-card.open .meeting-body { display: flex; }

.section-lbl {
  font-size: 9px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-dim); margin-bottom: 5px;
}
.section-lbl-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 5px;
}
.section-lbl-row .section-lbl { margin-bottom: 0; }

.copy-actions-btn {
  display: flex; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 3px 9px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono);
  transition: all .15s; cursor: pointer;
}
.copy-actions-btn:hover { border-color: var(--accent); color: var(--accent-hi); background: var(--accent-glow); }

.meeting-overview-txt {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
  border-left: 2px solid var(--border2); padding-left: 10px;
}
.participants-row { display: flex; flex-wrap: wrap; gap: 5px; }
.participant-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 2px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); font-family: var(--mono);
}
.p-avatar {
  width: 16px; height: 16px; border-radius: 2px;
  background: var(--accent-glow); color: var(--accent-hi);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; font-family: var(--mono);
}
.assignee-block { display: flex; flex-direction: column; gap: 6px; }
.assignee-hd { display: flex; align-items: center; gap: 6px; }
.assignee-name-txt { font-size: 12px; font-weight: 600; color: var(--text-hi); }
.action-list { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.action-item {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.action-item::before {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 7px;
}

/* ── Jira panel ──────────────────────────────────────────────── */
#jira { padding: 20px 24px; overflow-y: auto; background: transparent; }
.jira-toolbar {
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px; flex-wrap: wrap;
}
.jira-search {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 7px 12px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); flex: 1; min-width: 140px;
  transition: border-color .15s;
}
.jira-search::placeholder { color: var(--text-dim); }
.jira-search:focus { border-color: var(--accent); outline: none; }
.jira-filter {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 7px 10px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono); appearance: none; cursor: pointer;
  transition: border-color .15s;
}
.jira-filter:focus { border-color: var(--accent); outline: none; }

.jira-resolved-toggle {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono);
  transition: all .15s; cursor: pointer; white-space: nowrap;
}
.jira-resolved-toggle:hover { border-color: var(--border2); color: var(--text); }
.jira-resolved-toggle.active {
  background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3);
  color: #4ADE80;
}

.jira-count { font-size: 10px; color: var(--text-muted); font-family: var(--mono); margin-left: auto; }
.jira-list { display: flex; flex-direction: column; gap: 6px; }
.jira-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; transition: border-color .15s;
  position: relative;
}
.jira-card:hover { border-color: var(--border2); }
.jira-card.open { border-color: var(--accent-ring); border-left: 2px solid var(--accent); }
.jira-card.resolved { opacity: 0.55; }
.jira-card.resolved:hover { opacity: 0.75; }
.jira-card-row {
  display: grid; grid-template-columns: 3px 72px 1fr auto;
  align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer;
}
.jira-key-link { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent-hi); }
.jira-key-link:hover { text-decoration: underline; }
.jira-info-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jira-summary-txt { font-size: 13px; font-weight: 500; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jira-tags-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.jira-right-col { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.expand-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 3px 9px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono);
  transition: all .15s; white-space: nowrap;
}
.expand-btn:hover { border-color: var(--accent); color: var(--accent-hi); background: var(--accent-glow); }
.jira-detail {
  display: none; padding: 0 14px 12px;
  flex-direction: column; gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.jira-card.open .jira-detail { display: flex; }
.transitions-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-top: 6px; }
.trans-lbl { font-size: 9px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .10em; color: var(--text-dim); }
.trans-btn {
  padding: 3px 10px; border-radius: 2px;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text-muted); font-size: 10px; font-family: var(--mono);
  cursor: pointer; transition: all .15s;
}
.trans-btn:hover { border-color: var(--accent); color: var(--accent-hi); background: var(--accent-glow); }
.comments-list { display: flex; flex-direction: column; gap: 8px; max-height: 160px; overflow-y: auto; }
.comment-item { display: flex; flex-direction: column; gap: 2px; }
.comment-who { font-size: 11px; font-weight: 600; color: var(--text-hi); font-family: var(--mono); }
.comment-when { font-size: 10px; font-family: var(--mono); color: var(--text-dim); }
.comment-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.comment-input-row { display: flex; gap: 7px; }
.comment-ta {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 7px 10px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); resize: none; min-height: 52px;
  transition: border-color .15s;
}
.comment-ta:focus { border-color: var(--accent); outline: none; }
.comment-ta::placeholder { color: var(--text-dim); }
.comment-post-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 7px 12px; border-radius: var(--r);
  font-size: 11px; font-weight: 600; align-self: flex-end;
  transition: opacity .15s; font-family: var(--mono);
}
.comment-post-btn:hover { opacity: .85; }
.comment-post-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── States ──────────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 20px;
  color: var(--text-muted); gap: 5px; text-align: center;
}
.empty-title { font-size: 13px; font-weight: 600; color: var(--text-muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.empty-sub { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.error-block {
  padding: 10px 14px; border-radius: var(--r);
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.18);
  border-left: 2px solid var(--red);
  color: #F87171; font-size: 11px; font-family: var(--mono);
}
.skel {
  background: var(--surface2); border-radius: var(--r);
  animation: skel-pulse 1.4s ease-in-out infinite;
}
@keyframes skel-pulse { 0%,100% { opacity:.3 } 50% { opacity:.6 } }
.skel-wrap { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; }

/* ── Planner header + filters ────────────────────────────────── */
.planner-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.planner-header-left { display: flex; align-items: baseline; gap: 10px; }
.planner-header-right { display: flex; align-items: center; gap: 8px; }

.planner-show-completed-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); padding: 5px 12px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono); cursor: pointer;
  transition: all .15s;
}
.planner-show-completed-btn:hover { border-color: var(--border2); color: var(--text); }
.planner-show-completed-btn.active { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.3); color: #4ADE80; }

.planner-filter-group { display: flex; align-items: center; gap: 6px; }
.planner-filter-sel {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); padding: 5px 10px; border-radius: var(--r);
  font-size: 10px; font-family: var(--mono); appearance: none; cursor: pointer;
  transition: border-color .15s;
}
.planner-filter-sel:focus { border-color: var(--accent); outline: none; }

.task-bucket-lbl {
  font-size: 9px; font-family: var(--mono); color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Planner edit modal fields ───────────────────────────────── */
.tm-field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.tm-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 140px; }
.tm-select, .tm-input {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 7px 10px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font);
  transition: border-color .15s; appearance: none;
}
.tm-select:focus, .tm-input:focus { border-color: var(--accent); outline: none; }
.tm-textarea {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 8px 10px; border-radius: var(--r);
  font-size: 12px; font-family: var(--font); resize: vertical;
  transition: border-color .15s; line-height: 1.5; width: 100%;
}
.tm-textarea:focus { border-color: var(--accent); outline: none; }
.tm-textarea::placeholder { color: var(--text-dim); }
.tm-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding-top: 4px;
}
.tm-save-status { font-size: 11px; font-family: var(--mono); }
.tm-save-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 8px 20px; border-radius: var(--r);
  font-size: 12px; font-weight: 600; font-family: var(--mono);
  transition: opacity .15s; cursor: pointer;
}
.tm-save-btn:hover { opacity: .85; }
.tm-save-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ── Action item row (Fireflies + Planner button) ────────────── */
.action-item-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; padding: 2px 0;
}
.action-item-row .action-item { flex: 1; }

.add-to-planner-btn {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); padding: 2px 8px; border-radius: var(--r);
  font-size: 9px; font-family: var(--mono); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer; transition: all .15s; white-space: nowrap;
  margin-top: 2px;
}
.add-to-planner-btn:hover {
  border-color: var(--accent); color: var(--accent-hi);
  background: var(--accent-glow);
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cal-week-grid { grid-template-columns: repeat(7, 1fr); }
  .cal-event-title { font-size: 10px; }
}
@media (max-width: 900px) {
  .ov-grid { grid-template-columns: 1fr; }
  .cal-week-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  :root { --sidebar: 52px; }
  .cal-week-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   PATCH v3 — New styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Overview Planner widget ─────────────────────────────────── */
.ov-planner-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.ov-planner-item:last-child { border-bottom: none; }
.ov-planner-item:hover { background: var(--surface2); }

.ov-planner-left { flex-shrink: 0; }

.ov-planner-pct-ring {
  position: relative; width: 28px; height: 28px;
}
.ov-planner-pct-txt {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 700; color: var(--text-muted);
  pointer-events: none; font-family: var(--mono);
}

.ov-planner-info { flex: 1; min-width: 0; }
.ov-planner-title {
  font-size: 12px; font-weight: 500; color: var(--text-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-planner-title.done { text-decoration: line-through; color: var(--text-muted); }
.ov-planner-due {
  font-size: 10px; color: var(--text-muted); margin-top: 2px; font-family: var(--mono);
}
.ov-planner-due.overdue { color: var(--red); font-weight: 600; }
.ov-planner-arrow {
  font-size: 14px; color: var(--text-muted);
  opacity: 0; transition: opacity .15s;
}
.ov-planner-item:hover .ov-planner-arrow { opacity: 1; }

/* ── Calendar event detail modal ─────────────────────────────── */
.cev-modal { max-width: 560px !important; }

.cev-join-btn {
  display: inline-block; padding: 5px 14px;
  background: var(--accent); color: #fff;
  border-radius: var(--r); font-size: 12px; font-weight: 600;
  text-decoration: none; transition: opacity .15s;
  font-family: var(--mono);
}
.cev-join-btn:hover { opacity: .85; text-decoration: none; }

.cev-attendees { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.cev-att-row { display: flex; align-items: center; gap: 7px; }
.cev-att-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cev-att-name { font-size: 12px; color: var(--text); font-family: var(--mono); }
.cev-att-resp { font-size: 10px; color: var(--text-muted); margin-left: auto; font-family: var(--mono); }

.cev-body { margin-top: 4px; }
.cev-body-text {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.6; white-space: pre-wrap;
  max-height: 200px; overflow-y: auto;
  background: var(--bg); padding: 8px 10px;
  border-radius: var(--r); border: 1px solid var(--border);
  font-family: var(--font);
}
.cev-links { margin-top: 10px; }
.cev-links-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim);
  margin-bottom: 6px; font-family: var(--mono);
}
.cev-link {
  display: block; font-size: 12px; color: var(--accent-hi);
  text-decoration: none; padding: 5px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.cev-link:last-child { border-bottom: none; }
.cev-link:hover { text-decoration: underline; color: var(--text-hi); }