/**
 * DiaTech OS — Styles v2
 * Revolut-inspired palette: чёрные CTA, приглушённый золотой акцент,
 * тёплые чистые нейтрали. Без emoji, без красного/синего/зелёного/фиолетового.
 *
 * Brand derivation:
 *   #FFED00 (лого) → #C4A600 (UI gold, приглушённый)
 *   #1C1B17 (лого) → primary button + text
 */

/* ======================== FONTS ======================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

@font-face {
  font-family: 'Avenir Next';
  src: url('../ofont.ru_Avenir Next.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

/* ======================== LIGHT THEME (DEFAULT) ======================== */
:root {
  /* Surfaces — тёплый linen-white, не графит */
  --bg: #F8F7F4;
  --bg-secondary: #F0EFEC;
  --surface: #FFFFFF;
  --surface-hover: #FAFAF8;
  --surface-2: #F4F3F0;

  /* Text — тёплый, чистый */
  --text: #1A1918;
  --text-secondary: #6B6A64;
  --text-muted: #A5A49E;

  /* Borders — едва заметные тёплые линии */
  --border: #E8E7E2;
  --border-light: #F2F1ED;

  /* Primary action = near-black (Revolut pattern) */
  --accent: #1A1918;
  --accent-hover: #2D2C28;
  --accent-light: rgba(26,25,24,0.05);
  --accent-text: #FFFFFF;

  /* Gold — приглушённый, из бренда #FFED00 → sophisticated */
  --gold: #C4A600;
  --gold-hover: #AD9300;
  --gold-light: rgba(196,166,0,0.07);
  --gold-subtle: rgba(196,166,0,0.04);
  --gold-text: #8A7500;
  --gold-on-dark: #D4C200;

  /* Semantic — тёплые нейтрали + gold */
  --success: #4A4A44;
  --success-light: #F0EFEC;
  --success-text: #3A3A35;
  --warning: #C4A600;
  --warning-light: rgba(196,166,0,0.07);
  --warning-text: #8A7500;
  --danger: #9A4030;
  --danger-light: rgba(154,64,48,0.07);
  --danger-text: #7A3025;
  --info: #6B6A64;
  --info-light: #F0EFEC;
  --info-text: #5C5B56;

  /* Shadows — мягкие, едва ощутимые */
  --shadow-sm: 0 1px 3px rgba(26,25,24,0.04), 0 1px 2px rgba(26,25,24,0.03);
  --shadow-md: 0 4px 12px rgba(26,25,24,0.06);
  --shadow-lg: 0 12px 32px rgba(26,25,24,0.08);

  /* Radii — крупнее, premium feel */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Cards — на свету без бордера, только тень */
  --card-border: transparent;
  --card-shadow: var(--shadow-sm);

  /* Sidebar — тёмный, акцент = gold */
  --sidebar-width: 260px;
  --sidebar-bg: #1A1918;
  --sidebar-text: #8A8984;
  --sidebar-text-hover: #FFFFFF;
  --sidebar-active-bg: rgba(196,166,0,0.08);
  --sidebar-active-text: #D4C200;
  --sidebar-border: #2D2C28;

  --header-height: 56px;
  --transition: 0.15s ease;
}

