/* Modena Helpdesk — design tokens align with modena-prototype.vercel.app */
:root {
  --modena: #062429; --modena-deep: #062429; --modena-darker: #04191C;
  --modena-accent: #FFE66D; --modena-mint: #DFFAF2; --modena-mint-light: #dff7f2;
  --bg: #FFFFFF; --surface: #F1F2F3; --surface-soft: #F5F5F4;
  --slate-50: #F8FAFB; --slate-100: #F1F2F3;
  --slate-200: rgba(6,36,41,0.10); --slate-300: rgba(6,36,41,0.18);
  --slate-400: rgba(6,36,41,0.40); --slate-500: rgba(6,36,41,0.55);
  --slate-600: rgba(6,36,41,0.70); --slate-700: rgba(6,36,41,0.82); --slate-800: rgba(6,36,41,0.92);
  --text-primary: #062429; --text-secondary: rgba(6,36,41,0.72);
  --text-tertiary: rgba(6,36,41,0.50); --text-label: rgba(6,36,41,0.40);
  --border: rgba(6,36,41,0.08); --border-soft: rgba(6,36,41,0.06); --border-hover: rgba(6,36,41,0.16);
  --success: #10B981; --success-dim: rgba(16,185,129,0.12);
  --warning: #F59E0B; --warning-dim: rgba(251,191,36,0.14);
  --error: #EF4444; --error-dim: rgba(239,68,68,0.10);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(6,36,41,0.06), 0 1px 2px rgba(6,36,41,0.04);
  --shadow-md: 0 4px 16px rgba(6,36,41,0.06), 0 2px 6px rgba(6,36,41,0.04);
  --shadow-lg: 0 12px 32px rgba(6,36,41,0.10), 0 4px 12px rgba(6,36,41,0.06);
  --shadow-focus: 0 0 0 3px rgba(6,36,41,0.10);
  --spring-fast: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-moderate: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 120ms; --dur-moderate: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', 'Inter Display', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss03";
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---- Header / nav ---- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
}
.app-header .inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex; align-items: center; gap: 20px;
}
.brand {
  font-weight: 700; letter-spacing: -0.04em; text-decoration: none; color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px;
}
.brand .dot { color: var(--modena-accent); }
.brand .sub { color: var(--text-tertiary); font-size: 13px; font-weight: 400; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background var(--dur-moderate) var(--spring-moderate),
              color var(--dur-moderate) var(--spring-moderate);
}
.nav a.active { background: var(--surface); color: var(--text-primary); font-weight: 600; }
.nav a:hover:not(.active) { background: rgba(6,36,41,0.05); color: var(--text-primary); }
.spacer { flex: 1; }
.btn-new {
  background: var(--modena-accent); color: var(--text-primary);
  border: none; padding: 8px 16px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 13px;
  transition: filter var(--dur-fast) var(--spring-moderate),
              transform var(--dur-fast) var(--spring-moderate);
}
.btn-new:hover { filter: brightness(0.95); }
.btn-new:active { transform: scale(0.98); }
.user-menu { position: relative; }
.user-menu > button {
  background: transparent; color: var(--text-primary); border: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  transition: background var(--dur-fast) var(--spring-moderate);
}
.user-menu > button:hover { background: var(--surface); }
.dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 6px;
  background: white; color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 220px; padding: 6px;
}
.dropdown a, .dropdown button {
  display: block; padding: 8px 12px; font-size: 13px; border-radius: 8px;
  text-decoration: none; color: var(--text-primary);
  background: transparent; border: none; width: 100%; text-align: left;
  transition: background var(--dur-fast) var(--spring-moderate);
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface); }
.dropdown .divider { height: 1px; background: var(--border-soft); margin: 4px 0; }

