/*
 * BNB Ops Hub theme: brand tokens (light + dark), app shell, shared components
 * and motion. Colors come from the logo: ink purple, brand purple #663399 and
 * signal cyan #22C7DD (cyan is for "live" states; text uses --bnb-cyan-text).
 * Dark mode follows the existing `.dark` class on <html>.
 */

/* ------------------------------------------------------------------ tokens */
:root {
  /* Matched to the website (bnb-website-tau.vercel.app): lavender page, ink #15111d,
     accent #673493, cyan #26b1ce, Inter Tight + Instrument Serif accents. */
  --bnb-ink: #15111d;
  --bnb-ink-2: #211a2d;
  --bnb-ink-3: #2c2339;
  --bnb-ink-line: #3a2f4b;
  --bnb-ink-text: #cec7da;
  --bnb-ink-muted: #a69eb5;
  --bnb-brand: #673493;
  --bnb-brand-strong: #552a7a;
  --bnb-brand-soft: #efe8f7;
  --bnb-brand-text: #552a7a;
  --bnb-brand-light: #c4a5f5;
  --bnb-cyan: #26b1ce;
  --bnb-cyan-soft: #dcf3f8;
  --bnb-cyan-text: #0b6f84;
  --bnb-slate: #5f5a6b;
  --bnb-bg: #f4f2f8;
  --bnb-surface: #ffffff;
  --bnb-surface-2: #f4f1f8;
  --bnb-border: #e3dfea;
  --bnb-border-soft: #efecf3;
  --bnb-text: #15111d;
  --bnb-text-2: #2d2838;
  --bnb-muted: #5f5a6b;
  --bnb-field: #ffffff;
  --bnb-field-border: #dcd7e4;
  --bnb-ok-bg: #e2f5ed;   --bnb-ok: #0d6b4a;
  --bnb-warn-bg: #fdf1e1; --bnb-warn: #8a4a05;
  --bnb-bad-bg: #fdecec;  --bnb-bad: #a21f1f;
  --bnb-info-bg: #dcf3f8; --bnb-info: #0a5d6e;
  --bnb-shadow: 0 14px 34px -18px rgba(21, 17, 29, .35);
  --bnb-trace: linear-gradient(90deg, #673493, #26b1ce);
  --bnb-radius: 18px;
  --bnb-dots: rgba(103, 52, 147, .13);
  --bnb-font: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bnb-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --bnb-serif: 'Instrument Serif', Georgia, serif;
  --bnb-logo-font: 'Unica One', 'Inter Tight', sans-serif;
}

.dark {
  --bnb-ink: #0b0910;
  --bnb-ink-2: #19141f;
  --bnb-ink-3: #241d2e;
  --bnb-ink-line: #342b41;
  --bnb-brand: #9a6fd0;
  --bnb-brand-strong: #8a5cc4;
  --bnb-brand-soft: #2a2040;
  --bnb-brand-text: #d6c3f4;
  --bnb-cyan-soft: #0e3640;
  --bnb-cyan-text: #6fd6ea;
  --bnb-bg: #0e0b14;
  --bnb-surface: #15111d;
  --bnb-surface-2: #1d1727;
  --bnb-border: #2a2337;
  --bnb-border-soft: #221c2e;
  --bnb-text: #f4f2f8;
  --bnb-text-2: #ddd8e6;
  --bnb-muted: #a8a1b6;
  --bnb-field: #1a1523;
  --bnb-field-border: #352d44;
  --bnb-ok-bg: #11342a;   --bnb-ok: #7fdcae;
  --bnb-warn-bg: #3a2810; --bnb-warn: #f4c27f;
  --bnb-bad-bg: #3d1717;  --bnb-bad: #f6a39b;
  --bnb-info-bg: #0e3640; --bnb-info: #8ce3f2;
  --bnb-shadow: 0 14px 34px -16px rgba(0, 0, 0, .8);
  --bnb-dots: rgba(196, 165, 245, .07);
}

/* -------------------------------------------------------------------- base */
html { background: var(--bnb-bg); }
.bnb-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  max-width: 1400px; margin: 0 auto; padding: 18px 28px 28px; box-sizing: border-box;
  font-size: 12px; color: var(--bnb-muted); border-top: 1px solid var(--bnb-border);
}
.bnb-footer-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--bnb-text-2); }
.bnb-footer-brand img { border-radius: 5px; background: #fff; padding: 2px; }
body {
  font-family: var(--bnb-font);
  color: var(--bnb-text);
}
/* More specific than the old `.dark body { … !important }` gradients in skeleton.css */
:root body, :root.dark body { background: var(--bnb-bg) !important; }
/* The website's faint dot grid behind every page */
:root body, :root.dark body { background-image: radial-gradient(var(--bnb-dots) 1px, transparent 1.4px) !important; background-size: 22px 22px !important; background-attachment: fixed !important; }
@media (max-width: 768px) { :root body, :root.dark body { background-attachment: scroll !important; } } /* fixed backgrounds repaint on every scroll on phones */
.display, .bnb-display { font-family: var(--bnb-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
/* Italic serif accent word, as on the website ("Bytes of impact.") */
.bnb-serif { font-family: var(--bnb-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* The old canvas/particle/rinnegan backgrounds are replaced by solid surfaces */
#canvas, .tech-background, .dark-animation, .light-animation { display: none !important; }
body::before, body::after, .dark body::before, .dark body::after { content: none !important; display: none !important; }

/* -------------------------------------------------------------- sidebar */
#sidebar.sidebar {
  background-color: var(--bnb-ink) !important;
  background-image:
    linear-gradient(rgba(102, 51, 153, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 51, 153, .16) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: bnb-drift 9s linear infinite;
  backdrop-filter: none;
  box-shadow: none;
  border-right: 1px solid var(--bnb-ink-line);
  color: #e9e3f3;
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 200;
  overflow: hidden;
  position: relative;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.sidebar-content { display: flex; flex-direction: column; height: 100%; padding-bottom: 4.5rem; overflow: hidden; }

.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 22px 18px 14px; flex-shrink: 0; }
.bnb-logo-tile {
  width: 44px; height: 44px; border-radius: 12px; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  animation: bnb-breathe 4s ease-in-out infinite;
}
.bnb-logo-tile img { width: 34px; height: 34px; object-fit: contain; }
.bnb-logo-name { font: 400 19px var(--bnb-logo-font); color: #fff; line-height: 1.1; letter-spacing: .02em; }
.bnb-logo-sub { font-size: 12px; color: var(--bnb-ink-muted); }

/* Employee | Staff switch */
.bnb-mode {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  margin: 4px 16px 6px; padding: 4px; border-radius: 12px; background: var(--bnb-ink-2);
}
.bnb-mode a, .bnb-mode span {
  min-height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font: 600 13px var(--bnb-font); color: var(--bnb-ink-text); text-decoration: none;
  transition: background-color .2s, color .2s;
}
.bnb-mode a:hover { background: var(--bnb-ink-3); color: #fff; }
.bnb-mode .is-on { background: #663399; color: #fff; box-shadow: 0 6px 18px -8px rgba(102, 51, 153, .9); }

.sidebar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 14px;
  /* thin but visible: long staff menus scroll under the user card, so show that there's more */
  scrollbar-width: thin; scrollbar-color: rgba(161, 118, 206, .35) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(161, 118, 206, .35); border-radius: 3px; }
.bnb-nav-group { font: 600 11px var(--bnb-font); color: #8f84a6; text-transform: uppercase; letter-spacing: .06em; padding: 14px 12px 6px; }

.sidebar-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px;
  padding: 0 12px; margin-bottom: 2px; border: 0; border-radius: 10px;
  background: transparent !important; color: var(--bnb-ink-text) !important;
  font: 500 14px var(--bnb-font); text-decoration: none; text-align: left; white-space: nowrap;
  cursor: pointer; position: relative; box-shadow: none !important; backdrop-filter: none;
  transition: background-color .2s, color .2s, transform .2s;
}
.sidebar-item:hover { background: var(--bnb-ink-2) !important; color: #fff !important; transform: translateX(3px); }
.sidebar-item.active { background: var(--bnb-ink-3) !important; color: #fff !important; font-weight: 600; }
.sidebar-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 10px; height: 2px; border-radius: 2px;
  background: var(--bnb-cyan); box-shadow: 0 0 10px var(--bnb-cyan), 0 0 2px var(--bnb-cyan); transform: translateY(-50%);
}
.sidebar-item.is-danger { color: #f6a39b !important; }
.sidebar-item.is-danger:hover { background: rgba(180, 35, 24, .18) !important; }
.sidebar-icon { width: 20px; min-width: 20px; text-align: center; color: inherit; opacity: .9; display: flex; align-items: center; justify-content: center; }
.sidebar-text { transition: opacity .3s ease; overflow: hidden; }
.bnb-nav-sep { height: 1px; background: var(--bnb-ink-line); margin: 10px 6px; }

.bnb-user {
  display: flex; align-items: center; gap: 10px; margin: 0 14px 10px; padding: 10px;
  border-radius: 12px; background: var(--bnb-ink-2); color: #fff; text-decoration: none; flex-shrink: 0;
}
.bnb-avatar {
  position: relative; width: 36px; height: 36px; border-radius: 50%; background: #663399; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font: 700 13px var(--bnb-font); overflow: visible;
}
.bnb-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bnb-user-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.bnb-user-role { font-size: 12px; color: var(--bnb-ink-muted); }

/* collapsed rail */
.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .bnb-logo-text,
.sidebar.collapsed .bnb-nav-group,
.sidebar.collapsed .bnb-user > div:last-child { opacity: 0; width: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }
.sidebar.collapsed .bnb-mode { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 22px 0 14px; }
.sidebar.collapsed .sidebar-item { justify-content: center; padding: 0; gap: 0; }
.sidebar.collapsed .sidebar-item:hover { transform: none; }
.sidebar.collapsed .bnb-user { justify-content: center; margin: 0 8px 10px; padding: 8px 0; }

.sidebar-toggle {
  position: absolute; bottom: 14px; left: 14px; right: 14px; height: 40px; border: 1px solid var(--bnb-ink-line);
  border-radius: 10px; background: var(--bnb-ink-2) !important; color: var(--bnb-ink-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background-color .2s, color .2s; z-index: 100;
}
.sidebar-toggle:hover { background: var(--bnb-ink-3) !important; color: #fff; }
.sidebar.collapsed .sidebar-toggle { left: 50%; right: auto; width: 40px; transform: translateX(-50%); }

/* ---------------------------------------------------------------- navbar */
[x-cloak] { display: none !important; }
.grid-navbar #navbar { background: color-mix(in srgb, var(--bnb-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bnb-border); }
#navbar .hidden { display: none !important; }
.bnb-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 24px; box-sizing: border-box; }
@media (max-width: 768px) { .bnb-topbar { padding: 0 12px; } }
.bnb-topbar-left, .bnb-topbar-right { display: flex; align-items: center; gap: 8px; }
.bnb-topbar-when { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--bnb-muted); font-weight: 500; }
.bnb-clock { font: 600 14px var(--bnb-display); color: var(--bnb-text); }
.bnb-topbar-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--bnb-text); cursor: pointer; }
.bnb-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--bnb-muted); cursor: pointer; transition: background-color .2s, color .2s;
}
.bnb-iconbtn:hover { background: var(--bnb-surface-2); color: var(--bnb-text); }
.bnb-badge {
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bnb-brand); color: #fff;
  font: 700 11px var(--bnb-font); display: flex; align-items: center; justify-content: center; box-sizing: border-box;
}
.bnb-timer-pill {
  display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: var(--bnb-ink); color: #fff; border: 1px solid var(--bnb-ink-line); font-size: 14px;
}
.bnb-timer-pill .bnb-timer-sub { font-size: 12px; color: var(--bnb-ink-muted); }
.bnb-btn-break { background: #f4b740; color: #2a1a00; }
.bnb-btn-break:hover:not(:disabled) { background: #f7c766; color: #2a1a00; }
.bnb-avatar-btn { border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; }
.bnb-menu {
  background: var(--bnb-surface); color: var(--bnb-text); border: 1px solid var(--bnb-border); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(23, 15, 36, .18); padding: 6px; box-sizing: border-box;
}
.bnb-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 10px; border-bottom: 1px solid var(--bnb-border); margin-bottom: 4px; }
.bnb-menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--bnb-text); text-decoration: none; }
.bnb-menu-item:hover { background: var(--bnb-surface-2); color: var(--bnb-text); }
.bnb-menu-item i { width: 16px; text-align: center; color: var(--bnb-muted); }
.bnb-menu-item.is-danger, .bnb-menu-item.is-danger i { color: #b42318; }
.dark .bnb-menu-item.is-danger, .dark .bnb-menu-item.is-danger i { color: #f6a39b; }

/* ------------------------------------------------------------ components */
.bnb-page { display: flex; flex-direction: column; gap: 20px; padding: 24px 28px 48px; max-width: 1400px; margin: 0 auto; box-sizing: border-box; }
@media (max-width: 768px) { .bnb-page { padding: 16px; } }
.bnb-eyebrow { font-size: 13px; color: var(--bnb-muted); font-weight: 500; }
.bnb-h1 { margin: 4px 0 0; font: 600 30px/1.15 var(--bnb-display); letter-spacing: -.03em; color: var(--bnb-text); }
.bnb-h2 { margin: 0; font: 600 16px var(--bnb-display); letter-spacing: -.01em; color: var(--bnb-text); }
.bnb-trace { display: flex; align-items: center; gap: 8px; }
.bnb-trace::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #663399; flex-shrink: 0; }
.bnb-trace::after {
  content: ""; flex: 1; max-width: 56px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #663399, #22c7dd, #663399); background-size: 200% 100%;
  animation: bnb-shift 2.8s linear infinite;
}

.bnb-card {
  background: var(--bnb-surface); border: 1px solid var(--bnb-border); border-radius: var(--bnb-radius);
  padding: 20px; box-sizing: border-box; color: var(--bnb-text);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s;
  animation: bnb-rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.bnb-card:hover { transform: translateY(-3px); box-shadow: var(--bnb-shadow); border-color: color-mix(in srgb, var(--bnb-brand) 30%, var(--bnb-border)); }
.bnb-card.is-static:hover { transform: none; box-shadow: none; }
.bnb-stat-label { font-size: 12px; color: var(--bnb-muted); }
.bnb-stat-value { font: 700 28px/1.2 var(--bnb-display); color: var(--bnb-text); }
.bnb-grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.bnb-grid-stats > :nth-child(2) { animation-delay: .05s; }
.bnb-grid-stats > :nth-child(3) { animation-delay: .1s; }
.bnb-grid-stats > :nth-child(4) { animation-delay: .15s; }

.bnb-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 24px;
  background: var(--bnb-ink); color: #f3eefa; box-sizing: border-box;
  animation: bnb-rise .55s cubic-bezier(.2, .7, .2, 1) both;
}
.bnb-holo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--bnb-a), transparent 0 62%, #22c7dd 78%, #663399 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: bnb-rot 5s linear infinite;
}
.bnb-packet { stroke-dasharray: 12 60; animation: bnb-flow 2.4s linear infinite; }
.bnb-glow { animation: bnb-glow 2.4s ease-in-out infinite; }

.bnb-btn {
  font: 600 14px var(--bnb-font); border-radius: 10px; padding: 0 16px; min-height: 44px; border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  box-sizing: border-box; transition: transform .15s, box-shadow .2s, background-color .2s, color .2s;
}
.bnb-btn:hover:not(:disabled) { transform: translateY(-1px); }
.bnb-btn:active:not(:disabled) { transform: scale(.97); }
.bnb-btn:disabled { opacity: .45; cursor: not-allowed; }
.bnb-btn-sm { min-height: 36px; font-size: 13px; padding: 0 12px; }
.bnb-btn-primary { background: var(--bnb-brand); color: #fff; }
.bnb-btn-primary:hover:not(:disabled) { background: var(--bnb-brand-strong); color: #fff; box-shadow: 0 10px 24px -10px rgba(102, 51, 153, .9); }
.bnb-btn-ghost { background: var(--bnb-surface); color: var(--bnb-text); border-color: var(--bnb-field-border); }
.bnb-btn-ghost:hover:not(:disabled) { background: var(--bnb-surface-2); color: var(--bnb-text); }
.bnb-btn-cyan { background: #22c7dd; color: #0d1a22; }
.bnb-btn-cyan:hover:not(:disabled) { background: #4dd6e8; color: #0d1a22; box-shadow: 0 0 0 3px rgba(34, 199, 221, .25), 0 10px 26px -8px rgba(34, 199, 221, .9); }
.bnb-btn-dark { background: var(--bnb-ink-3); color: #f3eefa; border-color: var(--bnb-ink-line); }
.bnb-btn-dark:hover:not(:disabled) { background: var(--bnb-ink-line); color: #fff; }
.bnb-btn-ok { background: #17734a; color: #fff; }
.bnb-btn-ok:hover:not(:disabled) { background: #125c3b; color: #fff; }
.bnb-btn-danger { background: var(--bnb-surface); color: #b42318; border-color: #f3c7c3; }
.bnb-btn-danger:hover:not(:disabled) { background: var(--bnb-bad-bg); }

.bnb-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font: 600 12px var(--bnb-font); white-space: nowrap; background: var(--bnb-brand-soft); color: var(--bnb-brand-text); }
.bnb-chip.is-ok { background: var(--bnb-ok-bg); color: var(--bnb-ok); }
.bnb-chip.is-warn { background: var(--bnb-warn-bg); color: var(--bnb-warn); }
.bnb-chip.is-bad { background: var(--bnb-bad-bg); color: var(--bnb-bad); }
.bnb-chip.is-info { background: var(--bnb-info-bg); color: var(--bnb-info); }
.bnb-chip.is-muted { background: var(--bnb-surface-2); color: var(--bnb-muted); }

.bnb-field {
  width: 100%; box-sizing: border-box; min-height: 44px; border: 1px solid var(--bnb-field-border); border-radius: 10px;
  padding: 10px 12px; font: 14px var(--bnb-font); color: var(--bnb-text); background: var(--bnb-field);
}
.bnb-label { display: block; font: 600 12px var(--bnb-font); color: var(--bnb-muted); margin-bottom: 6px; }

.bnb-bar { height: 6px; border-radius: 3px; background: var(--bnb-surface-2); overflow: hidden; }
.bnb-bar > span, .bnb-fill { position: relative; overflow: hidden; display: block; height: 100%; background: var(--bnb-trace); border-radius: inherit; }
.bnb-bar > span::after, .bnb-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: bnb-sweep 2.6s ease-in-out infinite;
}
.bnb-live { width: 8px; height: 8px; border-radius: 50%; background: #22c7dd; animation: bnb-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }

.bnb-table { width: 100%; border-collapse: collapse; }
.bnb-table th { padding: 12px 14px; border-bottom: 1px solid var(--bnb-border); text-align: left; font: 600 12px var(--bnb-font); color: var(--bnb-muted); }
.bnb-table td { padding: 12px 14px; border-bottom: 1px solid var(--bnb-border-soft); font-size: 14px; color: var(--bnb-text); }
.bnb-table tbody tr { transition: background-color .2s; }
.bnb-table tbody tr:hover { background: var(--bnb-surface-2); }

/* Django messages as toasts */
#django-messages { position: fixed; left: 50%; transform: translateX(-50%); top: auto !important; bottom: 24px; z-index: 10002; width: calc(100% - 32px); max-width: 460px !important; display: flex; flex-direction: column; gap: 8px; }
.django-message {
  background: var(--bnb-ink) !important; color: #fff !important; border: 1px solid var(--bnb-ink-line) !important;
  border-radius: 12px !important; text-align: left !important; font: 500 14px var(--bnb-font) !important;
  padding: 12px 40px 12px 36px !important; animation: bnb-toast .35s cubic-bezier(.2, .8, .2, 1) both;
}
.django-message::before { content: ""; position: absolute; left: 16px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #22c7dd; }
.django-message.bg-red-100::before { background: #f97066; }
.django-message.bg-yellow-100::before { background: #f4b740; }
.django-message { position: relative; transition: opacity .3s; }
.django-message.is-error::before { background: #f97066; }
.django-message.is-warning::before { background: #f4b740; }
.django-message.is-success::before { background: #34d399; }
.django-message .close-message { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); border: 0; background: none; color: rgba(255, 255, 255, .6); font-size: 20px; line-height: 1; cursor: pointer; }
.django-message .close-message:hover { color: #fff; }

/* Legacy components, restyled to the brand until each page is redone */
.neo-button { background: var(--bnb-brand) !important; color: #fff !important; border-radius: 10px !important; transition: transform .15s, box-shadow .2s, background-color .2s; }
.neo-button:hover { background: var(--bnb-brand-strong) !important; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(102, 51, 153, .9); }
.section-title { background: none !important; color: var(--bnb-text) !important; font: 700 18px/1.3 var(--bnb-display) !important; padding-left: 16px !important; transform: none !important; }
.section-title::before { width: 6px !important; height: 6px !important; border-radius: 50% !important; background: var(--bnb-brand) !important; box-shadow: 0 0 0 3px var(--bnb-brand-soft); }
.section-title::after { display: none !important; }

/* Break history rows are built by the attendance scripts */
#breaksList > div { color: #e9e3f3 !important; display: flex; justify-content: space-between; }
#breaksList .font-mono { font-family: var(--bnb-display); color: var(--bnb-ink-muted); }

/* Modals */
.bnb-modal-backdrop { background: rgba(23, 15, 36, .55); backdrop-filter: blur(6px); }
.bnb-modal {
  background: var(--bnb-surface); color: var(--bnb-text); border-radius: 20px; padding: 24px; box-sizing: border-box;
  width: min(480px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
  animation: bnb-pop .32s cubic-bezier(.2, .8, .2, 1) both;
}
.bnb-modal-wide { width: min(880px, calc(100vw - 32px)); }
.bnb-modal-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--bnb-text); }
.bnb-modal-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--bnb-text-2); }
.bnb-modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bnb-modal .bg-blue-500, .bnb-modal .bg-blue-600 { background-color: var(--bnb-brand) !important; color: #fff !important; }
.bnb-modal .bg-blue-500:hover, .bnb-modal .bg-blue-600:hover { background-color: var(--bnb-brand-strong) !important; }
.bnb-modal .bg-green-500, .bnb-modal .bg-green-600 { background-color: #17734a !important; }
.bnb-modal .bg-gray-500 { background-color: var(--bnb-surface-2) !important; color: var(--bnb-text) !important; border: 1px solid var(--bnb-field-border); }
.bnb-modal .text-red-500 { color: var(--bnb-text) !important; }
.bnb-modal .bg-gray-50, .bnb-modal .bg-gray-100 { background-color: var(--bnb-surface-2) !important; }
.bnb-modal input:not([type=checkbox]):not([type=radio]), .bnb-modal select, .bnb-modal textarea {
  background: var(--bnb-field); color: var(--bnb-text); border-color: var(--bnb-field-border);
}

/* ------------------------------------------------- legacy bridge
 * Pages not yet rebuilt use Tailwind blues and grays. Inside the page area,
 * map the common patterns onto brand tokens so every page follows the theme
 * in light and dark mode. */
#content-comp { color: var(--bnb-text); }
#content-comp :is([class~="bg-white"], [class~="light:bg-blue-800"], .glass-card, .profile-card, .quick-stat):not(.bnb-card):not(.bnb-hero) {
  background-color: var(--bnb-surface) !important;
}
.dark #content-comp :is([class~="dark:bg-gray-800"], [class~="dark:bg-gray-900"], [class~="dark:bg-dark-200"], [class~="dark:bg-dark-300"], [class~="dark:bg-gold-100/50"], [class~="dark:bg-white/5"], [class~="dark:bg-gray-800/50"], [class~="dark:bg-transparent/20"]) {
  background-color: var(--bnb-surface) !important;
}
#content-comp :is([class~="bg-gray-50"], [class~="bg-gray-100"], [class~="bg-blue-50"], [class~="bg-slate-50"]) { background-color: var(--bnb-surface-2) !important; }
.dark #content-comp :is([class~="dark:bg-gray-700"], [class~="dark:bg-gray-700/50"], [class~="dark:bg-dark-100"], [class~="dark:bg-gray-800/30"]) { background-color: var(--bnb-surface-2) !important; }
#content-comp :is([class~="border-gray-200"], [class~="border-gray-300"], [class~="border-blue-200"], [class~="border-blue-500/20"]) { border-color: var(--bnb-border) !important; }
.dark #content-comp :is([class~="dark:border-gray-600"], [class~="dark:border-gray-700"], [class~="dark:border-blue-900"]) { border-color: var(--bnb-border) !important; }
#content-comp :is([class~="text-gray-900"], [class~="text-gray-800"], [class~="text-gray-700"], [class~="dark:text-blue-800"]) { color: var(--bnb-text) !important; }
#content-comp :is([class~="text-gray-600"], [class~="text-gray-500"], [class~="text-gray-400"]) { color: var(--bnb-muted) !important; }
.dark #content-comp :is([class~="dark:text-white"], [class~="dark:text-gray-100"], [class~="dark:text-gray-200"], [class~="dark:text-gray-300"]) { color: var(--bnb-text) !important; }
.dark #content-comp :is([class~="dark:text-gray-400"], [class~="dark:text-gray-500"]) { color: var(--bnb-muted) !important; }
#content-comp :is([class~="text-blue-400"], [class~="text-blue-500"], [class~="text-blue-600"], [class~="text-blue-700"], [class~="text-indigo-600"]) { color: var(--bnb-brand-text) !important; }
#content-comp :is(button, a):is([class~="bg-blue-500"], [class~="bg-blue-600"], [class~="bg-indigo-500"], [class~="bg-indigo-600"], [class~="bg-purple-600"]) {
  background-color: var(--bnb-brand) !important; color: #fff !important; border-radius: 10px;
}
#content-comp :is(button, a):is([class~="bg-blue-500"], [class~="bg-blue-600"], [class~="bg-indigo-600"], [class~="bg-purple-600"]):hover { background-color: var(--bnb-brand-strong) !important; }
#content-comp :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([class*="bnb-"]), select:not([class*="bnb-"]), textarea:not([class*="bnb-"])) {
  background-color: var(--bnb-field) !important; color: var(--bnb-text) !important; border-color: var(--bnb-field-border) !important; border-radius: 10px;
}
#content-comp :is(input, select, textarea):focus { outline: 2px solid #22c7dd; outline-offset: 1px; border-color: transparent !important; }
#content-comp table:not(.bnb-table) th { color: var(--bnb-muted); }
#content-comp :is(.hover-card, .glass-card) { border: 1px solid var(--bnb-border); box-shadow: none; }
#content-comp h1, #content-comp h2, #content-comp h3 { font-family: var(--bnb-display); }
.dark #content-comp :is(.bg-green-100, .bg-yellow-100, .bg-red-100, .bg-blue-100) { filter: saturate(.9) brightness(.9); }

/* Modal backdrops opened by legacy pages */
[role="dialog"], [role="alertdialog"] { animation: bnb-pop .32s cubic-bezier(.2, .8, .2, 1) both; }

/* --------------------------------------------------------------- motion */
@property --bnb-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes bnb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bnb-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bnb-toast { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bnb-ping { 0% { box-shadow: 0 0 0 0 rgba(34, 199, 221, .6); } 75%, 100% { box-shadow: 0 0 0 9px rgba(34, 199, 221, 0); } }
@keyframes bnb-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes bnb-flow { to { stroke-dashoffset: -240; } }
@keyframes bnb-shift { to { background-position: 200% 0; } }
@keyframes bnb-drift { to { background-position: 28px 28px, 28px 28px; } }
@keyframes bnb-glow { 0%, 100% { text-shadow: 0 0 0 rgba(34, 199, 221, 0); } 50% { text-shadow: 0 0 22px rgba(34, 199, 221, .7); } }
@keyframes bnb-breathe { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 12px rgba(34, 199, 221, .15); } 50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 0 26px rgba(34, 199, 221, .5); } }
@keyframes bnb-rot { to { --bnb-a: 360deg; } }

:focus-visible { outline: 2px solid #22c7dd; outline-offset: 2px; }

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

/* ---------- Tabs, filter pills, icon tints (time off and others) ---------- */
.bnb-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); width: fit-content; max-width: 100%; }
.bnb-tabs .tab-btn { border: 0 !important; background: transparent; color: var(--bnb-muted) !important; font: 600 13px/1 var(--bnb-font); padding: 9px 14px; border-radius: 9px; cursor: pointer; transition: background .2s, color .2s; }
.bnb-tabs .tab-btn:hover { color: var(--bnb-text) !important; }
.bnb-tabs .tab-btn.active { background: var(--bnb-surface); color: var(--bnb-brand-text) !important; box-shadow: 0 1px 3px rgba(23, 15, 36, .12); }
.tab-content.hidden { display: none !important; }
.tab-content:not(.hidden) { animation: bnb-rise .35s ease both; }
#content-comp .filter-btn.active,
#content-comp .filter-btn.active[class~="bg-blue-500"] { background: var(--bnb-brand) !important; border-color: var(--bnb-brand) !important; color: #fff !important; }
.bnb-ico-brand { color: var(--bnb-brand-text); }
.bnb-ico-cyan { color: var(--bnb-cyan-text); }
.bnb-ico-ok { color: var(--bnb-ok); }
.bnb-ico-warn { color: var(--bnb-warn); }
.bnb-ico-bad { color: var(--bnb-bad); }
.bnb-table th a, .bnb-table th button { color: inherit !important; }
.bnb-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--bnb-text-2); cursor: pointer; }
.bnb-check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--bnb-brand); flex: none; }
.bnb-file { display: block; width: 100%; font-size: 13px; color: var(--bnb-muted); }
.bnb-file::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--bnb-field-border); border-radius: 10px; background: var(--bnb-surface-2); color: var(--bnb-text); font: 600 13px var(--bnb-font); cursor: pointer; }
.bnb-file::file-selector-button:hover { border-color: var(--bnb-brand); }
.bnb-stack { display: flex; flex-direction: column; gap: 14px; }
.bnb-stack.hidden { display: none; }

/* ---------- Projects ---------- */
.bnb-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bnb-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.bnb-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--bnb-muted); font-size: 13px; pointer-events: none; }
.bnb-search > .bnb-field { padding-left: 38px; }
.bnb-project-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bnb-project { display: flex; flex-direction: column; gap: 14px; }
.bnb-project.hidden { display: none; }
.bnb-project-mark { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font: 700 15px var(--bnb-display); color: #fff; background: linear-gradient(135deg, var(--bnb-brand), var(--bnb-ink)); box-shadow: inset 0 0 0 1px rgba(34, 199, 221, .35); }
.bnb-project-title { margin: 0; font: 700 16px/1.3 var(--bnb-display); color: var(--bnb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bnb-project-meta { margin: 2px 0 0; font-size: 12px; color: var(--bnb-muted); }
.bnb-project-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--bnb-text-2); }
.bnb-faces { display: flex; }
.bnb-face { width: 30px; height: 30px; border-radius: 50%; margin-left: -8px; display: grid; place-items: center; object-fit: cover; font: 700 11px var(--bnb-font); color: var(--bnb-brand-text); background: var(--bnb-brand-soft); border: 2px solid var(--bnb-surface); }
.bnb-face:first-child { margin-left: 0; }
.bnb-face.is-more { color: var(--bnb-muted); background: var(--bnb-surface-2); }
.bnb-mini-stat { padding: 14px; border-radius: 14px; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); }
.bnb-mini-value { font: 700 24px/1.1 var(--bnb-display); color: var(--bnb-text); margin-bottom: 4px; }
.bnb-lane { padding: 10px; border-radius: 14px; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); display: flex; flex-direction: column; gap: 8px; }
.bnb-lane-head { display: flex; justify-content: space-between; align-items: center; font: 700 13px var(--bnb-display); color: var(--bnb-text); padding: 2px 2px 4px; }
.bnb-lane-count { font: 600 11px var(--bnb-font); color: var(--bnb-muted); background: var(--bnb-surface); border-radius: 999px; padding: 2px 8px; }
.bnb-task { padding: 10px 12px; border-radius: 10px; background: var(--bnb-surface); border: 1px solid var(--bnb-border-soft); font-size: 13px; color: var(--bnb-text); }
.bnb-rich p { margin: 0 0 4px; }
.bnb-rich ul { list-style: disc; padding-left: 18px; }
.bnb-rich ol { list-style: decimal; padding-left: 18px; }
.bnb-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--bnb-cyan); animation: bnb-spin .8s linear infinite; }
@keyframes bnb-spin { to { transform: rotate(360deg); } }

