/* Client Portal — minimal baseline, "serious with UX considered" */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-12: 3rem;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
  --color-text: #2d3748; --color-text-muted: #5a6577;
  --color-text-subtle: #7a8494;
  --color-bg: #f4f6f9; --color-bg-alt: #ffffff;
  --color-bg-hover: #edf1f7;
  --color-border: #d8dde5; --color-border-subtle: #e8ecf1;
  --sidebar-width: 280px; --sidebar-bg: #1a1a2e;
  --sidebar-text: #a0a4b8; --sidebar-text-active: #ffffff;
  --header-height: 64px; --header-bg: #ffffff;
  --color-brand: #4a6fa5; --color-brand-hover: #3a578a;
  --color-error-fg: #c81e1e; --color-error-bg: #fde8e8;
  --card-radius: 10px;
  --card-shadow: 0 0.3125rem 0.9375rem rgba(0,0,0,0.05);
  --card-shadow-hover: 0 0.5rem 1.25rem rgba(0,0,0,0.08);
  --btn-radius: 8px; --btn-shadow-hover: 0 0.5rem 1rem rgba(74,111,165,0.18);
  --motion-duration: 150ms; --ring-width: 3px;
  --ring-color: var(--color-brand); --ring-offset: 2px;
  --text-scale: 1;
}

/* Dark mode (opt-in only) */
html[data-color-scheme="dark"] {
  --color-text: #e0e0e4; --color-text-muted: #a0a0a8; --color-text-subtle: #808088;
  --color-bg: #121218; --color-bg-alt: #1e1e28; --color-bg-hover: #2a2a34;
  --color-border: #3a3a44; --color-border-subtle: #2e2e38;
  --header-bg: #1e1e28; --sidebar-bg: #0e0e1a;
  --color-brand: #6a90c0; --color-brand-hover: #5a7daa;
  --card-shadow: 0 0.3125rem 0.9375rem rgba(0,0,0,0.15);
  color-scheme: dark;
}

/* User prefs */
html[data-text-size="large"] { --text-scale: 1.25; }
html[data-text-size="xl"]    { --text-scale: 1.5; }
html[data-contrast="high"] { --color-text: #000; --color-text-muted: #1a1a1a; --color-border: #000; }
html[data-motion="reduced"] { --motion-duration: 0ms; }
html[data-focus="enhanced"] { --ring-width: 5px; --ring-offset: 3px; }
@media (prefers-reduced-motion: reduce) { :root { --motion-duration: 0ms; } }
@media (prefers-contrast: more) { :root { --color-text: #000; --color-border: #000; --ring-width: 4px; } }
@media (forced-colors: active) { :root { --color-text: CanvasText; --color-bg: Canvas; --color-brand: LinkText; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: 'Poppins', system-ui, sans-serif;
  font-size: calc(var(--text-base) * var(--text-scale));
  line-height: 1.55; color: var(--color-text); background: var(--color-bg);
}

:focus { outline: none; }
:focus-visible { outline: var(--ring-width) solid var(--ring-color); outline-offset: var(--ring-offset); border-radius: 2px; }
a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg); color: var(--sidebar-text);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
  display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
  transition: transform var(--motion-duration) ease-out;
}
.sidebar-logo {
  padding: var(--space-6) var(--space-6) var(--space-4); display: flex; align-items: center;
  justify-content: center;
}
.sidebar-logo .logo-img { height: 30px; width: auto; opacity: 0.9; }
/* Gradient gold fade separator — matches Agility brand pattern */
.sidebar-separator {
  height: 1px;
  margin: 0 10% var(--space-4);
  width: 80%;
  background: linear-gradient(90deg, transparent, #D6AD60, transparent);
}
.sidebar-project-name {
  padding: var(--space-4) var(--space-6) var(--space-2);
  font-size: var(--text-lg); font-weight: 600; color: #fff;
  letter-spacing: -0.01em;
}
.sidebar-section { padding: var(--space-2) 0; }
.sidebar-label {
  padding: var(--space-2) var(--space-6); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3); font-weight: 600;
}
.sidebar-nav { list-style: none; margin: 0; padding: 0; }
.sidebar-nav li a, .sidebar-nav li button.folder-toggle {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-6); color: var(--sidebar-text);
  text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--motion-duration) ease-out;
}
.sidebar-nav li a:hover, .sidebar-nav li button.folder-toggle:hover {
  color: var(--sidebar-text-active); background: rgba(255,255,255,0.04);
  text-decoration: none;
}
.sidebar-nav li a.active {
  color: var(--sidebar-text-active); background: rgba(255,255,255,0.06);
  border-left-color: var(--color-brand);
}
.sidebar-nav li .nav-icon { width: 20px; text-align: center; opacity: 0.7; flex-shrink: 0; }
.sidebar-nav li a.active .nav-icon { opacity: 1; }
.sidebar-nav .sub-nav { list-style: none; padding: 0 0 0 var(--space-8); margin: 0; }
.sidebar-nav .sub-nav li a { font-size: var(--text-xs); padding: var(--space-1) var(--space-6); }
.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  padding: 0 var(--space-1);
  margin-left: auto;
  margin-right: var(--space-2);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: var(--sidebar-text);
  font-size: 0.65rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.sidebar-nav li a.active .nav-pill,