/* ---- Common ---- */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 20px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 28px 20px; }
.container-board { max-width: 100%; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.005em; }
h3 { font-weight: 600; color: var(--text-primary); }
.muted { color: var(--text-tertiary); font-size: 13px; }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color var(--dur-moderate) var(--spring-moderate),
              box-shadow var(--dur-moderate) var(--spring-moderate);
}
.card + .card { margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500; border: 1px solid var(--border);
  background: white; color: var(--text-primary); text-decoration: none;
  transition: background var(--dur-fast) var(--spring-moderate),
              border-color var(--dur-fast) var(--spring-moderate),
              transform var(--dur-fast) var(--spring-moderate);
  cursor: pointer; line-height: 1.4;
}
.btn:hover { background: var(--surface); border-color: var(--border-hover); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--text-primary); color: var(--modena-accent);
  border-color: var(--text-primary); font-weight: 600;
}
.btn-primary:hover { background: var(--text-primary); filter: brightness(1.15); border-color: var(--text-primary); }
.btn-mint { background: var(--modena-mint); color: var(--text-primary); border-color: transparent; }
.btn-mint:hover { background: var(--modena-mint); filter: brightness(0.96); border-color: transparent; }
.btn-danger-link { background: none; color: var(--error); padding: 6px 10px; border: 0; }
.btn-danger-link:hover { text-decoration: underline; background: var(--error-dim); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

input[type=text], input[type=email], input[type=date], input[type=password],
input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 14px; background: white;
  font-family: inherit; color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--spring-moderate),
              box-shadow var(--dur-fast) var(--spring-moderate);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--text-primary);
  box-shadow: var(--shadow-focus);
}
label { font-size: 12px; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 6px; letter-spacing: 0.01em; }
.field + .field { margin-top: 14px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ---- Avatar ---- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: white; font-weight: 600;
  flex-shrink: 0; vertical-align: middle;
}
.avatar.xs { width: 20px; height: 20px; font-size: 10px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.md { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
img.avatar { object-fit: cover; border: 1px solid var(--slate-200); background: white; }

/* ---- Login ---- */
.login-page { min-height: 100vh; display: flex; background: white; }
.login-left { flex: 1; display: flex; flex-direction: column; padding: 32px 48px; }
.login-left .top { display: flex; justify-content: space-between; align-items: center; }
.login-left .lang { color: rgba(1,43,50,0.7); background: none; border: none; font-size: 14px; }
.login-left .center { flex: 1; display: flex; align-items: center; justify-content: center; }
.login-form { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 28px; font-weight: 700; margin: 0 0 4px; }
.login-form .lead { color: var(--slate-500); font-size: 14px; margin: 0 0 24px; line-height: 1.6; }
.login-form .lead strong { color: var(--modena); }
.login-form input[type=email] {
  width: 100%; padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--slate-300); font-size: 14px;
}
.login-form .submit {
  margin-top: 16px; width: 100%; padding: 12px 0;
  background: var(--modena-accent); color: var(--modena);
  border: none; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.login-form .submit:hover { background: var(--modena-accent); filter: brightness(0.92); }
.login-form .err { color: #B91C1C; font-size: 13px; margin-top: 6px; padding: 0 8px; }
.login-form .terms { font-size: 11px; color: var(--slate-400); margin-top: 32px; line-height: 1.6; }
.login-form .terms a { text-decoration: underline; }
.login-modena-name { font-weight: 800; letter-spacing: -0.04em; font-size: 24px; }
.login-right { flex: 1; background: var(--modena); position: relative; overflow: hidden; display: none; }
.login-right .monogram {
  position: absolute; inset: 0; color: var(--modena-deep);
  display: flex; align-items: flex-end; justify-content: center;
  font-family: 'Open Sans', sans-serif; font-weight: 900;
  font-size: 80vmin; line-height: 0.8; letter-spacing: -0.05em;
  opacity: 0.9;
}
.login-right .tagline {
  position: relative; z-index: 1;
  display: flex; align-items: center; padding: 0 64px;
  height: 100%; color: white;
}
.login-right .tagline h2 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-size: clamp(2.5rem, 4.5vw, 4.25rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0;
}
@media (min-width: 1024px) {
  .login-right { display: flex; }
}
/* Mobile login: tighter padding, scaled text, full-width form */
@media (max-width: 720px) {
  .login-page { min-height: 100vh; min-height: 100dvh; }
  .login-left { padding: 20px 18px 24px; }
  .login-left .top { margin-bottom: 8px; }
  .login-modena-name { font-size: 22px; }
  .login-left .lang { font-size: 13px; }
  .login-form { max-width: 100%; }
  .login-form h1 { font-size: 26px; margin-bottom: 6px; }
  .login-form .lead { font-size: 13px; margin-bottom: 18px; line-height: 1.5; }
  .login-form input[type=email] { padding: 12px 18px; font-size: 16px; /* prevents iOS auto-zoom */ }
  .login-form .submit { padding: 14px 0; font-size: 15px; }
  .login-sso-btn { padding: 13px 0; font-size: 14px; }
  .login-form .terms { font-size: 11px; margin-top: 24px; }
}

/* Mobile fix: prevent iOS Safari auto-zoom on form fields by ensuring 16px+ */
@media (max-width: 720px) {
  input[type=text], input[type=email], input[type=date], input[type=number],
  input[type=password], input[type=search], select, textarea {
    font-size: 16px;
  }
}

/* ---- Board / Kanban ---- */
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px;
}
.toolbar input[type=text] { width: 240px; }

/* Compact board toolbar */
.board-toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.search-wrap {
  flex: 1 1 280px; min-width: 220px; max-width: 520px;
  position: relative;
}
.search-wrap input {
  width: 100%; padding: 8px 36px 8px 34px;
  border: 1px solid var(--slate-300); border-radius: 999px;
  font-size: 14px; background: white;
}
.search-wrap input:focus {
  outline: none; border-color: var(--modena);
  box-shadow: 0 0 0 3px rgba(1,43,50,0.1);
}
.search-wrap .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--slate-400); pointer-events: none; line-height: 0;
}
.search-wrap .search-clear {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--slate-400);
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 0;
}
.search-wrap .search-clear:hover { background: var(--slate-100); color: var(--modena); }
.search-wrap .search-shortcut {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--slate-400); font-family: ui-monospace, monospace;
  background: var(--slate-100); padding: 2px 5px; border-radius: 4px;
  pointer-events: none;
}
.search-wrap input:focus ~ .search-shortcut,
.search-wrap input:not(:placeholder-shown) ~ .search-shortcut { display: none; }