/* ---------- SweetAlert2 dialogs ---------- */
.swal2-container.swal2-backdrop-show { background: rgba(23, 15, 36, .55) !important; backdrop-filter: blur(6px); }
.swal2-popup { background: var(--bnb-surface) !important; color: var(--bnb-text) !important; border-radius: 20px !important; font-family: var(--bnb-font) !important; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.swal2-title { color: var(--bnb-text) !important; font-family: var(--bnb-display) !important; font-size: 22px !important; }
.swal2-html-container { color: var(--bnb-text-2) !important; font-size: 14px !important; }
.swal2-html-container label { color: var(--bnb-muted) !important; }
.swal2-styled.swal2-confirm { background: var(--bnb-brand) !important; border-radius: 10px !important; font-weight: 600 !important; }
.swal2-styled.swal2-cancel, .swal2-styled.swal2-deny { background: var(--bnb-surface-2) !important; color: var(--bnb-text) !important; border: 1px solid var(--bnb-field-border) !important; border-radius: 10px !important; font-weight: 600 !important; }
.swal2-styled:focus { box-shadow: 0 0 0 3px var(--bnb-brand-soft) !important; }
.swal2-input, .swal2-textarea, .swal2-select { background: var(--bnb-field) !important; color: var(--bnb-text) !important; border-color: var(--bnb-field-border) !important; border-radius: 10px !important; }
.swal2-icon.swal2-success { border-color: var(--bnb-ok) !important; color: var(--bnb-ok) !important; }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: var(--bnb-ok) !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color: var(--bnb-ok-bg) !important; }
.swal2-success-circular-line-left, .swal2-success-circular-line-right, .swal2-success-fix { background: transparent !important; }

