/* =====================================================================
   Carbiforce Admin Panel – app.css
   Look: Carbiforce red + CFX navy, frosted-glass cards on a soft mesh
   background, Barlow type (industrial, like the website logo).
   Light & dark: html[data-bs-theme="dark"].
   ===================================================================== */
:root {
  --cf-red: #98012E;
  --cf-red-2: #C8104A;
  --accent-rgb: 152, 1, 46;
  --accent2-rgb: 200, 16, 74;
  --cf-red-soft: rgba(var(--accent-rgb), .09);
  --cf-navy: #13293D;
  --cf-navy-2: #1D4E66;
  --cf-teal: #2A7F8F;
  --cf-gold: #C98A1B;
  --cf-green: #1F8A57;

  --bg: #EEF1F4;
  --ink: #142028;
  --ink-2: #44515C;
  --muted: #6B7782;
  --line: rgba(20, 32, 40, .09);
  --glass: rgba(255, 255, 255, .5);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-border: rgba(255, 255, 255, .75);
  --shadow: 0 1px 2px rgba(17, 38, 57, .05), 0 10px 30px rgba(17, 38, 57, .07);
  --shadow-lg: 0 24px 60px rgba(17, 38, 57, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --side-w: 264px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --bs-primary: var(--cf-red);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-link-color: var(--cf-red);
  --bs-link-color-rgb: var(--accent-rgb);
  --bs-link-hover-color: var(--cf-red-2);
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 16px;
  color-scheme: light;
}
/* Colour themes (Profile menu → Theme). Each only swaps the accent; navy stays the base. */
html[data-accent="cfx"]      { --cf-red: #14707F; --cf-red-2: #1E9AAD; --accent-rgb: 20, 112, 127; --accent2-rgb: 30, 154, 173; }
html[data-accent="metaldur"] { --cf-red: #1D4E66; --cf-red-2: #2F7AA0; --accent-rgb: 29, 78, 102; --accent2-rgb: 47, 122, 160; }
html[data-accent="royal"]    { --cf-red: #5B3FA8; --cf-red-2: #7D5CD6; --accent-rgb: 91, 63, 168; --accent2-rgb: 125, 92, 214; }
html[data-accent="forest"]   { --cf-red: #1E7048; --cf-red-2: #2A9A62; --accent-rgb: 30, 112, 72; --accent2-rgb: 42, 154, 98; }
html[data-accent="graphite"] { --cf-red: #3A4652; --cf-red-2: #C98A1B; --accent-rgb: 58, 70, 82; --accent2-rgb: 201, 138, 27; }

html[data-bs-theme="dark"] {
  --bg: #0A1117;
  --ink: #E6ECF1;
  --ink-2: #B8C3CC;
  --muted: #8B98A3;
  --line: rgba(255, 255, 255, .08);
  --glass: rgba(18, 28, 38, .62);
  --glass-strong: rgba(20, 31, 42, .9);
  --glass-border: rgba(255, 255, 255, .07);
  --cf-red-soft: rgba(var(--accent2-rgb), .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .3);
  --bs-primary: var(--cf-red-2);
  --bs-primary-rgb: var(--accent2-rgb);
  --bs-link-color: color-mix(in srgb, var(--cf-red-2) 65%, #fff);
  --bs-link-hover-color: color-mix(in srgb, var(--cf-red-2) 45%, #fff);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  color-scheme: dark;
}

/* ---------- Base ---------- */
html, body { min-height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* soft mesh background (fixed so glass blurs something) */
body::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none;
  background:
    radial-gradient(34vmax 34vmax at 14% 10%, rgba(var(--accent-rgb), .38), transparent 62%),
    radial-gradient(40vmax 40vmax at 88% 14%, rgba(29, 78, 102, .40), transparent 62%),
    radial-gradient(32vmax 32vmax at 72% 92%, rgba(201, 138, 27, .22), transparent 62%),
    radial-gradient(30vmax 30vmax at 20% 88%, rgba(42, 127, 143, .26), transparent 62%),
    radial-gradient(24vmax 24vmax at 50% 50%, rgba(var(--accent2-rgb), .10), transparent 65%);
}
/* faint dot grid on top of the colours – gives the glass something to blur */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(19, 41, 61, .10) 1px, transparent 1.2px); background-size: 22px 22px;
}
html[data-bs-theme="dark"] body::before { opacity: .75; filter: saturate(1.25); }
html[data-bs-theme="dark"] body::after { background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px); }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(26px, 3vw, 34px); }
h2 { font-size: 22px; }
h3 { font-size: 19px; }
a { text-decoration: none; }
.text-muted, .muted { color: var(--muted) !important; }
.small-caps { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .9em; }
::selection { background: var(--cf-red); color: #fff; }
:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .30));
  border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(255, 255, 255, .25), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
}
html[data-bs-theme="dark"] .glass {
  background: linear-gradient(145deg, rgba(30, 44, 58, .62), rgba(14, 22, 31, .48));
  border-color: rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--shadow);
}
.glass-strong { background: var(--glass-strong); }
.glass-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.glass-head h2, .glass-head h3 { margin: 0; font-size: 19px; }
.glass-body { padding: 18px 20px; }
.glass-body.flush { padding: 0; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1040;
  background: linear-gradient(170deg, rgba(14, 30, 45, .9), rgba(19, 41, 61, .86) 55%, color-mix(in srgb, var(--cf-red) 38%, rgba(14, 30, 45, .9)));
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  color: #DCE6EE; border-right: 1px solid rgba(255, 255, 255, .08); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
  transition: width .28s cubic-bezier(.4, 0, .2, 1); overflow-x: hidden;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 14px; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 17px;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), .45);
}
.brand b { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: .08em; line-height: 1; }
.brand span { font-size: 11.5px; color: #9FB2C2; letter-spacing: .06em; }
.nav-side { padding: 6px 12px 20px; }
.nav-side .label { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #7F95A7; padding: 16px 12px 6px; font-weight: 600; }
.nav-side a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 11px; color: #D3DEE7; font-weight: 500; font-size: 14.5px; position: relative;
  transition: background .2s, color .2s, transform .2s;
}
.nav-side a i { font-size: 17px; width: 20px; text-align: center; opacity: .85; }
.nav-side a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(2px); }
.nav-side a.active { background: linear-gradient(90deg, rgba(var(--accent2-rgb), .9), rgba(var(--accent-rgb), .75)); color: #fff; box-shadow: 0 6px 18px rgba(var(--accent-rgb), .35); }
.nav-side a .badge { margin-left: auto; background: #fff; color: var(--cf-red); font-weight: 700; }
.nav-side a.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.side-foot { padding: 14px 20px 22px; font-size: 12px; color: #8EA3B4; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .search { flex: 1; max-width: 420px; position: relative; }
.topbar .search input { padding-left: 38px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-border); }
.topbar .search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; position: relative; flex: none;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--ink-2); font-size: 18px; transition: transform .15s, color .15s;
}
.icon-btn:hover { color: var(--bs-primary); transform: translateY(-1px); }
.icon-btn .dot {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700;
  background: var(--cf-red); color: #fff; display: grid; place-items: center; border: 2px solid var(--bg);
}
.me-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--ink); }
.me-chip b { font-size: 14px; display: block; line-height: 1.1; }
.me-chip small { font-size: 11.5px; color: var(--muted); }
.content { padding: 26px 28px 90px; max-width: 1420px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }

/* ---------- Avatars ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.avatar.xs { width: 26px; height: 26px; font-size: 10.5px; border-width: 1.5px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 112px; height: 112px; font-size: 38px; border-width: 4px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-right: -8px; }

/* ---------- Buttons / forms ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1.05rem; transition: transform .12s, box-shadow .2s, background .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); border: 0; box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28); }
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, var(--cf-red), var(--cf-red)); filter: brightness(.92); box-shadow: 0 8px 22px rgba(var(--accent-rgb), .36); }
.btn-navy { background: linear-gradient(135deg, var(--cf-navy), var(--cf-navy-2)); color: #fff; border: 0; }
.btn-navy:hover { color: #fff; filter: brightness(1.12); }
.btn-glass { background: var(--glass); border: 1px solid var(--glass-border); color: var(--ink); }
.btn-glass:hover { background: var(--glass-strong); color: var(--bs-primary); }
.btn-success { background: linear-gradient(135deg, #18784a, #22a565); border: 0; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1.05rem; border-radius: 14px; }
.form-control, .form-select { border-radius: 12px; border-color: var(--line); background-color: var(--glass-strong); padding: .58rem .85rem; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 .22rem var(--cf-red-soft); background-color: var(--glass-strong); color: var(--ink); }
.form-label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin-bottom: .35rem; }
.form-label .req { color: var(--cf-red); }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.input-group-text { border-radius: 12px; background: var(--glass); border-color: var(--line); }

/* Choice cards (radio as big tiles) */
.choice { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 86px; padding: 12px 6px; cursor: pointer; text-align: center;
  border-radius: 16px; border: 1.5px solid var(--line); background: var(--glass-strong); font-weight: 600; transition: all .18s;
}
.choice label > span i { font-size: 26px; color: var(--muted); transition: transform .25s, color .2s; }
.choice input:checked + span { border-color: var(--bs-primary); background: var(--cf-red-soft); color: var(--bs-primary); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .14); }
.choice input:checked + span i { color: var(--bs-primary); transform: scale(1.15) rotate(-6deg); }
.choice input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.choice.sm label > span { min-height: 0; padding: 10px 6px; font-size: 13.5px; }

/* ---------- KPI tiles ---------- */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; height: 100%; }
.kpi .k-label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .k-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--cf-red-soft); color: var(--bs-primary); }
.kpi .k-icon.navy { background: rgba(29, 78, 102, .12); color: var(--cf-navy-2); }
.kpi .k-icon.gold { background: rgba(201, 138, 27, .14); color: #a46e0f; }
.kpi .k-icon.green { background: rgba(31, 138, 87, .13); color: var(--cf-green); }
html[data-bs-theme="dark"] .kpi .k-icon.navy { color: #7FB6CF; }
.kpi .k-value { font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.05; margin-top: 10px; }
.kpi .k-foot { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--cf-red-soft), transparent 70%); }