/* ======================== DARK THEME ======================== */
[data-theme="dark"] {
  --bg: #141413;
  --bg-secondary: #1C1C1A;
  --surface: #222220;
  --surface-hover: #2A2A28;
  --surface-2: #262624;

  --text: #EFEEEA;
  --text-secondary: #A5A49E;
  --text-muted: #6B6A64;

  --border: #2D2C28;
  --border-light: #222220;

  /* Dark mode: primary button инвертирован (Revolut pattern) */
  --accent: #EFEEEA;
  --accent-hover: #D8D7D3;
  --accent-light: rgba(239,238,234,0.06);
  --accent-text: #1A1918;

  --gold: #D4C200;
  --gold-hover: #C4B400;
  --gold-light: rgba(212,194,0,0.08);
  --gold-subtle: rgba(212,194,0,0.04);
  --gold-text: #E8DA40;
  --gold-on-dark: #D4C200;

  --success: #5A5A54;
  --success-light: #262624;
  --success-text: #B8B8B2;
  --warning: #D4C200;
  --warning-light: rgba(212,194,0,0.08);
  --warning-text: #E8DA40;
  --danger: #C0705A;
  --danger-light: rgba(192,112,90,0.10);
  --danger-text: #E0A090;
  --info: #7A7A74;
  --info-light: #262624;
  --info-text: #9A9A94;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);

  /* Cards — в тёмной теме нужен тонкий бордер */
  --card-border: var(--border);
  --card-shadow: none;

  --sidebar-bg: #0E0E0D;
  --sidebar-text: #6B6A64;
  --sidebar-text-hover: #EFEEEA;
  --sidebar-active-bg: rgba(212,194,0,0.08);
  --sidebar-active-text: #D4C200;
  --sidebar-border: #222220;
}

/* ======================== RESET ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }

/* ======================== SCROLLBAR ======================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ======================== LOGIN SCREEN ======================== */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #1A1918; padding: 20px;
}
.login-box {
  width: 100%; max-width: 420px; background: #FFFFFF;
  border: none;
  border-radius: var(--radius-xl); padding: 52px 44px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35); text-align: center; color: #1A1918;
}
.login-logo-wrap { margin-bottom: 20px; }
.login-logo-img { height: 38px; width: auto; }
.login-logo { font-family: 'Avenir Next', 'Inter', sans-serif; font-size: 28px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; color: #1A1918; }
.login-logo span { color: #C4A600; font-weight: 700; }
.login-subtitle { font-size: 12px; color: #A5A49E; margin-bottom: 36px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.login-error { background: var(--danger-light); color: var(--danger-text); padding: 10px 16px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 16px; display: none; }
.login-error.show { display: block; }

/* ======================== FORMS ======================== */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group-inline { display: flex; align-items: center; gap: 12px; }
.form-group-inline label { margin-bottom: 0; white-space: nowrap; }
.form-input {
  width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text); font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }

/* ======================== BUTTONS ======================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border: 1px solid transparent; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--transition); line-height: 1.4; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-gold { background: var(--gold); color: #FFFFFF; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn-danger { background: var(--danger); color: #FFF; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-xs { padding: 5px 10px; font-size: 11px; }
.btn-icon { padding: 6px; border-radius: var(--radius-sm); }
.btn-ghost { background: none; border: none; color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); }
.btn-ghost:hover { color: var(--text); background: var(--surface-hover); }
.w-full { width: 100%; justify-content: center; }

/* ======================== APP LAYOUT ======================== */
.app-layout { display: flex; min-height: 100vh; }

/* ======================== SIDEBAR ======================== */
.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100; border-right: 1px solid var(--sidebar-border);
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.sidebar-logo-img { height: 19px; width: auto; }
.sidebar-logo-text { font-family: 'Avenir Next', 'Inter', sans-serif; font-size: 20px; font-weight: 800; color: #FFF; letter-spacing: -0.5px; }
.sidebar-logo-text span { color: var(--gold-on-dark); }
.sidebar-version { font-size: 11px; color: var(--sidebar-text); margin-left: auto; }
.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: none;
  background: none; color: var(--sidebar-text); border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all var(--transition);
  width: 100%; text-align: left;
}
.nav-item:hover { color: var(--sidebar-text-hover); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--sidebar-active-text); background: var(--sidebar-active-bg); border-left: 2px solid var(--sidebar-active-text); margin-left: -2px; }
.nav-item .material-icons-round { font-size: 20px; }
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold-on-dark);
  color: #1A1918; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: #FFF; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: var(--sidebar-text); font-size: 11px; }