/* ---------- Staff dashboards ---------- */
.bnb-stat-link { display: block; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; width: 100%; }
.bnb-stat-link .bnb-stat-label { display: flex; align-items: center; gap: 8px; }
.bnb-stat-link:hover { border-color: var(--bnb-brand); }
.bnb-stat-link:focus-visible { outline: 2px solid var(--bnb-cyan); outline-offset: 2px; }
.bnb-stat-link.is-attention { border-color: var(--bnb-warn); box-shadow: 0 0 0 3px var(--bnb-warn-bg); }
.bnb-stat-foot { font-size: 12px; color: var(--bnb-muted); margin-top: 6px; }
.bnb-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.bnb-tile { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border-radius: 14px; text-align: left; font: inherit; color: var(--bnb-text); text-decoration: none; cursor: pointer; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); transition: border-color .2s, transform .2s; }
.bnb-tile:hover { border-color: var(--bnb-brand); transform: translateY(-2px); }
.bnb-tile:focus-visible { outline: 2px solid var(--bnb-cyan); outline-offset: 2px; }
.bnb-tile > i { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--bnb-brand), var(--bnb-ink)); box-shadow: inset 0 0 0 1px rgba(34, 199, 221, .35); }
.bnb-tile > span { font-size: 15px; }
.bnb-tile > span b { font-family: var(--bnb-display); font-size: 18px; }
.bnb-tile > small { font-size: 12px; color: var(--bnb-muted); }
.bnb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bnb-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--bnb-border-soft); font-size: 14px; color: var(--bnb-text); }
.bnb-list > li:first-child { border-top: 0; }
#content-comp .bnb-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--bnb-font); color: var(--bnb-brand-text); background: var(--bnb-brand-soft); }
.bnb-modal table { width: 100%; font-size: 14px; border-collapse: collapse; }
.bnb-modal th { font: 600 12px var(--bnb-font) !important; color: var(--bnb-muted) !important; text-align: left; }
.bnb-modal td { color: var(--bnb-text-2); }
.bnb-modal tbody tr { border-top: 1px solid var(--bnb-border-soft); }
.dark .row-on-break { background-color: var(--bnb-warn-bg) !important; }