.folder-toggle[aria-expanded="true"] .nav-pill {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.folder-toggle .chevron { font-size: 0.7em; transition: transform var(--motion-duration); flex-shrink: 0; }
.folder-toggle[aria-expanded="true"] .chevron { transform: rotate(90deg); }

/* Header */
.header-bar {
  position: fixed; top: 0; left: var(--sidebar-width); right: 0;
  height: var(--header-height); background: var(--header-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-6); z-index: 30;
}
.header-left { display: flex; align-items: center; gap: var(--space-4); }
.header-left h1 { font-size: calc(var(--text-xl) * var(--text-scale)); font-weight: 600; margin: 0; }
.header-right { display: flex; align-items: center; gap: var(--space-3); }
.sidebar-toggle {
  display: none; background: none; border: 1px solid var(--color-border);
  border-radius: var(--btn-radius); padding: var(--space-2);
  color: var(--color-text); cursor: pointer; font-size: var(--text-lg); line-height: 1;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-width); margin-top: var(--header-height);
  padding: var(--space-6); flex: 1; min-height: calc(100vh - var(--header-height));
}

/* Cards */
.card {
  background: var(--color-bg-alt); padding: var(--space-6);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
  margin-bottom: var(--space-5);
}

/* Document viewer */
.doc-viewer { width: 100%; }
.doc-viewer iframe, .doc-viewer embed { width: 100%; min-height: 80vh; border: none; border-radius: var(--card-radius); }
.doc-viewer img { max-width: 100%; height: auto; border-radius: var(--btn-radius); }
.doc-viewer .md-content { line-height: 1.7; }
.doc-viewer .md-content h1, .doc-viewer .md-content h2, .doc-viewer .md-content h3 { margin-top: var(--space-8); margin-bottom: var(--space-4); }
.doc-viewer .md-content code { background: var(--color-bg); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.9em; }
.doc-viewer .md-content pre { background: var(--color-bg); padding: var(--space-4); border-radius: var(--btn-radius); overflow-x: auto; }
.doc-viewer .md-content pre code { background: none; padding: 0; }
.doc-viewer .txt-content { white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; background: var(--color-bg); padding: var(--space-5); border-radius: var(--btn-radius); font-size: var(--text-sm); }
.doc-viewer .html-frame { width: 100%; min-height: 80vh; border: 1px solid var(--color-border-subtle); border-radius: var(--card-radius); background: #fff; }
.download-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5); background: var(--color-brand);
  color: #fff; border-radius: var(--btn-radius); font-weight: 500;
  transition: background var(--motion-duration), box-shadow var(--motion-duration), transform var(--motion-duration);
}
.download-link:hover { background: var(--color-brand-hover); box-shadow: var(--btn-shadow-hover); transform: translateY(-1px); text-decoration: none; }

/* Login form */
.login-container {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--color-bg); padding: var(--space-6);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--color-bg-alt);
  padding: var(--space-8); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}
.login-card h1 { font-size: var(--text-2xl); font-weight: 700; margin: 0 0 var(--space-2); text-align: center; }
.login-card .tagline { color: var(--color-text-muted); text-align: center; margin: 0 0 var(--space-8); font-size: var(--text-sm); }
.login-card label { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-1); color: var(--color-text); }
.login-card input {
  width: 100%; padding: var(--space-3); border: 1px solid var(--color-border);
  border-radius: var(--btn-radius); font-size: var(--text-base);
  margin-bottom: var(--space-5); background: var(--color-bg); color: var(--color-text);
}
.login-card input:focus-visible { border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(74,111,165,0.15); }
.login-card button {
  width: 100%; padding: var(--space-3); background: var(--color-brand);
  color: #fff; border: 0; border-radius: var(--btn-radius);
  font-size: var(--text-base); font-weight: 600; cursor: pointer;
  transition: background var(--motion-duration), box-shadow var(--motion-duration), transform var(--motion-duration);
}
.login-card button:hover { background: var(--color-brand-hover); box-shadow: var(--btn-shadow-hover); transform: translateY(-1px); }
.login-card button:active { transform: translateY(0); }
.login-error { background: var(--color-error-bg); color: var(--color-error-fg); padding: var(--space-3); border-radius: var(--btn-radius); margin-bottom: var(--space-5); font-size: var(--text-sm); text-align: center; }

