/* =====================================================================
   The Envision Tech — Attendance. Modern HR-app layout:
   dark left sidebar, white top bar, soft grey canvas, white cards.
   Everything is local (fonts, icons) so it works without internet.
   ===================================================================== */

/* ===== Fonts ===== */
@font-face {
  font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/noto-sans-bengali-bengali-400-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/noto-sans-bengali-bengali-700-normal.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/noto-sans-bengali-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Bengali"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/noto-sans-bengali-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Design tokens ===== */
:root {
  --brand: #E8184C;          /* The Envision Tech pink */
  --brand-dark: #C10F3C;
  --brand-soft: #FDE8EE;
  --ink: #111111;            /* The Envision Tech black */
  --sidebar: #161824;
  --sidebar-hover: #23263a;
  --sidebar-text: #b9bdd0;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --text: #1D2433;
  --muted: #6B7385;
  --line: #E4E7EE;
  --ok-bg: #E6F6EC;   --ok: #15803D;
  --warn-bg: #FEF3E2; --warn: #B45309;
  --bad-bg: #FDECEC;  --bad: #C62828;
  --info-bg: #E8F0FE; --info: #1D4ED8;
  --off-bg: #EEF0F4;  --off: #4B5363;
  --in: #16A34A;
  --out: #EA580C;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .06);
  --side-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans Bengali", "Nirmala UI", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15px; line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; line-height: 1.3; font-weight: 700; }
h2 { font-size: 1.08rem; margin: 0 0 .7rem; font-weight: 700; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
h1 small, h2 small, h3 small { font-weight: 400; color: var(--muted); font-size: .78em; }
code { background: #EEF1F6; padding: 1px 6px; border-radius: 5px; font-size: .88em; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ===== Icons (Lucide sprite) ===== */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 28px; height: 28px; }

/* ===== Sidebar ===== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; z-index: 40; overflow-y: auto;
}
.side-brand { display: block; padding: 18px 20px 14px; }
.side-brand img { height: 40px; width: auto; display: block; }
.side-nav { padding: 6px 10px 16px; flex: 1; }
.side-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #6f7490;
              padding: 14px 12px 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--sidebar-text); text-decoration: none !important; position: relative; transition: background .15s;
}
.side-link:hover { background: var(--sidebar-hover); color: #fff; }
.side-link.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(232, 24, 76, .35); }
.side-ico { width: 30px; height: 30px; flex: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.side-text { display: flex; flex-direction: column; line-height: 1.2; font-size: .93rem; flex: 1; }
.side-text small { font-size: .72rem; opacity: .7; }
.side-foot { padding: 12px 20px 18px; font-size: .75rem; color: #6f7490; border-top: 1px solid #23263a; }
.side-overlay { display: none; }

/* ===== Main area + top bar ===== */
.with-sidebar .main { margin-left: var(--side-w); min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  padding: 10px 24px; min-height: 62px;
}
.top-title { font-weight: 700; font-size: 1rem; flex: 1; min-width: 0; }
.top-title small { font-weight: 400; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 8px; }
.top-user { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.top-user-text { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; font-size: .9rem; }
.top-user-text small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; position: relative;
  text-decoration: none !important;
}
.icon-btn:hover { background: #F5F6FA; }
.menu-btn { display: none; }
.bell-count { position: absolute; top: -6px; right: -6px; background: var(--brand); color: #fff; font-size: .68rem;
              font-weight: 700; border-radius: 999px; padding: 1px 6px; border: 2px solid #fff; }
.nav-count { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 700; }
.side-link.active .nav-count { background: #fff; color: var(--brand); }
.inline { display: inline; margin: 0; }
.brand-link { display: inline-flex; }
.logo-img { height: 38px; width: auto; display: block; }

.container { max-width: 1240px; margin: 0 auto; padding: 22px 24px 40px; }
.container.narrow { max-width: 560px; }
.container.medium { max-width: 860px; }

/* Avatars with initials */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
          font-weight: 700; font-size: .85rem; color: #fff; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
.av-0 { background: #E8184C; } .av-1 { background: #2563EB; } .av-2 { background: #16A34A; } .av-3 { background: #9333EA; }
.av-4 { background: #EA580C; } .av-5 { background: #0891B2; } .av-6 { background: #DB2777; } .av-7 { background: #475569; }
.person { display: flex; align-items: center; gap: 10px; }
.person-text { line-height: 1.25; }

/* ===== Cards & layout helpers ===== */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 18px;
        box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; align-items: start; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.dash-grid > .card { margin-bottom: 0; }
.span-all { grid-column: 1 / -1; }
.align-end { align-self: end; padding-bottom: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.pre { white-space: pre-wrap; word-break: break-word; }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: -6px; margin-bottom: 10px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin: 4px 0; }

/* ===== Forms ===== */
label { display: block; font-weight: 600; margin: 8px 0 5px; font-size: .9rem; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 16px 6px 0; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=month],
input[type=number], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; border: 1px solid #CDD3DE; border-radius: 10px;
  background: #fff; margin-bottom: 12px; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 24, 76, .14); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline-form input, .inline-form select { width: auto; margin: 0; padding: 7px 10px; }
.checks { display: flex; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
       border: 1px solid #CDD3DE; background: #fff; color: var(--text); font: inherit; font-weight: 600;
       cursor: pointer; text-align: center; text-decoration: none !important; transition: background .15s, box-shadow .15s; }
.btn:hover { background: #F5F6FA; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 4px 12px rgba(232, 24, 76, .3); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-warning { background: #F59E0B; border-color: #F59E0B; color: #1f1300; }
.btn-danger { background: #DC2626; border-color: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-small { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; padding: 12px; font-size: 1.02rem; margin-top: 8px; }

/* ===== Employee home: check-in widget ===== */
.clock-card { text-align: center; }
.hello { font-size: 1rem; color: var(--muted); }
.hello strong { color: var(--text); }
.date-bn { font-size: 1.05rem; font-weight: 700; margin-top: 2px; }
.date-en { font-size: .85rem; }
.clock { font-size: 2rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.worked { font-size: .9rem; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ----- Dashboard clock: 5 looks (drawn by clock.js) ----- */
.clockx { --ck-a: #E8184C; --ck-b: #F97316; display: flex; justify-content: center; align-items: center;
          min-height: 236px; margin: 12px auto 4px; font-variant-numeric: tabular-nums; }
.clockx[data-done="1"] { --ck-a: #16A34A; --ck-b: #4ade80; }
.ck-fallback { text-align: center; }
.clockx svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ck-track { fill: none; stroke: var(--line); stroke-width: 12; }
.ck-arc { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ck-track.thin, .ck-arc.thin { stroke-width: 5; }
.ck-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ck-time { font-size: 2.5rem; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -.02em; display: flex; align-items: baseline; }
.ck-time.small { font-size: 2.1rem; }
.ck-sec { font-size: 1.1rem; font-weight: 700; color: var(--muted); margin-left: 1px; }
.ck-ap { font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, var(--ck-a), var(--ck-b));
         border-radius: 999px; padding: 2px 7px; margin-left: 6px; align-self: center; }
.cx-worked { display: flex; flex-direction: column; align-items: center; margin-top: 6px; line-height: 1.25; }
.cx-worked-label { font-size: .74rem; color: var(--muted); }
.cx-worked-value { font-size: .98rem; color: var(--text); }

/* 1 ring */
.ck-ring { position: relative; width: 236px; height: 236px; }
.ck-ring-dot { fill: var(--card); stroke: var(--ck-b); stroke-width: 3.5; transition: opacity .3s; }
.ck-ring::before { content: ""; position: absolute; inset: 30px; border-radius: 50%;
                   background: radial-gradient(circle at 50% 35%, var(--card), var(--bg)); box-shadow: inset 0 2px 10px rgba(16, 24, 40, .06); }

/* 2 analog */
.ck-analog { display: flex; flex-direction: column; align-items: center; }
.ck-analog svg { width: 220px; height: 220px; }
.ck-face { fill: var(--card); stroke: var(--line); stroke-width: 1; filter: drop-shadow(0 6px 14px rgba(16, 24, 40, .10)); }
.ck-tick { stroke: var(--muted); stroke-width: 1; opacity: .55; }
.ck-tick.big { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; opacity: 1; }
.ck-num { fill: var(--text); font-size: 15px; font-weight: 800; font-family: inherit; }
.ck-analog-dig { fill: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; font-family: inherit; }
.ck-hand { stroke-linecap: round; }
.ck-hand.hour { stroke: var(--text); stroke-width: 6; }
.ck-hand.min { stroke: var(--text); stroke-width: 4; opacity: .85; }
.ck-hand.sec { stroke: var(--ck-a); stroke-width: 1.8; }
.ck-cap { fill: var(--ck-a); }
.ck-cap-in { fill: var(--card); }

/* 3 flip */
.ck-flip { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 320px; }
.ck-flip-row { display: flex; align-items: center; gap: 6px; }
.ck-card { position: relative; width: 52px; height: 74px; border-radius: 10px; perspective: 300px;
           background: linear-gradient(180deg, #2b3245 0%, #2b3245 50%, #1f2535 50%, #1f2535 100%);
           box-shadow: 0 6px 14px rgba(16, 24, 40, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
           display: flex; align-items: center; justify-content: center; }
.ck-card::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .45); }
.ck-card-v { font-size: 2.9rem; font-weight: 800; color: #fff; line-height: 1; }
.ck-card.go .ck-card-v { animation: ck-flip .45s ease; }
@keyframes ck-flip { 0% { transform: rotateX(90deg); opacity: .2; } 60% { transform: rotateX(-12deg); opacity: 1; } 100% { transform: none; } }
.ck-colon { font-size: 2.4rem; font-weight: 800; color: var(--ck-a); margin: 0 2px; animation: ck-blink 1s steps(1) infinite; }
@keyframes ck-blink { 50% { opacity: .25; } }
.ck-flip-side { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-left: 4px; }
.ck-flip-side .ck-ap { margin: 0; }
.ck-flip-sec { font-size: 1.2rem; font-weight: 800; color: var(--muted); }
.ck-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ck-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--ck-a), var(--ck-b)); transition: width .8s ease; }
.ck-flip .cx-worked { margin-top: 0; }

/* 4 neon */
.ck-neon { width: 100%; max-width: 330px; border-radius: 20px; padding: 22px 20px 16px; color: #e8ecf6;
           background: radial-gradient(120% 90% at 0% 0%, rgba(232, 24, 76, .28), transparent 60%),
                       radial-gradient(120% 90% at 100% 100%, rgba(249, 115, 22, .22), transparent 60%), #10131f;
           box-shadow: 0 10px 28px rgba(16, 19, 31, .35), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ck-neon.is-done { background: radial-gradient(120% 90% at 0% 0%, rgba(22, 163, 74, .30), transparent 60%),
                       radial-gradient(120% 90% at 100% 100%, rgba(74, 222, 128, .18), transparent 60%), #0e1a14; }
.ck-neon-time { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ck-neon-hm { font-size: 3.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em;
              background: linear-gradient(135deg, #fff 20%, var(--ck-b) 60%, var(--ck-a)); -webkit-background-clip: text; background-clip: text;
              color: transparent; filter: drop-shadow(0 0 14px rgba(232, 24, 76, .45)); }
.ck-neon.is-done .ck-neon-hm { filter: drop-shadow(0 0 14px rgba(22, 163, 74, .45)); }
.ck-neon-right { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ck-neon-ap { font-size: .7rem; font-weight: 800; letter-spacing: .1em; padding: 2px 8px; border-radius: 999px;
              border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.ck-neon-sec { font-size: 1.15rem; font-weight: 800; color: var(--ck-b); }
.ck-segs { display: flex; gap: 4px; margin: 16px 0 10px; }
.ck-segs i { --part: 0%; flex: 1; height: 7px; border-radius: 999px;
             background: linear-gradient(90deg, var(--ck-b) var(--part), rgba(255, 255, 255, .12) var(--part)); }
.ck-segs i.full { background: linear-gradient(90deg, var(--ck-a), var(--ck-b)); box-shadow: 0 0 8px rgba(249, 115, 22, .55); }
.ck-neon-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: .78rem; color: #aab1c5; }
.ck-neon-foot strong { font-size: .98rem; color: #fff; }

/* 5 orbit */
.ck-orbit { position: relative; width: 236px; height: 236px; }
.ck-dot { fill: var(--line); transition: fill .3s; }
.ck-dot.on { fill: var(--ck-a); opacity: .75; }
.ck-dot.now { fill: var(--ck-b); opacity: 1; filter: drop-shadow(0 0 4px var(--ck-b)); }
.ck-orbit .ck-track, .ck-orbit .ck-arc { stroke-width: 8; }
.ck-pct { font-size: .72rem; font-weight: 700; color: var(--ck-a); background: rgba(232, 24, 76, .1);
          border-radius: 999px; padding: 1px 8px; margin-top: 4px; }
.clockx[data-done="1"] .ck-pct { background: rgba(22, 163, 74, .12); }

/* the picker under the clock */
.ck-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.ck-opt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
          font: inherit; font-size: .76rem; font-weight: 600; border-radius: 999px; padding: 4px 10px 4px 6px; cursor: pointer; }
.ck-opt:hover { color: var(--text); border-color: var(--muted); }
.ck-opt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ck-swatch { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; box-sizing: border-box; }
.ck-sw-ring { border: 3px solid #E8184C; border-right-color: #F3D0DA; }
.ck-sw-analog { border: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) 5px 2px / 2px 5px no-repeat,
                linear-gradient(currentColor, currentColor) 5px 5px / 4px 2px no-repeat; }
.ck-sw-flip { border-radius: 3px; background: linear-gradient(180deg, #2b3245 50%, #1f2535 50%); }
.ck-sw-neon { border-radius: 4px; background: linear-gradient(135deg, #E8184C, #F97316); box-shadow: 0 0 6px rgba(249, 115, 22, .7); }
.ck-sw-orbit { border: 2px dotted #E8184C; background: radial-gradient(circle, #E8184C 2px, transparent 2.5px); }
.ck-opt.on .ck-sw-ring { border-color: #fff; border-right-color: rgba(255, 255, 255, .4); }
.ck-opt.on .ck-sw-orbit { border-color: #fff; background: radial-gradient(circle, #fff 2px, transparent 2.5px); }
@media (prefers-reduced-motion: reduce) { .ck-card.go .ck-card-v, .ck-colon { animation: none; } }
@media print { .ck-picker { display: none; } }
.shift-line { font-size: .82rem; color: var(--muted); }
.today-status { margin: 8px 0 2px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 6px; }
.actions form { margin: 0; }
.btn-big { width: 100%; min-height: 76px; border: 0; border-radius: 14px; color: #fff; font: inherit;
           font-size: 1.15rem; font-weight: 700; line-height: 1.2; cursor: pointer;
           display: flex; align-items: center; justify-content: center; gap: 10px;
           box-shadow: 0 6px 16px rgba(0, 0, 0, .14); transition: transform .05s, filter .15s; }
.btn-big .ic { width: 26px; height: 26px; }
.btn-big small { display: block; font-size: .8rem; font-weight: 400; opacity: .95; }
.btn-big:hover { filter: brightness(1.05); }
.btn-big:active { transform: scale(.98); }
.btn-in { background: linear-gradient(135deg, #22C55E, #15803D); }
.btn-out { background: linear-gradient(135deg, #FB923C, #EA580C); }
.btn-big:disabled { background: #C9CED8; box-shadow: none; cursor: not-allowed; }
.done-time { font-size: .82rem; font-weight: 600; opacity: .95; }
.today-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-top: 12px; }
.today-grid > div { background: var(--bg); border-radius: 10px; padding: 8px 4px; }
.today-grid span { display: block; }
.today-grid strong { font-size: 1.05rem; }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
             box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.stat-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.stat-ico .ic { width: 22px; height: 22px; }
.stat-tile strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.stat-tile span { font-size: .78rem; color: var(--muted); line-height: 1.25; display: block; }
.t-ok .stat-ico { background: var(--ok-bg); color: var(--ok); }
.t-warn .stat-ico { background: var(--warn-bg); color: var(--warn); }
.t-bad .stat-ico { background: var(--bad-bg); color: var(--bad); }
.t-info .stat-ico { background: var(--info-bg); color: var(--info); }
.t-brand .stat-ico { background: var(--brand-soft); color: var(--brand); }
.t-off .stat-ico { background: var(--off-bg); color: var(--off); }

/* Old 4-column mini stats (dashboard 30 days) */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 12px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 8px 4px; }
.stats strong { display: block; font-size: 1.25rem; }
.stats span { font-size: .76rem; color: var(--muted); line-height: 1.25; display: block; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat-card span { font-size: .8rem; color: var(--muted); }

/* Attendance timeline (week view, drawn as SVG bars) */
.timeline { width: 100%; }
.tl-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 74px; gap: 10px; align-items: center;
          padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-day { font-size: .82rem; line-height: 1.2; }
.tl-day strong { display: block; }
.tl-day.is-today strong { color: var(--brand); }
.tl-svg { width: 100%; height: 26px; display: block; }
.tl-track { fill: #F0F2F6; }
.tl-office { fill: #E3E7EF; }
.tl-bar-present, .tl-bar-weekend_work, .tl-bar-holiday_work { fill: #22C55E; }
.tl-bar-late { fill: #F59E0B; }
.tl-bar-open { fill: #60A5FA; }
.tl-label { font-size: 11px; fill: #fff; font-weight: 700; }
.tl-tag { font-size: 11px; fill: #6B7385; }
.tl-hours { font-size: .82rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.tl-scale { display: grid; grid-template-columns: 92px minmax(0, 1fr) 74px; gap: 10px; font-size: .7rem; color: var(--muted); }
.tl-scale-inner { display: flex; justify-content: space-between; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { background: #F7F8FB; font-size: .76rem; color: #5A6274; font-weight: 700; text-transform: none; }
.table tbody tr:hover { background: #FAFBFD; }
.table tfoot th { background: #F1F3F8; }
.table-compact th, .table-compact td { padding: 7px 8px; }
.table tr.inactive td { opacity: .55; }
.ua { font-size: .72rem; }
.kv div { white-space: nowrap; }

/* ===== Badges / pills ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem;
         font-weight: 600; margin: 1px 0; background: var(--off-bg); color: var(--off); white-space: nowrap; }
.badge-present, .badge-weekend_work, .badge-holiday_work { background: var(--ok-bg); color: var(--ok); }
.badge-late { background: var(--warn-bg); color: var(--warn); }
.badge-absent { background: var(--bad-bg); color: var(--bad); }
.badge-leave { background: var(--info-bg); color: var(--info); }
.badge-holiday { background: var(--brand-soft); color: var(--brand-dark); }
.badge-weekend, .badge-future, .badge-not_employed { background: var(--off-bg); color: var(--off); }
.badge-not_yet { background: #F3F4F6; color: #4B5563; }
.flag-early_leave { background: #FFEDD5; color: #9A3412; }
.flag-missing_checkout { background: var(--bad-bg); color: var(--bad); }
.flag-working { background: var(--info-bg); color: var(--info); }
.badge-admin { background: #F3E8FF; color: #6B21A8; }
.req-pending { background: var(--warn-bg); color: var(--warn); }
.req-approved { background: var(--ok-bg); color: var(--ok); }
.req-rejected { background: var(--bad-bg); color: var(--bad); }
.req-cancelled { background: var(--off-bg); color: var(--off); }

/* ===== Flash messages ===== */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
         font-weight: 600; border: 1px solid transparent; }
.flash .ic { margin-top: 2px; }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: #BBE5C8; }
.flash-warning { background: var(--warn-bg); color: var(--warn); border-color: #F6D9A8; }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: #F5C2C2; }
.flash-message, .flash-info { background: var(--info-bg); color: var(--info); }
.reminder { font-size: 1rem; align-items: center; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
          text-decoration: none !important; font-weight: 600; font-size: .9rem; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs.radios { border-bottom: 0; }
.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
details.card summary { cursor: pointer; padding: 4px 0; }
.danger-zone { border-color: #F5C2C2; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line);
              border-radius: 12px; color: var(--text); font-weight: 600; text-decoration: none !important; box-shadow: var(--shadow); }
.quick-link:hover { border-color: var(--brand); }
.quick-link .ic { width: 22px; height: 22px; }
.quick-link small { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }

/* ===== Login page (split screen) ===== */
.plain-layout .main { min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: 1.1fr 1fr; max-width: 980px; margin: 24px auto; background: #fff;
               border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(16, 24, 40, .12); border: 1px solid var(--line); }
.login-art { background: linear-gradient(150deg, #161824 0%, #262a40 60%, #3a1424 100%); color: #fff; padding: 36px 32px;
             display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.login-art img.logo-light { height: 46px; width: auto; align-self: flex-start; }
.login-art h2 { font-size: 1.6rem; line-height: 1.3; margin: 0; }
.login-art p { color: #c9cce0; margin: 0; }
.login-art svg.art { width: 100%; max-width: 360px; height: auto; align-self: center; }
.login-feats { display: grid; gap: 8px; font-size: .88rem; color: #dfe1ee; }
.login-feats span { display: flex; align-items: center; gap: 8px; }
.login-feats .ic { color: var(--brand); }
.login-form { padding: 36px 34px; }
.login-form h1 { margin-bottom: 4px; }
.login-form .sub { color: var(--muted); margin-bottom: 18px; }
.login-form .cf-turnstile { margin: 14px 0 4px; min-height: 65px; }  /* robot check (internet logins) */
.login-logo { display: block; margin: 4px auto 12px; height: 150px; width: auto; }

/* ===== Calendar ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-title { margin: 0; text-align: center; font-size: 1.05rem; }
.cal-wrap { overflow-x: auto; }
.cal { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; min-width: 560px; }
.cal th { font-size: .74rem; padding: 4px 2px; color: var(--muted); font-weight: 600; }
.cal-day { background: #FAFBFD; border: 1px solid var(--line); border-radius: 10px; vertical-align: top; height: 92px;
           padding: 6px; font-size: .76rem; }
.cal-day.other-month { opacity: .4; }
.cal-day.is-weekend { background: #F1F3F7; }
.cal-day.is-holiday { background: var(--brand-soft); border-color: #F7C3D1; }
.cal-day.is-today { border: 2px solid var(--brand); }
.cal-day.is-selected { background: #FFF6DB; border-color: #F2D27A; }
.cal-link { display: block; height: 100%; color: inherit; text-decoration: none !important; }
.cal-num { font-weight: 700; font-size: .92rem; }
.cal-num .muted { font-weight: 400; font-size: .68rem; }
.cal-tag { display: block; border-radius: 6px; padding: 1px 5px; margin-top: 3px; font-size: .7rem; line-height: 1.35;
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-holiday { background: var(--brand); color: #fff; }
.tag-weekend { background: #E1E5EC; color: #4B5363; }
.tag-leave { background: var(--info-bg); color: var(--info); }
.tag-pending { background: var(--warn-bg); color: var(--warn); border: 1px dashed #E8B65E; }
.tag-present, .tag-weekend_work, .tag-holiday_work { background: var(--ok-bg); color: var(--ok); }
.tag-late { background: var(--warn-bg); color: var(--warn); }
.tag-absent { background: var(--bad-bg); color: var(--bad); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr); gap: 18px; align-items: start; }

/* ===== Leave, requests, notices, notifications ===== */
.balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.balance-grid .stat-card { text-align: left; border-top: 4px solid var(--brand); }
.bal-name { display: block; font-weight: 700; font-size: .85rem; color: var(--text) !important; margin-bottom: 4px; }
.req-card { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.req-main { flex: 1 1 320px; }
.req-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 0 1 420px; }
.req-actions input { margin: 0; flex: 1 1 100%; }
/* Upcoming birthdays (dashboards) */
.bday-list { list-style: none; margin: 0; padding: 0; }
.bday-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.bday-list li:last-child { border-bottom: 0; }
.bday-list li.is-today { background: var(--brand-soft); border-radius: 10px; border-bottom-color: transparent; }
.bday-list .person-text { flex: 1; min-width: 0; }
.bday-list .person-text strong { white-space: normal; overflow-wrap: anywhere; }   /* long names wrap instead of running into the date */
.bday-when { text-align: right; font-size: .9rem; flex: 0 1 auto; max-width: 45%; }
.bday-today { background: var(--brand); color: #fff; }
.bday-years { background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.notice { border-left: 4px solid var(--line); padding: 6px 12px; margin-bottom: 10px; }
.notice.pinned { border-left-color: var(--brand); }
.notice.inactive { opacity: .55; }
.card.notice { border-left-width: 5px; }
.reply { background: #F6F8FB; border-radius: 10px; padding: 8px 12px; }
.notif { display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.notif.unread { font-weight: 700; background: #FFF7F9; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --side-w: 270px; }
  .with-sidebar .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.side-open .sidebar { transform: none; }
  body.side-open .side-overlay { display: block; position: fixed; inset: 0; background: rgba(10, 12, 20, .45); z-index: 35; }
  .menu-btn { display: inline-flex; }
  .cal-layout { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; margin: 12px; }
  .login-art { padding: 24px; }
  .login-art svg.art, .login-feats { display: none; }
}
@media (max-width: 600px) {
  .container { padding: 14px 12px 30px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .top-user-text, .top-title small { display: none; }
  .top-title { font-size: .92rem; }
  .ck-ring, .ck-orbit { width: 208px; height: 208px; }
  .ck-analog svg { width: 196px; height: 196px; }
  .ck-time { font-size: 2.1rem; }
  .ck-card { width: 44px; height: 64px; }
  .ck-card-v { font-size: 2.4rem; }
  .ck-neon-hm { font-size: 3rem; }
  .clock { font-size: 1.7rem; }
  .today-grid { grid-template-columns: repeat(2, 1fr); }
  .table { font-size: .84rem; }
  .tl-row, .tl-scale { grid-template-columns: 70px minmax(0, 1fr) 58px; gap: 6px; }
  .login-form { padding: 24px 20px; }
}

@media print {
  .sidebar, .topbar, .export-buttons, .report-form, .btn, .side-overlay { display: none !important; }
  .with-sidebar .main { margin-left: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* Timeline legend + section titles */
.tl-legend-ok { background: #22C55E; } .tl-legend-late { background: #F59E0B; }
.tl-legend-open { background: #60A5FA; } .tl-legend-office { background: #E3E7EF; }
.section-title { margin: 22px 0 10px; }
.login-page .topbar { display: none; }
.login-page .container { max-width: 1040px; padding-top: 40px; }
.tl-bar-missing { fill: #EF4444; }
.stat-tile strong { word-break: keep-all; }
.tl-hours .badge { white-space: normal; text-align: center; font-size: .68rem; line-height: 1.2; padding: 2px 6px; }
.tl-hours { min-width: 0; }
@media (max-width: 600px) { .tl-scale-inner span:nth-child(even) { display: none; } }
/* Small phones (≤480px): keep the top bar within the screen (language/theme/logout are in the menu
   below 900px; the bottom tab bar has the punch button). */
@media (max-width: 480px) {
  .topbar { gap: 6px; padding: 8px 10px; }
  .topbar .quick-punch { display: none; }
  .top-right { gap: 4px; }
  .top-user { padding: 0; }
}
.person-text strong { white-space: nowrap; }
.filter-bar { margin-bottom: 12px; color: var(--muted); }
.filter-bar select { min-width: 180px; }
.branch-rules { border-top: 1px solid var(--line); padding: 10px 0; }
.branch-rules summary { cursor: pointer; }

/* ===== KPI + home office ===== */
.badge-home_office { background: #E0F2FE; color: #075985; }
.flag-kpi_missing { background: #FEE2E2; color: #B91C1C; }
.tag-home_office, .tag-wfh { background: #E0F2FE; color: #075985; }
.pbar { width: 100%; height: 10px; display: block; }
.pbar-track { fill: #EEF0F5; }
.pbar-fill.low { fill: #F87171; } .pbar-fill.mid { fill: #F59E0B; } .pbar-fill.over { fill: #22C55E; }
.lv { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem; white-space: nowrap; }
.lv-A { background: linear-gradient(135deg, #F59E0B, #E8184C); color: #fff; }
.lv-B { background: #DBEAFE; color: #1D4ED8; }
.lv-C { background: #DCFCE7; color: #15803D; }
.lv-D { background: #EEF0F4; color: #4B5363; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-metric { background: var(--bg); border-radius: 12px; padding: 12px; }
.kpi-metric .num { font-size: 1.4rem; font-weight: 700; }
.kpi-metric .num small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.kpi-score { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.kpi-score .big { font-size: 2rem; font-weight: 700; line-height: 1; }
.rank { font-weight: 700; color: var(--muted); }
.qty-input { max-width: 120px; font-size: 1.2rem; text-align: center; }

/* ===== KPI monthly sheet (like the office Google Sheet) ===== */
.ksheet-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.ksheet { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 900px; background: #fff; }
.ksheet th, .ksheet td { border: 1px solid #E1E4EA; padding: 5px 8px; vertical-align: middle; }
.ksheet thead th { background: #F7F8FB; text-align: center; font-size: .76rem; }
.ksheet .ks-month th { background: #F97316; color: #fff; font-size: 1rem; padding: 8px; text-align: center; }
.ks-target { display: inline-block; margin-left: 14px; background: #FACC15; color: #111; border-radius: 6px; padding: 2px 10px; font-size: .85rem; }
.ks-date { white-space: nowrap; text-align: center; width: 92px; position: relative; }
.ks-project { min-width: 260px; }
.ks-others { min-width: 150px; text-align: center; }
.ks-num { text-align: center; font-weight: 700; width: 90px; }
.ks-label td { background: #E5E7EB; font-weight: 700; text-align: center; letter-spacing: .03em; color: #374151; }
.ks-label td.ks-date { font-weight: 400; }
.ks-future td { background: #FCFCFD; color: var(--muted); }
.ks-absent td { background: #FEF2F2; }
.ks-rejected td { background: #FEF2F2; text-decoration: line-through; text-decoration-color: #F87171; }
.ks-today td { background: #FFFBEB; }
.ks-edit { display: inline-flex; margin-left: 4px; color: var(--brand); vertical-align: middle; }
.ks-total { text-align: right; }
.ks-pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: .74rem;
           background: #F97316; color: #111; white-space: nowrap; text-transform: uppercase; }
.pill-orange { background: #F97316; color: #111; } .pill-red { background: #EF4444; color: #fff; }
.pill-blue { background: #3B82F6; color: #fff; } .pill-green { background: #22C55E; color: #052e16; }
.pill-purple { background: #A855F7; color: #fff; } .pill-teal { background: #14B8A6; color: #042f2e; }
.pill-pink { background: #EC4899; color: #fff; } .pill-gray { background: #9CA3AF; color: #111; }
.emp-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 0; }
.emp-tabs a { padding: 6px 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #F7F8FB;
              color: var(--text); text-decoration: none !important; font-size: .85rem; }
.emp-tabs a.active { background: #fff; font-weight: 700; color: var(--brand); border-color: var(--brand); }

/* Several channels per day */
.channel-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.channel-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 10px; border: 2px solid var(--line);
                border-radius: 12px; cursor: pointer; font-weight: 400; background: #fff; }
.channel-pick input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.channel-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ks-channels .ks-pill { display: block; width: fit-content; margin: 2px auto; }

/* Leave / home-office: separate dates picked one by one */
.date-choice .grid3 { margin-top: .5rem; }
.pick-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.pick-row input { max-width: 12rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.chip { border: 1px solid var(--brand); background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px;
        padding: .25rem .7rem; font: inherit; font-size: .9rem; cursor: pointer; }
.chip:hover { background: var(--card); }

/* Language picker (top bar + login page) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-form { display: inline-flex; align-items: center; gap: 4px; }
.lang-form .lang-label { display: inline-flex; color: var(--muted); margin: 0; }
.lang-form select { width: auto; min-width: 0; padding: 6px 8px; font-size: .85rem; border-radius: 8px; }
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 8px; }
@media (max-width: 600px) { .topbar .lang-form .lang-label { display: none; } .topbar .lang-form select { max-width: 92px; } }

/* Profile photos */
img.avatar { object-fit: cover; background: var(--off-bg); padding: 0; border: 0; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }
.photo-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.photo-actions .btn { font-size: .78rem; padding: 4px 8px; }
.photo-actions label.btn { margin: 0; cursor: pointer; }

/* ===== Office rules & policy ===== */
.rules-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px; justify-content: space-between;
  background: radial-gradient(circle at 85% 20%, rgba(232, 24, 76, .35), transparent 45%), linear-gradient(135deg, #161824 0%, #23263a 60%, #2d1424 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 32px; margin-bottom: 18px; }
.rules-hero h1 { color: #fff; margin: 6px 0 8px; font-size: 1.7rem; }
.rules-hero p { color: #c9cce0; max-width: 560px; margin: 0 0 14px; }
.rules-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; letter-spacing: .04em; color: #FDE8EE;
  background: rgba(232, 24, 76, .25); padding: 4px 10px; border-radius: 999px; }
.rules-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; color: #c9cce0; font-size: .9rem; }
.rules-stats strong { color: #fff; font-size: 1.4rem; margin-right: 4px; }
.rules-stats .muted-light { align-self: flex-end; color: #8f94b0; }
.rules-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.rules-art { width: 300px; max-width: 38%; flex-shrink: 0; }
.rules-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.rules-search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px 12px; max-width: 520px; }
.rules-search .ic { color: var(--muted); }
.rules-search input { border: 0; box-shadow: none; padding: 8px 0; background: transparent; }
.rules-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rule-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .85rem;
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.rule-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.rule-chip .ic { width: 16px; height: 16px; }
.rule-ico { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rule-ico .ic { width: 24px; height: 24px; }
.rule-ico.c0 { background: #FDE8EE; color: #E8184C; } .rule-chip.c0 .ic { color: #E8184C; }
.rule-ico.c1 { background: #E8F0FE; color: #1D4ED8; } .rule-chip.c1 .ic { color: #1D4ED8; }
.rule-ico.c2 { background: #E6F6EC; color: #15803D; } .rule-chip.c2 .ic { color: #15803D; }
.rule-ico.c3 { background: #FEF3E2; color: #B45309; } .rule-chip.c3 .ic { color: #B45309; }
.rule-ico.c4 { background: #F3E8FF; color: #7E22CE; } .rule-chip.c4 .ic { color: #7E22CE; }
.rule-ico.c5 { background: #E0F7F6; color: #0F766E; } .rule-chip.c5 .ic { color: #0F766E; }
.rule-en { display: block; color: var(--muted); font-size: .88em; margin-top: 2px; }
.grid2-inline { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.card-muted { opacity: .65; }
@media (max-width: 760px) {
  .rules-hero { flex-direction: column; align-items: flex-start; padding: 22px 18px; }
  .rules-art { max-width: 70%; align-self: center; }
}
@media print {
  .rules-tools, .rules-actions, .rules-art { display: none !important; }
  .rules-hero { background: none; color: #000; padding: 0; }
  .rules-hero h1, .rules-hero p, .rules-stats strong { color: #000; }
  .faq { break-inside: avoid; }
  .faq-toggle, .faq-more { display: none !important; }
}

/* Office rules FAQ (accordion) */
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.rule-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rule-chip.active .ic { color: #fff !important; }
.faq-topics { display: flex; flex-direction: column; gap: 18px; }
.faq-topic { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); scroll-margin-top: 80px; }
.faq-topic header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.faq-topic h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.faq-topic h2 .rule-en { display: block; font-weight: 400; }
.faq-count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--off-bg); color: var(--off);
  font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.faq { border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.faq summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 4px; cursor: pointer; border-radius: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--bg); }
.faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.faq-q-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand);
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.faq-q { flex: 1; font-weight: 600; line-height: 1.45; }
.faq-q .rule-en { font-weight: 400; }
.faq-toggle { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); position: relative; flex-shrink: 0; }
.faq-toggle::before, .faq-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px;
  background: var(--muted); transform: translate(-50%, -50%); transition: transform .2s ease; }
.faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq[open] .faq-toggle { border-color: var(--brand); background: var(--brand); }
.faq[open] .faq-toggle::before, .faq[open] .faq-toggle::after { background: #fff; }
.faq[open] .faq-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq[open] summary .faq-q { color: var(--brand-dark); }
.faq-a { display: flex; gap: 10px; margin: 0 4px 14px 44px; padding: 12px 14px; background: var(--ok-bg);
  border-left: 3px solid var(--ok); border-radius: 0 10px 10px 0; line-height: 1.6; }
.faq-a > .ic { color: var(--ok); flex-shrink: 0; margin-top: 3px; }
.faq-more { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 18px; background: var(--card);
  border: 1px dashed var(--line); border-radius: var(--radius); }
.faq-more > div { flex: 1; }
.faq-more p { margin: 2px 0 0; }
.grid2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.faq-edit { border-top: 1px solid var(--line); padding: 8px 0; scroll-margin-top: 80px; }
.faq-edit-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.edit-box > summary { cursor: pointer; color: var(--brand-dark); font-size: .85rem; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center; }
.edit-box[open] { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 4px 0; }
.add-box { margin-top: 8px; }
.edit-jump { margin-bottom: 14px; }
@media (max-width: 760px) {
  .faq-a { margin-left: 4px; }
  .grid2-even { grid-template-columns: 1fr; }
  .faq-more { flex-wrap: wrap; }
}
.top-avatar-link { display: inline-flex; border-radius: 50%; }
.top-avatar-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Multi-line reasons and request attachments */
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
textarea.reason-box { resize: vertical; min-height: 96px; max-height: 60vh; line-height: 1.5; }
.char-count { display: block; text-align: right; font-size: .75rem; color: var(--muted); margin: -8px 0 8px; }
.char-count.near { color: var(--warn); } .char-count.full { color: var(--bad); }
.file-input { padding: 8px; border: 1px dashed #CDD3DE; border-radius: 10px; background: #fafbfd; width: 100%; margin-bottom: 4px; }
.req-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.req-files a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--info-bg);
  color: var(--info); font-size: .8rem; text-decoration: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-files a:hover { text-decoration: underline; }

/* ===== Home office: calendars ===== */
.wfh-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 10px; color: var(--muted); }
.wfh-legend span { display: inline-flex; align-items: center; gap: 5px; }
.wfh-c { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: transparent; vertical-align: middle; }
.wfh-c.approved, .wfh-m.approved { background: #0EA5E9; color: #fff; }
.wfh-c.given, .wfh-m.given { background: #7C3AED; color: #fff; }
.wfh-c.standing, .wfh-m.standing { background: #BAE6FD; color: #075985; }
.wfh-c.pending, .wfh-m.pending { background: repeating-linear-gradient(45deg, #FDE68A 0 4px, #FEF3C7 4px 8px); color: #92400E; }
.wfh-c.off, .wfh-m.off { background: var(--off-bg); }
.wfh-cal { border-collapse: separate; border-spacing: 2px; font-size: .78rem; min-width: 100%; }
.wfh-cal th { font-weight: 600; color: var(--muted); text-align: center; padding: 2px; line-height: 1.1; }
.wfh-cal th span { font-size: .66rem; font-weight: 400; }
.wfh-cal td { text-align: center; padding: 1px; }
.wfh-cal td .wfh-c { width: 18px; height: 18px; }
.wfh-cal .wfh-name { text-align: left; min-width: 150px; padding-right: 8px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.wfh-cal .is-today { background: var(--brand-soft); border-radius: 4px; }
.wfh-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.wfh-two .card { margin-bottom: 16px; }
.wfh-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; margin-bottom: 8px; }
.wfh-month b { font-size: .72rem; color: var(--muted); font-weight: 600; }
.wfh-m { padding: 7px 0; border-radius: 8px; font-size: .85rem; font-weight: 600; background: var(--bg); }
.wfh-m.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
@media (max-width: 900px) { .wfh-two { grid-template-columns: 1fr; } }

/* leave calendar colours (same grid as home office) */
.wfh-c.lv-leave, .wfh-m.lv-leave { background: #16A34A; color: #fff; }
.wfh-c.lv-holiday, .wfh-m.lv-holiday { background: #FCE7F3; color: #9D174D; }

/* ===== 3D pictures (static/img/ui, pic() helper) + extra icon touches ===== */
.ic-sm { width: 15px; height: 15px; vertical-align: -2px; }
.pic { display: inline-block; flex: none; object-fit: contain; vertical-align: middle;
       filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .18)); }
.hello .wave { display: inline-block; color: #F59E0B; margin-right: 4px; transform-origin: 70% 80%; animation: wave 2.4s ease-in-out 1; }
.hello .desig { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--text); }
.hello .desig .ic { color: #F59E0B; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }
.ck-opt .ic { width: 14px; height: 14px; }
.btn-big .btn-pic { width: 50px; height: 50px; border-radius: 12px; background: rgba(255, 255, 255, .92); display: flex;
                    align-items: center; justify-content: center; flex: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.btn-big:disabled .btn-pic { filter: grayscale(1); opacity: .7; }
.see-all { display: inline-flex; align-items: center; gap: 2px; }
.notice-title { display: inline-flex; align-items: center; gap: 6px; }
.notice-ic { color: var(--brand); }
.quick-link .pic { width: 26px; height: 26px; }
/* label with a leading icon */
.lbl-ic { display: inline-flex; align-items: center; gap: 5px; }
/* .lbl-ic icons take their colour from the tone (see "Colourful icons") */
.btn .ic, .btn .pic { margin-right: 2px; }
.ic-red { color: #DC2626 !important; }
.ic-green { color: #16A34A !important; }
.ic-gold { color: #D97706 !important; }
.ic-muted { color: var(--muted) !important; }
.rank { white-space: nowrap; font-weight: 700; }
.rank-ic { width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }
.rank-ic.r1 { color: #EAB308; } .rank-ic.r2 { color: #94A3B8; } .rank-ic.r3 { color: #C2410C; }
.lv .ic, .badge .ic, .ks-pill .ic, .ks-target .ic { width: 13px; height: 13px; vertical-align: -2px; }
.ks-pill .ic { margin-right: 4px; }
.ksheet th .ic { color: inherit; opacity: .85; }
.empty-state { text-align: center; padding: 26px 16px; }
.empty-state .empty-ic { width: 56px; height: 56px; stroke-width: 1.4; color: var(--brand); opacity: .35; display: block; margin: 0 auto 8px; }
.empty-state p { margin: 0; }
.tabs a .ic, .tabs label .ic { vertical-align: -2px; }
.dropzone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 2px dashed var(--line); border-radius: 14px;
            padding: 14px 16px; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type=file] { flex: 1 1 220px; min-width: 0; font-size: .85rem; }
.phone-link { display: inline-flex; align-items: center; gap: 5px; color: #16A34A; font-weight: 600; white-space: nowrap; }
.phone-link .ic { width: 14px; height: 14px; }
.t-purple .stat-ico { background: #F3E8FF; color: #9333EA; }
.t-teal .stat-ico { background: #CCFBF1; color: #0D9488; }
.pw-head { display: flex; align-items: center; gap: 12px; }
.pw-field { position: relative; }
.pw-field input { padding-left: 38px; padding-right: 42px; width: 100%; }
.pw-field .pw-lock { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted);
          width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pw-eye:hover { color: var(--brand); background: var(--brand-soft); }
.pw-eye .eye-off, .pw-eye.showing .eye-on { display: none; }
.pw-eye.showing .eye-off { display: inline; }
.stat-ico .pic { width: 34px; height: 34px; }
h1 .pic, h2 .pic, h3 .pic { vertical-align: -6px; margin-right: 4px; }
.quick-punch .pic { width: 26px; height: 26px; }
#punch { scroll-margin-top: 90px; }

/* ===== Colourful icons — icon() adds tn-<tone> by meaning (ICON_TONES in app/__init__.py).
   Colour shows only where the icon sits directly in plain text (headings, table heads, labels,
   plain buttons...). Inside coloured buttons, badges, pills, stat boxes it keeps the text colour.
   :where() keeps it weaker than any older, more specific icon rule. ===== */
:root {
  --tn-green: #16A34A; --tn-orange: #EA580C; --tn-red: #DC2626; --tn-blue: #2563EB; --tn-indigo: #4F46E5;
  --tn-violet: #9333EA; --tn-amber: #D97706; --tn-teal: #0D9488; --tn-pink: #E8184C; --tn-slate: #64748B;
}
.tn-green { --tn: var(--tn-green); } .tn-orange { --tn: var(--tn-orange); } .tn-red { --tn: var(--tn-red); }
.tn-blue { --tn: var(--tn-blue); } .tn-indigo { --tn: var(--tn-indigo); } .tn-violet { --tn: var(--tn-violet); }
.tn-amber { --tn: var(--tn-amber); } .tn-teal { --tn: var(--tn-teal); } .tn-pink { --tn: var(--tn-pink); }
.tn-slate { --tn: var(--tn-slate); }
:where(h1, h2, h3, h4, th, label, legend, summary, p, li, td, dt, dd, span, strong, small, div, a:not(.btn), .lbl-ic,
       .btn:not(.btn-primary, .btn-dark, .btn-danger, .btn-warning, .btn-light, .btn-outline-light, .btn-big),
       .icon-btn, .quick-link, .see-all) > .ic {
  color: var(--tn, currentColor);
}
/* places that must keep their own text colour */
:where(.badge, .lv, .ks-pill, .ks-target, .tag, .pill, .flash, .side-link, .stat-ico, .nav-count, .bell-count,
       .rule-chip.active, .tabs a.active, .emp-tabs a.active, .ck-opt.on, .login-art, .rules-hero,
       .ksheet .ks-month, [class*="pill-"], [class*="req-"], [class*="badge-"], [class*="flag-"]) .ic {
  color: inherit;
}
/* heading icons sit in a soft tinted tile */
h1 > .ic[class*="tn-"], h2 > .ic[class*="tn-"] {
  box-sizing: content-box; padding: 6px; border-radius: 10px; margin-right: 6px;
  background: color-mix(in srgb, var(--tn, currentColor) 13%, transparent);
}
h1 > .ic[class*="tn-"] { width: 20px; height: 20px; vertical-align: -9px; }
h2 > .ic[class*="tn-"] { width: 16px; height: 16px; padding: 5px; border-radius: 8px; vertical-align: -7px; }
th > .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
/* white icon tile on the coloured hero banners (boards home, office rules) */
.bh-hero h1 > .ic[class*="tn-"], .rules-hero h1 > .ic[class*="tn-"] { color: #fff; background: rgba(255, 255, 255, .2); }

/* ===== Mobile app home (≤760px): pink header, round service icons, notice banners, bottom tab bar.
   Markup: templates/employee/_mobile_home.html and the tab bar in base.html; behaviour: js/mobile.js ===== */
.m-app, .m-tabbar { display: none; }
@media (max-width: 760px) {
  body.m-dash .container { padding-top: 0; }
  .m-app { display: block; --gut: 24px; margin: 0 calc(-1 * var(--gut)) 16px; }
  /* the pink header has the avatar, bell and menu button, so the home screen needs no top bar */
  body.m-dash .topbar { display: none; }
  body.m-dash .clock-card .hello, body.m-dash .quick-links, body.m-dash .notice-card { display: none; }
  .m-hero-actions { display: flex; gap: 8px; flex: none; }
  .m-hello { display: block; font-size: .82rem; opacity: .9; margin-bottom: 1px; }
  .m-hello small { display: none; }

  .m-hero { position: relative; overflow: hidden; color: #fff; padding: 18px var(--gut) 46px;
    background: linear-gradient(165deg, #E8184C 0%, #C10F3C 62%, #8E0A2E 100%); }
  .m-hero-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; pointer-events: none; }
  .m-hero-row { position: relative; display: flex; align-items: center; gap: 12px; }
  .m-hero-avatar .avatar { width: 54px; height: 54px; font-size: 1.2rem; border: 3px solid rgba(255, 255, 255, .85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
  .m-hero-who { flex: 1; min-width: 0; }
  .m-hero-who strong { display: block; font-size: 1.05rem; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-hero-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; cursor: pointer;
    border-radius: 50%; background: #fff; color: var(--brand); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); flex: none; }
  .m-hero-btn .ic { width: 22px; height: 22px; }

  /* "hours worked today" pill under the name (always shown, no tap needed) */
  .m-worked { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 36px; padding: 0 14px 0 3px;
    border-radius: 999px; background: #fff; color: var(--brand); font-weight: 700; font-size: .9rem; white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15); }
  .m-worked-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; flex: none;
    display: inline-flex; align-items: center; justify-content: center; }
  .m-worked-ico .ic { width: 16px; height: 16px; color: #fff; }
  .m-worked-label { color: #6B7385; font-weight: 600; }
  .m-worked-val { color: #111; overflow: hidden; text-overflow: ellipsis; }
  .m-live { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; flex: none; animation: m-live 1.6s ease-in-out infinite; }
  @keyframes m-live { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 50% { box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); } }
  .m-worked small, .m-svc-label small, .m-tabbar small, .m-more small { display: none; }

  /* white sheet with the service icons, overlapping the header */
  .m-services { position: relative; margin-top: -26px; background: var(--card); border-radius: 22px 22px 0 0; padding: 18px 10px 6px; }
  .m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 4px; }
  .m-svc { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none !important; color: var(--text); text-align: center; }
  .m-svc-ico { width: 58px; height: 58px; border-radius: 50%; background: var(--soft, #F3F4F7); display: flex; align-items: center; justify-content: center;
    transition: transform .15s; }
  .m-svc:active .m-svc-ico { transform: scale(.92); }
  .m-svc-ico img { width: 34px; height: 34px; object-fit: contain; }
  .m-svc-ico { position: relative; }
  .m-svc-ico .bell-count { top: -2px; right: -2px; }
  /* admin home: the pink header replaces the page title */
  body.m-dash .live-head h1 { display: none; }
  .m-svc-label { font-size: .78rem; line-height: 1.25; font-weight: 600; }
  .m-grid:not(.open) .m-extra { display: none; }
  .m-more { display: flex; align-items: center; gap: 4px; margin: 14px auto 6px; padding: 6px 16px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--card); color: var(--brand); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
  .m-more-ic { transform: rotate(90deg); transition: transform .2s; }
  .m-more[aria-expanded="true"] .m-more-ic { transform: rotate(-90deg); }
  .m-more .m-more-close, .m-more[aria-expanded="true"] .m-more-open { display: none; }
  .m-more[aria-expanded="true"] .m-more-close { display: inline; }

  /* swipeable notice banners */
  .m-banners { background: var(--card); padding: 6px var(--gut) 14px; }
  .m-slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .m-slides::-webkit-scrollbar { display: none; }
  .m-slide { flex: 0 0 100%; scroll-snap-align: center; min-height: 118px; border-radius: 16px; padding: 14px 16px; color: #fff;
    text-decoration: none !important; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
  .m-slide::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
  .m-slide-0 { background: linear-gradient(135deg, #111 0%, #3a0a18 55%, #E8184C 130%); }
  .m-slide-1 { background: linear-gradient(135deg, #E8184C 0%, #C10F3C 60%, #5c0620 100%); }
  .m-slide-2 { background: linear-gradient(135deg, #2a0712 0%, #111 50%, #C10F3C 140%); }
  .m-slide-tag { font-size: .72rem; font-weight: 700; opacity: .85; display: inline-flex; align-items: center; gap: 4px; }
  .m-slide-title { font-size: 1.05rem; line-height: 1.3; }
  .m-slide-body { font-size: .82rem; opacity: .85; line-height: 1.45; }
  .m-dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
  .m-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .25s, background .25s; }
  .m-dots i.on { width: 18px; background: var(--brand); }

  /* bottom tab bar (employees, every page except chat and boards) */
  body.has-tabbar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .m-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 34;
    background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(0, 0, 0, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .m-tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 600;
    color: var(--muted); text-decoration: none !important; padding: 4px 0; }
  .m-tabbar a .ic { width: 22px; height: 22px; }
  .m-tabbar a.on { color: var(--brand); }
  .m-tabbar .bell-count { top: -2px; right: calc(50% - 22px); }
  .m-tab-punch-ring { width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(232, 24, 76, .4); border: 3px solid var(--brand); }
  .m-tab-punch-ring .pic { width: 30px; height: 30px; }
  .m-tab-punch { color: var(--brand) !important; }
}
@media (max-width: 600px) { .m-app { --gut: 12px; } }

/* ===== Phone / tablet menu (≤900px): white drawer like a phone app, with language, theme and logout
   (the top bar drops those three). On phones (≤760px) it slides in from the right. ===== */
.side-tools, .side-logout { display: none; }
@media (max-width: 900px) {
  .topbar .theme-form, .topbar .lang-form, .topbar .top-right > form.inline { display: none; }
  .sidebar { background: var(--card); color: var(--text); }
  .side-brand { display: none; }
  .side-link { color: var(--text); }
  .side-link:hover { background: var(--soft, #F3F4F7); color: var(--text); }
  .side-link.active, .side-link.active:hover { background: var(--brand); color: #fff; }
  .side-group { color: var(--muted); }
  .side-foot { color: var(--muted); border-top-color: var(--line); }
  .side-ico { filter: none; }

  .side-tools { display: block; padding: 18px 16px 8px; border-bottom: 1px solid var(--line); }
  .side-tools-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
  .side-tools-title { font-size: 1.4rem; color: var(--brand); }
  .seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft, #F3F4F7); }
  .seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 9px; border: 0; border-radius: 8px;
    background: none; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
  .seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 1px 3px rgba(0, 0, 0, .12); }
  .seg-theme { display: flex; width: 100%; margin-bottom: 4px; }
  .seg-theme button { flex: 1; }
  .side-tools small, .seg small { display: none; }

  .side-logout { display: block; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
  .side-logout .side-link { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
  .side-ico-svg { display: inline-flex; align-items: center; justify-content: center; color: var(--brand); }
  .side-ico-svg .ic { width: 22px; height: 22px; }
}
@media (max-width: 760px) {
  .sidebar { inset: 0 0 0 auto; width: min(86vw, 320px); transform: translateX(100%); box-shadow: -10px 0 40px rgba(0, 0, 0, .25); }
  body.side-open .sidebar { transform: none; }
  .topbar .menu-btn { order: 99; }
}

/* Admin notices: hide / delete buttons side by side, edit form folded under each notice */
.notice-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.notice-edit { margin: 4px 0 8px; }
.notice-edit > summary { list-style: none; display: inline-flex; cursor: pointer; }
.notice-edit > summary::-webkit-details-marker { display: none; }
.notice-edit[open] > summary { margin-bottom: 8px; }
.notice-edit form { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }

/* ===== Admin pages of the public website (templates/admin/website*.html) ===== */
.site-hint { margin: 0 0 14px; }
.site-admin-tabs .nav-count { position: static; margin-left: 4px; }
.site-pic-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.site-pic-row .dropzone { flex: 1 1 260px; }
.site-pic-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.site-pic-thumb.sq { width: 48px; height: 48px; border-radius: 50%; }
.site-item-head .site-pic-thumb:not(.sq) { width: 72px; height: 48px; }
.site-pic-thumb.empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--soft, #F3F4F7); }
.site-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 6px 0 10px; }
.site-stat { display: grid; grid-template-columns: auto 1fr 54px; gap: 6px; align-items: center; }
.site-stat input[name$="_label"] { grid-column: 1 / -1; }
.site-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.site-item.inactive { opacity: .6; }
.site-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-item-head .grow { flex: 1 1 220px; min-width: 0; }
/* showreel clips (admin/website_reels.html, js/site-reels.js) */
.reel-thumb { width: 160px; height: 90px; border-radius: 10px; background: #000; object-fit: contain; flex: none; }
.reel-progress { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; font-size: .85rem; }
.reel-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.reel-bar b { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.reel-progress.error { color: var(--danger, #DC2626); }
@media (max-width: 560px) { .reel-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; } }
/* Gearify Zone products (admin/website_gear.html) */
.gear-link a { word-break: break-all; }
.gear-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; }
.gear-filter input[name=q] { flex: 1 1 220px; width: auto; margin: 0; }
.gear-filter select { width: auto; margin: 0; }
.gear-filter .check { margin: 0; }
.gear-quick-link { display: flex; gap: 6px; align-items: center; margin: 8px 0 6px; }
.gear-quick-link input { flex: 1; margin: 0; min-width: 0; font-size: .85rem; }
.gear-quick-link.empty input { border-color: var(--warn, #D97706); }
.gear-pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.gear-cat-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gear-cat-row:last-child { border-bottom: 0; }
.gear-cat-row input[name=name] { flex: 1 1 200px; width: auto; margin: 0; }
.gear-cat-row .gear-cat-sort { width: 80px; margin: 0; }
.gear-cat-row.inactive { opacity: .6; }
.site-item details { margin-top: 8px; }
.site-item details > form { margin-top: 10px; }
.site-item-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.icon-pick label { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; margin: 0; position: relative; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.icon-pick .ic { color: inherit !important; }
.site-emp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 10px; margin-bottom: 12px; }
.site-emp span small { display: block; color: var(--muted); font-size: .78rem; }
.badge.app-new { background: var(--info-bg); color: var(--info); }
.badge.app-shortlisted, .badge.app-interview { background: var(--warn-bg); color: var(--warn); }
.badge.app-hired { background: var(--ok-bg); color: var(--ok); }
.badge.app-rejected { background: var(--bad-bg); color: var(--bad); }
.table tr.row-new td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.site-msg-new { border-left-color: var(--brand); }
.site-tr { display: grid; gap: 8px; margin-bottom: 8px; }
.site-tr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); }
.site-tr-row.missing { border-left: 3px solid var(--warn, #D97706); }
.site-tr-en { font-size: .86rem; color: var(--muted); white-space: pre-line; padding-top: 6px; }
.site-tr-row textarea { margin: 0; min-height: 38px; }
@media (max-width: 700px) { .site-tr-row { grid-template-columns: 1fr; } }