/* ---------- Inline alerts, filter bars ---------- */
.bnb-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; transition: opacity .3s; animation: bnb-rise .3s ease both; }
.bnb-alert.is-bad { background: var(--bnb-bad-bg); color: var(--bnb-bad); border-color: currentColor; }
.bnb-alert.is-warn { background: var(--bnb-warn-bg); color: var(--bnb-warn); border-color: currentColor; }
.bnb-alert.is-ok { background: var(--bnb-ok-bg); color: var(--bnb-ok); border-color: currentColor; }
.bnb-alert .bnb-iconbtn { color: inherit; font-size: 18px; }
.bnb-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 18px 20px; border-bottom: 1px solid var(--bnb-border-soft); }
.bnb-filters > div { flex: 0 1 170px; }
.bnb-decision { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

/* ---------- Legacy page normalisation (pages not hand-rebuilt yet) ---------- */
/* Gradient-text titles become solid display type */
#content-comp [class~="bg-clip-text"][class~="text-transparent"] {
  background: none !important; color: var(--bnb-text) !important; -webkit-text-fill-color: currentColor;
  font-family: var(--bnb-display); letter-spacing: 0;
}
#content-comp h1[class~="text-4xl"], #content-comp h1[class~="text-3xl"] { font-size: 28px !important; line-height: 1.2; }
/* Old glass cards */
#content-comp .neo-glass, #content-comp .form-section {
  background: var(--bnb-surface) !important; border: 1px solid var(--bnb-border-soft) !important;
  box-shadow: 0 1px 2px rgba(23, 15, 36, .04) !important; backdrop-filter: none !important;
}
/* Old top-level wrappers get the same width and padding as rebuilt pages */
#content-comp > .container.mx-auto,
#content-comp > [class~="w-5/6"],
#content-comp > [class~="p-4"][class~="md:p-8"],
#content-comp > [class~="p-4"][class~="md:p-16"] {
  width: 100% !important; max-width: 1400px !important; margin: 0 auto !important; padding: 24px 28px 48px !important;
  box-sizing: border-box; backdrop-filter: none !important; box-shadow: none !important; background: transparent !important;
}
/* Solid colour icon squares on old stat cards use the brand mark */
#content-comp [class~="w-12"][class~="h-12"][class~="rounded-xl"]:is([class*="bg-yellow-"], [class*="bg-green-"], [class*="bg-red-"], [class*="bg-blue-"], [class*="bg-purple-"], [class*="bg-gradient-to-br"]) {
  background: linear-gradient(135deg, var(--bnb-brand), var(--bnb-ink)) !important; box-shadow: inset 0 0 0 1px rgba(34, 199, 221, .35);
}
.bnb-legacy-head { margin-bottom: 20px; }
/* Floating "how to use" buttons on older pages */
#teamGuideBtn, #projectGuideBtn { background: var(--bnb-ink) !important; color: #fff !important; box-shadow: 0 0 0 1px rgba(34, 199, 221, .45), 0 10px 30px -10px rgba(23, 15, 36, .6); }
@media (max-width: 640px) {
  .bnb-grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bnb-page { padding: 16px 16px 40px; }
}