.sidebar-logout { background: none; border: none; color: var(--sidebar-text); padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.sidebar-logout:hover { color: var(--danger); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.sidebar-overlay.show { display: block; }

/* ======================== MAIN CONTENT ======================== */
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.main-header {
  height: var(--header-height); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
#menu-toggle { display: none; }

.header-control {
  display: inline-flex; background: var(--bg); border-radius: var(--radius-md); padding: 2px;
  border: 1px solid var(--border); overflow-x: auto; max-width: 100%; flex-shrink: 1;
}
.header-control-btn {
  padding: 4px 10px; border: none; background: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition); display: flex; align-items: center; gap: 4px;
}
.header-control-btn:hover { color: var(--text); }
.header-control-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.view-container { flex: 1; padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ======================== CARDS ======================== */
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); overflow: clip; }
.card-header {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card-body-flush { padding: 0; }
.card-accent { border-left: 3px solid var(--gold); }
.card-accent-pad { padding: 20px; }

/* ======================== KPI BAR ======================== */
.kpi-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-item {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 18px 22px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all var(--transition); box-shadow: var(--card-shadow);
}
.kpi-item:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon.accent { background: var(--gold-light); color: var(--gold); }
.kpi-icon.muted { background: var(--info-light); color: var(--info); }
.kpi-icon .material-icons-round { font-size: 20px; }
.kpi-value { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ======================== TABLES ======================== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); background: var(--surface);
}
tbody td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: none; }
.td-actions { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }

/* ======================== BADGES ======================== */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-dark { background: #1A1918; color: #FFF; }
[data-theme="dark"] .badge-dark { background: #EFEEEA; color: #1A1918; }
.badge-accent { background: var(--gold-light); color: var(--gold-text); }
.badge-gray { background: var(--info-light); color: var(--info); }
.badge-warm { background: var(--gold-light); color: var(--gold-text); }
.badge-muted { background: var(--bg-secondary); color: var(--text-muted); }
.badge-graphite { background: var(--accent-light); color: var(--text-secondary); }
.badge-xs { font-size: 10px; padding: 2px 6px; }

/* Status badges — минимальные, Revolut-style */
.status-active { background: var(--gold-light); color: var(--gold-text); }
.status-done { background: var(--bg-secondary); color: var(--text-muted); }
.status-pending { background: var(--info-light); color: var(--info); }
.status-critical { background: #1A1918; color: var(--gold-on-dark); }
[data-theme="dark"] .status-critical { background: var(--gold-light); color: var(--gold-text); }

/* ======================== PRIORITY ======================== */
.priority-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.priority-dot.critical { background: #1A1918; }
[data-theme="dark"] .priority-dot.critical { background: #EFEEEA; }
.priority-dot.high { background: var(--gold); }
.priority-dot.medium { background: var(--text-muted); }
.priority-dot.low { background: var(--border); }
.importance-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-sm); text-transform: uppercase; }
.importance-badge.critical { background: #1A1918; color: #FFFFFF; }
[data-theme="dark"] .importance-badge.critical { background: #EFEEEA; color: #1A1918; }
.importance-badge.high { background: var(--gold-light); color: var(--gold-text); }
.importance-badge.medium { background: var(--info-light); color: var(--info-text); }
.importance-badge.low { background: var(--bg-secondary); color: var(--text-muted); }

/* ======================== DEADLINE BADGES ======================== */
.deadline-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); }
.deadline-badge.normal { background: var(--info-light); color: var(--info); }
.deadline-badge.urgent { background: var(--gold-light); color: var(--gold-text); }
.deadline-badge.overdue { background: #1A1918; color: #FFFFFF; }
[data-theme="dark"] .deadline-badge.overdue { background: #EFEEEA; color: #1A1918; }
.deadline-badge.done { background: var(--bg-secondary); color: var(--text-muted); }

/* ======================== SECTION ======================== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: 16px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* ======================== DASHBOARD GRID ======================== */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }

/* ======================== EMPTY STATE ======================== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .material-icons-round { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ======================== MODAL ======================== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(28,27,23,0.5);
  z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-xl); width: 100%; max-width: 560px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 48px rgba(28,27,23,0.3); animation: modalIn 0.2s ease;
}
.modal-wide { max-width: 800px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header {
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); cursor: pointer; }
.modal-close:hover { color: var(--text); background: var(--surface-hover); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ======================== TIMELINE (for pipelines) ======================== */
.timeline { display: flex; align-items: flex-start; overflow-x: auto; padding: 12px 0 20px; }
.timeline-step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 80px; position: relative; }
.timeline-dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--surface); z-index: 1; transition: all var(--transition);
}
.timeline-line {
  position: absolute; top: 8px; left: 50%; right: -50%; height: 2px;
  background: var(--border); z-index: 0;
}
.timeline-step:last-child .timeline-line { display: none; }
.timeline-step.completed .timeline-dot { background: var(--text); border-color: var(--text); }
.timeline-step.completed .timeline-line { background: var(--text); }
.timeline-step.active .timeline-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-light); }
.timeline-label { font-size: 10px; color: var(--text-muted); margin-top: 8px; text-align: center; font-weight: 500; max-width: 80px; }
.timeline-step.completed .timeline-label { color: var(--text); }
.timeline-step.active .timeline-label { color: var(--gold-text); font-weight: 700; }