.btn-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border: 1px solid var(--slate-300);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--modena);
  cursor: pointer; line-height: 1.4;
}
.btn-toggle:hover { background: var(--slate-50); border-color: var(--slate-400); }
.btn-toggle.active {
  background: var(--modena); color: var(--modena-accent);
  border-color: var(--modena);
}
.btn-toggle .badge {
  background: var(--modena-accent); color: var(--modena);
  border-radius: 999px; padding: 1px 7px;
  font-size: 11px; font-weight: 700;
}
.btn-toggle.active .badge { background: var(--modena-accent); color: var(--modena); }
.btn-toggle svg { flex-shrink: 0; }

.filter-panel {
  background: white; border: 1px solid var(--slate-200);
  border-radius: 12px; padding: 14px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(1,43,50,0.06);
}
.filter-panel .filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-panel .filter-field label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--slate-500); font-weight: 600;
}
.filter-panel select {
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--slate-300);
  font-size: 13px; background: white;
}
.filter-panel .clear-wrap { justify-content: flex-end; }
.filter-panel .clear-wrap button {
  background: none; border: 0; color: var(--slate-500);
  padding: 6px 0; font-size: 12px; cursor: pointer;
  text-decoration: underline; text-align: left;
}
.filter-panel .clear-wrap button:hover { color: var(--modena); }