/* ---------- Command palette ---------- */
.bnb-search-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid var(--bnb-border); background: var(--bnb-surface-2); color: var(--bnb-muted); font: 500 13px var(--bnb-font); cursor: pointer; transition: border-color .2s, color .2s; }
.bnb-search-btn:hover { border-color: var(--bnb-brand); color: var(--bnb-text); }
.bnb-search-btn kbd, .bnb-palette kbd { font: 600 11px var(--bnb-font); padding: 2px 6px; border-radius: 6px; background: var(--bnb-surface); border: 1px solid var(--bnb-border); color: var(--bnb-muted); }
@media (max-width: 900px) { .bnb-search-btn span, .bnb-search-btn kbd { display: none; } .bnb-search-btn { padding: 0 11px; } }
.bnb-palette { position: fixed; inset: 0; z-index: 10000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(23, 15, 36, .55); backdrop-filter: blur(6px); }
.bnb-palette[hidden] { display: none; }
.bnb-palette-panel { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bnb-surface); border: 1px solid var(--bnb-border); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(34, 199, 221, .15); animation: bnb-pop .22s cubic-bezier(.2, .8, .2, 1) both; }
.bnb-palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--bnb-border-soft); color: var(--bnb-muted); }
.bnb-palette-input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--bnb-text); font: 500 16px var(--bnb-font); }
.bnb-palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.bnb-palette-group { padding: 10px 10px 4px; font: 600 11px var(--bnb-font); letter-spacing: .06em; text-transform: uppercase; color: var(--bnb-muted); }
.bnb-palette-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; cursor: pointer; color: var(--bnb-text); font-size: 14px; }
.bnb-palette-item > i { width: 18px; text-align: center; color: var(--bnb-muted); }
.bnb-palette-item.is-active { background: var(--bnb-brand-soft); }
.bnb-palette-item.is-active > i { color: var(--bnb-brand-text); }
.bnb-palette-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bnb-palette-sub { font-size: 12px; color: var(--bnb-muted); white-space: nowrap; }
.bnb-palette-empty { padding: 24px; text-align: center; color: var(--bnb-muted); font-size: 14px; }
.bnb-palette-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--bnb-border-soft); font-size: 12px; color: var(--bnb-muted); }
.bnb-palette-foot kbd { margin-right: 3px; }
@media (max-width: 640px) { .bnb-palette-foot { display: none; } }