/* ======================== PIPELINE CARDS ======================== */
.pipeline-card { margin-bottom: 16px; overflow-x: auto; }
.pipeline-card .order-timeline { display: none; padding: 0 20px 20px; }
.pipeline-card.expanded .order-timeline { display: block; }
.order-expand-icon { transition: transform 0.2s; }
.pipeline-card.expanded .order-expand-icon { transform: rotate(180deg); }
.dev-progress-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.dev-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.3s; }
.dev-project-name { font-size: 15px; font-weight: 700; }
.assignee-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-muted); background: var(--bg-secondary);
  padding: 2px 10px 2px 6px; border-radius: 20px;
}
.assignee-chip .material-icons-round { font-size: 14px; }

/* Stage history */
.stage-history { padding: 0 0 16px; }
.stage-history-item { display: flex; gap: 16px; padding: 8px 0; position: relative; }
.stage-history-item::before { content: ''; position: absolute; left: 7px; top: 24px; bottom: -8px; width: 2px; background: var(--border); }
.stage-history-item:last-child::before { display: none; }
.stage-history-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--border); background: var(--surface);
}
.stage-history-item.completed .stage-history-dot { background: var(--text); border-color: var(--text); }
.stage-history-item.active .stage-history-dot { background: var(--gold); border-color: var(--gold); }
.stage-history-content { flex: 1; }
.stage-history-title { font-size: 13px; font-weight: 600; }
.stage-history-date { font-size: 11px; color: var(--text-muted); }
.stage-history-comment { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.subtask-header-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.dev-card-footer { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }

/* Blocker */
.dev-blocker-panel { background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; }
.dev-blocker-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--gold-text); }
.dev-blocker-row { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
.blocker-item { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.blocker-item.active .blocker-icon { color: var(--gold-text); }
.blocker-item.resolved .blocker-icon { color: var(--text-muted); }
.blocker-text { font-size: 12px; }
.blocker-date { font-size: 11px; color: var(--text-muted); }

/* ======================== MEETING CARDS ======================== */
.meeting-card {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--card-shadow);
  cursor: pointer; transition: all var(--transition);
}
.meeting-card:hover { box-shadow: var(--shadow-md); }
.meeting-card-date { font-size: 15px; font-weight: 700; }
.meeting-card-status { font-size: 12px; }
.meeting-card-body { display: none; padding: 0 20px 20px; border-top: 1px solid var(--border-light); }
.meeting-card.expanded .meeting-card-body { display: block; padding-top: 16px; }

/* Meeting tabs */
.m-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.m-tab {
  padding: 8px 16px; border: none; background: none; font-size: 12px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--transition);
}
.m-tab:hover { color: var(--text); }
.m-tab.active { color: var(--text); border-bottom-color: var(--gold); }
.m-tab-content { display: none; animation: fadeIn 0.2s ease; }
.m-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Meeting layout */
.m-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.m-main { min-width: 0; }
.meetings-sidebar { }
.m-search-wrap { position: relative; }
.m-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-muted); }
.m-search-input { padding-left: 40px; }