/* A11y panel */
.a11y-toggle {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-3); background: none;
  border: 1px solid var(--color-border); border-radius: var(--btn-radius);
  color: var(--color-text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer;
}
.a11y-toggle:hover { background: var(--color-bg-hover); }
.a11y-toggle[aria-expanded="true"] { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.a11y-panel { display: none; margin-top: var(--space-4); padding: var(--space-5) var(--space-6); background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--card-radius); }
.a11y-panel.open { display: block; }
.a11y-panel h2 { font-size: var(--text-lg); margin: 0 0 var(--space-1); }
.a11y-panel .a11y-intro { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-5); }
.a11y-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
.a11y-row:last-of-type { border-bottom: none; }
.a11y-row-label { flex: 0 0 140px; font-weight: 500; font-size: var(--text-sm); }
.a11y-row-help { flex: 1 1 100%; margin-top: var(--space-1); color: var(--color-text-muted); font-size: var(--text-xs); order: 3; }
.a11y-options { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.a11y-options button { padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); font: inherit; font-size: var(--text-sm); border-radius: var(--btn-radius); cursor: pointer; min-height: 36px; }
.a11y-options button:hover { background: var(--color-bg-hover); }
.a11y-options button[aria-pressed="true"] { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.a11y-reset { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-border-subtle); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.a11y-reset-note { color: var(--color-text-subtle); font-size: var(--text-xs); flex: 1; }
.btn-link { padding: var(--space-2) var(--space-3); color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); background: none; border: 0; cursor: pointer; }
.btn-link:hover { color: var(--color-text); text-decoration: underline; }

/* Split pane — email-style: doc list on left, PDF viewer on right */
.split-pane {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--header-height) - var(--space-6) * 2 - 3rem);
  background: var(--color-bg-alt);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.split-list {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--color-border-subtle);
  overflow-y: auto;
  background: var(--color-bg-alt);
}
.split-list-item {
  display: block;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-subtle);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--motion-duration) ease-out;
  cursor: pointer;
}
.split-list-item:hover { background: var(--color-bg-hover); text-decoration: none; }
.split-list-item.active {
  background: var(--color-bg-hover);
  border-left: 3px solid var(--color-brand);
  padding-left: calc(var(--space-5) - 3px);
}
.split-list-item.placeholder { cursor: default; opacity: 0.6; }
.split-list-item.placeholder:hover { background: none; }
.split-list-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.split-list-file {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: ui-monospace, Consolas, monospace;
}
.split-list-status {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  font-style: italic;
}
.split-viewer {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.split-pdf { width: 100%; height: 100%; border: none; }
.split-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-muted);
}
.split-empty h3 { color: var(--color-text); font-size: var(--text-xl); margin-bottom: var(--space-2); font-weight: 600; }
.split-empty p { margin: 0 0 var(--space-2); }
.split-hint { font-size: var(--text-xs); color: var(--color-text-subtle); font-style: italic; }

@media (max-width: 900px) {
  .split-pane { flex-direction: column; height: auto; }
  .split-list { width: 100%; min-width: 100%; border-right: none; border-bottom: 1px solid var(--color-border-subtle); max-height: 250px; }
  .split-viewer { min-height: 60vh; }
  .split-pdf { min-height: 60vh; }
}

/* Empty state */
.empty-state { text-align: center; padding: var(--space-12) var(--space-5); color: var(--color-text-muted); }
.empty-state h3 { color: var(--color-text); font-size: var(--text-xl); margin-bottom: var(--space-2); font-weight: 600; }