/* ---------- HR action queue ---------- */
.bnb-nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 11px var(--bnb-font); color: var(--bnb-ink); background: var(--bnb-cyan); box-shadow: 0 0 12px rgba(34, 199, 221, .5); }
.sidebar.collapsed .bnb-nav-badge { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
.bnb-queue-jump { display: flex; flex-wrap: wrap; gap: 6px; }
.bnb-queue-jump a { text-decoration: none; }
.bnb-queue-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-items: start; }
@media (max-width: 640px) { .bnb-queue-grid { grid-template-columns: 1fr; } }
.bnb-queue { list-style: none; margin: 0; padding: 0; }
.bnb-queue-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--bnb-border-soft); }
.bnb-queue-item:first-child { border-top: 0; }
.bnb-queue-main { flex: 1; min-width: 0; }
.bnb-queue-title { font-weight: 600; font-size: 14px; color: var(--bnb-text); }
.bnb-queue-sub { font-size: 12px; color: var(--bnb-muted); margin-top: 2px; }
.bnb-queue-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bnb-queue-item.is-done { color: var(--bnb-ok); font-size: 14px; font-weight: 600; animation: bnb-rise .3s ease both; }
.bnb-queue-item.is-done > i { width: 34px; text-align: center; }
.bnb-queue-clear { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bnb-queue-check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--bnb-ok); background: var(--bnb-ok-bg); box-shadow: 0 0 0 8px var(--bnb-ok-bg); margin-bottom: 8px; }
@media (max-width: 640px) { .bnb-queue-item { flex-wrap: wrap; } .bnb-queue-actions { width: 100%; justify-content: flex-start; padding-left: 46px; } }

/* ---------- Live attendance board ---------- */
.bnb-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--bnb-muted); }
.bnb-dot.is-working { background: var(--bnb-ok); box-shadow: 0 0 0 3px var(--bnb-ok-bg); }
.bnb-dot.is-break { background: var(--bnb-warn); box-shadow: 0 0 0 3px var(--bnb-warn-bg); }
.bnb-dot.is-late { background: var(--bnb-bad); box-shadow: 0 0 0 3px var(--bnb-bad-bg); }
.bnb-dot.is-away { background: var(--bnb-cyan); box-shadow: 0 0 0 3px var(--bnb-cyan-soft); }
.bnb-dot.is-out, .bnb-dot.is-waiting { background: var(--bnb-muted); }
.bnb-board-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.bnb-board-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--bnb-border); background: var(--bnb-surface); color: var(--bnb-text-2); font: 500 13px var(--bnb-font); cursor: pointer; transition: border-color .2s, background .2s; }
.bnb-board-filter b { font-family: var(--bnb-display); color: var(--bnb-text); }
.bnb-board-filter:hover { border-color: var(--bnb-brand); }
.bnb-board-filter.is-on { background: var(--bnb-brand); border-color: var(--bnb-brand); color: #fff; }
.bnb-board-filter.is-on b { color: #fff; }
.bnb-board-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bnb-board-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--bnb-surface); border: 1px solid var(--bnb-border-soft); color: var(--bnb-text); text-decoration: none; overflow: hidden; transition: border-color .2s, transform .2s; animation: bnb-rise .3s ease both; }
.bnb-board-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--bnb-muted); opacity: .5; }
.bnb-board-card.is-working::before { background: var(--bnb-ok); opacity: 1; }
.bnb-board-card.is-break::before { background: var(--bnb-warn); opacity: 1; }
.bnb-board-card.is-late::before { background: var(--bnb-bad); opacity: 1; }
.bnb-board-card.is-away::before { background: var(--bnb-cyan); opacity: 1; }
.bnb-board-card.is-out, .bnb-board-card.is-waiting { opacity: .75; }
.bnb-board-card:hover { border-color: var(--bnb-brand); transform: translateY(-2px); opacity: 1; }
.bnb-board-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bnb-board-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bnb-board-detail { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--bnb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.bnb-board-detail b { color: var(--bnb-text-2); font-weight: 600; }
.bnb-board-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--bnb-text-2); white-space: nowrap; }

/* ---------- Stepper (payroll run) ---------- */
.bnb-stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; }
@media (max-width: 900px) { .bnb-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bnb-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bnb-surface); border: 1px solid var(--bnb-border-soft); }
.bnb-step > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.bnb-step b { font: 700 14px var(--bnb-display); color: var(--bnb-text); }
.bnb-step small { font-size: 12px; color: var(--bnb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bnb-step-num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--bnb-display); color: var(--bnb-muted); background: var(--bnb-surface-2); border: 1px solid var(--bnb-border); }
.bnb-step.is-done .bnb-step-num { color: #fff; background: var(--bnb-ok); border-color: var(--bnb-ok); }
.bnb-step.is-current { border-color: var(--bnb-brand); box-shadow: 0 0 0 3px var(--bnb-brand-soft); }
.bnb-step.is-current .bnb-step-num { color: #fff; background: var(--bnb-brand); border-color: var(--bnb-brand); box-shadow: 0 0 14px rgba(102, 51, 153, .5); }
.bnb-step-card { display: flex; flex-direction: column; gap: 12px; border-color: var(--bnb-brand) !important; }
.bnb-multi { min-height: 140px; padding: 6px; }
.bnb-multi option { padding: 6px 8px; border-radius: 6px; }
.bnb-multi option:checked { background: var(--bnb-brand-soft); color: var(--bnb-brand-text); }
.bnb-field.is-readonly { opacity: .65; cursor: not-allowed; }
.bnb-iconbtn.is-danger:hover { color: var(--bnb-bad); }
.bnb-review-banner { width: 100%; text-align: left; cursor: pointer; font: inherit; }

/* ---------- Forms (employee create / edit / finance) ---------- */
.bnb-form-section { display: flex; flex-direction: column; gap: 14px; }
.bnb-form-hint { margin: -6px 0 4px; font-size: 13px; color: var(--bnb-muted); }
.bnb-help { display: block; margin-top: 4px; font-size: 12px; color: var(--bnb-muted); }
.bnb-input { min-width: 0; }
.bnb-form-divider { padding-bottom: 14px; border-bottom: 1px solid var(--bnb-border-soft); }
.bnb-label.required-field::after, .required-field::after { content: " *"; color: var(--bnb-bad); }
.bnb-popover { margin-top: 6px; padding: 12px 14px; width: 100%; border-radius: 12px; font-size: 13px; color: var(--bnb-text-2); background: var(--bnb-surface); border: 1px solid var(--bnb-border); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); }
.bnb-range { flex: 1; accent-color: var(--bnb-brand); }
#selectedSkills, #selectedProjects { display: flex; flex-direction: column; gap: 8px; }
.bnb-subtitle { margin: 4px 0 0; font-size: 14px; color: var(--bnb-muted); }
.bnb-muted { color: var(--bnb-muted); }
.bnb-link { color: var(--bnb-brand-text); text-decoration: none; font-weight: 500; }
.bnb-link:hover { text-decoration: underline; }
.bnb-panel { background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); border-radius: 12px; }
.bnb-strong { font-weight: 600; color: var(--bnb-text); }
.bnb-empty { text-align: center; padding: 32px 16px; color: var(--bnb-muted); }
.bnb-warn-text { color: var(--bnb-warn); }
.bnb-stat-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--bnb-brand), var(--bnb-ink)); box-shadow: inset 0 0 0 1px rgba(34, 199, 221, .35); }
.bnb-card-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--bnb-border-soft); }
.bnb-divider { border: 1px solid var(--bnb-border-soft) !important; }
.bnb-divider-b { border-bottom: 1px solid var(--bnb-border-soft) !important; }
.bnb-divider-t { border-top: 1px solid var(--bnb-border-soft) !important; }
.bnb-profile-img { box-shadow: 0 0 0 4px var(--bnb-surface), 0 0 0 6px var(--bnb-brand), 0 0 30px rgba(102, 51, 153, .35); }
.bnb-hover-row { transition: background .2s, border-color .2s; }
.bnb-hover-row:hover { background: var(--bnb-surface-2); border-color: var(--bnb-brand) !important; }
.bnb-field.bnb-field-sm { min-height: 32px; min-width: 88px; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
.bnb-field.text-right { text-align: right; }
.bnb-faq-q { margin: 0; font: 600 15px var(--bnb-font); color: var(--bnb-text); }
.bnb-auth-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; }
.bnb-auth-icon.is-ok { color: var(--bnb-ok); background: var(--bnb-ok-bg); }
.bnb-auth-icon.is-bad { color: var(--bnb-bad); background: var(--bnb-bad-bg); }
.bnb-auth-tips { margin: 0; padding-left: 18px; list-style: disc; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--bnb-muted); }