.active-filter-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px; align-items: center;
}
.active-filter-pill {
  display: inline-flex; align-items: center;
  background: var(--modena-mint); color: var(--modena);
  padding: 3px 4px 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.active-filter-pill button {
  background: none; border: 0; color: var(--modena);
  font-size: 16px; line-height: 1; padding: 0; margin-left: 4px;
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.active-filter-pill button:hover { background: rgba(1,43,50,0.12); }
.chip-clear-all {
  background: none; border: 0; color: var(--slate-500);
  font-size: 12px; cursor: pointer; padding: 3px 8px;
}
.chip-clear-all:hover { color: var(--modena); text-decoration: underline; }

/* Wrapper that keeps toolbar + board centered together on the board page.
   width: fit-content shrinks to inner content (= board width); max-width caps
   at parent so very-wide-content gets internal scroll instead of overflowing. */
.board-shell {
  width: fit-content; max-width: 100%; margin: 0 auto;
}
.board {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto; padding-bottom: 8px;
}
/* Inside the centered shell, give each filter row 100% width so the row itself
   stretches with the board, but center the *items* within so toolbar content
   stays grouped in the middle (matches board centering on wide screens). */
.board-shell .board-toolbar,
.board-shell .filter-panel,
.board-shell .active-filter-pills,
.board-shell .quick-chips { width: 100%; justify-content: center; }

/* Single-row board toolbar — search + env chips + quick chips + selects all
   on one line, wrapping only on narrow screens. */
.board-toolbar.single-row {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}
/* On wide-enough desktops force everything onto a single row. The numbers
   here account for: search 220 + env 220 + quick 380 + 3 selects 390 + gaps. */
@media (min-width: 1280px) {
  .board-toolbar.single-row { flex-wrap: nowrap; }
  .board-toolbar.single-row .quick-chips.inline { flex: 0 1 auto; min-width: 0; }
}
.board-toolbar.single-row .search-wrap {
  flex: 0 1 220px; min-width: 160px; max-width: 280px;
}
.board-toolbar.single-row .search-wrap input { padding: 7px 30px 7px 30px; height: 30px; font-size: 13px; }
.board-toolbar.single-row .search-wrap .search-shortcut { display: none; }

/* Environment filter — segmented chip group */
.env-chips {
  display: inline-flex; gap: 2px; align-items: center;
  background: var(--slate-100); padding: 2px; border-radius: 999px; height: 30px;
}
.env-chip {
  background: transparent; border: 0; border-radius: 999px; height: 26px;
  padding: 0 10px; font-size: 12px; color: var(--slate-700); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; line-height: 1;
  transition: all 0.12s; white-space: nowrap;
}
.env-chip:hover { color: var(--modena); }
.env-chip.active {
  background: white; color: var(--modena); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.env-chip .count {
  background: var(--slate-200); color: var(--slate-600);
  padding: 0 5px; border-radius: 999px; font-size: 10px; font-weight: 600; min-width: 16px; text-align: center;
}
.env-chip.active .count { background: var(--modena-mint); color: var(--modena); }
/* Icons-only by default — tooltip shows full env name. The "Kõik" chip has no
   icon, so its label stays visible. */
.env-chip[data-env] .env-label { display: none; }

/* Quick filter chips (inline variant — sits in same toolbar row) */
.quick-chips {
  display: flex; gap: 5px; flex-wrap: wrap; align-items: center;
  margin-bottom: 12px;
}
.quick-chips.inline { margin-bottom: 0; flex-wrap: nowrap; }
.quick-chip {
  background: white; border: 1px solid var(--slate-300); border-radius: 999px;
  padding: 0 10px; height: 28px; font-size: 12px; color: var(--slate-700); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; line-height: 1; white-space: nowrap;
  transition: all 0.12s;
}
.quick-chip:hover { border-color: var(--modena); color: var(--modena); }
.quick-chip.active { background: var(--modena); color: white; border-color: var(--modena); }
.quick-chip .count {
  background: rgba(255,255,255,0.25); padding: 0 5px; border-radius: 999px;
  font-size: 10px; font-weight: 600; min-width: 16px; text-align: center;
}
.quick-chip:not(.active) .count { background: var(--slate-100); color: var(--slate-600); }

/* Multi-select + keyboard focus on cards */
.task-card.selected {
  border-color: var(--modena); box-shadow: 0 0 0 2px rgba(1,43,50,0.15);
}
.task-card.kbd-focus {
  outline: 2px solid var(--modena); outline-offset: 2px;
}

/* Selection action bar (appears when ≥1 cards are selected) */
.selection-bar {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; gap: 10px; align-items: center;
  background: var(--modena); color: white;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.selection-bar button {
  background: rgba(255,255,255,0.15); border: 0; color: white;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer;
}
.selection-bar button:hover { background: rgba(255,255,255,0.28); }

/* Quick-edit clickable bits on cards */
.task-card .meta .pill { cursor: pointer; }
.task-card .meta .pill:hover { filter: brightness(0.95); }
.task-card .footer .due-edit {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.task-card .footer .due-edit:hover { color: var(--modena); }

/* Priority popover (quick edit) */
.popover {
  position: absolute; z-index: 100;
  background: white; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px;
  display: flex; flex-direction: column; gap: 2px; min-width: 140px;
}
.popover button {
  background: none; border: 0; padding: 6px 10px; text-align: left;
  font-size: 13px; cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
}
.popover button:hover { background: var(--slate-100); }
.popover button.danger { color: #B91C1C; }

/* WIP limit warnings */
.column.wip-over .column-header .count {
  background: #FEE2E2; color: #B91C1C;
}
.column-header .wip-edit {
  background: none; border: 0; padding: 0 2px; font-size: 10px;
  color: var(--slate-400); cursor: pointer; opacity: 0;
}
.column-header:hover .wip-edit { opacity: 1; }
.column-header .wip-edit:hover { color: var(--modena); }

/* Swimlanes */
.lane { margin-bottom: 16px; }
.lane:last-child { margin-bottom: 0; }
.lane-header {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 8px; padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--slate-700);
}
.lane-header .lane-count {
  background: var(--slate-100); color: var(--slate-600);
  padding: 1px 8px; border-radius: 999px; font-size: 10px;
}
.lane-header .lane-collapse {
  background: none; border: 0; cursor: pointer; color: var(--slate-400);
  padding: 0 4px; font-size: 14px;
}
.lane.collapsed .board { display: none; }
.lane.collapsed .lane-collapse { transform: rotate(-90deg); }

/* Lane / view selector in toolbar */
.toolbar-select {
  background: white; border: 1px solid var(--slate-300); border-radius: 999px;
  padding: 0 26px 0 10px; font-size: 12px; color: var(--slate-700); cursor: pointer;
  height: 30px; max-width: 160px;
}
.toolbar-select:hover { border-color: var(--modena); }

/* View / grouping icon button — single button replacing two selects */
.view-btn {
  background: white; border: 1px solid var(--slate-300); border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--slate-600); transition: all 0.12s; flex: 0 0 auto;
}
.view-btn:hover { border-color: var(--modena); color: var(--modena); }
.view-btn.active {
  background: var(--modena); border-color: var(--modena); color: white;
}
@media (max-width: 1280px) {
  .toolbar-select { max-width: 130px; }
}
@media (max-width: 1100px) {
  .toolbar-select { max-width: 110px; font-size: 11px; }
}

/* Keyboard help (footer hint, only on board page) */
.kbd-help {
  display: inline-flex; gap: 4px; align-items: center;
  font-size: 11px; color: var(--slate-400); margin-left: auto;
}
.kbd-help kbd {
  background: var(--slate-100); border: 1px solid var(--slate-300);
  border-bottom-width: 2px; border-radius: 4px;
  padding: 1px 5px; font-family: ui-monospace, monospace; font-size: 10px;
}
.column {
  min-width: 264px; max-width: 320px; flex: 0 0 auto; display: flex; flex-direction: column;
}
.column-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding: 0 4px;
  height: 28px;
}
.column-header .actions { opacity: 0; transition: opacity .15s; }
.column-header:hover .actions { opacity: 1; }
.column-header:hover .name { color: var(--modena); }
.column-header .name {
  font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0; color: inherit;
  cursor: pointer;
}
.column-header .name .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.column-header .count {
  background: var(--slate-100); color: var(--slate-500);
  border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
.column-header .actions { display: inline-flex; gap: 2px; color: var(--slate-400); }
.column-header .actions button { background: none; border: none; padding: 2px; font-size: 14px; }
.column-header .actions button:hover { color: var(--modena); }
.column-header .actions .delete:hover { color: #B91C1C; }

.column-body {
  flex: 1; background: rgba(241,245,249,0.6);
  border-radius: 8px; padding: 6px; min-height: 200px;
  display: flex; flex-direction: column; gap: 6px;
}
.column-body.over { background: var(--modena-mint); }
.column-body .empty { color: var(--slate-400); font-size: 12px; text-align: center; padding: 32px 0; }

.task-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px; cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-moderate) var(--spring-moderate),
              border-color var(--dur-moderate) var(--spring-moderate),
              transform var(--dur-fast) var(--spring-moderate);
}
.task-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.task-card.sortable-ghost { opacity: 0.4; }
.task-card .meta { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.task-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px; font-weight: 600;
  color: var(--slate-500); letter-spacing: 0.04em;
  margin-bottom: 4px; display: inline-block;
}
.task-card .title {
  font-weight: 600; font-size: 13px; color: var(--modena);
  margin: 4px 0 8px; line-height: 1.4;
  text-decoration: none; display: block;
}
.task-card .title:hover { text-decoration: underline; }
.task-card .footer {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  font-size: 12px; color: var(--slate-500);
}
.task-card .footer .name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card .badges { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--slate-400); }
.task-card .overdue { color: #DC2626; font-weight: 600; }

.add-column {
  min-width: 220px; margin-top: 38px;
}
.add-column .toggle {
  width: 100%; height: 40px; border: 1px dashed var(--slate-300); border-radius: 8px;
  color: var(--slate-500); background: transparent; font-size: 14px;
}
.add-column .toggle:hover { background: white; color: var(--modena); }
.add-column form input { padding: 8px 12px; }