/* ---------- Tables ---------- */
.table-glass { margin: 0; --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-hover-bg: rgba(var(--accent-rgb), .035); }
.table-glass th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 12px 16px; white-space: nowrap; background: transparent; }
.table-glass td { padding: 12px 16px; border-color: var(--line); vertical-align: middle; }
.table-glass tr:last-child td { border-bottom: 0; }
.t-name { font-weight: 600; }
.t-sub { font-size: 12.5px; color: var(--muted); }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 30px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(107, 119, 130, .14); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.success { background: rgba(31, 138, 87, .13); color: #177046; }
.pill.warning { background: rgba(201, 138, 27, .16); color: #93600a; }
.pill.danger { background: rgba(176, 32, 42, .12); color: #a11d27; }
.pill.info { background: rgba(29, 78, 102, .13); color: var(--cf-navy-2); }
.pill.brand { background: var(--cf-red-soft); color: var(--bs-primary); }
.pill.secondary { background: rgba(107, 119, 130, .14); color: var(--ink-2); }
.pill.dark { background: rgba(20, 32, 40, .12); color: var(--ink-2); }
html[data-bs-theme="dark"] .pill.success { color: #6AD79F; } html[data-bs-theme="dark"] .pill.warning { color: #F0C060; }
html[data-bs-theme="dark"] .pill.danger { color: #FF8B93; } html[data-bs-theme="dark"] .pill.info { color: #84BCD6; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.cf { color: var(--cf-red); } .chip.md { color: var(--cf-navy-2); }
html[data-bs-theme="dark"] .chip.cf { color: #F07A99; } html[data-bs-theme="dark"] .chip.md { color: #84BCD6; }

/* ---------- Lists / timeline ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background .15s; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: rgba(var(--accent-rgb), .035); color: var(--ink); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; }
.list-row .sub { font-size: 12.5px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline > li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bs-primary); box-shadow: 0 0 0 4px var(--cf-red-soft); }
.timeline > li::after { content: ""; position: absolute; left: 7px; top: 19px; bottom: 0; width: 1px; background: var(--line); }
.timeline > li:last-child::after { display: none; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state i { font-size: 38px; opacity: .5; display: block; margin-bottom: 8px; }

/* ---------- Dashboard ---------- */
.hero {
  position: relative; overflow: hidden; padding: 26px 28px; border-radius: 22px; color: #fff; margin-bottom: 22px;
  background: linear-gradient(120deg, var(--cf-navy) 0%, var(--cf-navy-2) 45%, var(--cf-red) 100%);
  box-shadow: 0 18px 40px rgba(19, 41, 61, .25);
}
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 220px at 85% 0%, rgba(255,255,255,.18), transparent 70%), radial-gradient(400px 200px at 0% 100%, rgba(255,255,255,.08), transparent 70%); pointer-events: none; }
.hero h1 { color: #fff; margin: 0; }
.hero p { color: rgba(255,255,255,.8); margin: 4px 0 0; }
.hero .btn-glass { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.hero .btn-glass:hover { background: rgba(255,255,255,.24); color: #fff; }
.tea-card { display: flex; align-items: center; gap: 16px; }
.tea-card .cup { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex: none; background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); color: #fff; box-shadow: 0 8px 20px rgba(var(--accent-rgb), .3); }
.celebrate-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.celebrate-row:last-child { border-bottom: 0; }
.chart-box { position: relative; height: 240px; }
.chart-box.sm { height: 190px; }

/* ---------- Directory ---------- */
.person-card { padding: 20px 16px 16px; text-align: center; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.person-card .name { font-weight: 700; font-size: 15.5px; margin-top: 8px; }
.person-card .role { font-size: 13px; color: var(--muted); min-height: 2.6em; }
.person-card .meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.person-card .contact { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }

/* ---------- Org chart ---------- */
.org-wrap { overflow: auto; padding: 24px 16px 40px; cursor: grab; }
.org-wrap.dragging { cursor: grabbing; user-select: none; }
.org-zoom { width: max-content; margin: 0 auto; }
.org-wrap { min-height: 420px; max-height: calc(100vh - 210px); }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; position: relative; }
.org-tree ul { padding-top: 26px; }
.org-tree li { position: relative; padding: 26px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org-tree > li { padding-top: 0; }
/* connectors */
.org-tree li::before, .org-tree li::after { content: ""; position: absolute; top: 0; width: 50%; height: 26px; border-top: 2px solid rgba(var(--accent-rgb), .28); }
.org-tree li::before { right: 50%; }
.org-tree li::after { left: 50%; border-left: 2px solid rgba(var(--accent-rgb), .28); }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:only-child { padding-top: 26px; }
.org-tree li:only-child::after { display: block; width: 0; border-top: 0; left: 50%; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0 none; }
.org-tree li:last-child::before { border-right: 2px solid rgba(var(--accent-rgb), .28); border-radius: 0 10px 0 0; }
.org-tree li:first-child::after { border-radius: 10px 0 0 0; }
.org-tree > li::before, .org-tree > li::after { display: none; }
.org-tree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 26px; border-left: 2px solid rgba(var(--accent-rgb), .28); }
.org-node {
  width: 186px; padding: 14px 10px 12px; text-align: center; position: relative; color: var(--ink); cursor: pointer;
  background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 16px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.org-node:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.org-node .avatar { margin: -34px auto 6px; width: 52px; height: 52px; font-size: 17px; }
.org-node .n { font-weight: 700; font-size: 14px; line-height: 1.2; }
.org-node .d { font-size: 12px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.org-node .dep { font-size: 11px; margin-top: 6px; }
.org-node .toggle { position: absolute; bottom: -13px; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0; font-size: 11px; font-weight: 700; color: #fff; background: var(--cf-red); box-shadow: 0 3px 10px rgba(var(--accent-rgb), .35); z-index: 2; }
.org-node.hod { border-top: 3px solid var(--cf-red); }
.org-node.top { background: linear-gradient(140deg, #13293D, #1D4E66); color: #fff; border: 0; }
.org-node.top .d { color: rgba(255,255,255,.75); }
.org-node.hit { outline: 3px solid var(--cf-gold); outline-offset: 3px; animation: pulseHit 1.4s ease 2; }
li.collapsed > ul { display: none; }

/* ---------- Tea ---------- */
.session-tile { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-strong); }
.session-tile.open { border-color: rgba(31, 138, 87, .5); background: linear-gradient(120deg, rgba(31,138,87,.12), rgba(31,138,87,.04)); }
.session-tile .time { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.order-done { text-align: center; padding: 10px 0 4px; }
.order-done .ring { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 36px; color: var(--cf-green); background: rgba(31, 138, 87, .12); }
.floor-card .floor-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.floor-card .floor-head h3 { margin: 0; }
.tally { display: flex; gap: 6px; flex-wrap: wrap; }
.tally span { font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 9px; background: var(--glass-strong); border: 1px solid var(--line); }
.tally span.tea { color: var(--bs-primary); } .tally span.coffee { color: #8a5a18; } .tally span.water { color: var(--cf-navy-2); }
html[data-bs-theme="dark"] .tally span.coffee { color: #E3AC45; } html[data-bs-theme="dark"] .tally span.water { color: #84BCD6; }
.batch-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.big-num { font-family: var(--font-display); font-size: 44px; font-weight: 800; line-height: 1; }

/* ---------- Alerts / toasts ---------- */
.alert { border-radius: 14px; border: 0; box-shadow: var(--shadow); }
.alert-success { background: rgba(31, 138, 87, .13); color: #166640; }
.alert-danger { background: rgba(176, 32, 42, .11); color: #a11d27; }
.alert-warning { background: rgba(201, 138, 27, .15); color: #8a5a07; }
.alert-info { background: rgba(29, 78, 102, .12); color: var(--cf-navy-2); }
html[data-bs-theme="dark"] .alert-success { color: #6AD79F; } html[data-bs-theme="dark"] .alert-danger { color: #FF8B93; }
html[data-bs-theme="dark"] .alert-warning { color: #F0C060; } html[data-bs-theme="dark"] .alert-info { color: #84BCD6; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast-item { display: flex; gap: 12px; align-items: flex-start; max-width: 360px; padding: 13px 16px; border-radius: 14px; color: #fff; background: rgba(19, 41, 61, .94); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.toast-item i { color: #FF8BA9; font-size: 18px; }
.toast-item b { display: block; }
.toast-item a { color: #fff; }

/* ---------- Modal / offcanvas glass ---------- */
.modal-content, .offcanvas, .dropdown-menu { background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); color: var(--ink); }
.modal-content { border-radius: 22px; }
.dropdown-menu { border-radius: 14px; padding: 6px; }
.dropdown-item { border-radius: 9px; padding: 8px 12px; color: var(--ink); }
.dropdown-item:hover { background: var(--cf-red-soft); color: var(--bs-primary); }
.notif-item { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--ink); }
.notif-item:hover { background: var(--cf-red-soft); color: var(--ink); }
.notif-item.unread .t { font-weight: 700; }
.notif-item .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--cf-red-soft); color: var(--bs-primary); flex: none; }

/* Celebration modal */
.celebrate .modal-content { overflow: hidden; text-align: center; }
.celebrate .burst { background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2) 50%, #C98A1B); color: #fff; padding: 30px 24px 70px; position: relative; }
.celebrate .burst h2 { color: #fff; font-size: 30px; }
.celebrate .people { margin-top: -54px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 0 20px; }
.celebrate .people .p { width: 150px; }
.celebrate .people .avatar { width: 96px; height: 96px; font-size: 32px; border-width: 4px; margin: 0 auto; }

/* ---------- Bottom nav (phones) ---------- */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; z-index: 1045; --bs-offcanvas-width: 286px; }
  .content { padding: 18px 16px 100px; }
  .topbar { padding: 10px 16px; }
  .topbar .search { display: none; }
  .bottom-nav {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1035; justify-content: space-around;
    padding: 6px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; border-radius: 14px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
  .bottom-nav a i { font-size: 20px; }
  .bottom-nav a.active { color: var(--bs-primary); background: var(--cf-red-soft); }
  .bottom-nav a .dot { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 17px; height: 17px; border-radius: 9px; font-size: 10px; background: var(--cf-red); color: #fff; display: grid; place-items: center; padding: 0 4px; }
  .toast-stack { bottom: 96px; right: 12px; left: 12px; align-items: stretch; }
  .me-chip .who { display: none; }
}
@media (max-width: 575.98px) {
  h1 { font-size: 26px; }
  .hero { padding: 20px; border-radius: 18px; }
  .kpi .k-value { font-size: 30px; }
  .choice { --cols: 2 !important; }
  .glass-head, .glass-body { padding-left: 16px; padding-right: 16px; }
  /* tables become cards */
  .table-cards thead { display: none; }
  .table-cards tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table-cards td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table-cards td::before { content: attr(data-label); font-size: 12px; color: var(--muted); text-align: left; font-weight: 600; }
  .table-cards td.main-cell { display: block; text-align: left; padding-bottom: 6px; }
  .table-cards td.main-cell::before { display: none; }
  .modal-dialog { margin: .75rem; }
}

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(150deg, #0E1E2D, var(--cf-navy) 40%, color-mix(in srgb, var(--cf-red) 60%, #000) 85%, var(--cf-red));
}
.auth-art::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent2-rgb), .55), transparent 65%); filter: blur(10px); }
.auth-art::after { content: ""; position: absolute; width: 420px; height: 420px; left: -120px; bottom: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(42,127,143,.45), transparent 65%); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { color: #fff; font-size: clamp(38px, 5vw, 64px); line-height: .95; text-transform: uppercase; }
.auth-art h1 em { font-style: normal; color: #FF4D7E; }
.auth-art .points { display: grid; gap: 14px; max-width: 420px; }
.auth-art .points div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.auth-art .points i { font-size: 20px; color: #FF8BA9; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 430px; padding: 34px 30px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- Misc ---------- */
.progress { height: 8px; border-radius: 6px; background: rgba(107,119,130,.15); }
.progress-bar { background: linear-gradient(90deg, var(--cf-red), var(--cf-red-2)); border-radius: 6px; }
.nav-pills .nav-link { border-radius: 11px; color: var(--ink-2); font-weight: 600; }
.nav-pills .nav-link.active { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--glass); border: 1px solid var(--glass-border); gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { padding: 6px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); border: 0; background: none; }
.seg a.active, .seg button.active { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); color: #fff; box-shadow: 0 4px 12px rgba(var(--accent-rgb), .25); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 120px 1fr; } }
.profile-cover { height: 130px; border-radius: 22px 22px 0 0; background: linear-gradient(120deg, var(--cf-navy), var(--cf-navy-2) 50%, var(--cf-red)); }
.profile-head { display: flex; gap: 20px; align-items: flex-start; padding: 0 24px 20px; flex-wrap: wrap; }
.profile-head > .avatar { margin-top: -56px; flex: none; }
.profile-head > div { padding-top: 14px; min-width: 0; }
.profile-head h1 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; word-break: break-word; }
@media (max-width: 575.98px) { .profile-head { flex-direction: column; align-items: center; text-align: center; } .profile-head > div { padding-top: 6px; } .profile-head .d-flex { justify-content: center; } }
.pagination { --bs-pagination-border-radius: 10px; --bs-pagination-active-bg: var(--cf-red); --bs-pagination-active-border-color: var(--cf-red); --bs-pagination-color: var(--ink-2); --bs-pagination-bg: var(--glass-strong); --bs-pagination-border-color: var(--line); }
.help-section h3 { display: flex; align-items: center; gap: 10px; }
.photo-drop { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 16px; background: var(--glass-strong); }
.sticky-actions { position: sticky; bottom: 14px; z-index: 5; }
@media (max-width: 991.98px) { .sticky-actions { bottom: 92px; } }

/* ---------- Admin tables ---------- */
.perm-table .group-row td { background: var(--cf-red-soft); color: var(--bs-primary); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 16px; }
.perm-table td:first-child, .perm-table th:first-child { position: sticky; left: 0; background: var(--glass-strong); z-index: 1; }
.min-w-0 { min-width: 0; }
.order-chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-strong); }
.order-chip.done { opacity: .55; }
.order-chip .what { font-weight: 700; }
.order-chip .where { font-size: 12px; color: var(--muted); }
.step-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.step-btns .btn { padding: 12px 6px; font-weight: 700; }

/* ---------- Floors (directory tabs, seating) ---------- */
.floor-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.floor-tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .2s, box-shadow .2s, background .2s; }
.floor-tab:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.floor-tab b { display: block; font-size: 14.5px; line-height: 1.2; }
.floor-tab small { color: var(--muted); font-size: 12.5px; }
.floor-tab.active { background: linear-gradient(135deg, var(--cf-navy), var(--cf-navy-2)); color: #fff; border-color: transparent; box-shadow: 0 10px 24px rgba(19, 41, 61, .3); }
.floor-tab.active small { color: rgba(255, 255, 255, .75); }
.ft-num { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff; background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .28); }
.ft-num.muted, .floor-tab.muted .ft-num { background: linear-gradient(140deg, #8794A0, #6B7782); box-shadow: none; }
.floor-tab.active .ft-num { background: rgba(255, 255, 255, .16); box-shadow: none; }
.floor-banner { display: flex; align-items: center; gap: 14px; padding: 12px 4px 14px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.floor-banner h2 { font-size: 20px; margin: 0; }
.person-card .seat { font-size: 12px; color: var(--muted); margin-top: 6px; }
.floor-pick { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); }
.floor-pick input { position: absolute; opacity: 0; pointer-events: none; }
.floor-pick span { display: grid; place-items: center; min-width: 38px; height: 34px; padding: 0 8px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--ink-2); transition: all .15s; }
.floor-pick input:checked + span { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); color: #fff; box-shadow: 0 4px 10px rgba(var(--accent-rgb), .25); }
.floor-pick input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.seat-row.changed { background: rgba(201, 138, 27, .08); }
.choice .tea-hint { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.choice input:checked + span .tea-hint { color: var(--bs-primary); }
.floor-chip { color: var(--bs-primary); border-color: rgba(var(--accent-rgb), .25); background: var(--cf-red-soft); }
.floor-chip:hover { color: var(--bs-primary); filter: brightness(.97); }


/* ---------- Brand lock-up (logo + name) ---------- */
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-lockup .brand-logo { height: 42px; max-width: 120px; object-fit: contain; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .92); padding: 4px 6px; }
.brand-lockup .brand-text { min-width: 0; }
.brand-lockup .brand-text b { display: block; font-family: var(--font-display); font-size: 20px; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.brand-lockup .brand-text span { display: block; font-size: 11.5px; letter-spacing: .06em; opacity: .7; white-space: nowrap; margin-top: 3px; }
.brand-lockup.lg .brand-mark { width: 52px; height: 52px; font-size: 21px; border-radius: 15px; }
.brand-lockup.lg .brand-logo { height: 56px; max-width: 170px; }
.brand-lockup.lg .brand-text b { font-size: 26px; }

/* ---------- Collapsible sidebar (desktop) ---------- */
.nav-side a .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.side-toggle { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #DCE6EE; display: grid; place-items: center; flex: none; transition: transform .28s, background .2s; }
.side-toggle:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@media (min-width: 992px) {
  html.side-mini { --side-w: 80px; }
  html.side-mini .sidebar .brand { flex-direction: column; padding: 18px 10px 10px; gap: 10px; }
  html.side-mini .sidebar .brand-text, html.side-mini .nav-side .label, html.side-mini .nav-side a .t, html.side-mini .side-foot { display: none; }
  html.side-mini .sidebar .brand-logo { height: 34px; max-width: 56px; }
  html.side-mini .side-toggle { transform: rotate(180deg); }
  html.side-mini .nav-side { padding: 6px 12px 20px; }
  html.side-mini .nav-side a { justify-content: center; padding: 11px 0; }
  html.side-mini .nav-side a i { font-size: 19px; }
  html.side-mini .nav-side a .badge { position: absolute; top: 2px; right: 4px; font-size: 9.5px; padding: 2px 5px; }
  html.side-mini .nav-side .sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 10px 8px; }
}
.nav-side .sep { display: none; }

/* ---------- Theme picker ---------- */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 4px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid transparent; background: none; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.swatch i { width: 30px; height: 30px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6), 0 3px 10px rgba(0, 0, 0, .18); }
.swatch:hover { background: var(--cf-red-soft); }
.swatch.active { border-color: var(--bs-primary); background: var(--cf-red-soft); }

/* ---------- Attachments ---------- */
.file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 10px; background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; transition: border-color .15s, transform .15s; }
.file-chip:hover { border-color: var(--bs-primary); color: var(--bs-primary); transform: translateY(-1px); }
.file-chip i { font-size: 16px; color: var(--bs-primary); }
.file-chip small { color: var(--muted); font-weight: 500; }
.brand-preview { padding: 18px; border-radius: 16px; color: #fff; background: linear-gradient(170deg, #0E1E2D, var(--cf-navy) 55%, color-mix(in srgb, var(--cf-red) 45%, #0E1E2D)); }
.brand-preview .brand-text span { color: #9FB2C2; }

/* ---------- Employee milestones widget (dashboard) ---------- */
.ms-widget { position: fixed; right: 22px; bottom: 22px; width: 340px; z-index: 1020; overflow: hidden; padding: 0; box-shadow: var(--shadow-lg); animation: msIn .5s .4s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes msIn { from { opacity: 0; transform: translateY(24px); } }
.ms-widget.collapsed { width: 280px; }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; color: #fff; background: linear-gradient(120deg, var(--cf-navy), var(--cf-navy-2) 60%, color-mix(in srgb, var(--cf-red) 55%, var(--cf-navy-2))); }
.ms-head b { font-family: var(--font-display); font-size: 17px; letter-spacing: .02em; }
.ms-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 8px; background: #FFC94D; color: #3A2A00; font-weight: 800; font-size: 12.5px; display: inline-grid; place-items: center; }
.ms-collapse { width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; transition: transform .25s; }
.ms-widget.collapsed .ms-collapse { transform: rotate(180deg); }
.ms-widget.collapsed .ms-body { display: none; }
.ms-toggles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; background: linear-gradient(90deg, rgba(29, 78, 102, .12), rgba(var(--accent-rgb), .08)); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.ms-switch { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.ms-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ms-switch span { width: 28px; height: 16px; border-radius: 10px; background: rgba(107, 119, 130, .4); position: relative; transition: background .2s; flex: none; }
.ms-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ms-switch input:checked + span { background: #F2B01E; }
.ms-switch input:checked + span::after { transform: translateX(12px); }
.ms-switch input:focus-visible + span { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.ms-range { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); margin-left: auto; }
.ms-range button { border: 0; background: var(--glass-strong); padding: 2px 7px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.ms-range button.active { background: #F2B01E; color: #3A2A00; }
.ms-cal { width: 26px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: #F2B01E; color: #3A2A00; }
.ms-list { max-height: min(56vh, 460px); overflow-y: auto; scrollbar-width: thin; }
.ms-title { display: flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }
.ms-title.pink { background: rgba(232, 62, 120, .1); color: #C2185B; }
.ms-title.amber { background: rgba(242, 176, 30, .14); color: #A86A00; }
.ms-title.blue { background: rgba(29, 120, 200, .1); color: #1565C0; }
html[data-bs-theme="dark"] .ms-title.pink { color: #F48FB1; } html[data-bs-theme="dark"] .ms-title.amber { color: #FFD166; } html[data-bs-theme="dark"] .ms-title.blue { color: #90CAF9; }
.ms-n { min-width: 20px; height: 18px; border-radius: 6px; padding: 0 6px; font-size: 11px; display: inline-grid; place-items: center; background: currentColor; }
.ms-n { color: inherit; background: rgba(255, 255, 255, .7); border: 1px solid currentColor; }
.ms-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background .15s; }
.ms-item:hover { background: var(--cf-red-soft); color: var(--ink); }
.ms-item { cursor: pointer; }
.ms-item:focus-visible { outline: 2px solid var(--cf-red); outline-offset: -2px; }
/* Milestone greeting card (click a person in Employee Milestones) */
.msc-modal .modal-dialog { max-width: 420px; }
.msc-modal .modal-content { border: 0; border-radius: 26px; overflow: hidden; background: transparent; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.msc-x { position: absolute; top: 14px; right: 14px; z-index: 3; filter: none; opacity: .8; }
.msc { color: #fff; text-align: center; padding: 26px 26px 24px; position: relative; overflow: hidden; }
.msc::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .28), transparent 40%), radial-gradient(circle at 90% 90%, rgba(255, 255, 255, .18), transparent 45%); pointer-events: none; }
.msc > * { position: relative; }
.msc-birthday { background: linear-gradient(140deg, #FF6FA3 0%, #FF7F7F 45%, #FF9A4D 100%); }
.msc-anniv { background: linear-gradient(140deg, #5B6CFF 0%, #8E5BF5 50%, #E66BC1 100%); }
.msc-probation { background: linear-gradient(140deg, #F0A030 0%, #E07A2E 55%, #C9502A 100%); }
.msc-top { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; margin: 0 26px 18px; }
.msc-emoji { font-size: 54px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); animation: celBounce 1.6s ease-in-out infinite; }
.msc-h { font-size: 22px; font-weight: 800; line-height: 1.15; }
.msc-s { font-size: 13px; opacity: .85; }
.msc-av .avatar { width: 104px; height: 104px; font-size: 36px; font-weight: 700; border: 0; margin: 0 auto; background: rgba(255, 255, 255, .25) !important; color: #fff; box-shadow: none; object-fit: cover; }
.msc-av img.avatar { border: 4px solid rgba(255, 255, 255, .45); }
.msc-name { font-size: 22px; font-weight: 800; margin-top: 14px; line-height: 1.2; }
.msc-when { font-size: 16px; margin-top: 6px; }
.msc-role { font-size: 14.5px; opacity: .85; margin-top: 14px; }
.msc-from { font-size: 14px; opacity: .8; margin-top: 14px; }
.msc-from b { display: block; font-size: 17px; opacity: 1; margin-top: 2px; }
.msc-wish { display: flex; gap: 6px; margin-top: 16px; }
.msc-wish .form-control { background: rgba(255, 255, 255, .92); border: 0; font-size: 12.5px; }
.msc-wish .btn { white-space: nowrap; font-weight: 700; }
.msc-done { display: inline-block; margin-top: 16px; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .25); font-weight: 700; font-size: 13px; }
.msc-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.msc-ok { background: #fff; color: #1E2736; font-weight: 800; min-width: 130px; padding: 9px 18px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.msc-ok:hover { background: #F4F4F6; color: #1E2736; }
@media (max-width: 420px) { .msc { padding: 22px 18px; } .msc-top { margin: 0 20px 14px; } .msc-emoji { font-size: 44px; } .msc-h { font-size: 19px; } .msc-name { font-size: 19px; } .msc-wish { flex-direction: column; } }
.ms-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.ms-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-date { font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.ms-badge { flex: none; padding: 3px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 800; background: #6B7782; color: #fff; }
.ms-badge.soon { background: #1F8AA3; }
.ms-badge.today { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); animation: msPulse 1.6s ease-in-out infinite; }
.ms-empty { padding: 10px 14px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 991.98px) {
  /* phone: open = bottom sheet above the menu bar; closed = a round floating button */
  .ms-widget { left: 10px; right: 10px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom)); max-height: 68vh; display: flex; flex-direction: column; border-radius: 22px; }
  .ms-widget .ms-body { overflow-y: auto; }
  .ms-widget.collapsed { left: auto; right: 14px; width: 58px; height: 58px; border-radius: 50%; overflow: visible; padding: 0; background: none; border: 0; box-shadow: none; }
  .ms-widget.collapsed .ms-head { width: 58px; height: 58px; padding: 0; justify-content: center; border-radius: 50%; cursor: pointer; box-shadow: 0 10px 26px rgba(var(--accent-rgb), .4), 0 0 0 4px rgba(255, 255, 255, .6); background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); }
  .ms-widget.collapsed .ms-head > div { gap: 0 !important; }
  .ms-widget.collapsed .ms-head b, .ms-widget.collapsed .ms-collapse { display: none; }
  .ms-widget.collapsed .ms-head .bi-balloon-heart { font-size: 25px; animation: msBob 2.4s ease-in-out infinite; }
  .ms-widget.collapsed .ms-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; box-shadow: 0 0 0 2px #fff; }
  .ms-widget.collapsed .ms-head::after { display: none; }
  .ms-widget:not(.collapsed) .ms-head { cursor: pointer; }
}
@keyframes msBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }
@media print { .ms-widget { display: none; } }

/* ---------- Dashboard: action strip & quick actions ---------- */
.ms-spacer { height: 120px; }
.action-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; color: var(--ink); border-left: 4px solid var(--cf-red) !important; transition: transform .2s, box-shadow .2s; }
.action-strip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.as-lead { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; margin-right: 6px; }
.as-lead i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .3); }
.as-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.as-chip b { color: var(--bs-primary); }
.as-go { font-weight: 700; color: var(--bs-primary); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.quick-actions a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 8px; border-radius: 16px; font-weight: 600; font-size: 13.5px; color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .35)); border: 1px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transition: transform .2s, box-shadow .2s; }
html[data-bs-theme="dark"] .quick-actions a { background: linear-gradient(145deg, rgba(30, 44, 58, .62), rgba(14, 22, 31, .48)); border-color: rgba(255, 255, 255, .09); }
.quick-actions a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--bs-primary); }
.quick-actions a i { font-size: 22px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--bs-primary); background: var(--cf-red-soft); transition: transform .25s; }
.quick-actions a:hover i { transform: scale(1.08) rotate(-4deg); }
.quick-actions a em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 8px; background: var(--cf-red); color: #fff; }
.leave-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- Stepper (request progress) ---------- */
.stepper { list-style: none; display: flex; gap: 0; padding: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
.stepper li { flex: 1; min-width: 92px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before, .stepper li.stop::before { background: linear-gradient(90deg, var(--cf-red), var(--cf-red-2)); }
.stepper .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--glass-strong); border: 2px solid var(--line); color: var(--muted); }
.stepper li.done .dot { background: var(--cf-green); border-color: var(--cf-green); color: #fff; }
.stepper li.now .dot { background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); border-color: transparent; color: #fff; box-shadow: 0 0 0 5px var(--cf-red-soft); animation: msPulse 2s ease-in-out infinite; }
.stepper li.stop .dot { background: #B0202A; border-color: #B0202A; color: #fff; }
.stepper li.now, .stepper li.done { color: var(--ink); }
.stepper .lbl { line-height: 1.2; padding: 0 4px; }

/* ---------- Stars ---------- */
.stars { color: #F2B01E; letter-spacing: 1px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 24px; color: rgba(107, 119, 130, .35); cursor: pointer; transition: color .15s, transform .15s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #F2B01E; }
.star-input label:hover { transform: scale(1.15); }
.star-input input:focus-visible + label { outline: 2px solid var(--bs-primary); border-radius: 4px; }

/* ---------- Action panel (who acts now) ---------- */
.act-panel { border: 1.5px solid rgba(var(--accent-rgb), .35) !important; }
.act-panel .glass-head { background: linear-gradient(90deg, var(--cf-red-soft), transparent); }
.waiting-on { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--glass-strong); border: 1px dashed var(--line); font-size: 14px; }
.money { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.req-meta b { color: var(--ink); font-weight: 600; }
.cal-day { width: 46px; flex: none; text-align: center; line-height: 1; padding: 6px 0; border-radius: 12px; background: var(--cf-red-soft); color: var(--bs-primary); }
.cal-day b { display: block; font-family: var(--font-display); font-size: 20px; }
.cal-day span { font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* ---------- Leave ---------- */
.leave-bal { padding: 16px 18px; height: 100%; border-top: 3px solid var(--c) !important; }
.lb-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-code { font-family: var(--font-display); font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 7px; color: #fff; background: var(--c); }
.lb-num { font-size: 34px; font-weight: 700; line-height: 1.1; margin-top: 8px; }
.lb-num small { font-size: 14px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.seg-opt { display: inline-block; padding: 6px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.seg input:checked + .seg-opt { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); color: #fff; box-shadow: 0 4px 12px rgba(var(--accent-rgb), .25); }
.seg input:focus-visible + .seg-opt { outline: 2px solid var(--bs-primary); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-grid .dow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal-cell { min-height: 104px; padding: 6px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.other { opacity: .4; }
.cal-cell.off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(107, 119, 130, .07) 6px 12px), var(--glass-strong); }
.cal-cell.today { border: 2px solid var(--bs-primary); }
.cal-cell .d { font-weight: 800; font-size: 13px; display: flex; justify-content: space-between; gap: 4px; }
.cal-cell .hol { font-size: 10.5px; font-weight: 700; color: var(--cf-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-cell .hol.bank { color: #2B7BB9; font-weight: 600; }
.cal-ev { display: block; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.pending { opacity: .55; outline: 1px dashed currentColor; }
@media (max-width: 767.98px) { .cal-cell { min-height: 64px; } .cal-ev { font-size: 0; height: 6px; padding: 0; } .cal-grid { gap: 3px; } }

/* ---------- Worksheet ---------- */
.ws-q { padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.ws-q:last-child { border-bottom: 0; padding-bottom: 0; }
.ws-answer { white-space: pre-line; padding: 10px 14px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); }
.req-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 18px; color: var(--bs-primary); background: var(--cf-red-soft); }
.quote-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--glass-strong); transition: border-color .15s; }
.quote-card.selected { border-color: var(--cf-green); box-shadow: 0 0 0 4px rgba(31, 138, 87, .12); }
.quote-card label { cursor: pointer; }
.low-row { background: rgba(176, 32, 42, .05); }

/* ---------- Dark-mode fixes ---------- */
html[data-bs-theme="dark"] { --bs-link-color-rgb: 240, 150, 175; --bs-link-hover-color-rgb: 255, 185, 205; }
html[data-bs-theme="dark"][data-accent="cfx"] { --bs-link-color-rgb: 120, 210, 225; }
html[data-bs-theme="dark"][data-accent="metaldur"] { --bs-link-color-rgb: 140, 195, 225; }
html[data-bs-theme="dark"][data-accent="royal"] { --bs-link-color-rgb: 185, 165, 245; }
html[data-bs-theme="dark"][data-accent="forest"] { --bs-link-color-rgb: 130, 210, 165; }
html[data-bs-theme="dark"][data-accent="graphite"] { --bs-link-color-rgb: 235, 190, 110; }
html[data-bs-theme="dark"] .ms-n { background: rgba(0, 0, 0, .3); }
html[data-bs-theme="dark"] .as-go { color: rgb(var(--bs-link-color-rgb)); }
@media (max-width: 575.98px) { .quick-actions { grid-template-columns: repeat(3, 1fr); } .quick-actions a { padding: 12px 4px; font-size: 12.5px; } .quick-actions a i { width: 38px; height: 38px; font-size: 19px; } }

/* ---------- Org chart – list view ---------- */
.org-list, .org-list ul { list-style: none; margin: 0; padding: 0; }
.org-list ul { margin-left: 22px; padding-left: 14px; border-left: 2px solid rgba(var(--accent-rgb), .2); }
.org-list li { margin: 6px 0; }
.org-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); color: var(--ink); max-width: 620px; transition: transform .15s, border-color .15s; }
.org-row:hover { transform: translateX(3px); border-color: var(--bs-primary); color: var(--ink); }
.org-row.hod { border-left: 3px solid var(--cf-red); }
.org-row.hit { outline: 3px solid var(--cf-gold); outline-offset: 2px; }
.org-row b { display: block; font-size: 14px; line-height: 1.2; }
.org-row small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.impersonate-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 28px 0; padding: 10px 16px; border-radius: 14px; color: #3A2A00; font-size: 14px; background: linear-gradient(90deg, #FFD166, #F2B01E); box-shadow: var(--shadow); }
@media (max-width: 991.98px) { .impersonate-bar { margin: 10px 16px 0; } }
.choice label.na > span { opacity: .55; cursor: not-allowed; border-style: dashed; }
.stock-drink { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong); }
.stock-drink.out { border-color: rgba(176, 32, 42, .35); background: rgba(176, 32, 42, .05); }
.co-chip { color: var(--co); border-color: color-mix(in srgb, var(--co) 35%, transparent); background: color-mix(in srgb, var(--co) 8%, var(--glass-strong)); }
html[data-bs-theme="dark"] .co-chip { color: color-mix(in srgb, var(--co) 45%, #fff); }

/* ---------- Company tabs (employees) ---------- */
.company-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.company-tab { --co: var(--cf-navy-2); display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 14px; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-border); border-left: 4px solid var(--co); box-shadow: var(--shadow); transition: transform .15s; }
.company-tab:hover { transform: translateY(-2px); color: var(--ink); }
.company-tab span { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--co); }
.company-tab.active { background: color-mix(in srgb, var(--co) 14%, var(--glass-strong)); border-color: var(--co); }

/* ---------- Sidebar groups (click a title to open its pages) ---------- */
.nav-group { margin-top: 4px; }
.nav-group-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; border: 0; background: none; border-radius: 10px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8FA5B7; font-weight: 700; transition: color .2s, background .2s; }
.nav-group-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav-group-btn i { font-size: 12px; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.nav-group.open .nav-group-btn { color: #fff; }
.nav-group.open .nav-group-btn i { transform: rotate(180deg); }
.nav-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.4, 0, .2, 1); }
.nav-items > div { overflow: hidden; }
.nav-group.open .nav-items { grid-template-rows: 1fr; }
@media (min-width: 992px) {
  html.side-mini .nav-group-btn { display: none; }
  html.side-mini .nav-items { grid-template-rows: 1fr; }
  html.side-mini .nav-group { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 6px; padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .nav-items, .nav-group-btn i { transition: none; } }

/* ---------- Lunch ---------- */
.lunch-menu { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.veg-dot, .nonveg-dot { display: inline-block; width: 14px; height: 14px; border: 2px solid #1F8A57; border-radius: 3px; margin-right: 6px; vertical-align: -2px; position: relative; }
.veg-dot::after, .nonveg-dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #1F8A57; }
.nonveg-dot { border-color: #A0522D; } .nonveg-dot::after { background: #A0522D; border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lunch-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lunch-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 8px 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--glass-strong); color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .2s; }
.lunch-btn .em { font-size: 34px; line-height: 1; }
.lunch-btn b { font-size: 16px; }
.lunch-btn small { color: var(--muted); font-size: 12px; }
.lunch-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: var(--shadow); }
.lunch-btn:disabled { opacity: .45; cursor: not-allowed; }
.lunch-btn .tick { position: absolute; top: 8px; right: 10px; font-size: 18px; }
.lunch-btn.veg.on { border-color: #1F8A57; background: rgba(31, 138, 87, .1); } .lunch-btn.veg.on .tick { color: #1F8A57; }
.lunch-btn.nonveg.on { border-color: #B0202A; background: rgba(176, 32, 42, .08); } .lunch-btn.nonveg.on .tick { color: #B0202A; }
.lunch-btn.none.on { border-color: var(--cf-navy-2); background: rgba(29, 78, 102, .1); } .lunch-btn.none.on .tick { color: var(--cf-navy-2); }
.lunch-kpi.veg { border-top: 3px solid #1F8A57 !important; } .lunch-kpi.nonveg { border-top: 3px solid #B0202A !important; }
.lunch-person.veg { border-left: 4px solid #1F8A57; } .lunch-person.nonveg { border-left: 4px solid #B0202A; }
@media (max-width: 575.98px) { .lunch-choice { gap: 8px; } .lunch-btn { padding: 14px 4px 10px; } .lunch-btn .em { font-size: 28px; } }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 4px; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Reports ---------- */
.stack-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.stack-bar span { display: block; height: 100%; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.stack-bar .ok, .stack-legend .ok::before { background: #1F8A57; }
.stack-bar .late, .stack-legend .late::before { background: #D99A1E; }
.stack-bar .miss, .stack-legend .miss::before { background: #C0392B; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 8px 0 12px; }
.stack-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.hbar-row { margin-bottom: 9px; }
.hbar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 3px; }
.hbar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb))); }
.mini-stat { padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); height: 100%; }
.lunch-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-left: 4px solid #1F8A57 !important; }
.lunch-strip .ls-text { display: flex; gap: 12px; align-items: center; flex: 1 1 260px; min-width: 0; }
.lunch-strip .ls-text > i { font-size: 26px; color: #1F8A57; }
.lunch-strip .seg button:disabled { opacity: .4; }
@media (max-width: 575.98px) { .lunch-strip .seg { width: 100%; } .lunch-strip .seg button { flex: 1; } }
.lunch-strip.chosen { border-left-color: var(--cf-red) !important; }
.lunch-strip.chosen .ls-text > i { color: var(--cf-red); }
.lunch-sofar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(var(--accent-rgb), .06); border: 1px dashed rgba(var(--accent-rgb), .25); font-size: 13.5px; }
.lunch-sofar .lbl { font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.lunch-sofar .chip { padding: 3px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); font-weight: 600; }
.lunch-sofar .chip.veg { color: #1F8A57; } .lunch-sofar .chip.nonveg { color: #C0392B; } .lunch-sofar .chip.muted { color: var(--ink-3, #888); }

/* Checkboxes / radios clearly visible on glass, light and dark */
.form-check-input { width: 1.15em; height: 1.15em; border: 1.6px solid rgba(20, 32, 40, .42); background-color: rgba(255, 255, 255, .92); }
.form-check-input:hover { border-color: rgb(var(--accent-rgb)); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.form-switch .form-check-input { width: 2.1em; }
html[data-bs-theme="dark"] .form-check-input:not(:checked) { background-color: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
html[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255,255,255,.7)'/%3e%3c/svg%3e"); }
.perm-table .form-check-input { width: 1.3em; height: 1.3em; cursor: pointer; }
.perm-table tbody tr:hover td { background: rgba(var(--accent-rgb), .04); }

/* Lunch board – people who did not choose (folded) */
.no-choice > summary { cursor: pointer; list-style: none; }
.no-choice > summary::-webkit-details-marker { display: none; }
.no-choice[open] > summary { border-bottom: 1px solid var(--line); }
.names-fold summary { cursor: pointer; color: var(--muted); }
.names-fold[open] { white-space: normal; }

/* Error pages */
.err-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%, rgba(var(--accent-rgb), .12), transparent 45%), radial-gradient(circle at 80% 80%, rgba(29, 78, 102, .14), transparent 45%), var(--bg, #eef2f5); }
.err-card { max-width: 460px; width: 100%; text-align: center; padding: 36px 28px; }
.err-card .err-code { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 72px; line-height: 1; background: linear-gradient(135deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-card .err-icon { font-size: 40px; color: rgb(var(--accent-rgb)); }
.page-head .form-select, .glass-head .form-select { padding-right: 2.5rem; min-width: 170px; }

/* Office boy home */
.ob-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 16px; border-left: 5px solid rgb(var(--accent-rgb)) !important; }
.ob-hero h1 { font-size: clamp(24px, 4vw, 32px); }
.ob-now { font-size: 15px; color: var(--ink-2); }
.ob-floor .glass-head h3 { font-size: 19px; }
.ob-floor.done { opacity: .7; }
.ob-cups { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.ob-cups .num { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1; margin-right: 4px; }
.ob-prep { display: flex; flex-direction: column; gap: 6px; }
.ob-prep-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 15.5px; }
.ob-prep-row b { font-size: 18px; color: rgb(var(--accent-rgb)); }
.ob-who { margin-top: 10px; }
.ob-who summary { cursor: pointer; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.ob-urgent { border: 2px solid rgba(217, 154, 30, .55) !important; }
@media (max-width: 575.98px) { .ob-hero .btn-lg { width: 100%; } .ob-cups .num { font-size: 34px; } }

/* Language switch */
.lang-btn { width: auto; padding: 0 10px; gap: 5px; display: inline-flex; align-items: center; }
.lang-btn .lang-code { font-size: 12.5px; font-weight: 700; }
.lang-menu .dropdown-item { border-radius: 8px; font-size: 15px; }
.guest-lang { position: fixed; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; background: var(--glass-strong, rgba(255, 255, 255, .8)); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 50; font-size: 13.5px; }
.guest-lang button { border: 0; background: none; padding: 3px 9px; border-radius: 999px; color: var(--ink-2); font-weight: 600; }
.guest-lang button.active { background: rgb(var(--accent-rgb)); color: #fff; }
/* Devanagari: Barlow has no Hindi / Marathi letters – use a clear system font for them */
html[lang="hi"], html[lang="mr"] { --font: "Barlow", "Nirmala UI", "Noto Sans Devanagari", "Mangal", system-ui, sans-serif; --font-display: "Barlow Condensed", "Nirmala UI", "Noto Sans Devanagari", "Mangal", system-ui, sans-serif; }
html[lang="hi"] h1, html[lang="mr"] h1, html[lang="hi"] h2, html[lang="mr"] h2, html[lang="hi"] h3, html[lang="mr"] h3 { line-height: 1.35; }

/* Worksheet – files & links */
.ws-attach { padding: 14px; border-radius: 14px; border: 1px dashed var(--glass-border); background: rgba(var(--accent-rgb), .03); }
.ws-attach-head { font-weight: 700; margin-bottom: 8px; color: var(--ink-2); }
.ws-file-row { display: flex; align-items: center; gap: 8px; }
.ws-link { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-border); color: inherit; text-decoration: none; font-size: 13.5px; word-break: break-all; }
.ws-link:hover { border-color: rgba(var(--accent-rgb), .45); }
.ws-link .bi-google { color: #1a73e8; }

/* Complaints vs grievances */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind-opt { margin: 0; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border-radius: 14px; border: 1.5px solid var(--glass-border); background: var(--glass); transition: .15s; }
.kind-opt span i { font-size: 20px; color: var(--ink-2); }
.kind-opt small { color: var(--ink-2); font-size: 11.5px; line-height: 1.3; }
.kind-opt input:checked + span { border-color: var(--cf-red); background: rgba(var(--accent-rgb), .07); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .14); }
.kind-opt.grievance input:checked + span { border-color: #5B4BC4; background: rgba(91, 75, 196, .08); box-shadow: 0 6px 18px rgba(91, 75, 196, .16); }
.kind-opt input:checked + span i { color: var(--cf-red); } .kind-opt.grievance input:checked + span i { color: #5B4BC4; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--bs-primary); }
.tk-form[data-kind="complaint"] .only-grievance, .tk-form[data-kind="grievance"] .only-complaint { display: none !important; }
.grv-note { font-size: 13px; padding: 8px 12px; border-radius: 10px; background: rgba(91, 75, 196, .08); color: #4a3caa; }
html[data-bs-theme="dark"] .grv-note { color: #b9afff; }
.req-icon.grv { background: rgba(91, 75, 196, .12); color: #5B4BC4; }

/* Offer letters – A4 paper, prints clean */
.letter-wrap { display: flex; justify-content: center; }
.letter-paper { --co: #98012E; background: #fff; color: #1d1d1f; width: 100%; max-width: 820px; padding: 48px 60px 34px; border-radius: 6px; box-shadow: 0 18px 50px rgba(17, 38, 57, .16); font-family: Georgia, 'Noto Serif', 'Times New Roman', serif; font-size: 15px; line-height: 1.7; position: relative; overflow: hidden; }
.letter-paper::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--co), color-mix(in srgb, var(--co) 55%, #C98A1B)); }
.letter-paper.small-preview { padding: 30px 32px 22px; box-shadow: none; border: 1px solid #e6e6e6; font-size: 13.5px; max-height: 78vh; overflow: auto; }
.letter-paper p { margin: 0 0 12px; }
.lp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 16px; border-bottom: 2px solid var(--co); margin-bottom: 22px; }
.lp-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lp-logo { max-height: 62px; max-width: 190px; object-fit: contain; }
.lp-badge { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--co); color: #fff; font: 800 20px/1 var(--font-display, sans-serif); letter-spacing: .04em; }
.lp-co { font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 23px; letter-spacing: .06em; color: var(--co); text-transform: uppercase; line-height: 1.1; }
.lp-addr { font-family: var(--font, sans-serif); font-size: 12px; color: #555; white-space: pre-line; line-height: 1.45; margin-top: 3px; }
.lp-contact { font-family: var(--font, sans-serif); font-size: 11.5px; color: #555; text-align: right; max-width: 220px; line-height: 1.5; }
.lp-meta { display: flex; justify-content: space-between; font-size: 13.5px; color: #444; margin-bottom: 16px; }
.lp-to { margin-bottom: 16px; }
.lp-subject { margin: 0 0 16px; padding: 8px 12px; border-left: 3px solid var(--co, #98012E); background: #faf7f6; }
.lp-sign { display: flex; justify-content: space-between; gap: 24px; margin-top: 44px; font-size: 14px; }
.lp-line { width: 190px; border-bottom: 1px solid #333; height: 44px; margin-bottom: 6px; }
.lp-sign .text-end .lp-line { margin-left: auto; }
.lp-foot { margin-top: 34px; padding-top: 10px; border-top: 1px solid #e3e3e3; text-align: center; font-family: var(--font, sans-serif); font-size: 11px; color: #777; letter-spacing: .03em; }
@media (max-width: 575.98px) { .letter-paper { padding: 26px 20px; font-size: 14px; } .lp-sign, .lp-head { flex-direction: column; } .lp-contact { text-align: left; } }
@media print {
    .sidebar, .topbar, .bottomnav, .no-print, .ms-widget, .flash, .alert, footer { display: none !important; }
    body, body::before { background: #fff !important; }
    .main, .content, main { margin: 0 !important; padding: 0 !important; }
    .letter-paper { box-shadow: none; max-width: none; padding: 0 0 0; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .letter-paper::before { display: none; }
    @page { size: A4; margin: 18mm 18mm; }
}

/* ================= Sidebar v3 – follows the colour theme; 3 styles (palette → Menu style) ================= */
/* colour (default): rich gradient of the theme colour · light: frosted white glass · dark: deep navy */
html { --sb-ink: #EEF3F7; --sb-ink2: rgba(255, 255, 255, .78); --sb-muted: rgba(255, 255, 255, .58); --sb-hover: rgba(255, 255, 255, .10); --sb-tile: rgba(255, 255, 255, .12);
  --sb-line: rgba(255, 255, 255, .12); --sb-card: rgba(255, 255, 255, .08); --sb-input: rgba(255, 255, 255, .10);
  --sb-bg: radial-gradient(120% 55% at 0% 0%, rgba(255, 255, 255, .16), transparent 60%),
           radial-gradient(100% 50% at 100% 100%, rgba(var(--accent2-rgb), .55), transparent 65%),
           linear-gradient(170deg, color-mix(in srgb, var(--cf-red) 82%, #0B1824) 0%, color-mix(in srgb, var(--cf-red) 58%, #102235) 52%, color-mix(in srgb, var(--cf-red-2) 40%, #13293D) 100%);
  --sb-active-bg: rgba(255, 255, 255, .96); --sb-active-ink: var(--cf-red); --sb-active-tile: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); --sb-active-icon: #fff; }
html[data-side="dark"] { --sb-ink: #E6EEF4; --sb-ink2: #C9D5DF; --sb-muted: #8FA5B7; --sb-hover: rgba(255, 255, 255, .06); --sb-tile: rgba(255, 255, 255, .07); --sb-line: rgba(255, 255, 255, .08); --sb-card: rgba(255, 255, 255, .05); --sb-input: rgba(255, 255, 255, .06);
  --sb-bg: radial-gradient(120% 60% at 0% 0%, rgba(var(--accent2-rgb), .28), transparent 60%), radial-gradient(90% 50% at 100% 100%, rgba(var(--accent-rgb), .40), transparent 65%), linear-gradient(175deg, #13283D 0%, #173149 50%, #142A40 100%);
  --sb-active-bg: linear-gradient(90deg, rgba(var(--accent2-rgb), .95), rgba(var(--accent-rgb), .85)); --sb-active-ink: #fff; --sb-active-tile: rgba(255, 255, 255, .95); --sb-active-icon: var(--cf-red); }
html[data-side="light"] { --sb-ink: #14283B; --sb-ink2: #3B5163; --sb-muted: #6E8292; --sb-hover: rgba(var(--accent-rgb), .07); --sb-tile: rgba(var(--accent-rgb), .08); --sb-line: rgba(19, 41, 61, .08); --sb-card: rgba(255, 255, 255, .75); --sb-input: rgba(255, 255, 255, .9);
  --sb-bg: radial-gradient(120% 50% at 0% 0%, rgba(var(--accent-rgb), .10), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .66));
  --sb-active-bg: linear-gradient(90deg, var(--cf-red), var(--cf-red-2)); --sb-active-ink: #fff; --sb-active-tile: rgba(255, 255, 255, .95); --sb-active-icon: var(--cf-red); }
html[data-bs-theme="dark"][data-side="light"] { --sb-ink: #E6ECF1; --sb-ink2: #B8C3CC; --sb-muted: #8B98A3; --sb-card: rgba(255, 255, 255, .06); --sb-input: rgba(255, 255, 255, .06); --sb-line: rgba(255, 255, 255, .08);
  --sb-bg: linear-gradient(180deg, rgba(20, 31, 42, .88), rgba(14, 22, 31, .82)); }

.sidebar { display: flex; flex-direction: column; background: var(--sb-bg); color: var(--sb-ink); border-right: 1px solid var(--sb-line);
  box-shadow: 10px 0 40px rgba(6, 16, 26, .18); scrollbar-color: var(--sb-tile) transparent; }
html[data-side="light"] .sidebar { -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: 6px 0 30px rgba(17, 38, 57, .08); }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35; background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.2px); background-size: 18px 18px; }
html[data-side="light"] .sidebar::before { background-image: radial-gradient(rgba(19, 41, 61, .06) 1px, transparent 1.2px); }
.sidebar::after { content: ""; position: absolute; width: 260px; height: 260px; right: -120px; top: 30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--accent2-rgb), .35), transparent 70%); animation: sb-float 14s ease-in-out infinite alternate; }
html[data-side="light"] .sidebar::after { opacity: .5; }
@keyframes sb-float { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 160px) scale(1.25); } }
.sidebar > * { position: relative; z-index: 1; }

/* brand */
.sidebar .brand { margin: 12px 12px 4px; padding: 10px 12px; border-radius: 16px; background: var(--sb-card); border: 1px solid var(--sb-line); color: var(--sb-ink); }
.sidebar .brand-lockup .brand-text span { color: var(--sb-muted); opacity: 1; }
.sidebar .brand-logo { height: 44px; max-width: 128px; background: #fff; border-radius: 12px; padding: 5px 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.sidebar .brand-mark { position: relative; overflow: hidden; background: linear-gradient(140deg, #fff, #F2F4F7); color: var(--cf-red); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
html[data-side="light"] .sidebar .brand-mark { background: linear-gradient(140deg, var(--cf-red), var(--cf-red-2)); color: #fff; }
.brand-mark::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: rotate(20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: sb-shine 6s ease-in-out infinite; }
@keyframes sb-shine { 0%, 70% { left: -60%; } 100% { left: 140%; } }
.side-toggle { color: var(--sb-ink) !important; background: var(--sb-tile) !important; border-color: var(--sb-line) !important; }

/* search */
.side-search { position: relative; margin: 8px 14px 4px; }
.side-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sb-muted); font-size: 13px; pointer-events: none; }
.side-search input { width: 100%; height: 36px; border-radius: 11px; border: 1px solid var(--sb-line); background: var(--sb-input); color: var(--sb-ink); padding: 0 10px 0 32px; font-size: 13.5px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.side-search input::placeholder { color: var(--sb-muted); }
.side-search input:focus { border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
html[data-side="light"] .side-search input:focus { border-color: rgba(var(--accent-rgb), .5); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }

/* links */
.nav-side { flex: 1; padding: 6px 10px 14px; }
.nav-side a { gap: 11px; padding: 6px 10px 6px 6px; margin: 2px 0; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--sb-ink2); transition: background .2s, color .2s, box-shadow .25s; }
.nav-side a .ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--sb-tile); transition: background .25s, transform .25s cubic-bezier(.34, 1.56, .64, 1), color .2s; }
.nav-side a .ic i { font-size: 16px; width: auto; opacity: 1; }
.nav-side a:hover { background: var(--sb-hover); color: var(--sb-ink); transform: none; }
.nav-side a:hover .ic { transform: scale(1.1) rotate(-6deg); }
.nav-side a.active { background: var(--sb-active-bg); color: var(--sb-active-ink); font-weight: 600; box-shadow: 0 8px 22px rgba(0, 0, 0, .16); }
.nav-side a.active .ic { background: var(--sb-active-tile); color: var(--sb-active-icon); box-shadow: 0 4px 12px rgba(var(--accent-rgb), .3); }
.nav-side a.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--sb-ink); }
.nav-side a .badge { font-size: 11px; background: #FF4D6D; color: #fff; box-shadow: 0 0 0 3px rgba(255, 77, 109, .2); }
.nav-side a.active .badge { background: var(--cf-red); color: #fff; }
html[data-side="light"] .nav-side a.active .badge, html[data-side="dark"] .nav-side a.active .badge { background: rgba(255, 255, 255, .3); }

/* groups */
.nav-group { margin-top: 6px; }
.nav-group-btn { padding: 6px 10px 6px 6px; gap: 11px; justify-content: flex-start; font-size: 13px; letter-spacing: .02em; text-transform: none; color: var(--sb-ink2); font-weight: 600; border-radius: 12px; }
.nav-group-btn:hover { color: var(--sb-ink); background: var(--sb-hover); }
.nav-group.open .nav-group-btn { color: var(--sb-ink); background: var(--sb-hover); }
.nav-group-btn .ng-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--sb-ink); background: var(--sb-tile); border: 1px solid var(--sb-line); transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .2s; }
.nav-group-btn:hover .ng-ic { transform: scale(1.08); }
.nav-group.open .nav-group-btn .ng-ic { background: var(--sb-active-tile); color: var(--sb-active-icon); border-color: transparent; }
.nav-group-btn .ng-ic i { font-size: 15px; transform: none !important; }
.nav-group-btn .ng-t { flex: 1; text-align: left; }
.nav-group-btn .ng-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF4D6D; box-shadow: 0 0 0 3px rgba(255, 77, 109, .25); animation: sb-pulse 2s infinite; }
@keyframes sb-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 77, 109, 0); } }
.nav-group-btn .ng-chev { font-size: 12px; opacity: .7; transition: transform .3s; }
.nav-group.open .nav-group-btn .ng-chev { transform: rotate(180deg); }
.nav-group .nav-items > div { position: relative; padding-left: 14px; }
.nav-group .nav-items > div::before { content: ""; position: absolute; left: 21px; top: 4px; bottom: 6px; width: 1px; background: linear-gradient(var(--sb-line), transparent); }
.nav-group .nav-items a { font-size: 13.6px; }
.nav-group .nav-items a .ic { width: 28px; height: 28px; border-radius: 9px; background: transparent; }
.nav-group .nav-items a.active::before { left: -24px; }
.nav-group.open .nav-items a { animation: sb-in .35s cubic-bezier(.2, .8, .2, 1) both; }
.nav-group.open .nav-items a:nth-child(2) { animation-delay: .03s; } .nav-group.open .nav-items a:nth-child(3) { animation-delay: .06s; }
.nav-group.open .nav-items a:nth-child(4) { animation-delay: .09s; } .nav-group.open .nav-items a:nth-child(5) { animation-delay: .12s; }
.nav-group.open .nav-items a:nth-child(n+6) { animation-delay: .15s; }
@keyframes sb-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.side-empty { text-align: center; color: var(--sb-muted); font-size: 13px; padding: 16px 0; }

/* profile card */
.side-foot { padding: 10px 12px 14px; border-top: 1px solid var(--sb-line); color: var(--sb-muted); }
.side-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; color: var(--sb-ink); text-decoration: none; background: var(--sb-card); border: 1px solid var(--sb-line); transition: background .2s, transform .2s; }
.side-me:hover { background: var(--sb-hover); color: var(--sb-ink); transform: translateY(-1px); }
.side-me .t { flex: 1; min-width: 0; line-height: 1.25; }
.side-me .t b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me .t small { display: block; font-size: 11.5px; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me > i { color: var(--sb-muted); transition: transform .4s; } .side-me:hover > i { transform: rotate(90deg); }
.side-copy { font-size: 10.5px; color: var(--sb-muted); text-align: center; margin-top: 8px; opacity: .8; }
@media (min-width: 992px) {
  html.side-mini .side-foot { display: block; padding: 10px 8px; }
  html.side-mini .side-search, html.side-mini .side-copy, html.side-mini .side-me .t, html.side-mini .side-me > i { display: none; }
  html.side-mini .sidebar .brand { margin: 10px 8px 4px; }
  html.side-mini .nav-side a { justify-content: center; padding: 5px 0; }
  html.side-mini .nav-side a.active::before { display: none; }
  html.side-mini .nav-group .nav-items > div { padding-left: 0; }
  html.side-mini .nav-group .nav-items > div::before { display: none; }
  html.side-mini .side-me { justify-content: center; padding: 6px; }
  html.side-mini .nav-group { border-top-color: var(--sb-line); }
}
@media (prefers-reduced-motion: reduce) { .sidebar::after, .brand-mark::after, .nav-group-btn .ng-dot, .nav-group.open .nav-items a { animation: none; } }

/* menu style picker */
.side-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 2px 6px; }
.side-opt { border: 1px solid var(--line); border-radius: 10px; padding: 5px; background: none; font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.side-opt i { display: block; width: 100%; height: 30px; border-radius: 7px; }
.side-opt[data-side="color"] i { background: linear-gradient(170deg, var(--cf-red), var(--cf-red-2)); }
.side-opt[data-side="light"] i { background: linear-gradient(180deg, #fff, #eef2f6); border: 1px solid var(--line); }
.side-opt[data-side="dark"] i { background: linear-gradient(175deg, #13283D, #173149); }
.side-opt.active { border-color: var(--cf-red); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .15); color: var(--ink); }

/* ================= Fonts (palette menu → Font) ================= */
html[data-font="barlow"]  { --font: "Barlow", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif; --font-display: "Barlow Condensed", "Barlow", "Noto Sans Devanagari", system-ui, sans-serif; }
html[data-font="mukta"]   { --font: "Mukta", "Noto Sans Devanagari", system-ui, sans-serif; --font-display: "Mukta", "Noto Sans Devanagari", system-ui, sans-serif; }
html[data-font="poppins"] { --font: "Poppins", "Noto Sans Devanagari", system-ui, sans-serif; --font-display: "Poppins", "Noto Sans Devanagari", system-ui, sans-serif; --fs: 14px; }
html[data-font="hind"]    { --font: "Hind", "Noto Sans Devanagari", system-ui, sans-serif; --font-display: "Hind", "Noto Sans Devanagari", system-ui, sans-serif; }
html[data-font="baloo"]   { --font: "Baloo 2", "Noto Sans Devanagari", system-ui, sans-serif; --font-display: "Baloo 2", "Noto Sans Devanagari", system-ui, sans-serif; }
html[data-font="noto"]    { --font: "Noto Sans", "Noto Sans Devanagari", system-ui, sans-serif; --font-display: "Noto Sans", "Noto Sans Devanagari", system-ui, sans-serif; --fs: 14.5px; }
body { font-size: var(--fs, 15px); }
html:not([data-font="barlow"]) h1, html:not([data-font="barlow"]) h2, html:not([data-font="barlow"]) h3 { letter-spacing: 0; }
html[data-font="poppins"] h1, html[data-font="noto"] h1 { font-size: clamp(23px, 2.6vw, 30px); }
html[data-font="poppins"] .nav-side a, html[data-font="noto"] .nav-side a { font-size: 13.4px; }
html[lang="hi"], html[lang="mr"] { line-height: 1.55; }
/* font picker */
.palette-menu { max-height: 80vh; overflow-y: auto; }
.font-picker { display: grid; gap: 2px; padding: 4px 2px 6px; }
.font-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; color: var(--ink); }
.font-opt:hover { background: rgba(var(--accent-rgb), .06); }
.font-opt.active { border-color: rgba(var(--accent-rgb), .35); background: rgba(var(--accent-rgb), .08); }
.font-opt .fo-sample { width: 52px; flex: none; text-align: center; font-size: 17px; font-weight: 600; color: var(--cf-red); line-height: 1.3; }
.font-opt .fo-text { line-height: 1.15; min-width: 0; }
.font-opt .fo-text b { display: block; font-size: 13.5px; }
.font-opt .fo-text small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-font-sample="barlow"]  { font-family: "Barlow", "Noto Sans Devanagari", sans-serif; }
[data-font-sample="mukta"]   { font-family: "Mukta", sans-serif; }
[data-font-sample="poppins"] { font-family: "Poppins", sans-serif; }
[data-font-sample="hind"]    { font-family: "Hind", sans-serif; }
[data-font-sample="baloo"]   { font-family: "Baloo 2", sans-serif; }
[data-font-sample="noto"]    { font-family: "Noto Sans", "Noto Sans Devanagari", sans-serif; }
.palette-menu { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-bs-theme="dark"] .palette-menu { background: #121D28; }

/* Forgot password – steps & code box */
.auth-step { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.auth-step span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line); color: var(--muted); }
.auth-step span.on { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); color: #fff; box-shadow: 0 4px 12px rgba(var(--accent-rgb), .3); }
.auth-step span.done { background: #1F8A57; color: #fff; }
.auth-step i { width: 34px; height: 2px; background: var(--line); }
.otp-input { font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.auth-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), .06); font-size: 13.5px; color: var(--ink-2); }
.auth-note > i { font-size: 18px; color: var(--cf-red); }

/* Help – What's coming */
.road-sec { margin: 4px 0 10px; } .road-sec + .road-list { margin-bottom: 18px; }
.road-list { display: grid; gap: 4px; }
.road-item { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; transition: background .2s; }
.road-item:hover { background: rgba(var(--accent-rgb), .05); }
.road-item b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.road-item > div > span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.road-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .09); color: var(--cf-red); font-size: 16px; }
.road-list.info .road-ic { background: rgba(43, 123, 185, .1); color: #2B7BB9; }

/* Clean, airy text everywhere */
body { line-height: 1.55; letter-spacing: .005em; }
.form-text, small, .small { line-height: 1.5; }
.list-row .sub { line-height: 1.45; }
html[data-font="poppins"] .glass-head h3 { font-size: 17px; font-weight: 600; }
html[data-font="poppins"] h1 { font-weight: 700; letter-spacing: -.01em; }
html[data-font="poppins"] .kpi .k-value, html[data-font="poppins"] .big-num { letter-spacing: -.02em; }
html[data-font="poppins"] .small-caps { letter-spacing: .1em; }

/* Org chart – department view */
.dept-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.co-chip { --co: var(--cf-red); display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); font-weight: 600; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow); transition: .2s; }
.co-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--co); }
.co-chip span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(var(--accent-rgb), .08); }
.co-chip:hover { transform: translateY(-1px); }
.co-chip.active { background: var(--co); color: #fff; border-color: transparent; }
.co-chip.active i { background: #fff; } .co-chip.active span { background: rgba(255, 255, 255, .25); }
.dept-grid { columns: 3 340px; column-gap: 16px; }
.dept-card { break-inside: avoid; margin-bottom: 16px; padding: 0; overflow: hidden; display: inline-block; width: 100%; }
.dept-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, rgba(var(--accent-rgb), .07), transparent 70%); }
.dept-head h3 { font-size: 17px; margin: 0; }
.dept-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); box-shadow: 0 6px 14px rgba(var(--accent-rgb), .3); }
.dept-co { padding: 10px 12px 12px; border-top: 1px dashed var(--line); }
.dept-co:first-of-type { border-top: 0; }
.dept-co-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--co); margin: 2px 4px 6px; }
.dept-co-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--co); box-shadow: 0 0 0 3px color-mix(in srgb, var(--co) 20%, transparent); }
.dept-co-head .n { margin-left: auto; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.dept-tree, .dept-tree ul { list-style: none; margin: 0; padding: 0; }
.dept-tree ul { margin-left: 22px; padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--co) 25%, transparent); }
.dm-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 11px; color: var(--ink); text-decoration: none; transition: background .2s, transform .2s; }
.dm-row:hover { background: rgba(var(--accent-rgb), .06); color: var(--ink); transform: translateX(2px); }
.dm-row b { display: block; font-size: 13.8px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row.hod { background: color-mix(in srgb, var(--co) 8%, transparent); }
.dm-row .hod-chip { background: var(--co); color: #fff; border: 0; }
.dm-n { font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .1); color: var(--cf-red); }
.dm-row.hit { outline: 2px solid var(--cf-gold); }
@media print { .dept-grid { columns: 2; } .dept-filter { display: none; } }
.sidebar .brand > a { flex: 1; min-width: 0; }
.sidebar .brand-lockup { min-width: 0; }
.sidebar .brand-lockup .brand-text { min-width: 0; overflow: hidden; }
.sidebar .brand-lockup .brand-text b { font-size: 18px; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; }
html[data-font="poppins"] .sidebar .brand-lockup .brand-text b, html[data-font="noto"] .sidebar .brand-lockup .brand-text b, html[data-font="baloo"] .sidebar .brand-lockup .brand-text b { font-size: 16.5px; letter-spacing: .03em; }
.sidebar .brand-lockup .brand-text span { font-size: 10.5px; letter-spacing: .08em; }

/* Roles & permissions – the first column stays solid while scrolling sideways */
.perm-table { --pt-bg: #fff; }
html[data-bs-theme="dark"] .perm-table { --pt-bg: #131E29; }
.perm-table td:first-child, .perm-table th:first-child { background: var(--pt-bg) !important; z-index: 3; box-shadow: 6px 0 12px -6px rgba(17, 38, 57, .18); min-width: 260px; }
.perm-table tbody tr:hover td:first-child { background: color-mix(in srgb, var(--cf-red) 5%, var(--pt-bg)) !important; }
.perm-table .group-row td:first-child { background: color-mix(in srgb, var(--cf-red) 10%, var(--pt-bg)) !important; }
.perm-table thead th { background: var(--pt-bg); }

/* Sidebar: the icon of the open page inside a group was invisible */
.nav-group .nav-items a.active .ic { background: var(--sb-active-tile); color: var(--sb-active-icon); }

/* Employee milestones – one-line title, gently floating */
.ms-head b { white-space: nowrap; font-size: 15.5px; letter-spacing: .01em; }
.ms-head > div { min-width: 0; flex-wrap: nowrap; }
.ms-widget { animation: msIn .5s .4s cubic-bezier(.2, .8, .2, 1) both, msFloat 4.5s 1s ease-in-out infinite; }
.ms-widget:hover { animation-play-state: paused; }
@keyframes msFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.ms-widget.collapsed { box-shadow: 0 14px 34px rgba(var(--accent-rgb), .28); }
.ms-widget.collapsed .ms-head::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 3.5s linear infinite; }
.ms-head { position: relative; }
@media (prefers-reduced-motion: reduce) { .ms-widget, .ms-widget.collapsed .ms-head::after { animation: none; } }

/* Help – clear section titles (Getting started, Tea & coffee …) */
.help-sec-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; background: linear-gradient(115deg, var(--cf-red), var(--cf-red-2) 70%, color-mix(in srgb, var(--cf-red-2) 60%, #C98A1B)); position: relative; overflow: hidden; }
.help-sec-head::after { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.help-sec-head h3 { color: #fff; margin: 0; font-size: 18px; font-weight: 700; flex: 1; }
.hs-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); font-size: 18px; flex: none; }
.hs-n { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); position: relative; z-index: 1; }
.help-acc .accordion-button { font-weight: 500; font-size: 14.5px; color: var(--ink); padding: 14px 18px; box-shadow: none !important; }
.help-acc .accordion-button:not(.collapsed) { color: var(--cf-red); font-weight: 600; background: rgba(var(--accent-rgb), .05) !important; }
.help-acc .accordion-button:focus-visible { outline: 2px solid rgba(var(--accent-rgb), .5); outline-offset: -2px; }
.help-acc .accordion-button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--accent-rgb), .35); margin-right: 12px; flex: none; transition: background .2s, transform .2s; }
.help-acc .accordion-button:not(.collapsed)::before { background: var(--cf-red); transform: scale(1.3); }
.help-acc .accordion-body { font-size: 14px; line-height: 1.65; color: var(--ink-2); padding: 4px 18px 16px 37px; }
#helpList .glass { overflow: hidden; }

/* Birthday pop-up v2 */
.cel2 .burst { padding: 26px 24px 74px; background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2) 45%, #E0A526); }
.cel2 .burst::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 40%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .18), transparent 35%); pointer-events: none; }
.cel-date { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cel-cake { font-size: 54px; line-height: 1; margin: 6px 0 4px; animation: celBounce 1.4s ease-in-out infinite; display: inline-block; }
@keyframes celBounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.cel2 .burst h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; text-shadow: 0 4px 20px rgba(0, 0, 0, .2); }
.cel2 .burst p { max-width: 560px; margin: 0 auto; opacity: .92; }
.cel2 .people { align-items: flex-start; }
.cel2 .people .p { width: 220px; background: var(--glass-strong); border-radius: 18px; padding: 0 12px 14px; box-shadow: var(--shadow); }
.cel-av { position: relative; display: inline-block; }
.cel-av .avatar { box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.cel-av .hat { position: absolute; top: -14px; right: -10px; font-size: 30px; transform: rotate(18deg); z-index: 2; }
.cel-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 6px; max-height: 84px; overflow-y: auto; }
.cel-chip { border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 3px 9px; font-size: 11.5px; color: var(--ink-2); line-height: 1.35; transition: .15s; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cel-chip:hover, .cel-chip.on { border-color: var(--cf-red); color: var(--cf-red); background: rgba(var(--accent-rgb), .07); }
.cel-form textarea { font-size: 12.5px; resize: none; }
.cel-wishes { margin: -50px 24px 14px; padding: 14px 16px; background: var(--glass-strong); border-radius: 18px; box-shadow: var(--shadow); text-align: left; position: relative; z-index: 2; max-height: 220px; overflow-y: auto; }
.cel-wishes + .people { margin-top: 0; }
.cel-wish { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cel-wish:last-child { border-bottom: 0; }
.cel-wish b { display: block; font-size: 13.5px; } .cel-wish span { display: block; font-size: 13px; color: var(--ink-2); }
/* 14 Nov: compact pop-up – always fits on the screen, close (×) on top */
.cel2 .modal-content { max-height: calc(100dvh - 24px); overflow-y: auto; position: relative; }
.cel2 .cel-x { position: absolute; top: 12px; right: 12px; z-index: 5; opacity: .85; }
.cel2 .burst h2 { font-size: clamp(22px, 3vw, 30px); }
.cel2 .cel-cake { font-size: 46px; }
.cel-mine .burst { padding: 22px 22px 62px; }
.cel-mine .burst p { font-size: 14px; }
.cel-mine .cel-wishes { margin: -46px 18px 6px; max-height: 190px; }
.cel-mine .people { margin-top: 0; }
.cel-also { margin: 12px 0 8px; color: var(--ink-2); }
.cel2 .cel-solo .burst { padding-bottom: 28px; }
@media (max-height: 700px) { .cel2 .burst { padding-top: 16px; } .cel2 .cel-cake { font-size: 36px; margin: 2px 0; } .cel2 .people .avatar { width: 72px; height: 72px; font-size: 24px; } }
@media (max-width: 575.98px) { .cel2 .people .p { width: 100%; max-width: 300px; } }

/* Org chart – department tree */
.org-node.dept-node { cursor: default; padding-top: 30px; border-top: 3px solid var(--cf-red); background: linear-gradient(180deg, rgba(var(--accent-rgb), .06), var(--glass-strong) 60%); }
.org-node .g-ic { width: 52px; height: 52px; margin: -56px auto 8px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #fff; background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); box-shadow: 0 8px 18px rgba(var(--accent-rgb), .35); border: 3px solid var(--glass-strong); }
.org-node.dept-node .n { font-size: 15px; }
.org-node.dept-node .dep .chip { background: transparent; font-weight: 700; }
.org-node.group-node { padding-top: 30px; min-width: 220px; }
.org-node.group-node .g-ic { background: linear-gradient(135deg, #fff, #E9EEF3); color: #13293D; border-color: #13293D; }
.pw-code-link { padding: 6px 6px 0; }
/* Roles table: left column in the same tint as the rest (not plain white) */
.perm-table { --pt-bg: color-mix(in srgb, var(--cf-red) 4%, #F4F7FA); }
html[data-bs-theme="dark"] .perm-table { --pt-bg: color-mix(in srgb, var(--cf-red) 8%, #131E29); }
.perm-table td:first-child { border-right: 1px solid rgba(var(--accent-rgb), .12); }

/* Roles page – people lists (no empty gaps, names always visible) */
.role-grid { columns: 3 330px; column-gap: 16px; }
.role-cell { break-inside: avoid; margin-bottom: 16px; display: inline-block; width: 100%; }
.who-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line); transition: background .15s; }
.who-row:hover { background: rgba(var(--accent-rgb), .04); }
.who-main { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; line-height: 1.25; }
.who-main b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-main small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-main:hover b { color: var(--cf-red); }
.who-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #9AA6B1; display: inline-block; }
.who-dot.warning { background: #E0A526; } .who-dot.info { background: #2B7BB9; } .who-dot.danger { background: #D9534F; }
.who-btn { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); display: grid; place-items: center; flex: none; transition: .2s; }
.who-btn:hover { background: var(--cf-red); color: #fff; border-color: transparent; }
.who-legend .who-dot { vertical-align: middle; margin-right: 2px; }

/* Profile completion page */
.pc-row { display: grid; grid-template-columns: auto minmax(180px, 1.3fr) 120px minmax(160px, 2fr) auto; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); }
.pc-row:first-child { border-top: 0; }
.pc-name { min-width: 0; color: var(--ink); text-decoration: none; line-height: 1.25; }
.pc-name b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-name small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-miss { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-miss .chip { font-size: 11px; padding: 2px 8px; }
.chip.hr { background: rgba(108, 117, 125, .12); color: #5f6b76; border-color: transparent; }
.pc-act { display: flex; gap: 6px; }
.who-btn.wa:hover { background: #25D366; }
@media (max-width: 991.98px) { .pc-row { grid-template-columns: auto 1fr auto; } .pc-bar, .pc-miss { grid-column: 2 / -1; } }
/* One-minute profile form */
.qp .qp-head { display: flex; gap: 16px; align-items: center; padding: 20px 22px; color: #fff; background: linear-gradient(120deg, var(--cf-navy, #13293D), color-mix(in srgb, var(--cf-red) 70%, #13293D)); border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.qp .qp-head h3 { color: #fff; }
.qp-ring { --p: 50; width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#FFD166 calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); }
.qp-ring span { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: #13293D; font-weight: 800; font-size: 14px; }
/* Leave – clearer dates */
.chip-btn { border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--cf-red); color: var(--cf-red); }
.leave-summary { padding: 10px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), .06); border: 1px dashed rgba(var(--accent-rgb), .3); font-size: 14px; color: var(--ink-2); }
.leave-summary:empty { display: none; }
.leave-summary i { color: var(--cf-red); margin-right: 4px; }
.leave-mode .seg-opt i { margin-right: 4px; }
/* flatpickr in the panel's colours */
.flatpickr-calendar { border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-family: var(--font); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--cf-red); border-color: var(--cf-red); }
.flatpickr-day.today { border-color: var(--cf-red); }
.flatpickr-day.today:hover { background: var(--cf-red); border-color: var(--cf-red); color: #fff; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 600; }
input.flatpickr-input.form-control[readonly] { background-color: var(--bs-body-bg, #fff); cursor: pointer; }
html[data-bs-theme="dark"] .flatpickr-calendar { background: #15212d; color: #e6ecf1; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
html[data-bs-theme="dark"] .flatpickr-day { color: #e6ecf1; }
html[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled, html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay, html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay { color: rgba(230, 236, 241, .3); }
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-month, html[data-bs-theme="dark"] .flatpickr-current-month, html[data-bs-theme="dark"] span.flatpickr-weekday, html[data-bs-theme="dark"] .flatpickr-months .flatpickr-prev-month, html[data-bs-theme="dark"] .flatpickr-months .flatpickr-next-month { color: #e6ecf1; fill: #e6ecf1; background: transparent; }
.bal-help { display: flex; gap: 10px; margin: 0 16px 12px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--accent-rgb), .06); font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.bal-help > i { color: var(--cf-red); font-size: 18px; }
.bal-pend { color: #b7791f; font-weight: 700; text-decoration: none; border-bottom: 1px dashed currentColor; }
.bal-cols { display: flex; gap: 4px; justify-content: center; margin-top: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.bal-cols span { width: 58px; }

/* Management dashboard */
.mg-wait { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); }
.mg-wait:first-child { border-top: 0; }
.mg-wait b { display: block; font-size: 14px; font-weight: 600; } .mg-wait small { display: block; font-size: 12px; color: var(--muted); }
.mg-wait .mg-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .09); color: var(--cf-red); flex: none; }
.mg-wait .mg-n { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--cf-red); }
.mg-wait.zero { opacity: .55; } .mg-wait.zero .mg-n { color: var(--muted); }
.mg-scroll { max-height: 330px; overflow-y: auto; }
.mg-bday { margin: 8px 14px 12px; padding: 8px 12px; border-radius: 10px; background: rgba(201, 138, 27, .12); font-size: 13px; }
.mg-legend { display: flex; gap: 14px; padding: 10px 16px 4px; font-size: 12px; color: var(--muted); }
.mg-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.mg-legend .ok::before, .mg-stack .ok { background: #1F8A57; } .mg-legend .sub::before, .mg-stack .sub { background: #2B7BB9; }
.mg-legend .dr::before, .mg-stack .dr { background: #E0A526; } .mg-legend .mi::before, .mg-stack .mi { background: #C9D2DA; }
.mg-ws { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; padding: 8px 16px; }
.mg-ws-name b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mg-ws-name small { font-size: 12px; color: var(--muted); }
.mg-stack { display: flex; height: 22px; border-radius: 7px; overflow: hidden; background: var(--line); }
.mg-stack span { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; min-width: 18px; animation: growX .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.mg-stack .mi { color: #4c5a66; }
.mg-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mg-mini > div { padding: 10px 6px; border-radius: 12px; background: rgba(var(--accent-rgb), .05); text-align: center; }
.mg-mini b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.1; }
.mg-mini span { display: block; font-size: 11.5px; color: var(--muted); }
.mg-mini .bad b { color: #D9534F; }
.mg-bar-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; padding: 8px 16px; font-size: 13px; border-top: 1px solid var(--line); }
.mg-bar-row:first-child { border-top: 0; }
.mg-bar-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; } .mg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cf-red), var(--cf-red-2)); border-radius: 6px; animation: growX .8s both; transform-origin: left; }
.mg-bar-row b { text-align: right; }
@media (max-width: 575.98px) { .mg-ws { grid-template-columns: 1fr; gap: 4px; } .mg-mini { grid-template-columns: repeat(2, 1fr); } }
.mg-wait .grow { flex: 1; min-width: 0; }

/* Meeting rooms */
.room-days { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room-day { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 6px 8px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--ink); text-decoration: none; line-height: 1.15; box-shadow: var(--shadow); transition: .2s; }
.room-day b { font-size: 20px; font-family: var(--font-display); } .room-day small { font-size: 11px; color: var(--muted); }
.room-day:hover { transform: translateY(-2px); color: var(--ink); }
.room-day.active { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); color: #fff; border-color: transparent; } .room-day.active small { color: rgba(255, 255, 255, .8); }
.room-scroll { overflow-x: auto; }
.room-grid { min-width: 860px; padding: 8px 16px 12px; }
.room-hours, .room-row { display: grid; grid-template-columns: 230px 1fr; gap: 14px; align-items: stretch; }
.room-hours .rt-track { height: 22px; position: relative; }
.room-hours span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.room-row { padding: 10px 0; border-top: 1px solid var(--line); }
.room-name b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.room-name small { display: block; font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.room-name .pill { font-size: 11px; }
.rdot { width: 10px; height: 10px; border-radius: 3px; background: var(--rc); flex: none; }
.rt-track { position: relative; min-height: 58px; border-radius: 12px; background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(var(--accent-rgb), .03) 2px, rgba(var(--accent-rgb), .03) 4px), rgba(var(--accent-rgb), .03); cursor: copy; }
.room-hours .rt-track { background: none; min-height: 0; cursor: default; }
.rt-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.rt-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #D9534F; z-index: 3; box-shadow: 0 0 0 3px rgba(217, 83, 79, .15); }
.rt-now::before { content: ""; position: absolute; top: -3px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #D9534F; }
.rt-book { position: absolute; top: 5px; bottom: 5px; border-radius: 10px; padding: 4px 8px; overflow: hidden; color: #fff; cursor: default; z-index: 2; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 70%, #000)); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); animation: growX .5s both; transform-origin: left; }
.rt-book b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rt-book small { display: block; font-size: 10.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-book.mine { outline: 2px solid #FFD166; outline-offset: -2px; }
@media (max-width: 767.98px) {
  .room-days { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; } .room-days::-webkit-scrollbar { display: none; }
  .room-day { flex: 0 0 auto; min-width: 56px; }
  .room-grid { min-width: 720px; padding: 6px 10px 10px; }
  .room-hours, .room-row { grid-template-columns: 1fr; gap: 6px; }
  .room-hours > :first-child { display: none; }
  .room-name { position: sticky; left: 0; width: max-content; max-width: 330px; }
  .room-name small { margin-bottom: 4px; } .room-name .pill { display: inline-flex; }
}

/* Visitors */
.vis-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.vis-row:first-child { border-top: 0; }
.vis-row .title { font-weight: 600; } .vis-row .sub { font-size: 12.5px; color: var(--muted); }
.vis-av { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #fff; flex: none; background: linear-gradient(135deg, #2B7BB9, #1D4E66); }
.vis-row.st-in .vis-av { background: linear-gradient(135deg, #1F8A57, #2A9A62); box-shadow: 0 0 0 4px rgba(31, 138, 87, .15); }
.vis-row.st-out, .vis-row.st-cancelled { opacity: .6; }
.vis-row .grow { flex: 1; }
.cel-prev { background: #FFD166; color: #3A2A00; padding: 1px 8px; border-radius: 6px; font-weight: 700; letter-spacing: .04em; }
body.modal-open .ms-widget { visibility: hidden; }

/* ================= Letterhead (HR's A4 design) – offer / confirmation letters ================= */
.letter-paper.lh { padding: 0; background: #FAFDFD; font-family: var(--font, 'Poppins', sans-serif); font-size: 14px; line-height: 1.65; color: #1f2733; max-width: 210mm; overflow: hidden; }
.letter-paper.lh::before { display: none; }
.lh-top { --co: #98012E; }
.lh-band { background: #1E2736; color: #fff; padding: 13mm 18mm 9mm; min-height: 54mm; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-start; }
.lh-mark { display: flex; align-items: center; gap: 12px; height: 13mm; margin-bottom: 6.5mm; }
.lh-mark > img { height: 100%; width: auto; }
.lh-logo { background: #fff; border-radius: 8px; padding: 4px 6px; height: 100%; display: inline-flex; align-items: center; } .lh-logo img { max-height: 100%; max-width: 40mm; object-fit: contain; }
.lh-name { font-family: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif; font-weight: 800; font-size: 13mm; line-height: 1; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.lh-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6mm; font-size: 8.6pt; line-height: 1.3; color: #F3F6F9; }
.lh-contact li { display: flex; align-items: center; gap: 3mm; }
.lh-contact i { color: var(--co); font-size: 10pt; width: 4mm; text-align: center; filter: brightness(1.25); }
.lh-stripe { height: 4.6mm; background: var(--co); }
.lh-sheet { width: 100%; border-collapse: collapse; }
.lh-sheet > * > tr > td { padding: 0; }
.lh-space-top { height: 9mm; } .lh-space-bot { height: 40mm; }
.lh-content { padding: 0 18mm; position: relative; z-index: 1; }
.lh-content .lp-body p { margin: 0 0 9px; }
.lh-content .lp-body ul { margin: -2px 0 10px; padding-left: 22px; } .lh-content .lp-body li { margin-bottom: 2px; }
.lp-title { font-family: var(--font-display, sans-serif); font-size: 19px; font-weight: 800; letter-spacing: .14em; text-align: center; color: #1E2736; margin: 2px 0 16px; }
.lp-title::after { content: ""; display: block; width: 46px; height: 3px; border-radius: 3px; background: var(--co); margin: 8px auto 0; }
.lp-h { font-family: var(--font-display, sans-serif); font-size: 14.5px; font-weight: 700; color: var(--co); margin: 16px 0 6px; }
.lp-table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 13px; }
.lp-table th, .lp-table td { border: 1px solid #D7DEE5; padding: 6px 12px; text-align: left; vertical-align: top; }
.lp-table th { background: #1E2736; color: #fff; font-weight: 600; letter-spacing: .02em; }
.lp-table tbody tr:nth-child(odd) td { background: #F1F5F8; }
.lp-table td:first-child { width: 38%; font-weight: 600; color: #3a4654; }
.lp-break { border-top: 1px dashed #c4ccd4; margin: 26px -18mm 22px; position: relative; }
.lp-break::after { content: "new page"; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: #FAFDFD; padding: 0 8px; font-size: 10.5px; color: #8a96a3; letter-spacing: .1em; text-transform: uppercase; }
.lh-corner { position: absolute; left: 0; bottom: 0; width: 55mm; height: 49mm; pointer-events: none; z-index: 0; }
.lh-corner svg { width: 100%; height: 100%; display: block; }
.letter-paper.lh.small-preview { max-height: 78vh; overflow: auto; font-size: 12.5px; position: relative; padding: 0; border: 1px solid #e3e7eb; }
.letter-paper.lh.small-preview .lh-corner { display: none; }
@media (max-width: 575.98px) { .lh-band { padding: 8mm 7mm 6mm; min-height: 0; } .lh-mark { height: 9mm; } .lh-name { font-size: 9mm; } .lh-content { padding: 0 6mm; } .lp-break { margin: 22px -6mm 18px; } }
@media print {
    body:has(.letter-paper.lh) { background: #FAFDFD !important; }
    body:has(.letter-paper.lh) :is(.app-shell, .main, .content, main, .letter-wrap, .letter-paper) { transform: none !important; animation: none !important; filter: none !important; backdrop-filter: none !important; }
    .letter-wrap { display: block; }
    .letter-paper.lh { max-width: none; width: 210mm; overflow: visible; box-shadow: none; border-radius: 0; font-size: 10.4pt; background: transparent; }
    .letter-paper.lh, .letter-paper.lh * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .letter-paper.lh .lh-top { position: fixed; top: 0; left: 0; width: 210mm; z-index: 2; }
    .letter-paper.lh .lh-band { height: 58mm; min-height: 0; padding-top: 12mm; }
    .letter-paper.lh .lh-corner { position: fixed; left: 0; bottom: 0; }
    .lh-space-top { height: 71mm; } .lh-space-bot { height: 36mm; }
    .lp-break { border: 0; margin: 0; break-before: page; page-break-before: always; height: 0; }
    .lp-break::after { display: none; }
    .lp-table tr { break-inside: avoid; }
    .lp-keep { break-inside: avoid; page-break-inside: avoid; }
    .letter-paper.lh .lp-h { break-after: avoid; page-break-after: avoid; }
    .letter-paper.lh p, .letter-paper.lh li { orphans: 3; widows: 3; }
    .letter-paper.lh .lp-h { margin: 12px 0 4px; } .letter-paper.lh .lp-body p { margin-bottom: 7px; }
}

/* ================= Suggestion box ================= */
a.chip { text-decoration: none; } a.chip:hover { border-color: var(--cf-red); color: var(--cf-red); }
.chip.on { background: var(--cf-red); border-color: var(--cf-red); color: #fff; } .chip.on b { color: #fff; }
.chip b { font-weight: 700; color: var(--cf-red); }
@media (min-width: 1200px) { .sticky-xl { position: sticky; top: 88px; } }
.sg-row { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); align-items: flex-start; }
.sg-row:first-child { border-top: 0; }
.sg-row .title { font-weight: 700; font-size: 15px; color: var(--ink); }
.sg-body { white-space: pre-line; color: var(--ink-2); font-size: 13.5px; margin: 4px 0 6px; }
.sg-row .sub { font-size: 12px; color: var(--muted); }
.sg-anon { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-2); font-weight: 600; }
.sg-vote button { width: 52px; border: 1px solid var(--line); background: var(--glass); border-radius: 14px; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--muted); transition: .18s; }
.sg-vote button i { font-size: 18px; } .sg-vote button b { font-size: 15px; color: var(--ink); margin-top: 2px; }
.sg-vote button:hover:not(:disabled) { border-color: var(--cf-red); color: var(--cf-red); transform: translateY(-1px); }
.sg-vote button.on { background: linear-gradient(135deg, var(--cf-red), var(--cf-red-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(var(--accent-rgb), .3); } .sg-vote button.on b { color: #fff; }
.sg-vote button:disabled { opacity: .65; cursor: default; }
.sg-reply { margin-top: 10px; padding: 9px 12px; border-left: 3px solid var(--cf-green, #1F8A57); background: rgba(31, 138, 87, .07); border-radius: 0 10px 10px 0; font-size: 13.5px; white-space: pre-line; }
.sg-reply .small { color: var(--cf-green, #1F8A57); margin-bottom: 2px; white-space: normal; }
.sg-manage { margin-top: 8px; } .sg-manage summary { font-size: 12.5px; font-weight: 600; color: var(--cf-red); cursor: pointer; list-style: none; } .sg-manage summary::-webkit-details-marker { display: none; }
.sg-st input, .sg-cats input, .kd-badges input { position: absolute; opacity: 0; pointer-events: none; }
.sg-st span { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.sg-st input:checked + span { background: var(--cf-red); border-color: var(--cf-red); color: #fff; }
.sg-st input:focus-visible + span, .sg-cats input:focus-visible + span, .kd-badges input:focus-visible + span { outline: 2px solid var(--cf-red); outline-offset: 2px; }
.sg-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-cats span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); transition: .15s; }
.sg-cats input:checked + span { background: rgba(var(--accent-rgb), .1); border-color: var(--cf-red); color: var(--cf-red); }
.sg-row.st-done .title { text-decoration: none; } .sg-row.st-declined { opacity: .8; }

/* ================= Kudos wall ================= */
.kd-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.kd-badges span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--glass); font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: .18s; text-align: center; }
.kd-badges em { font-style: normal; font-size: 24px; line-height: 1.1; transition: transform .25s; }
.kd-badges span:hover { transform: translateY(-2px); border-color: var(--bc); }
.kd-badges input:checked + span { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 12%, transparent); color: var(--bc); box-shadow: 0 6px 16px color-mix(in srgb, var(--bc) 25%, transparent); }
.kd-badges input:checked + span em { transform: scale(1.18) rotate(-6deg); }
.kd-me-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 16px 8px; }
.kd-me-row > div + div { border-left: 1px solid var(--line); }
.kd-me-row b { display: block; font-size: 28px; font-family: var(--font-display); color: var(--cf-red); line-height: 1.1; }
.kd-me-row span { font-size: 11.5px; color: var(--muted); }
.kd-star { padding: 16px 18px; background: linear-gradient(135deg, rgba(255, 209, 102, .28), rgba(255, 255, 255, .5) 60%), var(--glass); }
.kd-star-tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a5f00; background: #FFE29A; border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.kd-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kd-card { position: relative; border-radius: 18px; padding: 12px 14px 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--bc) 11%, var(--glass-strong, #fff)), var(--glass-strong, #fff) 55%); border: 1px solid color-mix(in srgb, var(--bc) 22%, var(--line)); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: kdIn .45s both; transition: transform .2s; }
.kd-card:hover { transform: translateY(-3px) rotate(-.3deg); }
@keyframes kdIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.kd-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kd-em { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--bc) 16%, #fff); }
.kd-badge { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc); }
.kd-x { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 2px 4px; border-radius: 6px; } .kd-x:hover { color: var(--bs-danger); }
.kd-to { display: flex; align-items: center; gap: 9px; }
.kd-to b { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .kd-to small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-msg { margin: 9px 0 10px; font-size: 13.5px; color: var(--ink-2); font-style: italic; flex: 1; overflow-wrap: anywhere; }
.kd-foot { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.kd-foot button { border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; color: var(--ink-2); transition: .15s; }
.kd-foot button.on { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 14%, transparent); color: var(--bc); }
.kd-foot button.pop { animation: kdPop .4s; } @keyframes kdPop { 50% { transform: scale(1.3); } }
.kd-rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--glass-strong); color: var(--muted); flex: none; }
.kd-rank.r1 { background: #FFD166; color: #6b4a00; } .kd-rank.r2 { background: #DDE3EA; color: #3d4a57; } .kd-rank.r3 { background: #F0C29A; color: #6b3a12; }
/* dashboard kudos widget */
.kd-mini { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; }
.kd-mini .kd-card { flex: 0 0 230px; }
@media (prefers-reduced-motion: reduce) { .kd-card, .kd-foot button.pop { animation: none; } }

/* ---------- Letter signatures ---------- */
.lp-sig { height: 14mm; max-width: 55mm; object-fit: contain; vertical-align: bottom; display: inline-block; margin: 1mm 0 0; }
.letter-paper .lp-body ol { margin: 0 0 10px; padding-left: 22px; } .letter-paper .lp-body ol li { margin-bottom: 4px; }
.sig-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sig-row img { width: 96px; height: 42px; object-fit: contain; flex: none; }
.sig-row .grow { color: #1f2733; } .sig-row small { color: #6b7782 !important; }
.sig-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sig-box { flex: 1; min-width: 180px; height: 56px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 4px 10px; }
.sig-box img { max-height: 48px; max-width: 100%; object-fit: contain; } .sig-box span { font-size: 12px; color: #7b8792; }

/* ---------- Meeting rooms – room settings form ---------- */
.room-edit { border: 1px solid var(--line); border-left: 4px solid var(--rc, var(--line)); border-radius: 14px; padding: 12px 14px; background: var(--glass); }
.room-edit.add { border-left-color: var(--line); border-style: dashed; }
.room-edit .form-label { color: var(--muted); font-weight: 600; }
.room-color { width: 100%; height: 38px; padding: 4px; cursor: pointer; }

/* ================= Good morning pop-up ================= */
.morning .modal-content { border: 0; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(14, 30, 45, .35); }
.mo-sky { position: relative; height: 128px; background: linear-gradient(180deg, #FFB86B 0%, #FFD9A0 45%, #FFF1D6 100%); overflow: hidden; }
.mo-sun { position: absolute; left: 50%; bottom: -46px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; background: radial-gradient(circle, #FFF6C9 0 35%, #FFD24D 36% 62%, #FFB300 63%); box-shadow: 0 0 60px 20px rgba(255, 196, 64, .55); animation: moRise 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.mo-cloud { position: absolute; height: 26px; border-radius: 30px; background: rgba(255, 255, 255, .9); box-shadow: 18px -10px 0 4px rgba(255, 255, 255, .9), 40px 0 0 0 rgba(255, 255, 255, .9); }
.mo-cloud.c1 { width: 60px; top: 30px; left: 12%; animation: moDrift 9s ease-in-out infinite alternate; }
.mo-cloud.c2 { width: 46px; top: 58px; right: 16%; opacity: .8; animation: moDrift 11s ease-in-out infinite alternate-reverse; }
@keyframes moRise { from { transform: translateY(60px); opacity: .3; } }
@keyframes moDrift { to { transform: translateX(26px); } }
.mo-body { padding: 18px 24px 22px; text-align: center; }
.mo-date { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mo-body h2 { font-size: 26px; margin: 4px 0 12px; }
.mo-thought { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 10px 14px; border-radius: 14px; background: rgba(255, 184, 107, .14); color: var(--ink-2); font-style: italic; }
.mo-thought i { color: #E59A2F; font-size: 20px; line-height: 1; }
.mo-list { display: grid; gap: 6px; text-align: left; }
.mo-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); text-decoration: none; font-size: 13.5px; transition: .15s; }
a.mo-item:hover { border-color: var(--cf-red); transform: translateX(2px); color: var(--ink); }
.mo-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .1); color: var(--cf-red); flex: none; }
.mo-item > .bi-chevron-right { color: var(--muted); }
html[data-bs-theme="dark"] .mo-sky { background: linear-gradient(180deg, #F08A4B 0%, #F5B66E 50%, #3A3F55 100%); }
@media (prefers-reduced-motion: reduce) { .mo-sun, .mo-cloud { animation: none; } }
.mg-idea { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink); text-decoration: none; min-width: 0; }
.mg-idea:hover { color: var(--cf-red); }
.mg-votes { flex: none; font-size: 11.5px; font-weight: 700; color: var(--cf-red); background: rgba(var(--accent-rgb), .08); border-radius: 8px; padding: 1px 7px; }
html[data-bs-theme="dark"] .morning .modal-content { background: #16222E; }

/* ================= Responsive safety net (14 Nov 2026 audit) ================= */
/* flex children may shrink below their content, so buttons next to a long select never get pushed out of the card */
.d-flex > .form-select, .d-flex > .form-control, .d-flex > .input-group, .d-flex > .grow, .d-flex > .flex-grow-1, .d-flex > .min-w-0 { min-width: 0; }
.btn { max-width: 100%; }
.glass-head { flex-wrap: wrap; row-gap: 8px; }
.glass-head > h3 { min-width: 0; }
.glass-head .form-control, .glass-head .form-select { max-width: 100%; }
.page-head > div:last-child:not(:first-child) { min-width: 0; }
code, .mono, .sg-body, .kd-msg { overflow-wrap: anywhere; }
.glass-body li, .glass-body p, .list-row .title, .list-row .sub { overflow-wrap: break-word; }
@media (max-width: 575.98px) {
  .swatches { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)) !important; }
  .page-head { flex-wrap: wrap; }
  .page-head .btn { white-space: normal; }
  .glass-head .btn { flex: none; }
}
[class*="col-"] > .btn.w-100:only-child { padding-inline: .35rem; }
.kpi .k-label { flex-wrap: wrap; } .kpi .k-label .pill { white-space: normal; }
.brand-preview .brand-lockup { min-width: 0; } .brand-preview .brand-text { min-width: 0; } .brand-preview .brand-text b { overflow-wrap: anywhere; font-size: clamp(15px, 1.6vw, 20px); }
@media (max-width: 575.98px) {
  .list-row { flex-wrap: wrap; row-gap: 6px; }
  .list-row > .grow { flex: 1 1 150px; }
  .ms-title { white-space: normal; }
}
[class*="col-"].row { margin-left: 0; margin-right: 0; }
.glass-body.row, form.row.glass, .glass.glass-body.row { margin-left: 0; margin-right: 0; }
.swatch { min-width: 0; white-space: normal; text-align: center; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 991.98px) { main.content { overflow-x: clip; } }
.mo-team { display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 12px; padding: 3px 12px; border-radius: 999px; background: rgba(var(--accent-rgb), .08); color: var(--cf-red); font-size: 12.5px; font-weight: 600; }

/* ---------- HR → Approval flows ---------- */
.flow-dept { padding: 10px 20px; background: rgba(var(--accent-rgb), .05); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cf-red); border-top: 1px solid var(--line); }
.flow-dept span { color: var(--muted); margin-left: 6px; }
.flow-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) 1fr 1fr auto; gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); }
.flow-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.flow-path { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.flow-path small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.flow-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .08); color: var(--cf-red); flex: none; }
.flow-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
@media (max-width: 991.98px) { .flow-row { grid-template-columns: 1fr 1fr; } .flow-who { grid-column: 1 / -1; } .flow-act { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 575.98px) { .flow-row { grid-template-columns: 1fr; } }

/* Role change / transfer */
.rc-now { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(var(--accent-rgb), .06); }
.rc-line { font-size: 13.5px; line-height: 1.5; }
.rc-line > span { color: var(--ink-3, #6B7782); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.rc-line s { color: var(--ink-3, #6B7782); }
.rc-line .bi { font-size: 11px; color: var(--cf-red); }
.rc-timeline li { padding-bottom: 12px; }
.rc-timeline li.rc-sched { opacity: .85; }

/* My wishes – who wished me + replies */
.wish-tabs .nav-link { border-radius: 999px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.wish-tabs .nav-link.active { background: var(--cf-red); color: #fff; }
.wish-tabs .badge { background: rgba(0, 0, 0, .12); color: inherit; }
.wish-row { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.wish-row:last-child { border-bottom: 0; }
.wish-row > .avatar { flex: none; }
.wish-bubble { margin-top: 8px; padding: 9px 13px; border-radius: 4px 14px 14px 14px; background: rgba(var(--accent-rgb), .07); font-size: 14px; max-width: 560px; }
.wish-bubble.mine { border-radius: 14px 4px 14px 14px; background: rgba(29, 78, 102, .09); margin-left: auto; }
.wish-bubble.reply { background: rgba(31, 138, 87, .1); }
.wish-bubble .small-caps { display: block; margin-bottom: 2px; font-size: 10.5px; }
.wish-reply { margin-top: 10px; max-width: 560px; margin-left: auto; }
.wish-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.wish-all { margin: 0 18px 14px; padding: 12px 14px; border-radius: 14px; background: rgba(var(--accent-rgb), .05); border: 1px dashed rgba(var(--accent-rgb), .25); }
@media (max-width: 575.98px) { .wish-row { padding: 12px 14px; } .wish-bubble.mine, .wish-reply { margin-left: 0; } }
/* Notifications / menus in the top bar: solid background (blur does not work inside the blurred top bar) */
.topbar .dropdown-menu { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-bs-theme="dark"] .topbar .dropdown-menu { background: #142130; }