/* ---------- Page loading bar (HTMX navigation) ---------- */
/* Page loader: a thin bar plus a small cube version of the logo whose bits ripple
   left to right. Pure CSS (transform/opacity); the animation only exists while it's
   showing, and skeleton.html shows it only for navigations slower than 150ms. */
.loading-overlay { position: fixed; inset: 0; z-index: 10003; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
.loading-overlay.active { opacity: 1; visibility: visible; transition: opacity .2s; }
.bnb-loadbar-track { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; }
.bnb-loader { position: absolute; left: 50%; top: 50%; display: grid; grid-template-columns: repeat(12, 7px); grid-template-rows: repeat(11, 7px); gap: 2px; padding: 20px;
  border-radius: 20px; background: var(--bnb-ink, #15111d); border: 1px solid rgba(196, 165, 245, .18);
  box-shadow: 0 24px 60px -20px rgba(21, 17, 29, .55), 0 0 44px -10px rgba(168, 85, 247, .35);
  transform: translate(-50%, -50%) scale(.9); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.loading-overlay.active .bnb-loader { transform: translate(-50%, -50%) scale(1); }
.bnb-loader i { grid-row: calc(var(--r) + 1); grid-column: calc(var(--c) + 1); border-radius: 1.5px; background: #8a4fc4;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .32), inset 0 -1.5px 0 rgba(0, 0, 0, .3); opacity: .28; transform: scale(.7); }
.bnb-loader i.is-cyan { background: #26b1ce; }
.loading-overlay.active .bnb-loader i { animation: bnb-bit 1.3s cubic-bezier(.4, 0, .2, 1) infinite; animation-delay: calc(var(--c) * 70ms + var(--r) * 18ms); }
@keyframes bnb-bit {
  0%, 100% { opacity: .28; transform: scale(.7); }
  30% { opacity: 1; transform: translateY(-2px) scale(1.12); }
  60% { opacity: .75; transform: scale(.92); }
}
.dark .bnb-loader { background: #15111d; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85), 0 0 50px -10px rgba(168, 85, 247, .45); }
@media (prefers-reduced-motion: reduce) { .loading-overlay.active .bnb-loader i { animation: none; opacity: .9; transform: none; } }
.bnb-loadbar { height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--bnb-cyan), var(--bnb-brand), transparent); box-shadow: 0 0 12px rgba(34, 199, 221, .7); animation: bnb-load 1.1s ease-in-out infinite; }
@keyframes bnb-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .bnb-loadbar { animation: none; width: 100%; } }
.bnb-board-panel { display: flex; flex-direction: column; gap: 14px; }
.bnb-board-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bnb-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bnb-shortcut { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--bnb-text); text-decoration: none; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); transition: border-color .2s, transform .15s; }
.bnb-shortcut i { width: 18px; text-align: center; color: var(--bnb-brand-text); }
.bnb-shortcut:hover { border-color: var(--bnb-brand); transform: translateY(-1px); }

/* ---------- Project boards and tasks ---------- */
.bnb-proj-strip { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.bnb-kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
@media (max-width: 1100px) { .bnb-kanban { grid-template-columns: repeat(4, minmax(250px, 80vw)); scroll-snap-type: x mandatory; } .bnb-kcol { scroll-snap-align: start; } }
.bnb-kcol { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); min-height: 180px; transition: border-color .15s, background .15s; }
.bnb-kcol.is-over { border-color: var(--bnb-cyan); background: var(--bnb-cyan-soft); }
.bnb-kcol-head { display: flex; align-items: center; gap: 8px; font: 700 13px var(--bnb-display); color: var(--bnb-text); padding: 2px 4px; }
.bnb-kcol-head .bnb-lane-count { margin-left: auto; }
.bnb-kcol-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.bnb-kcol-empty { margin: 0; padding: 18px 8px; text-align: center; font-size: 12px; color: var(--bnb-muted); border: 1px dashed var(--bnb-border); border-radius: 12px; }
.bnb-kcol-empty[hidden] { display: none; }
.bnb-kdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.bnb-kdot.is-todo { background: var(--bnb-muted); }
.bnb-kdot.is-in_progress { background: var(--bnb-cyan); }
.bnb-kdot.is-review { background: var(--bnb-warn); }
.bnb-kdot.is-completed { background: var(--bnb-ok); }
.bnb-tcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bnb-surface); border: 1px solid var(--bnb-border-soft); box-shadow: 0 1px 2px rgba(23, 15, 36, .05); cursor: grab; transition: border-color .15s, transform .15s, box-shadow .15s; }
.bnb-tcard.hidden { display: none; }
.bnb-tcard:hover { border-color: var(--bnb-brand); }
.bnb-tcard.is-dragging { opacity: .45; cursor: grabbing; }
.bnb-tcard.is-moved { animation: bnb-pop .4s ease both; border-color: var(--bnb-cyan); }
.bnb-tcard-link { display: flex; flex-direction: column; gap: 2px; color: var(--bnb-text); text-decoration: none; }
.bnb-tcard-project { font-size: 11px; font-weight: 600; color: var(--bnb-brand-text); }
.bnb-tcard-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.bnb-tcard-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.bnb-tcard-by { font-size: 11px; color: var(--bnb-muted); }
.bnb-tcard-move { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.bnb-tcard-move .bnb-iconbtn { width: 26px; height: 26px; font-size: 11px; background: var(--bnb-surface-2); }
.bnb-tcard:hover .bnb-tcard-move, .bnb-tcard:focus-within .bnb-tcard-move { opacity: 1; }
@media (hover: none) { .bnb-tcard-move { opacity: 1; position: static; justify-content: flex-end; } }
.bnb-prio { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--bnb-muted); }
.bnb-prio.is-high { color: var(--bnb-bad); }
.bnb-prio.is-medium { color: var(--bnb-warn); }
.bnb-prio.is-low { color: var(--bnb-info); }
.bnb-due { display: inline-flex; align-items: center; gap: 4px; color: var(--bnb-muted); font-size: 11px; }
.bnb-due.is-late { color: var(--bnb-bad); font-weight: 700; }
.bnb-status-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 14px; background: var(--bnb-surface-2); border: 1px solid var(--bnb-border-soft); }
@media (max-width: 640px) { .bnb-status-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bnb-status-step { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--bnb-text-2); font: 600 13px var(--bnb-font); cursor: pointer; transition: background .15s, border-color .15s; }
.bnb-status-step:hover:not(:disabled) { background: var(--bnb-surface); border-color: var(--bnb-border); }
.bnb-status-step.is-on { background: var(--bnb-surface); border-color: var(--bnb-brand); color: var(--bnb-text); box-shadow: 0 0 0 3px var(--bnb-brand-soft); }
.bnb-status-step:disabled { cursor: not-allowed; opacity: .7; }