/* Meeting details sections */
.m-section { margin-bottom: 20px; }
.m-section-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.m-item { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.m-item:last-child { border-bottom: none; }
.m-item-title { font-size: 13px; font-weight: 600; }
.m-item-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }
.m-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ======================== LINKED ITEMS ======================== */
.linked-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  background: var(--gold-light); border: 1px solid var(--gold);
  border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--gold-text);
}

/* ======================== FLEX UTILITIES ======================== */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.mt-2 { margin-top: 2px; } .mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.p-12 { padding: 12px; } .p-16 { padding: 16px; } .p-20 { padding: 20px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 11px; } .text-base { font-size: 14px; }
.text-muted { color: var(--text-muted); } .text-accent { color: var(--gold-text); }
.font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.icon-14 { font-size: 14px; } .icon-16 { font-size: 16px; } .icon-18 { font-size: 18px; } .icon-20 { font-size: 20px; }
.icon-inline { vertical-align: middle; }
.grid-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.overflow-x-auto { overflow-x: auto; }
.inline-flex { display: inline-flex; }

/* ======================== TOAST ======================== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--gold);
  padding: 14px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
  animation: slideIn 0.3s ease; max-width: 400px;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ======================== CONFIRM DIALOG ======================== */
.confirm-dialog-body { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; text-align: center; }
.confirm-dialog-icon { font-size: 40px; color: var(--gold); }

/* ======================== TABS (pipeline settings etc) ======================== */
.tab-group { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tab-btn {
  padding: 8px 16px; border: none; background: none; font-size: 12px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--gold); }

/* ======================== MEETING DATE BLOCK (CHICO OS style) ======================== */
.meeting-date-block { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 8px 12px; background: var(--accent-light); border-radius: var(--radius-md); text-align: center; flex-shrink: 0; }
.meeting-date-day { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -1px; color: var(--text); }
.meeting-date-month { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; white-space: nowrap; }
.meeting-title-row { display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }
.meeting-meta { flex: 1; min-width: 0; padding-top: 4px; }
.meeting-meta-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meeting-meta-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meeting-card-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.meeting-3dot { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); flex-shrink: 0; }
.meeting-3dot:hover { background: var(--bg-secondary); color: var(--text); }

/* Meeting sub-tabs (inside Overview tab) */
.m-subtabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.m-subtab {
  padding: 5px 14px; border: 1px solid var(--border); background: none; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.m-subtab:hover { color: var(--text); border-color: var(--text-muted); }
.m-subtab.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ======================== MINI CALENDAR ======================== */
.mcal-title { font-size: 13px; font-weight: 700; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mcal-day { font-size: 10px; text-align: center; padding: 2px; font-weight: 600; color: var(--text-muted); }
.mcal-cell {
  font-size: 11px; text-align: center; padding: 6px 2px; border-radius: var(--radius-sm);
  cursor: default; color: var(--text-secondary);
}
.mcal-cell.has-meeting { background: var(--gold-light); color: var(--gold-text); font-weight: 700; cursor: pointer; }
.mcal-cell.today { border: 1px solid var(--gold); font-weight: 700; }

/* ======================== QUICK STATS ======================== */
.m-stats-label { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.m-stat-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.m-stat-row:last-child { border-bottom: none; }
.m-stat-val { font-weight: 700; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  #menu-toggle { display: flex; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .m-layout { grid-template-columns: 1fr; }
  .meetings-sidebar { display: none; }
  .grid-half { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .view-container { padding: 16px; }
  .kpi-bar { grid-template-columns: repeat(2, 1fr); }
  .card-header { flex-wrap: wrap; }
}