/* Logout */
/* Sidebar bottom — actions + a11y panel + copyright */
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.sidebar-actions {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.sidebar-btn-form { flex: 1; display: flex; }
.sidebar-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--btn-radius);
  color: var(--sidebar-text);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--motion-duration) ease-out;
  white-space: nowrap;
}
.sidebar-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-btn[aria-expanded="true"] { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.sidebar-btn-accent {
  background: rgba(200,80,80,0.15);
  border-color: rgba(200,80,80,0.3);
  color: #e08080;
  width: 100%;
}
.sidebar-btn-accent:hover { background: rgba(200,80,80,0.25); color: #f0a0a0; }

/* A11y panel inside sidebar */
.sidebar-bottom .a11y-panel {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.08);
  color: var(--sidebar-text);
}
.sidebar-bottom .a11y-panel h2 { color: #fff; font-size: var(--text-sm); }
.sidebar-bottom .a11y-panel .a11y-intro { color: var(--sidebar-text); font-size: var(--text-xs); margin-bottom: var(--space-3); }
.sidebar-bottom .a11y-row { border-color: rgba(255,255,255,0.06); padding: var(--space-2) 0; gap: var(--space-2); }
.sidebar-bottom .a11y-row-label { color: #fff; font-size: var(--text-xs); flex: 0 0 auto; width: 100%; }
.sidebar-bottom .a11y-row-help { display: none; }
.sidebar-bottom .a11y-options { gap: 2px; }
.sidebar-bottom .a11y-options button { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: var(--sidebar-text); font-size: var(--text-xs); padding: var(--space-1) var(--space-2); min-height: 28px; }
.sidebar-bottom .a11y-options button:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-bottom .a11y-options button[aria-pressed="true"] { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.sidebar-bottom .a11y-reset { border-color: rgba(255,255,255,0.06); }
.sidebar-bottom .a11y-reset-note { color: var(--sidebar-text); font-size: var(--text-xs); }
.sidebar-bottom .btn-link { color: var(--sidebar-text); font-size: var(--text-xs); }
.sidebar-bottom .btn-link:hover { color: #fff; }
.sidebar-copyright {
  padding: var(--space-1) var(--space-2) 0;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.2);
  text-align: center;
}

/* Document contextual actions — top-right of doc viewer card */
.doc-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-bottom: var(--space-4);
}
.doc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 150ms ease-out;
}
.doc-action-btn:hover {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
  box-shadow: 0 3px 10px rgba(74,111,165,0.2);
  transform: translateY(-1px);
}
.doc-action-btn:active { transform: translateY(0); }

@media print {
  .doc-actions { display: none !important; }
  .sidebar { display: none !important; }
  .sidebar-overlay { display: none !important; }
  .header-bar { display: none !important; }
  .main-content { margin-left: 0 !important; margin-top: 0 !important; padding: 0 !important; }
  .site-footer { display: none !important; }
  .sidebar-bottom { display: none !important; }
}

/* Dashboard layout — actions left, info right */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
.dashboard-left { display: flex; flex-direction: column; }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.dash-section-head h3 { font-size: var(--text-base); font-weight: 600; color: var(--color-text); margin: 0; }
.dash-count { font-size: var(--text-xs); color: var(--color-text-subtle); background: var(--color-bg-alt); padding: 0.2rem 0.6rem; border-radius: 1rem; border: 1px solid var(--color-border-subtle); }

/* Scrum board — card grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.action-card {
  background: var(--color-bg-alt);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border-top: 3px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow 150ms ease-out, transform 150ms ease-out;
}
.action-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); transform: translateY(-1px); }
.action-card.ac-pending { border-top-color: var(--color-brand); }
.action-card.ac-progress { border-top-color: #4BB8D4; }
.action-card.ac-blocked { border-top-color: #C0392B; }
.action-card.ac-done { border-top-color: #16A34A; opacity: 0.55; }

/* Card top — title + status + assigned */
.ac-top {
  padding: var(--space-3) var(--space-4) var(--space-2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.ac-title { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); line-height: 1.35; flex: 1; }
.ac-done .ac-title { text-decoration: line-through; }
.ac-top-pills { display: flex; gap: 0.25rem; flex-shrink: 0; flex-wrap: wrap; }

/* Card middle — description */
.ac-mid {
  padding: 0 var(--space-4);
  flex: 1;
}
.ac-desc { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.55; }

/* Card bottom — location + date */
.ac-bottom {
  padding: var(--space-2) var(--space-4) var(--space-3);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border-subtle);
}
.ac-location { font-size: 0.68rem; color: var(--color-text-subtle); display: flex; align-items: center; gap: 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-decoration: none; }
a.ac-location:hover { color: var(--color-brand); }
.ac-date { font-size: 0.68rem; color: var(--color-text-subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Pill badges */
.ac-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 1rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.4;
}
.ac-pill.ac-pending { background: rgba(74,111,165,0.08); color: var(--color-brand); }
.ac-pill.ac-progress { background: rgba(75,184,212,0.08); color: #4BB8D4; }
.ac-pill.ac-blocked { background: rgba(192,57,43,0.06); color: #C0392B; }
.ac-pill.ac-done { background: rgba(22,163,74,0.06); color: #16A34A; }
.ac-pill.ac-assign { background: var(--color-bg); color: var(--color-text-muted); border: 1px solid var(--color-border-subtle); }

/* How This Works — FAQ style */
.howto-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
.howto-item:last-child { border-bottom: none; }
.howto-q { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: var(--space-1); }
.howto-a { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }

@media (max-width: 1200px) {
  .action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
}

/* Footer — anchored to bottom */
.main-content { display: flex; flex-direction: column; }
.main-content > *:not(.site-footer) { flex-shrink: 0; }
.site-footer { margin-top: auto; padding-top: var(--space-5); border-top: 1px solid var(--color-border-subtle); font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .header-bar { left: 0; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 35; }
  .sidebar-overlay.open { display: block; }
}
@media (max-width: 600px) { .main-content { padding: var(--space-4); } .login-card { padding: var(--space-6); } }