/* Forgotten-checkout report (attendance card modal) */
.bnb-retro-notice { background: var(--bnb-warn-bg); border-left: 3px solid var(--bnb-warn); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.bnb-retro-task { background: var(--bnb-surface-2); border: 1px solid var(--bnb-border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.bnb-retro-task-head { display: flex; align-items: center; justify-content: space-between; }
.bnb-retro-task-head .bnb-iconbtn { color: var(--bnb-bad); }
.bnb-retro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .bnb-retro-grid { grid-template-columns: minmax(0, 1fr); } }
.bnb-retro-hours { margin: 10px 0 0; font-size: 13px; color: var(--bnb-muted); }
.bnb-retro-hours.is-over { color: var(--bnb-bad); font-weight: 600; }
.bnb-retro-editor { overflow: visible; } /* Quill draws its own border (see "Rich text editor" below); visible so dropdowns aren't clipped */
.bnb-field-error { color: var(--bnb-bad); font-size: 12px; margin-top: 4px; }
#retroactiveReportSection > * + * { margin-top: 18px; }

/* Notification bell list + history page */
.bnb-notif { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--bnb-text); }
.bnb-notif:hover { background: var(--bnb-surface-2); color: var(--bnb-text); }
.bnb-notif-title { font-weight: 600; font-size: 14px; }
.bnb-notif-text { font-size: 13px; color: var(--bnb-muted); overflow-wrap: anywhere; }
.bnb-notif-time { font-size: 12px; color: var(--bnb-muted); opacity: .85; }
.bnb-notif.is-unread { background: var(--bnb-surface-2); }
.bnb-notif.is-unread .bnb-notif-title::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bnb-brand); margin-right: 7px; vertical-align: middle; }
.bnb-notif-empty { text-align: center; padding: 16px; color: var(--bnb-muted); font-size: 14px; }
.bnb-notif-foot { text-align: center; padding: 8px; border-top: 1px solid var(--bnb-border); font-weight: 600; font-size: 14px; }
.bnb-checkout-hint { margin: 2px 0 0; font-size: 12.5px; color: var(--bnb-ink-text); line-height: 1.4; }
.bnb-project-link { color: inherit; text-decoration: none; }
.bnb-project-link:hover { color: var(--bnb-brand); text-decoration: underline; }
.bnb-level { margin-left: 6px; color: var(--bnb-brand); font-size: 13px; }
/* No "move left" in the first column or "move right" in the last */
.bnb-kcol:first-child [data-move="prev"], .bnb-kcol:last-child [data-move="next"] { visibility: hidden; }
.bnb-checkout-link { color: var(--bnb-cyan); font-weight: 600; text-decoration: underline; white-space: nowrap; }

/* Small screens: decorative loops (heading trace, progress-bar shine, sidebar grid
   drift, glows) repaint constantly and look like flicker on phones. Keep them still;
   the live dot and the page loading bar keep moving, the bar a little slower. */
@media (max-width: 768px) {
  .bnb-trace::after, .bnb-bar > span::after, .bnb-fill::after, #sidebar.sidebar,
  .bnb-logo-tile, .bnb-glow, .bnb-holo::after, .bnb-packet { animation: none !important; }
  .bnb-bar > span::after, .bnb-fill::after { display: none; }
  .bnb-loadbar { width: 55%; animation-duration: 1.6s; box-shadow: none; }
  /* The attendance card's circuit lines run through the heading on a phone */
  .bnb-hero-traces { display: none; }
}

/* Rich text editor (Quill "snow" theme: daily report, forgotten-checkout report).
   Its stylesheet hard-codes light colours (#444 icons, white menus); use the theme tokens instead.
   Prefixed with html: quill.snow.css is loaded inside the page body, after this file. */
html .ql-toolbar.ql-snow { border: 1px solid var(--bnb-border); border-radius: 10px 10px 0 0; background: var(--bnb-surface-2); font-family: var(--bnb-font); }
html .ql-container.ql-snow { border: 1px solid var(--bnb-border); border-top: 0; border-radius: 0 0 10px 10px; background: var(--bnb-surface); color: var(--bnb-text); font: 14px/1.6 var(--bnb-font); }
html .ql-snow .ql-editor { color: var(--bnb-text); }
html .ql-snow .ql-editor.ql-blank::before { color: var(--bnb-muted); font-style: normal; }
html .ql-snow .ql-editor a { color: var(--bnb-brand-text); }
html .ql-snow .ql-editor :is(pre, html code), html .ql-snow .ql-editor pre.ql-syntax { background: var(--bnb-surface-2); color: var(--bnb-text); border-radius: 6px; }
html .ql-snow .ql-editor blockquote { border-left-color: var(--bnb-border); color: var(--bnb-muted); }
html .ql-snow .ql-stroke, html .ql-snow .ql-stroke-miter { stroke: var(--bnb-muted); }
html .ql-snow .ql-fill, html .ql-snow .ql-stroke.ql-fill { fill: var(--bnb-muted); }
html .ql-snow .ql-picker, html .ql-snow .ql-picker-label { color: var(--bnb-muted); }
html .ql-snow.ql-toolbar :is(button, html .ql-picker-label, html .ql-picker-item):is(:hover, html :focus, html .ql-active) { color: var(--bnb-brand-text); }
html .ql-snow.ql-toolbar :is(button, html .ql-picker-label, html .ql-picker-item):is(:hover, html :focus, html .ql-active) :is(.ql-stroke, html .ql-stroke-miter) { stroke: var(--bnb-brand-text); }
html .ql-snow.ql-toolbar :is(button, html .ql-picker-label, html .ql-picker-item):is(:hover, html :focus, html .ql-active) .ql-fill { fill: var(--bnb-brand-text); }
html .ql-snow .ql-picker-options { background: var(--bnb-surface); border: 1px solid var(--bnb-border) !important; border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
html .ql-snow .ql-picker.ql-expanded .ql-picker-label { border-color: var(--bnb-border); }
html .ql-snow .ql-tooltip { background: var(--bnb-surface); color: var(--bnb-text); border: 1px solid var(--bnb-border); border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
html .ql-snow .ql-tooltip input[type="text"] { background: var(--bnb-surface-2); color: var(--bnb-text); border: 1px solid var(--bnb-border); border-radius: 6px; }
html .ql-snow .ql-tooltip a { color: var(--bnb-brand-text); }
html .ql-snow .ql-picker.ql-expanded .ql-picker-label { color: var(--bnb-brand-text); }
html .ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { stroke: var(--bnb-brand-text); }

/* Phones: the top bar is sticky (see skeleton.html), but skeleton.css forces
   `.grid-navbar { z-index: auto !important }` on small screens, so page content
   painted over it while scrolling. Keep it above content (still below the mobile
   sidebar 10001, dropdowns 10002 and dialogs) and fully opaque. */
@media (max-width: 768px) {
  .app-container > .grid-navbar { z-index: 600 !important; }
  .app-container > .grid-navbar #navbar { background: var(--bnb-bg); }
}

/* ------------------------------------------------- Voxel logo (bnb_voxel_logo.html)
   3D cubes drawn by assets/js/bnb-voxel-logo.js (three.js). The canvas is 136% of the box,
   so tilt, lift and halos have room. As a workday meter, --bnb-progress (0-1) is set by the
   script and the soft glow behind the logo grows with it. */
.bnb-voxel { --bnb-progress: 1; position: relative; width: 100%; aspect-ratio: 1 / 1; }
.bnb-voxel canvas { position: absolute; inset: -18%; width: 136%; height: 136%; display: block; cursor: pointer; touch-action: manipulation; }
.bnb-voxel::before { content: ""; position: absolute; inset: -6%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(168, 85, 247, .38) 0%, rgba(34, 211, 238, .12) 50%, transparent 100%);
  opacity: calc(.12 + .88 * var(--bnb-progress)); transform: scale(calc(.8 + .25 * var(--bnb-progress))); transition: opacity 1.2s ease, transform 1.2s ease; }
.bnb-voxel:not([data-surface="dark"])::before { background: radial-gradient(closest-side, rgba(103, 52, 147, .2) 0%, rgba(38, 177, 206, .08) 50%, transparent 100%); }
.bnb-voxel-caption { position: relative; margin-top: 6px; text-align: center; font: 600 12px/1.3 var(--bnb-font); letter-spacing: .02em; color: var(--bnb-ink-text); font-variant-numeric: tabular-nums; }
.bnb-voxel-caption:empty { display: none; }

/* Check-in card: content on the left, the animated logo on the right */
.attendance-card { display: grid; grid-template-columns: minmax(0, 1fr) clamp(200px, 34%, 300px); gap: 8px 20px; align-items: center; }
.att-main { grid-column: 1; grid-row: 1; position: relative; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.att-emblem { grid-column: 2; grid-row: 1; position: relative; align-self: center; }
@media (max-width: 640px) {
  .attendance-card { grid-template-columns: minmax(0, 1fr); }
  .att-emblem { position: absolute; top: 12px; right: 12px; width: 112px; }
  .att-emblem .bnb-voxel-caption { display: none; }
  .att-main > :first-child { padding-right: 120px; }
}
