/* IT Project Tracker — design system per Doc/mvp.html UI direction:
   light theme, white background, 100px fixed left panel, distinct action colors
   (red = delete/cancel, green = submit/process, blue = view/edit/reset). */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --blue: #2563eb;   --blue-soft: #eff6ff;   --blue-dark: #1d4ed8;
  --green: #059669;  --green-soft: #ecfdf5;  --green-dark: #047857;
  --red: #dc2626;    --red-soft: #fef2f2;    --red-dark: #b91c1c;
  --amber: #d97706;  --amber-soft: #fffbeb;
  --indigo: #6366f1; --indigo-soft: #eef2ff;
  --cyan: #0891b2;   --cyan-soft: #ecfeff;
  --purple: #7c3aed; --purple-soft: #f5f3ff;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.14);
  --radius: 12px;
  --sidebar-w: 100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

button { font-family: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Fixed 100px left panel ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  gap: 6px;
  z-index: 40;
}
.side-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.side-link.c-teal:hover,   .side-link.c-teal.active   { background: #f0fdfa; color: #0d9488; }
.side-link.c-violet:hover, .side-link.c-violet.active { background: #f5f3ff; color: #7c3aed; }
.side-link.c-rose:hover,   .side-link.c-rose.active   { background: #fff1f2; color: #e11d48; }
.side-link.c-orange:hover, .side-link.c-orange.active { background: #fff7ed; color: #ea580c; }
.side-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 4px 8px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.side-link:hover { text-decoration: none; }
/* Each section gets its own color scheme */
.side-link.c-blue:hover,   .side-link.c-blue.active   { background: var(--blue-soft);   color: var(--blue-dark); }
.side-link.c-indigo:hover, .side-link.c-indigo.active { background: var(--indigo-soft); color: var(--indigo); }
.side-link.c-green:hover,  .side-link.c-green.active  { background: var(--green-soft);  color: var(--green-dark); }
.side-link.c-amber:hover,  .side-link.c-amber.active  { background: var(--amber-soft);  color: var(--amber); }
.side-link.c-cyan:hover,   .side-link.c-cyan.active   { background: var(--cyan-soft);   color: var(--cyan); }
.side-link.c-purple:hover, .side-link.c-purple.active { background: var(--purple-soft); color: var(--purple); }
.side-link.c-red:hover                                { background: var(--red-soft);    color: var(--red-dark); }
.sidebar form { width: 100%; margin: 0; }
.side-link.logout-btn { border: 0; background: transparent; font-family: inherit; }

/* ---------- Main area ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; background: var(--bg); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.topbar .who { display: flex; align-items: center; gap: 10px; }
.topbar .who .meta { text-align: right; line-height: 1.25; }
.topbar .who .meta .name { font-weight: 600; font-size: 0.85rem; }
.topbar .who .meta .role { color: var(--muted); font-size: 0.72rem; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.5rem; }

.content { padding: 22px 28px 90px; width: 100%; max-width: none; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.card > h2, .card > h3 { margin-top: 0; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h2 { margin: 0; font-size: 1.02rem; }
.card-title .hint { color: var(--muted); font-size: 0.8rem; }

/* Stat tiles — distinct colors so they stand out */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.stat .ic svg { width: 18px; height: 18px; }
.stat .num { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.stat .lbl { color: var(--muted); font-size: 0.72rem; font-weight: 500; }
.stat.t-blue .ic   { background: var(--blue-soft);   color: var(--blue); }
.stat.t-indigo .ic { background: var(--indigo-soft); color: var(--indigo); }
.stat.t-green .ic  { background: var(--green-soft);  color: var(--green); }
.stat.t-red .ic    { background: var(--red-soft);    color: var(--red); }
.stat.t-amber .ic  { background: var(--amber-soft);  color: var(--amber); }

/* Compact KPI grid — 12 tiles as 6 per row (2 rows) on desktop */
.stats.kpi-grid { grid-template-columns: repeat(6, 1fr); gap: 9px; }
.stats.kpi-grid .stat { padding: 9px 10px; gap: 9px; }
.stats.kpi-grid .stat .ic { width: 30px; height: 30px; border-radius: 8px; }
.stats.kpi-grid .stat .ic svg { width: 16px; height: 16px; }
.stats.kpi-grid .stat .num { font-size: 1.05rem; }
.stats.kpi-grid .stat .lbl { font-size: 0.68rem; line-height: 1.2; }
@media (max-width: 1100px) { .stats.kpi-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .stats.kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .stats.kpi-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Buttons: color convention from the doc ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #c2410c; box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3); }
.btn-outline { background: var(--surface); color: var(--muted); border-color: var(--border); }
.btn-outline:hover { border-color: #cbd5e1; color: var(--text); background: var(--surface-2); }
.btn-sm { padding: 6px 11px; font-size: 0.78rem; border-radius: 8px; gap: 5px; }

/* Icon-only action buttons in table rows */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.18s ease;
}
.icon-btn.act-view { color: var(--blue); background: var(--blue-soft); border-color: #bfdbfe; }
.icon-btn.act-view:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.icon-btn.act-edit { color: var(--amber); background: var(--amber-soft); border-color: #fde68a; }
.icon-btn.act-edit:hover { background: var(--amber); border-color: var(--amber); color: #fff; }
.icon-btn.act-go { color: var(--green); background: var(--green-soft); border-color: #a7f3d0; }
.icon-btn.act-go:hover { background: var(--green); border-color: var(--green); color: #fff; }
/* Billing / additional-effort action — purple, matching the Add. Effort badge */
.icon-btn.act-pay { color: var(--purple); background: var(--purple-soft); border-color: #ddd6fe; }
.icon-btn.act-pay:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
.icon-btn.act-del { color: var(--red); background: var(--red-soft); border-color: #fecaca; }
.icon-btn.act-del:hover { background: var(--red); border-color: var(--red); color: #fff; }
.icon-btn.act-off { color: var(--red); background: var(--red-soft); border-color: #fecaca; }
.icon-btn.act-off:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Floating action button (bottom-right) */
.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 45;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--green), #10b981);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.fab:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(5, 150, 105, 0.5); text-decoration: none; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.field label .req { color: var(--red); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="tel"], .field input[type="date"],
.field input[type="time"], .field input[type="datetime-local"], .field input[type="url"],
.field select, .field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field input[type="color"] { width: 46px; height: 38px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.field .help { font-size: 0.72rem; color: var(--muted); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }

/* Two-column form layout: main fields left, side cards right */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.form-main { min-width: 0; }
.form-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }
.form-actions-sticky {
  position: sticky;
  bottom: 18px;
  z-index: 30;
  margin-left: auto;
  width: fit-content;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-side { position: static; }
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.data th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 2px dotted #cbd5e1;
  border-right: 1px dotted var(--border);
  white-space: nowrap;
}
table.data td { padding: 11px 12px; border-bottom: 1px dotted #cbd5e1; border-right: 1px dotted var(--border); vertical-align: middle; }
table.data th:last-child, table.data td:last-child { border-right: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data th .th-ic { display: inline-block; vertical-align: -3px; margin-right: 6px; color: var(--indigo); }
table.data tbody tr { transition: background 0.15s ease; }
table.data tbody tr:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green-dark); }
.badge.red   { background: var(--red-soft);   color: var(--red-dark); }
.badge.gray  { background: #f1f5f9;           color: var(--muted); }
.badge.blue  { background: var(--blue-soft);  color: var(--blue-dark); }
.badge.indigo{ background: var(--indigo-soft);color: var(--indigo); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }

/* Inline quick-edit selects (ticket list status / assignee) — badge-shaped */
.quick-select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  max-width: 160px;
  padding: 3px 22px 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-select:hover { border-color: currentColor; }
.quick-select:focus { outline: 2px solid var(--blue, #2563eb); outline-offset: 1px; }
.quick-select.is-empty { color: var(--muted); background-color: var(--surface-2); }
.quick-select option { background: var(--surface, #fff); color: var(--text, #0f172a); font-weight: 400; }
.quick-select:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Tabs (settings) ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
}
.tabs a:hover { border-color: var(--blue); color: var(--blue-dark); text-decoration: none; }
.tabs a.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tabs.tabs-wide a { padding: 8px 26px; min-width: 118px; text-align: center; }
.tab-count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--muted);
}
.tabs a.active .tab-count { background: rgba(255, 255, 255, 0.28); color: #fff; }

/* ---------- Permission matrix ---------- */
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }

/* ---------- Search bar ---------- */
.list-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }

/* Compact listing filter bar: the GET form filter cards above each listing.
   Scoped to method="get" so create/edit (POST) forms keep their roomy sizing. */
.card:has(> form[method="get"]) { padding: 10px 12px; margin-bottom: 12px; }
.card > form[method="get"] { gap: 8px !important; align-items: end; }
.card > form[method="get"] .field { gap: 3px; }
.card > form[method="get"] .field label,
.report-filters .field label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.card > form[method="get"] .field select,
.card > form[method="get"] .field input,
.report-filters .field select,
.report-filters .field input { padding: 6px 9px; font-size: 0.82rem; border-radius: 8px; }
.card > form[method="get"] .btn { padding-top: 7px; padding-bottom: 7px; }
.search-box { position: relative; flex: 1; max-width: 340px; }
.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px 9px 38px;
  font-size: 0.86rem;
  font-family: inherit;
}
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); display: grid; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 16px; align-items: center; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pagination .current { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  animation: toast-in 0.3s ease;
}
.toast.success { border-left-color: var(--green); }
.toast.success .t-ic { color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.error .t-ic { color: var(--red); }
.toast .t-ic { display: grid; margin-top: 1px; }
.toast .t-close { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: grid; }
.toast.leaving { opacity: 0; transform: translateX(12px); transition: all 0.25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, 0.45);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 22px;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-backdrop.open .modal { transform: none; }
.modal h3 { margin: 0 0 6px; font-size: 1.02rem; display: flex; align-items: center; gap: 9px; }
.modal h3 .warn-ic { color: var(--red); display: grid; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: 0.86rem; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal.modal-lg { max-width: 720px; max-height: calc(100vh - 48px); overflow-y: auto; }
.modal .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.modal .modal-head h3 { margin: 0; }
.modal .modal-head .head-ic { color: var(--blue); display: grid; }
.icon-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.icon-btn.is-disabled:hover { background: var(--red-soft); border-color: #fecaca; color: var(--red); }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
}
.empty .e-ic { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--surface-2); color: #94a3b8; margin-bottom: 12px; }
.empty p { margin: 4px 0 0; font-size: 0.86rem; }
.empty h3 { margin: 0; font-size: 0.98rem; color: var(--text); }

/* ---------- Auth pages ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 480px at 88% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(820px 420px at -8% 108%, rgba(16, 185, 129, 0.14), transparent 55%),
    radial-gradient(640px 420px at 50% 120%, rgba(37, 99, 235, 0.10), transparent 60%),
    linear-gradient(160deg, #eef4ff 0%, #fdfdff 45%, #effcf6 100%);
  padding: 24px;
}
.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 410px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 32px 32px 24px;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--indigo), var(--green));
}
.auth-hero { text-align: center; margin-bottom: 22px; }
.auth-hero .logo {
  width: 58px; height: 58px; border-radius: 16px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
  overflow: hidden;
}
.auth-hero .logo img { width: 100%; height: 100%; object-fit: cover; }
.auth-hero h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--blue-dark), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-hero .auth-sub { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }
.auth-card .field { margin-bottom: 13px; }
.input-icon { position: relative; }
.input-icon .in-ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; display: grid; pointer-events: none;
  transition: color 0.2s ease;
}
.field .input-icon input[type] { padding-left: 38px; }
.input-icon:focus-within .in-ic { color: var(--blue); }
.btn-auth { width: 100%; justify-content: center; padding: 11px 16px; font-size: 0.9rem; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; font-size: 0.8rem; }
.auth-trust { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.auth-trust span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600;
  white-space: nowrap;
}
.auth-trust span:nth-child(1) { background: var(--green-soft); color: var(--green-dark); }
.auth-trust span:nth-child(2) { background: var(--blue-soft); color: var(--blue-dark); }
.auth-trust span:nth-child(3) { background: var(--indigo-soft); color: var(--indigo); }
.auth-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 0.75rem; margin-top: 14px;
}

/* Split login layout — animated showcase panel left, form right */
.auth-shell {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  width: 100%;
  max-width: 940px;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.auth-shell .auth-card { max-width: none; border: 0; border-radius: 0; box-shadow: none; background: none; align-self: center; }
.auth-shell .auth-card::before { display: none; }

.auth-side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 38px 34px 30px;
  background: linear-gradient(150deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
}
.as-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.as-blob.b1 { width: 260px; height: 260px; top: -90px; right: -70px; background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%); animation: as-drift 9s ease-in-out infinite; }
.as-blob.b2 { width: 300px; height: 300px; bottom: -120px; left: -90px; background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%); animation: as-drift 11s ease-in-out infinite reverse; }

.as-head h2 { margin: 0 0 8px; font-size: 1.45rem; line-height: 1.25; letter-spacing: -0.02em; }
.as-head p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: rgba(255, 255, 255, 0.85); }

/* Floating mock progress card + orbiting icon chips */
.as-scene { position: relative; flex: 1; min-height: 250px; }
.as-card {
  position: absolute; left: 50%; top: 50%;
  width: min(300px, 82%);
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  padding: 16px 16px 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  animation: as-hover 6s ease-in-out infinite;
}
.as-row { display: flex; align-items: center; gap: 8px; font-size: 0.76rem; font-weight: 600; margin: 11px 0 6px; }
.as-row:first-child { margin-top: 0; }
.as-row .as-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, 0.18); flex-shrink: 0; }
.as-row .as-pct { margin-left: auto; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.9); }
.as-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.as-bar span { display: block; height: 100%; width: var(--w, 60%); border-radius: 999px; background: linear-gradient(90deg, #6ee7b7, #34d399); animation: as-grow 2.8s ease-in-out infinite alternate; }

.as-chip {
  position: absolute;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  animation: as-hover 5s ease-in-out infinite;
}
.as-chip.c1 { top: 4%; left: 1%; animation-delay: -0.6s; }
.as-chip.c2 { top: 0; right: 6%; animation-delay: -1.8s; }
.as-chip.c3 { bottom: 6%; left: 5%; animation-delay: -2.6s; }
.as-chip.c4 { bottom: 0; right: 2%; animation-delay: -3.4s; }
.as-chip.c5 { top: 42%; right: -6px; animation-delay: -4.2s; }

.as-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.as-points li { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.92); }
.as-points li svg { color: #6ee7b7; flex-shrink: 0; }

@keyframes as-hover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes as-drift { 0%, 100% { translate: 0 0; } 50% { translate: -14px 12px; } }
@keyframes as-grow { from { width: 14%; } to { width: var(--w, 60%); } }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-side { display: none; }
}

/* ---------- Detail pages (client / vendor / service) ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .id-block { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; }
.page-head .id-block .thumb {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; overflow: hidden;
  background: var(--indigo-soft); color: var(--indigo);
}
.page-head .id-block .thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.page-head .sub { color: var(--muted); font-size: 0.82rem; margin-top: 2px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.page-head .head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; }
.detail-grid .dt { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 2px; }
.detail-grid .dd { font-size: 0.9rem; word-break: break-word; }
.detail-grid a.dd { color: var(--blue); }

/* Sub-tabs inside a detail page */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.subtabs a {
  padding: 9px 15px; border-radius: 8px 8px 0 0; color: var(--muted);
  font-size: 0.83rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; border-bottom: 0;
  margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px;
}
.subtabs a:hover { color: var(--blue-dark); text-decoration: none; }
.subtabs a.active { background: var(--surface); border-color: var(--border); color: var(--blue-dark); }
.subtabs a .cnt { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 0.7rem; font-weight: 700; }

/* Secret / credential reveal */
.secret-row { display: inline-flex; align-items: center; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.secret-row .secret-val { letter-spacing: 0.05em; }
.secret-row .icon-btn { width: 28px; height: 28px; }

.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.money.in  { color: var(--green-dark); }
.money.out { color: var(--red-dark); }

/* ---------- Activity list ---------- */
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #f1f5f9; font-size: 0.84rem; align-items: flex-start; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list .a-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--indigo-soft); color: var(--indigo); display: grid; place-items: center; flex-shrink: 0; }
.activity-list .a-time { margin-left: auto; color: var(--muted); font-size: 0.72rem; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --sidebar-w: 74px; }
  .side-link { font-size: 0.58rem; }
  .content { padding: 18px 14px 110px; }
  .topbar { padding: 12px 14px; }
  .topbar .who .meta { display: none; }
}

/* ============================================================
   Phase 3 — Projects, Work Breakdown, progress & report
   ============================================================ */
.stat.t-purple .ic { background: var(--purple-soft); color: var(--purple); }
.stat.t-cyan .ic   { background: var(--cyan-soft);   color: var(--cyan); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.cyan   { background: var(--cyan-soft);   color: var(--cyan); }

/* Progress bar */
.progress { display: flex; align-items: center; gap: 8px; }
.progress .bar { flex: 1; height: 7px; border-radius: 999px; background: #eef2f6; overflow: hidden; min-width: 60px; }
.progress .bar > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width 0.3s ease; }
.progress .bar > span.p-done { background: var(--green); }
.progress .bar > span.p-mid  { background: var(--blue); }
.progress .bar > span.p-low  { background: var(--amber); }
.progress .bar > span.p-zero { background: #cbd5e1; }
.progress .pct { font-size: 0.74rem; font-weight: 700; color: var(--muted); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.progress.lg .bar { height: 10px; }
.progress.lg .pct { font-size: 0.85rem; }

/* Project cards grid on the index */
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-card { display: flex; flex-direction: column; gap: 12px; }
.proj-card .p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.proj-card h3 { margin: 0; font-size: 1rem; }
.proj-card h3 a { color: inherit; }
.proj-card .p-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.78rem; color: var(--muted); }
.proj-card .p-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 10px; }

/* WBS tree */
.wbs-tree { display: flex; flex-direction: column; gap: 10px; }
.wbs-module { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.wbs-node-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.wbs-module > .wbs-node-head { background: var(--surface-2); }
.wbs-node-head .n-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wbs-node-head .n-name .lvl { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #eef2f6; border-radius: 5px; padding: 2px 6px; }
.wbs-node-head .grow { flex: 1; min-width: 0; }
.wbs-node-head .progress { width: 160px; flex: none; }
.wbs-node-head .row-actions { flex: none; }
.wbs-subs { padding: 6px 10px 12px 26px; display: flex; flex-direction: column; gap: 8px; }
.wbs-sub { border-left: 2px solid var(--border); border-radius: 8px; background: var(--surface); }
.wbs-sub > .wbs-node-head { padding: 9px 12px; }
.wbs-feats { padding: 2px 8px 8px 24px; display: flex; flex-direction: column; }
.wbs-feat { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-top: 1px dashed var(--border); font-size: 0.88rem; }
.wbs-feat:first-child { border-top: 0; }
.wbs-feat .f-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.wbs-feat .f-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.76rem; }
.wbs-feat .progress { width: 110px; flex: none; }
.wbs-empty { color: var(--muted); font-size: 0.82rem; padding: 8px 4px; }
.wbs-addbtn { align-self: flex-start; }
.assignee-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--muted); }
.assignee-chip .av { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--purple)); color: #fff; font-size: 0.6rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.assignee-chip .av img { width: 100%; height: 100%; object-fit: cover; }

/* Import preview rows */
tr.row-error td { background: var(--red-soft); }
tr.row-warn td  { background: var(--amber-soft); }
.row-msg { font-size: 0.72rem; margin-top: 2px; }
.row-msg.err { color: var(--red-dark); }
.row-msg.warn { color: var(--amber); }

/* ============================================================
   Phase 4 & 5 — Tickets, Notifications, Dashboards, Portal
   ============================================================ */
:root {
  --teal: #0d9488;   --teal-soft: #f0fdfa;
  --rose: #e11d48;   --rose-soft: #fff1f2;
  --orange: #ea580c; --orange-soft: #fff7ed;
  --violet: #7c3aed; --violet-soft: #f5f3ff;
}

/* extra badge + stat-tile colours */
.badge.teal   { background: var(--teal-soft);   color: var(--teal); }
.badge.rose   { background: var(--rose-soft);   color: var(--rose); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.stat.t-teal .ic   { background: var(--teal-soft);   color: var(--teal); }
.stat.t-rose .ic   { background: var(--rose-soft);   color: var(--rose); }
.stat.t-orange .ic { background: var(--orange-soft); color: var(--orange); }
.stat.t-violet .ic { background: var(--violet-soft); color: var(--violet); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75rem; color: var(--muted); }
.row-sub { font-size: 0.72rem; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.row-sub svg { vertical-align: middle; }

/* ---------- Topbar bell + notification panel ---------- */
.topbar { gap: 14px; }
.topbar h1 { margin-right: auto; }
.bell-wrap { position: relative; }
.bell-btn {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.bell-btn:hover { background: #eef2ff; color: var(--indigo); }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 0.64rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface);
}
.notif-panel {
  position: absolute; top: 48px; right: 0; width: 340px; max-width: 88vw;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden;
}
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.np-mark { background: none; border: 0; color: var(--blue); font-size: 0.76rem; cursor: pointer; }
.np-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.np-list li a { display: block; padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: inherit; text-decoration: none; }
.np-list li a:hover { background: var(--surface-2); text-decoration: none; }
.np-list li.unread a { background: var(--blue-soft); }
.np-title { display: block; font-size: 0.82rem; font-weight: 600; }
.np-sub { display: block; font-size: 0.74rem; color: var(--muted); margin: 2px 0; }
.np-time { display: block; font-size: 0.68rem; color: #94a3b8; }
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; color: var(--muted); font-size: 0.82rem; }
.np-foot { display: block; text-align: center; padding: 10px; font-size: 0.8rem; border-top: 1px solid var(--border); }

/* ---------- Avatar / account dropdown ---------- */
.who-wrap { position: relative; }
.topbar .who {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 3px 6px 3px 3px; margin: 0;
  border-radius: 999px; cursor: pointer; color: inherit; font: inherit;
  transition: background 0.15s ease;
}
.topbar .who:hover { background: var(--surface-2); }
.who-caret { color: var(--muted); display: grid; place-items: center; transition: transform 0.15s ease; }
.who-wrap:has(#account-menu:not([hidden])) .who-caret { transform: rotate(180deg); }

.account-menu {
  position: absolute; top: 52px; right: 0; width: 244px; max-width: 88vw;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden;
}
.am-head { display: flex; align-items: center; gap: 11px; padding: 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.am-id { display: flex; flex-direction: column; min-width: 0; }
.am-name { font-weight: 600; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-role { color: var(--muted); font-size: 0.72rem; }
.am-list { padding: 6px; }
.am-logout { padding: 6px; border-top: 1px solid var(--border); }
.am-link {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border-radius: 9px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 0.86rem; text-align: left;
  text-decoration: none; cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
}
.am-link svg { color: var(--muted); flex-shrink: 0; transition: color 0.12s ease; }
.am-link:hover { background: var(--surface-2); text-decoration: none; }
.am-link:hover svg { color: var(--indigo); }
.am-link.active { background: var(--indigo-soft); color: var(--indigo); font-weight: 600; }
.am-link.active svg { color: var(--indigo); }
.am-danger { color: var(--red); }
.am-danger svg { color: var(--red); }
.am-danger:hover { background: var(--red-soft, #fef2f2); }
.am-danger:hover svg { color: var(--red); }

/* Full notifications page list */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li a { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f1f5f9; color: inherit; text-decoration: none; }
.notif-list li a:hover { background: var(--surface-2); text-decoration: none; }
.notif-list li.unread a { background: var(--blue-soft); }
.notif-list .n-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--indigo-soft); color: var(--indigo); display: grid; place-items: center; flex-shrink: 0; }
.notif-list .n-body { flex: 1; }
.notif-list .n-title { display: block; font-weight: 600; font-size: 0.88rem; }
.notif-list .n-sub { display: block; color: var(--muted); font-size: 0.78rem; }
.notif-list .n-time { color: #94a3b8; font-size: 0.72rem; white-space: nowrap; }

/* ---------- Bulk action bar ---------- */
.bulk-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  padding: 10px 14px; background: var(--blue-soft); border: 1px solid #bfdbfe; border-radius: var(--radius);
}
/* The bar starts hidden and JS toggles the attribute — display:flex above would
   otherwise win over the browser's [hidden] rule and leave it always on screen. */
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: 0.82rem; font-weight: 600; color: var(--blue-dark); }
.bulk-bar select {
  min-width: 200px;
  max-width: 240px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bulk-bar select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- Ticket detail layout ---------- */
.ticket-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 18px; align-items: start; }
.ticket-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ticket-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 78px; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: 1fr; } .ticket-side { position: static; } }

.side-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.84rem; }
.side-list > div:last-child { border-bottom: 0; }
.side-list .dt { color: var(--muted); }
.side-list .dd { text-align: right; font-weight: 500; }

.stack-form { margin-top: 10px; }
.stack-form > label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select { flex: 1; }

/* ---------- Comment thread + timeline ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.tl-event { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); padding-left: 4px; }
.tl-event .tl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.tl-event .tl-text { flex: 1; }
.tl-event .tl-time { color: #94a3b8; font-size: 0.72rem; }
.cmt { display: flex; gap: 12px; }
.cmt-av { width: 36px; height: 36px; border-radius: 50%; background: var(--indigo-soft); color: var(--indigo); display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.cmt-av img { width: 100%; height: 100%; object-fit: cover; }
.cmt-body { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; }
.cmt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 0.84rem; }
.cmt-time { color: #94a3b8; font-size: 0.72rem; margin-left: auto; }
.cmt-text { font-size: 0.88rem; white-space: pre-wrap; }

.cmt-form { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.cmt-form textarea { width: 100%; }
.cmt-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.file-pick { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px dashed var(--border); border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 0.82rem; background: var(--surface-2); }
.file-pick:hover { border-color: var(--blue); color: var(--blue); }
.file-names { font-size: 0.76rem; color: var(--muted); margin-top: 8px; }
.file-names span { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; }

/* attachments */
.att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font-size: 0.78rem; color: var(--text); text-decoration: none; }
.att-chip:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.att-chip .att-size { color: #94a3b8; font-size: 0.7rem; }
.att-chip-wrap { display: inline-flex; align-items: center; gap: 2px; }

/* additional-effort panel */
.ae-panel .detail-grid { margin-top: 4px; }

/* convert options */
.convert-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.convert-opt { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.convert-opt:hover { border-color: var(--blue); background: var(--blue-soft); }
.convert-opt input { margin-top: 3px; }
.convert-opt strong { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.convert-opt small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 3px; }

/* ---------- Dashboard grids ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 18px; }
.dash-grid .card { margin-bottom: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li a { font-weight: 600; }
.mini-list .ml-meta { color: var(--muted); font-size: 0.76rem; margin-left: auto; text-align: right; }
.mini-list li .badge { flex-shrink: 0; }
.renewal-mini { display: flex; gap: 8px; }

.workload { display: flex; flex-direction: column; gap: 12px; }
.wl-row { display: flex; align-items: center; gap: 12px; }
.wl-row .assignee-chip { min-width: 150px; }
.wl-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.wl-bar span { display: block; height: 100%; background: var(--green); border-radius: 5px; }
.wl-num { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.wl-num strong { color: var(--text); }

/* ============================================================
   Phase 6 — Global Search & Audit
   ============================================================ */

/* Audit filter bar */
.report-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.report-filters .field { min-width: 150px; }
.report-filters input[type="date"], .report-filters input[type="search"], .report-filters select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-size: 0.85rem; color: var(--text);
}

/* Global search results */
.search-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.search-group { margin-bottom: 0; }
.sg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sg-head h3 { margin: 0; font-size: 0.95rem; }
.sg-head .sg-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--indigo-soft); color: var(--indigo); }
.sg-head .sg-count { margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-radius: 20px; padding: 2px 9px; }
.sg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sg-list li { border-top: 1px solid var(--border); }
.sg-list li:first-child { border-top: 0; }
.sg-list li a { display: flex; flex-direction: column; gap: 2px; padding: 9px 4px; text-decoration: none; color: inherit; border-radius: 6px; }
.sg-list li a:hover { background: var(--surface-2); }
.sg-title { font-weight: 600; font-size: 0.88rem; }
.sg-sub { color: var(--muted); font-size: 0.78rem; }

/* Topbar global-search box */
.topbar .top-search { position: relative; }
.topbar .top-search input { width: 260px; max-width: 40vw; padding: 8px 12px 8px 34px;
  border: 1px solid var(--border); border-radius: 20px; background: var(--surface-2);
  font-size: 0.85rem; color: var(--text); }
.topbar .top-search input:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.topbar .top-search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* ============================================================
   Visual refresh — light gradients & colour accents
   ============================================================ */

/* Soft app-wide backdrop */
body {
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(99, 102, 241, 0.06), transparent 60%),
    radial-gradient(720px 380px at 0% 100%, rgba(13, 148, 136, 0.05), transparent 55%),
    linear-gradient(165deg, #f6f9ff 0%, #ffffff 45%, #f7fdfa 100%);
  background-attachment: fixed;
}
.main { background: transparent; }

.sidebar { background: linear-gradient(180deg, #ffffff 0%, #f7faff 55%, #f3f7ff 100%); }

.topbar {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.92) 0%, rgba(255, 255, 255, 0.94) 45%, rgba(236, 253, 245, 0.9) 100%);
  backdrop-filter: blur(10px);
}

/* Cards get a faint top-lit gradient + accent bar on titled cards */
.card { background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%); }
.card-title h2 { display: flex; align-items: center; gap: 9px; }
.card-title h2::before {
  content: "";
  width: 4px; height: 16px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--blue), var(--indigo));
}

/* Stat tiles — soft per-colour gradients with tinted borders */
.stat.t-blue   { background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%); border-color: #dbeafe; }
.stat.t-indigo { background: linear-gradient(135deg, #eef2ff 0%, #ffffff 60%); border-color: #e0e7ff; }
.stat.t-green  { background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 60%); border-color: #d1fae5; }
.stat.t-red    { background: linear-gradient(135deg, #fef2f2 0%, #ffffff 60%); border-color: #fee2e2; }
.stat.t-amber  { background: linear-gradient(135deg, #fffbeb 0%, #ffffff 60%); border-color: #fef3c7; }
.stat.t-purple { background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 60%); border-color: #ede9fe; }
.stat.t-cyan   { background: linear-gradient(135deg, #ecfeff 0%, #ffffff 60%); border-color: #cffafe; }
.stat.t-teal   { background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 60%); border-color: #ccfbf1; }
.stat.t-rose   { background: linear-gradient(135deg, #fff1f2 0%, #ffffff 60%); border-color: #ffe4e6; }
.stat.t-orange { background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%); border-color: #ffedd5; }
.stat.t-violet { background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 60%); border-color: #ede9fe; }

/* Gradient action buttons (colour convention unchanged).
   Pattern: base colour flowing into a clearly brighter neighbour hue,
   matching the orange→amber sweep of .btn-orange. */
.btn-green { background: linear-gradient(135deg, #059669, #34d399); }
.btn-green:hover { background: linear-gradient(135deg, #047857, #10b981); }
.btn-blue { background: linear-gradient(135deg, #2563eb, #818cf8); }
.btn-blue:hover { background: linear-gradient(135deg, #1d4ed8, #6366f1); }
.btn-red { background: linear-gradient(135deg, #dc2626, #fb7185); }
.btn-red:hover { background: linear-gradient(135deg, #b91c1c, #f43f5e); }
.btn-orange { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.btn-orange:hover { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.btn-outline { background: linear-gradient(180deg, #ffffff, #f1f5f9); }
.btn-outline:hover { background: linear-gradient(180deg, #f8fafc, #e2e8f0); }
.fab { background: linear-gradient(135deg, var(--green), #34d399); }

.tabs a.active { background: linear-gradient(135deg, var(--blue), var(--indigo)); border-color: transparent; }
.pagination .current { background: linear-gradient(135deg, var(--blue), var(--indigo)); border-color: transparent; }

/* Small identity & panel accents */
.avatar { background: linear-gradient(135deg, #eef2ff, #ede9fe); }
.page-head .id-block .thumb { background: linear-gradient(135deg, #eef2ff, #f5f3ff); }
.am-head { background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%); }
.bulk-bar { background: linear-gradient(90deg, #eff6ff, #eef2ff); }
.wbs-module > .wbs-node-head { background: linear-gradient(90deg, #f8fafc, #f1f5f9); }
.empty .e-ic { background: linear-gradient(135deg, #eef2ff, #f8fafc); }

/* ============================================================
   Dashboard v2 — welcome hero, entrance animations, spotlight
   ============================================================ */

/* Entrance: subtle rise + fade, staggered via --d. Disabled globally by the
   prefers-reduced-motion rule at the top of this file. */
.anim-in { animation: dash-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: var(--d, 0s); }
@keyframes dash-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Welcome hero */
.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.28);
}
.dh-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.dh-blob.b1 { width: 300px; height: 300px; top: -130px; right: -60px; background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%); }
.dh-blob.b2 { width: 260px; height: 260px; bottom: -130px; left: 32%; background: radial-gradient(circle, rgba(255, 255, 255, 0.10), transparent 70%); }
.dh-text { position: relative; min-width: 240px; }
.dh-greet { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.02rem; color: #fde68a; }
.dash-hero h2 { margin: 6px 0 4px; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.3; }
.dh-date { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }
.dh-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.dh-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 0.76rem; text-decoration: none;
  transition: background 0.2s ease;
}
.dh-chip:hover { background: rgba(255, 255, 255, 0.24); text-decoration: none; }
.dh-chip.hot  { background: rgba(225, 29, 72, 0.55);  border-color: rgba(255, 205, 210, 0.5); }
.dh-chip.warn { background: rgba(217, 119, 6, 0.5);   border-color: rgba(253, 230, 138, 0.5); }
.dh-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.btn.dh-btn { background: #fff; color: var(--blue-dark); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2); }
.btn.dh-btn:hover { background: #eff6ff; }
.btn.dh-btn.ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn.dh-btn.ghost:hover { background: rgba(255, 255, 255, 0.24); }

/* Critical tickets panel */
.crit-card { border-color: #fecaca; background: linear-gradient(180deg, #fff 0%, #fff8f8 100%); }
.crit-card .card-title h2.crit-h::before { background: linear-gradient(180deg, var(--red), var(--rose)); }
.crit-card .card-title h2 { color: var(--red-dark); }
.crit-card .card-title h2 svg { color: var(--red); }

/* Project spotlight cards */
.spot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .spot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .spot-grid { grid-template-columns: 1fr; } }
.spot-card {
  display: flex; flex-direction: column; gap: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.spot-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.sp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sp-id { min-width: 0; }
.sp-top h3 { margin: 0; font-size: 0.97rem; line-height: 1.3; }
.sp-top h3 a { color: inherit; }
.sp-meta { color: var(--muted); font-size: 0.76rem; margin-top: 2px; }
.sp-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-badges .badge svg { flex-shrink: 0; }
.sp-ticket {
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px dashed var(--border); border-radius: 9px;
  padding: 8px 10px; background: var(--surface-2);
  font-size: 0.82rem;
}
.sp-ticket .sp-tk-ic { color: var(--amber); display: grid; margin-top: 2px; flex-shrink: 0; }
.sp-ticket .sp-tk-ic.ok { color: var(--green); }
.sp-ticket .sp-tk-body { min-width: 0; }
.sp-ticket .sp-tk-body a { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 9px; margin-top: auto; }
.sp-go { display: inline-flex; align-items: center; gap: 3px; font-size: 0.78rem; font-weight: 600; }
.sp-go svg { transition: transform 0.2s ease; }
.spot-card:hover .sp-go svg { transform: translateX(3px); }

/* Priority mix distribution bar */
.mix-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.mix-bar span { display: block; height: 100%; min-width: 4px; transition: width 0.4s ease; }
.mix-bar span + span { border-left: 2px solid #fff; }
.mix-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mix-legend li { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
.mix-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mix-legend strong { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .dash-hero { padding: 20px; }
  .dash-hero h2 { font-size: 1.1rem; }
}

/* ============================================================
   Client portal — welcome greeting, waiting panel, done/next
   (All motion is disabled by the prefers-reduced-motion rule.)
   ============================================================ */

/* Animated welcome greeting */
.welcome-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, #0d9488 0%, #0ea5e9 55%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(13, 148, 136, 0.26);
  animation: wh-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.welcome-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(340px circle at 88% -40%, rgba(255,255,255,0.22), transparent 70%);
  pointer-events: none;
}
.welcome-hero .wh-thumb {
  width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
  animation: wh-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.welcome-hero .wh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.welcome-hero .wh-text { position: relative; flex: 1; min-width: 200px; }
.welcome-hero h2 {
  margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2;
  animation: wh-slide 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both;
}
.welcome-hero .wh-sub {
  font-size: 0.83rem; color: rgba(255,255,255,0.85); margin-top: 3px;
  animation: wh-slide 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
.welcome-hero .wh-actions { position: relative; }
.welcome-hero .wh-actions .btn-green { background: #fff; color: #0f766e; box-shadow: 0 6px 16px rgba(15,23,42,0.18); }
.welcome-hero .wh-actions .btn-green:hover { background: #ecfdf5; }
.welcome-hero .wave { display: inline-block; transform-origin: 70% 70%; animation: wh-wave 2.4s ease-in-out 0.7s 3; }
@keyframes wh-rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wh-slide { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes wh-pop   { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes wh-wave  { 0%,60%,100% { transform: rotate(0); } 10%,30%,50% { transform: rotate(16deg); } 20%,40% { transform: rotate(-10deg); } }

/* Staggered entrance for the stat row */
.stats-anim .stat { animation: wh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.stats-anim .stat:nth-child(1) { animation-delay: 0.06s; }
.stats-anim .stat:nth-child(2) { animation-delay: 0.12s; }
.stats-anim .stat:nth-child(3) { animation-delay: 0.18s; }
.stats-anim .stat:nth-child(4) { animation-delay: 0.24s; }
.stat.pulse { animation: wh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both, stat-pulse 2.2s ease-in-out 0.9s infinite; }
@keyframes stat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.0); }
  50%      { box-shadow: 0 0 0 5px rgba(225, 29, 72, 0.12); }
}

/* "We're waiting on you" — the prominent blocker panel */
.wait-panel {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffdf5 0%, #fffbeb 100%);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.12);
  animation: wh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.wait-panel .card-title h2 { color: #b45309; }
.wait-panel .card-title h2 svg { color: var(--amber); }
.wait-panel .wp-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--amber); color: #fff; font-size: 0.76rem; font-weight: 800;
}
.wait-list { display: flex; flex-direction: column; gap: 10px; }
.wait-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 11px;
  background: #fff; border: 1px solid #fde68a;
}
.wait-item .wi-ic { color: var(--amber); display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 8px; background: var(--amber-soft); }
.wait-item .wi-body { flex: 1; min-width: 0; }
.wait-item .wi-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wait-item .wi-what { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.wait-item .wi-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 0.77rem; margin-top: 3px; }
.wait-item .wi-meta a { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.wait-item .wi-age { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-weight: 600; }
.wait-item .wi-age.hot { background: var(--rose-soft); color: var(--rose); }
.wait-item .wi-act { flex-shrink: 0; }
@media (max-width: 620px) {
  .wait-item { flex-wrap: wrap; }
  .wait-item .wi-act { margin-left: 42px; }
}

/* (The portal's quick-approve panel — .appr-panel / .appr-item / .ai-* — was
   removed on 2026-07-28, and cost approval itself was dropped on 2026-07-30:
   additional-effort estimates are internal notes, nothing is approved.) */

/* Done / next snapshot inside in-progress project cards */
.proj-card.proj-live { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.07); }
.snap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.snap-col { border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; background: var(--surface-2); }
.snap-col.snap-done { background: linear-gradient(180deg, #f0fdf4, #fafffb); border-color: #d1fae5; }
.snap-col.snap-next { background: linear-gradient(180deg, #eff6ff, #fafcff); border-color: #dbeafe; }
.snap-h { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.snap-done .snap-h { color: var(--green-dark); }
.snap-next .snap-h { color: var(--blue-dark); }
.snap-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.snap-col li { display: flex; align-items: center; gap: 6px; font-size: 0.79rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snap-col li .tick { color: var(--green); display: grid; flex-shrink: 0; }
.snap-col li .dot-go, .snap-col li .dot-wait { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.snap-col li .dot-go { background: var(--blue); }
.snap-col li .dot-wait { background: #cbd5e1; }
.snap-empty { margin: 0; font-size: 0.78rem; color: var(--muted); }
.badge.tiny { padding: 0 5px; font-size: 0.62rem; gap: 3px; }
.badge.tiny svg { width: 10px; height: 10px; }
@media (max-width: 520px) { .snap { grid-template-columns: 1fr; } }

/* Waiting-flagged WBS nodes (portal project view) */
.wbs-module.is-waiting > .wbs-node-head,
.wbs-sub.is-waiting > .wbs-node-head { box-shadow: inset 3px 0 0 var(--amber); }
.wbs-feat.is-waiting { box-shadow: inset 3px 0 0 var(--amber); background: var(--amber-soft); }

/* "Waiting on client" toggle on the WBS edit form */
.wait-toggle {
  border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px;
  background: var(--surface-2); transition: border-color 0.2s ease, background 0.2s ease;
}
.wait-toggle.on { border-color: #fcd34d; background: var(--amber-soft); }
.wait-toggle .wait-check { display: block; cursor: pointer; }
.wait-toggle .wait-check input { margin-right: 8px; vertical-align: middle; accent-color: var(--amber); }
.wait-toggle .wt-label { font-weight: 700; font-size: 0.9rem; }
.wait-toggle .wt-label svg { vertical-align: middle; color: var(--amber); margin-right: 2px; }
.wait-toggle .field { display: none; }
.wait-toggle.on .field { display: block; }

/* Single-project home: pair the "waiting on you" panel and the project 50/50.
   Without .split the wrapper is a plain block, so cards stack as before. */
.dash-cols.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 20px; }
.dash-cols.split > .card { margin-bottom: 0; }
.dash-cols.split .proj-grid { grid-template-columns: 1fr; }
@media (max-width: 720px) { .dash-cols.split { grid-template-columns: 1fr; } }

/* ============================================================
   Work Breakdown — quick in-place editing (2026-07-28)
   Filter bar, collapsible branches, one-click complete ticks and
   inline status pickers. Motion is covered by the global
   prefers-reduced-motion rule at the top of this file.
   ============================================================ */

/* Filter / navigation bar above the tree. It sticks just under the sticky
   .topbar (14px padding + 40px tallest control + 14px + 1px border = 69px) and
   sits below it in the stack. */
.wbs-controls {
  position: sticky; top: 69px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.wbs-controls .grow { flex: 1; min-width: 0; }
.wbs-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  flex: 1 1 260px; min-width: 200px; max-width: 420px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2);
  padding: 0 10px; transition: border-color 0.16s ease, background 0.16s ease;
}
.wbs-search:focus-within { border-color: var(--blue); background: var(--surface); }
.wbs-search > svg { color: var(--muted); flex: none; }
.wbs-search input {
  border: 0; background: none; outline: none; width: 100%;
  padding: 8px 0; font: inherit; font-size: 0.88rem; color: var(--text);
}
.wbs-search input::-webkit-search-cancel-button { display: none; }
.wbs-q-clear {
  flex: none; border: 0; background: #e2e8f0; color: var(--muted);
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.wbs-q-clear:hover { background: var(--red-soft); color: var(--red); }
.wbs-state {
  flex: none; width: auto; padding: 7px 10px; font-size: 0.84rem;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2);
  color: var(--text); cursor: pointer;
}
.wbs-tally { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.wbs-tick-hint {
  display: inline-grid; place-items: center; width: 15px; height: 15px;
  border-radius: 50%; background: var(--green-soft); color: var(--green);
  border: 1px solid #a7f3d0; vertical-align: middle;
}

/* Collapse caret */
.wbs-caret {
  flex: none; border: 0; background: none; padding: 2px; cursor: pointer;
  color: var(--muted); display: grid; place-items: center; border-radius: 6px;
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.wbs-caret:hover { background: #e2e8f0; color: var(--text); }
.wbs-module.collapsed > .wbs-node-head > .wbs-caret,
.wbs-sub.collapsed > .wbs-node-head > .wbs-caret { transform: rotate(-90deg); }
.wbs-module.collapsed > .wbs-subs,
.wbs-sub.collapsed > .wbs-feats { display: none; }
/* While a filter is active every matching branch stays open regardless. */
.wbs-tree.wbs-filtering .wbs-module.collapsed > .wbs-subs { display: flex; }
.wbs-tree.wbs-filtering .wbs-sub.collapsed > .wbs-feats { display: flex; }
.wbs-tree.wbs-filtering .wbs-caret { transform: none; opacity: 0.4; }

/* One-click complete tick */
.wbs-tick {
  flex: none; width: 24px; height: 24px; padding: 0; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid #cbd5e1; background: var(--surface); color: transparent;
  transition: all 0.16s ease;
}
.wbs-tick:hover { border-color: var(--green); color: #a7f3d0; background: var(--green-soft); }
.wbs-tick[aria-pressed="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.wbs-tick[aria-pressed="true"]:hover { border-color: var(--amber); background: var(--amber); }
.wbs-tick.is-busy { opacity: 0.5; cursor: progress; }
.wbs-feat .wbs-tick { width: 20px; height: 20px; border-width: 1.5px; }

/* Inline status picker on feature rows — the select doubles as the status badge */
.wbs-status {
  flex: none; width: auto; max-width: 132px; padding: 3px 7px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em;
  border: 1px solid; border-radius: 999px; cursor: pointer;
  appearance: none; -webkit-appearance: none; text-align: center;
}
.wbs-status:hover { box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.07); }
.wbs-status:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.wbs-status.is-busy { opacity: 0.5; cursor: progress; }
.wbs-setall {
  flex: none; width: auto; max-width: 116px; padding: 4px 8px; font-size: 0.74rem;
  border: 1px dashed var(--border); border-radius: 8px; background: var(--surface);
  color: var(--muted); cursor: pointer;
}
.wbs-setall:hover { border-color: var(--green); color: var(--green-dark); }

/* Row states */
.wbs-node-head .n-name .kid-count { font-size: 0.7rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.wbs-feat.is-done .f-name { color: var(--muted); }
.wbs-module.is-done > .wbs-node-head .lvl,
.wbs-sub.is-done > .wbs-node-head .lvl { background: var(--green-soft); color: var(--green-dark); }
.wbs-hidden { display: none !important; }
.wbs-flash { animation: wbs-flash 1.4s ease-out; }
@keyframes wbs-flash {
  0%   { background: #dcfce7; box-shadow: inset 3px 0 0 var(--green); }
  100% { background: transparent; box-shadow: none; }
}

/* Add / edit popup */
#wbs-modal .modal { padding: 20px 22px; }
.wbs-modal-loading { padding: 30px 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.wbs-modal-parent { margin: -6px 0 14px !important; font-size: 0.8rem; color: var(--muted); }
.wbs-modal-parent svg { vertical-align: middle; margin-right: 3px; }
.wbs-modal-error {
  margin-bottom: 14px; padding: 9px 12px; border-radius: 9px;
  background: var(--red-soft); border: 1px solid #fecaca; color: var(--red-dark);
  font-size: 0.83rem;
}

/* "Undo" button inside a toast */
.toast .t-action {
  flex: none; align-self: center; border: 1px solid var(--border); background: var(--surface);
  color: var(--blue); font: inherit; font-size: 0.78rem; font-weight: 700;
  padding: 3px 9px; border-radius: 7px; cursor: pointer;
}
.toast .t-action:hover { background: var(--blue-soft); border-color: #bfdbfe; }

@media (max-width: 900px) {
  .wbs-setall { display: none; }
  .wbs-node-head .n-name .kid-count { display: none; }
}
@media (max-width: 700px) {
  .wbs-feat .progress, .wbs-node-head .progress { width: 76px; }
  .wbs-status { max-width: 96px; }
}

/* ---------- Mail: two-pane mailbox (list + reading pane) ---------- */
.side-badge {
  position: absolute; top: 6px; right: 12px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 0.62rem; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.side-link { position: relative; }

.mail-banner {
  display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 0.82rem; margin-bottom: 12px;
}
.mail-banner svg { flex-shrink: 0; }
.mail-banner span { flex: 1; }
.mail-banner.warn { background: var(--amber-soft); border-color: #fde68a; color: #92400e; }
.mail-banner.err  { background: var(--red-soft);   border-color: #fecaca; color: var(--red-dark); }

.mail-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }

/* --- list --- */
.mail-list {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: 78px;
}
.ml-head {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.ml-all { display: grid; place-items: center; }
.ml-head input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.ml-count { font-size: 0.72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ml-action {
  margin-left: auto; padding: 4px 7px; font-size: 0.74rem; border: 1px solid var(--border);
  border-radius: 7px; background: var(--surface); color: var(--muted); max-width: 108px;
}
.ml-apply { padding: 4px 9px; font-size: 0.72rem; }
.mail-list-scroll { max-height: calc(100vh - 232px); overflow-y: auto; scrollbar-width: thin; }
.ml-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }

.mail-row { display: flex; align-items: flex-start; gap: 7px; padding: 8px 10px; border-bottom: 1px solid #f1f5f9; transition: background 0.12s ease; }
.mail-row:last-child { border-bottom: 0; }
.mail-row:hover { background: var(--surface-2); }
.mail-row.is-open { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.mail-row .m-check { width: 15px; height: 15px; margin-top: 3px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.m-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; }
.m-main:hover { text-decoration: none; }
.m-top { display: flex; align-items: baseline; gap: 8px; }
.m-from { font-size: 0.79rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-time { margin-left: auto; font-size: 0.66rem; color: #94a3b8; white-space: nowrap; flex-shrink: 0; }
.m-subj { font-size: 0.81rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-snip { font-size: 0.72rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tags { display: flex; align-items: center; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.m-tags .badge { font-size: 0.62rem; padding: 1px 6px; }
.m-clip { color: var(--muted); display: grid; }
.mail-row.unread .m-from, .mail-row.unread .m-subj { font-weight: 700; color: var(--text); }
.mail-row.unread .m-subj::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); margin-right: 6px; vertical-align: middle;
}
.m-star { border: 0; background: none; color: #cbd5e1; cursor: pointer; padding: 2px; display: grid; flex-shrink: 0; }
.m-star:hover { color: var(--amber); }
.m-star.on { color: var(--amber); }

/* --- reading pane --- */
.mail-pane { min-width: 0; }
.mail-reader {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-sm); padding: 15px 17px; min-width: 0;
}
.mr-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.mr-id { flex: 1; min-width: 220px; }
.mr-subject { margin: 0 0 7px; font-size: 1.06rem; letter-spacing: -0.01em; line-height: 1.35; }
.mr-meta { display: flex; align-items: center; gap: 9px; }
.mr-meta .cmt-av { width: 30px; height: 30px; font-size: 0.68rem; }
.mr-who { display: flex; flex-direction: column; min-width: 0; }
.mr-from { font-size: 0.82rem; font-weight: 600; }
.mr-addr { font-weight: 400; color: var(--muted); font-size: 0.76rem; }
.mr-to { font-size: 0.72rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-date { margin-left: auto; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.mr-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.mr-tags a.badge:hover { text-decoration: none; filter: brightness(0.95); }
.mr-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mr-inline { margin: 0; display: inline-flex; }
.mr-atts { margin: 11px 0 0; }
.mr-note { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--muted); margin: 10px 0 0; }
.mr-body { padding: 13px 0 4px; }
.mail-body-text { white-space: pre-wrap; word-break: break-word; font-size: 0.87rem; line-height: 1.6; }

/* Email HTML is sanitised server-side; these rules keep it inside the pane. */
.mail-html { font-size: 0.87rem; line-height: 1.6; overflow-x: auto; word-break: break-word; }
.mail-html img { max-width: 100%; height: auto; }
.mail-html table { max-width: 100%; border-collapse: collapse; }
.mail-html td, .mail-html th { padding: 3px 5px; }
.mail-html a { word-break: break-all; }
.mail-html blockquote, .mail-quote {
  border-left: 3px solid var(--border); padding: 2px 0 2px 10px; margin: 8px 0;
  color: var(--muted); font-size: 0.84rem;
}
.mail-html * { max-width: 100%; }
.mail-html [data-blocked] { border: 1px dashed var(--border); border-radius: 6px; padding: 2px 6px; font-size: 0.7rem; color: var(--muted); }

/* --- conversation --- */
.sec-head { display: flex; align-items: center; gap: 7px; margin: 0 0 11px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sec-head svg { color: var(--indigo); }
.mr-thread { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--border); }
.mt-item { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 7px; background: var(--surface-2); }
.mt-item summary { display: flex; align-items: center; gap: 9px; padding: 8px 11px; cursor: pointer; font-size: 0.78rem; list-style: none; }
.mt-item summary::-webkit-details-marker { display: none; }
.mt-item summary::before { content: '▸'; color: var(--muted); font-size: 0.7rem; }
.mt-item[open] summary::before { content: '▾'; }
.mt-who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.mt-snip { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-time { color: #94a3b8; font-size: 0.68rem; white-space: nowrap; }
.mt-body { padding: 3px 13px 11px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }
.mt-open { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; margin-top: 8px; }

/* --- composer --- */
.mr-reply { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.mail-compose-card { max-width: 900px; }
.mc-fields { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.mc-row { display: flex; align-items: center; gap: 9px; }
/* .mc-row's display would otherwise beat the UA rule for [hidden]. */
.mc-row[hidden] { display: none; }
.mc-row label { width: 54px; flex-shrink: 0; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.mc-row input[type="text"] {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.83rem; background: var(--surface); color: var(--text);
}
.mc-row input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.mc-cc-toggle { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); border-radius: 7px; padding: 5px 9px; font-size: 0.72rem; font-weight: 600; cursor: pointer; }
.mc-cc-toggle:hover { border-color: var(--blue); color: var(--blue); }

.mail-editor { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.mail-editor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.me-toolbar { display: flex; align-items: center; gap: 2px; padding: 5px 7px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.me-btn {
  min-width: 27px; height: 27px; padding: 0 6px; border: 1px solid transparent; background: none;
  border-radius: 6px; cursor: pointer; color: var(--muted); display: grid; place-items: center;
  font-size: 0.8rem; line-height: 1;
}
.me-btn:hover { background: var(--surface); border-color: var(--border); color: var(--blue); }
.me-btn.is-active { background: var(--blue-soft); border-color: #bfdbfe; color: var(--blue-dark); }
.me-sep { width: 1px; height: 17px; background: var(--border); margin: 0 3px; }
.me-attach { margin-left: auto; padding: 4px 10px; font-size: 0.75rem; border-radius: 7px; }
.me-area { min-height: 160px; max-height: 460px; overflow-y: auto; padding: 11px 13px; font-size: 0.87rem; line-height: 1.6; outline: none; word-break: break-word; }
.me-area:empty::before { content: attr(data-placeholder); color: #94a3b8; }
.me-area img { max-width: 100%; }
.mc-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mc-actions .file-names { margin-top: 0; }

/* --- narrow screens: one column, reading pane below the list --- */
@media (max-width: 1080px) {
  .mail-shell { grid-template-columns: 1fr; }
  .mail-list { position: static; }
  .mail-list-scroll { max-height: 420px; }
}
@media (max-width: 640px) {
  .mr-head { flex-direction: column; }
  .mr-actions { width: 100%; }
  .mc-row { flex-wrap: wrap; }
  .mc-row label { width: auto; }
}

/* ---------- Bulk Add Tickets ---------- */
table.data.bulk-grid { font-size: 0.83rem; table-layout: fixed; }
table.data.bulk-grid th { white-space: nowrap; }
table.data.bulk-grid td { padding: 7px 8px; vertical-align: top; }
table.data.bulk-grid tbody tr:hover { background: transparent; }
.bulk-grid .bk-num { color: var(--muted); font-weight: 700; font-size: 0.78rem; padding-top: 15px !important; text-align: center; }
.bulk-grid .bk-row.is-filled .bk-num { color: var(--green); }
.bulk-grid input[type="text"], .bulk-grid select, .bulk-grid textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.83rem;
}
.bulk-grid input[type="text"]:focus, .bulk-grid select:focus, .bulk-grid textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bulk-grid .bk-cell-title { min-width: 240px; }
.bulk-grid .bk-title { font-weight: 600; }
.bulk-grid .bk-row.is-filled .bk-title { border-color: #a7f3d0; background: var(--green-soft); }
.bulk-grid .bk-desc { margin-top: 6px; resize: vertical; }
.bulk-grid .bk-acts { display: flex; gap: 4px; justify-content: flex-end; padding-top: 10px !important; }
.bulk-grid select { text-overflow: ellipsis; }
.bulk-grid .bk-acts .icon-btn { width: 28px; height: 28px; }

.bk-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.bk-hint { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; }
.bk-hint[hidden] { display: none; }  /* display:flex would otherwise beat the [hidden] attribute */
.bk-hint svg { flex-shrink: 0; }
.bk-hint kbd {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  font-size: 0.72rem;
  font-family: inherit;
}
.bk-hint-warn { color: var(--amber); }

.bk-paste {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.bk-paste-lbl { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.bk-paste textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  resize: vertical;
}
.bk-paste-acts { display: flex; gap: 8px; margin-top: 10px; }

@media (max-width: 1100px) {
  table.data.bulk-grid { table-layout: auto; min-width: 940px; }
}
