/* ==========================================================================
   timeforge — Timeforge
   Professional green design system
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --bg: #F3F7F4;
  --bg-accent: #E7F2EB;
  --surface: #ffffff;
  --ink: #0F291C;
  --ink-soft: #2A4A3A;
  --muted: #5F7A6A;
  --line: #D5E5DB;
  --accent: #0B7A4B;
  --accent-2: #09663F;
  --accent-soft: rgba(11, 122, 75, 0.14);
  --accent-tint: rgba(11, 122, 75, 0.08);
  --productive: #0B7A4B;
  --unproductive: #C0392B;
  --idle: #8FA89A;
  --neutral: #5F7A6A;
  --online: #0B7A4B;
  --warn: #B45309;
  --amber: #D97706;
  --daily: #0B7A4B;
  --presence: #1A9B63;
  --sidebar-bg: #073B28;
  --sidebar-text: #C8E0D3;
  --radius: 10px;
  --font-ui: "DM Sans", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
  --shadow: 0 1px 2px rgba(15, 41, 28, 0.04), 0 2px 10px rgba(15, 41, 28, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 41, 28, 0.08);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(11, 122, 75, 0.08), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(26, 155, 99, 0.06), transparent 50%),
    var(--bg);
}
body.app-shell { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

@keyframes content-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-24px, -18px); }
}

/* ==========================================================================
   App shell & dark DeskTime sidebar
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 12px 14px; background: var(--sidebar-bg); color: var(--sidebar-text);
  border-right: 0; overflow-y: auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.03em; color: var(--ink);
}
.sidebar .brand { padding: 6px 8px 14px; gap: 10px; color: #fff; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
  background: #fff; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-ui); font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.sidebar .brand-mark { width: 30px; height: 30px; }
.brand-text { display: grid; gap: 1px; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -0.02em; color: #fff; }
.brand-text small {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8FBFA6;
}
.sidenav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-group {
  margin: 16px 10px 6px; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: #6B7585;
}
.nav-group:first-child { margin-top: 2px; }
.sidenav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 6px; color: var(--sidebar-text); font-weight: 550; font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}
.sidenav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidenav a.is-active {
  background: rgba(255, 255, 255, 0.1); color: #fff;
  border-left-color: var(--accent);
}
.nav-ico {
  width: 1.05rem; height: 1.05rem; flex-shrink: 0; opacity: 0.85;
  stroke-linecap: round; stroke-linejoin: round;
}
.sidenav a.is-active .nav-ico { opacity: 1; }
.nav-pill {
  margin-left: auto; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px;
  border-radius: 999px; background: rgba(255,255,255,0.1); color: #D0D7E0;
}
.nav-pill.live {
  background: rgba(245, 158, 11, 0.25); color: #FCD34D;
  animation: pulse-soft 1.6s ease-in-out infinite;
}
.nav-pill.danger { background: rgba(217, 83, 79, 0.3); color: #FECACA; }
.sidebar-foot {
  margin-top: auto; display: grid; gap: 8px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.who, .sidebar-foot .who {
  display: flex; align-items: center; gap: 10px; padding: 4px 6px; font-size: 0.88rem;
}
.who-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-ui); font-weight: 750;
}
.who-meta { display: grid; gap: 3px; min-width: 0; }
.sidebar-foot .who strong {
  color: #fff; font-size: 0.9rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.role {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--muted);
  width: fit-content;
}
.role.admin, .sidebar .role.admin { background: var(--accent-soft); color: var(--accent); }
.sidebar .role { background: rgba(255,255,255,0.08); color: #A8B2C0; }
.priv-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #6B7585; margin-right: 8px;
}
.private-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
}
.private-btn.is-on {
  background: rgba(245, 158, 11, 0.2) !important; color: #FCD34D !important;
  border-color: rgba(245, 158, 11, 0.45) !important; font-weight: 800;
}
.private-btn.is-on .priv-dot {
  background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
}
.sidebar .btn.ghost {
  border: 1px solid rgba(255,255,255,0.12); color: var(--sidebar-text); background: transparent;
  border-radius: 8px; height: 38px;
}
.sidebar .btn.ghost:hover { background: rgba(255,255,255,0.06); color: #fff; }

.content {
  min-width: 0; max-width: 100%; overflow-x: clip;
  background: var(--bg); animation: content-in 0.28s ease both;
}
.content-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px 0; max-width: none; margin: 0; width: 100%;
  min-height: 52px; box-sizing: border-box;
}
.content-top-left { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.content-top-left .crumb, .crumb {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
}
.content-top-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.top-who {
  display: flex; align-items: center; gap: 10px; text-align: right;
}
.top-who-meta { display: grid; gap: 1px; }
.top-who-meta strong {
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 700; color: var(--ink);
}
.top-who-meta small { font-size: 0.72rem; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.03em;
  text-transform: uppercase; background: #E8ECF0; color: var(--ink-soft);
}
.pill.live { background: #ECFDF5; color: #047857; }
.pill.live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #10B981; animation: pulse-soft 1.4s ease-in-out infinite;
}
.pill.private { background: #FEF3C7; color: #92400E; }
.pill.warn { background: #FFF7ED; color: #C2410C; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; min-width: 0; }
.app-shell .wrap {
  max-width: none; width: 100%; min-width: 0;
  padding: 8px 20px 40px; box-sizing: border-box; overflow-x: clip;
}
.app-shell .flashes {
  max-width: none; width: 100%; margin-left: 0; margin-right: 0;
  padding: 0 20px; box-sizing: border-box;
}
.app-shell .content-top {
  max-width: none; width: 100%;
  padding-left: 20px; padding-right: 20px;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; max-height: none; overflow: visible; }
  .sidenav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .nav-group { grid-column: 1 / -1; margin-top: 8px; }
  .sidebar-foot { width: 100%; margin-top: 8px; }
}

/* Legacy topbar compatibility */
.topbar {
  display: flex; align-items: center; gap: 20px; padding: 12px 28px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--line);
}
.mainnav { display: flex; gap: 6px; margin-left: 8px; }
.mainnav a {
  color: var(--muted); font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.mainnav a:hover, .mainnav a.is-active {
  color: var(--accent); background: var(--accent-soft);
}
.userbox { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.whoami {
  color: var(--ink-soft); font-size: 0.9rem;
  display: flex; align-items: center; gap: 8px;
}

/* ==========================================================================
   Page heads, filters, buttons
   ========================================================================== */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-kicker {
  margin: 0 0 4px; font-size: 0.74rem; font-weight: 750;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}
.page-head h1 {
  margin: 0; font-family: var(--font-ui);
  font-size: clamp(1.55rem, 2.5vw, 2rem); font-weight: 780;
  letter-spacing: -0.035em; display: flex; align-items: baseline;
  gap: 10px; flex-wrap: wrap;
}
.page-sub { margin: 6px 0 0; color: var(--muted); max-width: 40rem; }
.page-sub strong { color: var(--ink-soft); font-weight: 650; }
.back { color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.back:hover { color: var(--accent); }
.muted { color: var(--muted); font-weight: 500; }

.daynav {
  display: flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 5px; box-shadow: var(--shadow);
}
.dayform { margin: 0; }
.daynav input[type="date"] {
  background: transparent; color: var(--ink); border: 0; padding: 8px 10px; font-weight: 600;
}
.daynav .filters, .filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.daynav select {
  background: transparent; border: 0; font-weight: 600; color: var(--ink); padding: 6px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 14px; border-radius: 10px;
  background: transparent; color: var(--ink-soft); border: 0; cursor: pointer;
  font-weight: 650;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: rgba(26, 35, 50, 0.06); color: var(--ink); }
.btn.ghost { border: 1px solid var(--line); background: var(--surface); }
.btn.primary {
  background: var(--accent); color: #fff; width: 100%; height: 46px;
  border-radius: var(--radius); box-shadow: 0 6px 16px rgba(31, 157, 108, 0.28);
}
.btn.primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn.primary.inline { width: auto; padding: 0 18px; display: inline-flex; }
.btn.block { width: 100%; }
.btn.tiny {
  min-width: 0; height: 30px; padding: 0 10px; font-size: 0.78rem;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
.btn.tiny.export {
  white-space: nowrap; background: #ECFDF5; color: var(--accent);
  border-color: rgba(31, 157, 108, 0.25);
}
.btn.tiny.is-allowed {
  background: #ECFDF5; color: #047857; border-color: rgba(5, 150, 105, 0.25);
}
.warn-btn {
  background: #E11D48 !important;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28) !important;
}

/* ==========================================================================
   Metrics & rings
   ========================================================================== */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
}
.metrics-wide { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.metrics-hero { margin-bottom: 4px; }
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 15px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  gap: 6px; min-height: 100px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.metric:hover {
  transform: translateY(-2px); border-color: rgba(31, 157, 108, 0.3); box-shadow: var(--shadow-md);
}
.metric.featured {
  flex-direction: row; align-items: center; gap: 14px; grid-column: span 2;
  min-height: 112px; background: linear-gradient(135deg, #fff 0%, #F0FBF6 100%);
}
.metric.accent-border { border-color: rgba(5, 150, 105, 0.28); }
.metric.warn-metric .metric-value { color: var(--warn); }
.metric-copy { display: grid; gap: 4px; }
.metric-label {
  color: var(--muted); font-size: 0.73rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.metric-value {
  font-family: var(--font-ui); font-size: 1.5rem; font-weight: 780;
  letter-spacing: -0.03em; color: var(--ink);
}
.metric-value.sm { font-size: 1.1rem; }
.metric-hint { color: var(--muted); font-size: 0.72rem; }
.metric.score { grid-column: span 1; align-items: center; text-align: center; }
.metric.score.featured { text-align: left; justify-content: flex-start; }
.live-dot::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--online); margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18); vertical-align: middle;
}
.ring {
  --pct: 0; --ring: var(--accent-2); width: 78px; height: 78px; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), rgba(26, 35, 50, 0.08) 0);
  display: grid; place-items: center; position: relative; margin-bottom: 2px; flex-shrink: 0;
}
.ring::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface);
}
.ring-val {
  position: relative; font-family: var(--font-ui); font-weight: 800; font-size: 0.98rem;
}
.ring.lg {
  --ring: var(--accent-2); width: 88px; height: 88px;
  background: conic-gradient(#18B579 calc(var(--pct) * 1%), rgba(26, 35, 50, 0.08) 0);
  flex-shrink: 0;
}
.ring.lg::before { inset: 9px; }
.ring.lg .ring-val { font-size: 1.05rem; }

/* ==========================================================================
   Panels, tables, employees
   ========================================================================== */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 20px; margin-top: 16px; box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.panel h2 {
  margin: 0; font-family: var(--font-ui); font-size: 1rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
}
.two-col {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 16px; margin-top: 16px; min-width: 0; max-width: 100%;
}
.two-col .panel { margin-top: 0; min-width: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.grid-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 760px; }
table.grid th, table.grid td {
  text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.grid th {
  color: var(--muted); font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
table.grid tbody tr { cursor: pointer; transition: background 0.15s ease; }
table.grid tbody tr:hover { background: var(--accent-tint); }
table.grid tbody tr.no-click { cursor: default; }
table.grid tbody tr.no-click:hover { background: transparent; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.emp { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--font-ui); font-weight: 700;
}
.avatar.warn { background: #E11D48; }
.avatar.accent { background: var(--accent-2); }
.avatar.online-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--online); }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 0.75rem; }
.emp strong { display: block; font-weight: 700; }
.emp .muted { display: block; font-size: 0.78rem; }

.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem;
  font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.status.online { background: rgba(5, 150, 105, 0.12); color: var(--online); }
.status.offline { background: rgba(100, 116, 139, 0.12); color: var(--muted); }
.status.late { background: rgba(180, 83, 9, 0.12); color: var(--warn); }

.minibar {
  display: inline-block; width: 120px; height: 14px; border-radius: 8px;
  background: rgba(26, 35, 50, 0.08); overflow: hidden; vertical-align: middle; margin-right: 8px;
  box-shadow: inset 0 1px 2px rgba(15, 41, 28, 0.06);
}
.minibar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.minibar-fill.productive { background: linear-gradient(90deg, #1A9B63, var(--productive)); }
.minibar-fill.unproductive { background: linear-gradient(90deg, #E74C3C, var(--unproductive)); }
.minibar-fill.neutral { background: linear-gradient(90deg, #A8B4C0, var(--neutral)); }

/* ==========================================================================
   Gallery, empties, flashes
   ========================================================================== */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 12px;
}
.shot {
  position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: #0B1220; display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.shot:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shot img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.shot-meta {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between;
  gap: 6px; padding: 8px 9px; font-size: 0.72rem; font-weight: 600; color: #E8EEF6;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.shot-app { max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot.is-unproductive { outline: 2px solid rgba(225, 29, 72, 0.55); }
.shot-flag {
  position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 0.65rem;
  font-weight: 800; text-transform: uppercase; background: #E11D48; color: #fff;
  padding: 3px 7px; border-radius: 6px;
}
.shot-flag.blur { left: auto; right: 8px; background: #475569; }

.empty { color: var(--muted); margin: 8px 0 0; }
.empty code {
  background: rgba(26, 35, 50, 0.06); padding: 2px 6px; border-radius: 5px; font-size: 0.86em;
}
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-family: var(--font-ui); }
.empty-state.compact { padding: 12px; text-align: left; }
.empty-state a { color: var(--accent); font-weight: 650; }

.flashes { max-width: 1120px; margin: 14px auto 0; padding: 0 22px; }
.flash {
  padding: 11px 14px; border-radius: 10px; margin-bottom: 8px;
  font-size: 0.92rem; font-weight: 550;
}
.flash.error {
  background: rgba(225, 29, 72, 0.1); color: #9F1239;
  border: 1px solid rgba(225, 29, 72, 0.18);
}
.flash.info {
  background: var(--accent-soft); color: #147A54;
  border: 1px solid rgba(31, 157, 108, 0.22);
}

/* ==========================================================================
   Login — green hero + light form
   ========================================================================== */
.auth-shell { background: var(--bg); }
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr;
}
.login-hero {
  position: relative; padding: clamp(36px, 6vw, 72px);
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  overflow: hidden; color: #F3FFFB;
  background:
    linear-gradient(155deg, #0B7A4B 0%, #09663F 48%, #073B28 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1' d='M0 60h120M60 0v120'/%3E%3C/svg%3E");
}
.login-hero::after {
  content: ""; position: absolute; width: 420px; height: 420px;
  right: -120px; bottom: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none; animation: drift 12s ease-in-out infinite alternate;
}
.login-hero-inner {
  position: relative; z-index: 1; display: grid; gap: 20px; max-width: 480px;
}
.login-hero-brand {
  font-family: var(--font-ui); font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800; letter-spacing: -0.04em;
  display: inline-flex; align-items: center; gap: 14px; color: #fff;
}
.login-logo {
  height: 48px; width: auto; max-width: min(280px, 70vw);
  object-fit: contain; filter: brightness(0) invert(1);
}
.login-product {
  margin: 0; font-family: var(--font-ui); font-weight: 800;
  font-size: 1.1rem; letter-spacing: 0.14em; text-transform: lowercase;
  color: #A7E6C5;
}
.login-mark {
  width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.login-hero-brand .brand-mark {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.2);
  font-size: 1.25rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.login-hero h1 {
  margin: 0; font-family: var(--font-ui);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 650; line-height: 1.25;
  letter-spacing: -0.02em; max-width: 22ch; color: rgba(243, 255, 251, 0.95);
}
.login-hero p, .login-hero-copy {
  margin: 0; max-width: 34ch; color: rgba(243, 255, 251, 0.78); font-size: 1.02rem;
}
.login-hero-points {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
}
.login-hero-points li {
  display: flex; align-items: center; gap: 10px;
  color: rgba(243, 255, 251, 0.86); font-weight: 550; font-size: 0.95rem;
}
.login-hero-points li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6EE7B7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.2); flex-shrink: 0;
}
.login-hero-foot { color: rgba(243, 255, 251, 0.7); font-size: 0.88rem; }
.login-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-top: 8px;
}
.login-metric {
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius); padding: 14px 12px; display: grid; gap: 4px;
}
.login-metric strong {
  font-family: var(--font-ui); font-size: 1.45rem; font-weight: 800;
  letter-spacing: -0.03em; color: #fff;
}
.login-metric span {
  font-size: 0.72rem; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.05em; color: rgba(243, 255, 251, 0.7);
}
.login-panel {
  display: grid; place-items: center; padding: 36px 24px; background: var(--bg);
}
.login-card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 28px; box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}
.login-kicker {
  margin: 0 0 8px; font-size: 0.72rem; font-weight: 750;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.login-card h2 {
  margin: 0; font-family: var(--font-ui); font-size: 1.45rem; letter-spacing: -0.03em;
}
.login-sub { margin: 6px 0 22px; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.82rem; font-weight: 650; color: var(--ink-soft);
}
.login-form input {
  background: #F8FAFB; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; color: var(--ink);
}
.login-form input:focus {
  outline: none; border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(31, 157, 108, 0.18);
}
.login-foot {
  margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 0.82rem;
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { min-height: 38vh; padding: 32px 24px; }
}

/* ==========================================================================
   Public front page
   ========================================================================== */
.public-home {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  display: grid;
  gap: 28px;
}
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}
.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.public-brand-text {
  display: grid;
  gap: 2px;
  line-height: 1.15;
}
.public-brand-text strong {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}
.public-brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.public-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 122, 75, 0.09);
  border: 1px solid rgba(11, 122, 75, 0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.public-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: center;
  min-height: 72vh;
}
.public-hero-copy {
  display: grid;
  gap: 16px;
  animation: content-in 0.45s ease both;
}
.public-hero-copy h1 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(2.1rem, 4.8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  max-width: 12ch;
}
.public-sub {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}
.public-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.public-proof span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.public-proof strong { color: var(--accent); }
.public-hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
}
.public-hero-mini-stats div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
}
.public-hero-mini-stats strong {
  font-family: var(--font-ui);
  font-size: 1rem;
}
.public-hero-mini-stats span {
  color: var(--muted);
  font-size: 0.8rem;
}
.public-hero-visual {
  position: relative;
  display: grid;
  gap: 18px;
  animation: rise 0.55s ease both;
}
.hero-card {
  background: linear-gradient(180deg, #fff, #F7FBF8);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}
.hero-main {
  padding: 18px;
  display: grid;
  gap: 14px;
  transform: translateY(0);
}
.hero-float {
  position: absolute;
  z-index: 3;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 2px;
  animation: float-soft 4.8s ease-in-out infinite;
}
.hero-float strong {
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
.hero-float span {
  color: var(--muted);
  font-size: 0.76rem;
}
.hero-float-a {
  top: -10px;
  right: -12px;
}
.hero-float-b {
  left: -18px;
  bottom: 96px;
  animation-delay: 1s;
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-chip.success {
  background: #ECFDF5;
  color: #047857;
}
.hero-main h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.2rem;
}
.hero-rings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mini-ring {
  --ring-bg: conic-gradient(var(--productive) calc(var(--pct) * 1%), #E5EDE7 0);
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ring-bg);
  position: relative;
}
.mini-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
}
.mini-ring.alt { --ring-bg: conic-gradient(var(--accent-2) calc(var(--pct) * 1%), #E5EDE7 0); }
.mini-ring span,
.mini-ring small {
  position: relative;
  z-index: 1;
}
.mini-ring span {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 800;
}
.mini-ring small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.hero-bar {
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15,41,28,0.08);
}
.hero-bar i { display: block; }
.hero-bar .productive { background: var(--productive); }
.hero-bar .neutral { background: #94A3B8; }
.hero-bar .unproductive { background: var(--unproductive); }
.hero-bar .idle { background: #CBD5E1; }
.hero-bar-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.hero-slider {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11,122,75,0.08), rgba(255,255,255,0.65));
  box-shadow: var(--shadow);
}
.hero-slide-track {
  display: flex;
  width: 400%;
  animation: hero-slide 16s ease-in-out infinite;
}
.hero-slide {
  width: 100%;
  padding: 20px 22px;
  display: grid;
  gap: 8px;
}
.hero-slide strong {
  font-family: var(--font-ui);
  font-size: 1rem;
}
.hero-slide p {
  margin: 0;
  color: var(--ink-soft);
}
@keyframes hero-slide {
  0%, 20% { transform: translateX(0%); }
  25%, 45% { transform: translateX(-25%); }
  50%, 70% { transform: translateX(-50%); }
  75%, 95% { transform: translateX(-75%); }
  100% { transform: translateX(0%); }
}
.public-trust-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.public-trust-strip span {
  text-align: center;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.public-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.public-metric-card,
.feature-panel,
.public-cta {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.public-metric-card {
  padding: 18px;
  display: grid;
  gap: 8px;
}
.public-metric-card strong {
  font-family: var(--font-ui);
  font-size: 1rem;
}
.public-metric-card span { color: var(--muted); }
.public-showcase {
  display: grid;
  grid-template-columns: 1.1fr 0.45fr 0.45fr;
  gap: 18px;
}
.showcase-panel {
  padding: 24px;
  display: grid;
  gap: 14px;
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.showcase-panel.big {
  background: linear-gradient(180deg, #fff, #F8FCF9);
}
.showcase-copy h2,
.showcase-panel h3 {
  margin: 0;
  font-family: var(--font-ui);
  letter-spacing: -0.03em;
}
.showcase-copy p,
.showcase-panel p {
  margin: 0;
  color: var(--ink-soft);
}
.showcase-board {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.showcase-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.showcase-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.showcase-pill.success {
  background: #ECFDF5;
  color: #047857;
}
.showcase-table {
  display: grid;
  gap: 10px;
}
.showcase-table div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}
.showcase-table span,
.showcase-table b {
  font-size: 0.84rem;
}
.showcase-table span { font-weight: 700; color: var(--ink-soft); }
.showcase-table b { text-align: right; font-family: var(--font-ui); }
.showcase-table .bar {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--productive), #1A9B63);
}
.showcase-table .bar.ok {
  background: linear-gradient(90deg, #64748B, #94A3B8);
}
.showcase-table .bar.warn {
  background: linear-gradient(90deg, var(--unproductive), #E74C3C);
}
.public-features {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}
.feature-panel {
  padding: 26px;
  display: grid;
  gap: 14px;
}
.feature-panel h2,
.public-cta h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  letter-spacing: -0.04em;
}
.feature-panel p,
.public-cta p { margin: 0; color: var(--ink-soft); }
.feature-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 10px;
  color: var(--ink-soft);
}
.feature-list.compact { gap: 8px; font-size: 0.92rem; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 4px;
}
.feature-grid strong {
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.feature-grid span { color: var(--muted); font-size: 0.9rem; }
.feature-panel.soft {
  background: linear-gradient(180deg, #F0FBF6, #fff);
}
.public-cta {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.public-cta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.public-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.step-card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(240,251,246,0.92));
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.step-n {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 800;
}
.step-card strong {
  font-family: var(--font-ui);
  font-size: 1rem;
}
.step-card p {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .public-hero,
  .public-features,
  .public-showcase { grid-template-columns: 1fr; }
  .public-metrics,
  .public-steps,
  .public-trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .public-home { padding: 18px 16px 48px; }
  .public-nav,
  .public-cta { flex-direction: column; align-items: flex-start; }
  .public-nav-actions,
  .public-hero-actions { width: 100%; }
  .public-nav-actions .btn,
  .public-hero-actions .btn,
  .public-cta .btn { flex: 1 1 auto; justify-content: center; }
  .public-metrics,
  .public-steps,
  .public-trust-strip,
  .feature-grid,
  .hero-rings,
  .public-hero-mini-stats { grid-template-columns: 1fr; }
  .hero-bar-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-float { display: none; }
}

/* ==========================================================================
   Productivity, tags, rankings, apps
   ========================================================================== */
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li a {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
}
.rank-list li a:hover { background: var(--accent-tint); }
.rank-meta { display: grid; gap: 2px; }
.rank-n {
  width: 22px; text-align: center; font-family: var(--font-ui);
  font-weight: 800; color: var(--accent); font-size: 0.85rem;
}
.rank-pct {
  margin-left: auto; font-family: var(--font-ui); font-weight: 780; color: var(--productive);
}
.rank-pct.warn { color: var(--unproductive); }
.rank-pct.accent { color: var(--accent); }

table.apps { width: 100%; border-collapse: collapse; }
table.apps th, table.apps td {
  text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line);
}
table.apps th {
  color: var(--muted); font-weight: 700; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.app-name { font-weight: 650; }
.pct-num { font-variant-numeric: tabular-nums; font-weight: 650; }

.tag { padding: 3px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; }
.tag.productive { background: rgba(31, 157, 108, 0.12); color: var(--productive); }
.tag.neutral { background: rgba(100, 116, 139, 0.14); color: var(--neutral); }
.tag.unproductive { background: rgba(225, 29, 72, 0.1); color: var(--unproductive); }

.legend-inline {
  display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted);
  font-size: 0.8rem; font-weight: 550;
}
.dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px;
}
.dot.productive { background: var(--productive); }
.dot.neutral { background: var(--neutral); }
.dot.unproductive { background: var(--unproductive); }
.dot.idle,
.dot.empty { background: transparent; border: 1px solid #C5CDD6; box-sizing: border-box; }

.prod-bar {
  display: flex; height: 48px; border-radius: 10px; overflow: hidden;
  background: rgba(26, 35, 50, 0.06); border: 1px solid var(--line);
}
.prod-seg { flex: 1 1 0; min-width: 1px; transition: filter 0.12s ease, transform 0.12s ease; }
.prod-seg.productive {
  background: linear-gradient(180deg, #1A9B63 0%, var(--productive) 55%, #065A38 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}
.prod-seg.unproductive {
  background: linear-gradient(180deg, #E74C3C 0%, var(--unproductive) 55%, #922B21 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.prod-seg.neutral {
  background: linear-gradient(180deg, #A8B4C0 0%, #7B8B99 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
/* Idle = gap — transparent with subtle track */
.prod-seg.idle,
.prod-seg.empty { background: transparent; }
.prod-bar-v2 .prod-seg:not(.empty):not(.fillable):hover {
  filter: brightness(1.08); transform: scaleY(1.04); z-index: 2;
}
.prod-empty {
  width: 100%; display: grid; place-items: center; color: var(--muted); font-size: 0.9rem;
  min-height: 88px;
}
.prod-hours {
  display: flex; justify-content: space-between; margin-top: 8px;
  color: var(--muted); font-size: 0.75rem; font-weight: 600;
}

/* ---- Productivity timeline v2 ---- */
.prod-timeline-panel {
  background: linear-gradient(180deg, #fff 0%, #F8FCF9 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.prod-timeline-panel.is-compact .prod-bar-v2 { height: 88px; }
.prod-timeline-head {
  align-items: flex-start !important;
  gap: 16px;
  flex-wrap: wrap;
}
.prod-timeline-sub {
  margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); font-weight: 500;
}
.prod-stat-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
}
.prod-stat {
  display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; min-width: 88px;
  text-align: center; box-shadow: var(--shadow);
}
.prod-stat em {
  font-style: normal; font-family: var(--font-ui); font-size: 0.95rem;
  font-weight: 750; letter-spacing: -0.02em;
}
.prod-stat small {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}
.prod-stat.productive em { color: var(--productive); }
.prod-stat.unproductive em { color: var(--unproductive); }
.prod-stat.neutral em { color: var(--neutral); }
.prod-stat.idle em { color: var(--idle); }
.prod-stat.gap em { color: var(--warn); }

.prod-timeline-wrap {
  position: relative; margin: 20px 0 10px; padding: 14px 0 6px;
}
.prod-timeline-grid {
  position: absolute; inset: 14px 0 34px; pointer-events: none; z-index: 0;
}
.prod-timeline-grid span {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(15, 41, 28, 0.07);
}
.prod-office-band {
  position: absolute; top: 10px; bottom: 38px; z-index: 1; pointer-events: none;
  border-left: 2px solid rgba(11, 122, 75, 0.35);
  border-right: 2px solid rgba(11, 122, 75, 0.35);
  background: linear-gradient(180deg, rgba(11,122,75,0.06), rgba(11,122,75,0.02));
  border-radius: 4px;
}
.prod-now-marker {
  position: absolute; top: 4px; bottom: 34px; width: 2px; z-index: 4;
  background: var(--warn); transform: translateX(-50%); pointer-events: none;
}
.prod-now-marker span {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--warn); white-space: nowrap;
  background: #fff; padding: 1px 5px; border-radius: 4px;
  border: 1px solid rgba(180, 83, 9, 0.25);
}
.prod-bar-v2 {
  position: relative; z-index: 2;
  display: flex; align-items: stretch;
  height: 108px; border-radius: 14px; overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(15, 41, 28, 0.04) 0,
      rgba(15, 41, 28, 0.04) 1px,
      transparent 1px,
      transparent calc(100% / 24)
    ),
    linear-gradient(180deg, #EEF3EF, #E4EBE6);
  border: 1px solid rgba(15, 41, 28, 0.1);
  box-shadow: inset 0 2px 8px rgba(15, 41, 28, 0.06), var(--shadow);
}
.prod-bar-v2 .prod-seg { min-width: 2px; border-radius: 0; }
.prod-bar-v2 .prod-seg.empty:not(.fillable) {
  background: transparent;
  box-shadow: inset 0 -3px 0 rgba(143, 168, 154, 0.35);
}
.prod-bar-v2 .prod-seg.fillable {
  display: block;
  background: repeating-linear-gradient(
    -45deg,
    rgba(180, 83, 9, 0.14) 0 5px,
    rgba(255, 255, 255, 0.5) 5px 10px
  );
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.25);
  cursor: pointer;
  animation: gap-pulse 2.8s ease-in-out infinite;
}
@keyframes gap-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}
.prod-bar-v2.clickable-gaps .prod-seg.fillable:hover,
.prod-bar-v2.clickable-gaps .prod-seg.fillable:focus-visible {
  background: repeating-linear-gradient(
    -45deg,
    rgba(11, 122, 75, 0.32) 0 5px,
    rgba(255, 255, 255, 0.55) 5px 10px
  );
  box-shadow: inset 0 0 0 2px var(--accent);
  animation: none; opacity: 1; z-index: 3;
}
.prod-hours-v2 {
  display: flex; justify-content: space-between; margin-top: 10px;
  color: var(--muted); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}
.prod-legend-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.prod-legend { gap: 12px 18px; }
.legend-office .dot.office {
  background: rgba(11, 122, 75, 0.2);
  border: 1px solid rgba(11, 122, 75, 0.45);
  border-radius: 2px; width: 12px; height: 9px;
}
.prod-fill-hint {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
}
.prod-extra-hint { margin-top: 12px; }
.dt-prod-chart-panel { margin-top: 0; }
.prod-cell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.prod-cell span { font-family: var(--font-ui); font-weight: 750; font-size: 0.92rem; }
.prod-t { color: var(--productive); font-weight: 700; }
.eff-badge {
  display: inline-flex; min-width: 48px; justify-content: center; padding: 3px 8px;
  border-radius: 8px; font-weight: 750;
  background: rgba(100, 116, 139, 0.12); color: var(--ink-soft);
}
.eff-badge.ok { background: rgba(180, 83, 9, 0.12); color: var(--warn); }
.eff-badge.good { background: rgba(31, 157, 108, 0.14); color: var(--productive); }

/* ==========================================================================
   Forms, projects, reports, week strip
   ========================================================================== */
.rules-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 980px) { .rules-grid { grid-template-columns: 1fr; } }
.rules-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  background: #F8FAFB; color: var(--ink); resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem;
}
.form-actions {
  margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.stack-form { display: grid; gap: 12px; }
.stack-form label {
  display: grid; gap: 6px; font-size: 0.82rem; font-weight: 650; color: var(--ink-soft);
}
.stack-form input, .stack-form select, .stack-form textarea {
  background: #F8FAFB; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; color: var(--ink);
}
.stack-form.tight { gap: 8px; margin-top: 8px; }
.check {
  display: flex !important; align-items: center; gap: 8px; grid-template-columns: none;
}
.tip-panel { background: linear-gradient(180deg, #F0FBF6, #fff); }
.steps {
  margin: 0; padding-left: 1.2rem; color: var(--ink-soft); display: grid; gap: 8px;
}
.token {
  font-size: 0.72rem; word-break: break-all; background: rgba(26, 35, 50, 0.05);
  padding: 4px 6px; border-radius: 6px; user-select: all;
}
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.inline-form { display: inline; }
.actions-cell { min-width: 14rem; }
.actions-cell .inline-form { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.35rem; }
details.pwd summary { list-style: none; cursor: pointer; }
details.pwd summary::-webkit-details-marker { display: none; }

.project-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.project-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.project-card.is-archived { opacity: 0.55; }
.project-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
}

.report-bars {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
  align-items: end; min-height: 180px; padding-top: 12px;
}
.report-day { display: grid; justify-items: center; gap: 6px; align-content: end; }
.report-col {
  width: 100%; max-width: 42px; min-height: 8px; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  position: relative; transition: filter 0.15s ease;
}
.report-day:hover .report-col { filter: brightness(1.08); }
.report-day.is-selected .report-col { box-shadow: 0 0 0 3px rgba(31, 157, 108, 0.25); }
.report-tip {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap;
}
.report-label { font-size: 0.75rem; font-weight: 700; }

.week-strip {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px; margin-bottom: 18px;
}
.week-day {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform 0.15s ease, border-color 0.15s ease;
}
.week-day:hover { transform: translateY(-2px); border-color: rgba(31, 157, 108, 0.35); }
.week-day.is-selected {
  border-color: var(--accent); background: linear-gradient(180deg, #fff, #EEF9F4);
  box-shadow: 0 0 0 2px rgba(31, 157, 108, 0.18), var(--shadow);
}
.week-day.is-today .wd-num {
  background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px;
}
.wd-label {
  font-size: 0.7rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
}
.wd-num { font-family: var(--font-ui); font-weight: 750; font-size: 1.05rem; }
.wd-bar {
  width: 10px; height: 36px; border-radius: 999px; background: rgba(26, 35, 50, 0.08);
  display: flex; align-items: flex-end; overflow: hidden;
}
.wd-bar i {
  display: block; width: 100%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-radius: 999px; min-height: 4px;
}
.wd-pct { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
@media (max-width: 700px) {
  .week-strip, .report-bars { gap: 4px; }
  .wd-bar { height: 28px; }
}

/* ==========================================================================
   Timer, alerts, presence
   ========================================================================== */
.timer-live {
  text-align: center; padding: 48px 24px; border-radius: var(--radius);
  background:
    radial-gradient(520px 180px at 50% 0%, rgba(31, 157, 108, 0.1), transparent 70%),
    var(--surface);
}
.timer-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem;
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 6px 12px;
  border-radius: 999px; margin-bottom: 18px;
}
.timer-badge.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--online); animation: pulse-soft 1.4s ease-in-out infinite;
}
.timer-clock {
  font-family: var(--font-ui); font-size: clamp(2.8rem, 7vw, 4.2rem); font-weight: 800;
  letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.timer-project { margin: 8px 0 22px; font-size: 1.15rem; font-weight: 700; color: var(--ink-soft); }
.timer-task {
  display: inline-block; margin-left: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(26, 35, 50, 0.06); font-size: 0.85rem; font-weight: 650;
}
.timer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.alert-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.alert-chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 4px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.alert-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.alert-chip strong {
  font-family: var(--font-ui); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
}
.alert-chip span {
  color: var(--muted); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.alert-chip.warn strong { color: var(--warn); }
.alert-chip.late strong { color: #C2410C; }
.alert-chip.accent strong { color: var(--accent); }
.alert-chip.danger strong { color: var(--unproductive); }

.presence-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 16px; padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.presence-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border-radius: 999px; background: #ECFDF5; color: #065F46;
  font-weight: 650; font-size: 0.85rem;
}
.presence-more { color: var(--muted); font-size: 0.82rem; font-weight: 650; margin-left: 4px; }
.presence-empty { font-size: 0.88rem; }
.presence-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--online); margin-right: 4px;
}
.team-pick select {
  background: #F8FAFB; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; font-weight: 600; color: var(--ink); max-width: 140px;
}
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

@media (max-width: 640px) {
  .timer-fields { grid-template-columns: 1fr; }
  .metric.featured { grid-column: span 1; flex-direction: column; text-align: center; }
  .metric.featured .metric-copy { justify-items: center; }
}

/* ==========================================================================
   DeskTime dashboard (dt-*)
   ========================================================================== */
.dt-dash { display: grid; gap: 16px; }
.dt-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.dt-toolbar-title h1 {
  margin: 0; font-family: var(--font-ui);
  font-size: clamp(1.55rem, 2.4vw, 1.95rem); font-weight: 800; letter-spacing: -0.035em;
}
.dt-toolbar-title p { margin: 4px 0 0; color: var(--muted); }
.dt-toolbar-title strong { color: var(--ink-soft); }
.dt-toolbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-daynav { margin: 0; }

.dt-hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; align-items: stretch;
}
.dt-rings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dt-ring-card {
  display: flex; align-items: center; gap: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px;
  box-shadow: var(--shadow); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dt-ring-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dt-ring-card h2 {
  margin: 0 0 4px; font-family: var(--font-ui); font-size: 1.05rem; font-weight: 750;
}
.dt-ring-card p { margin: 0; color: var(--muted); font-size: 0.82rem; }

.dt-attendance {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.dt-admin-totals {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.dt-total-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; box-shadow: var(--shadow); display: grid; gap: 4px;
}
.dt-total-card span {
  color: var(--muted); font-size: 0.72rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.dt-total-card strong {
  font-family: var(--font-ui); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em;
}
.dt-total-card small { color: var(--muted); font-size: 0.8rem; }
.dt-att {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; box-shadow: var(--shadow); display: grid; gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dt-att:hover {
  transform: translateY(-2px); border-color: rgba(31, 157, 108, 0.3); box-shadow: var(--shadow-md);
}
.dt-att-n {
  font-family: var(--font-ui); font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em;
}
.dt-att-l {
  color: var(--muted); font-size: 0.72rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.dt-att.online .dt-att-n { color: var(--online); }
.dt-att.late .dt-att-n { color: var(--warn); }
.dt-att.absent .dt-att-n { color: var(--muted); }

.dt-time-split {
  grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.dt-split-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.dt-split-head h2 {
  margin: 0; font-family: var(--font-ui); font-size: 1rem; font-weight: 750;
}
.dt-split-bar {
  display: flex; height: 18px; border-radius: 999px; overflow: hidden;
  background: rgba(26, 35, 50, 0.06);
}
.dt-split-bar i { display: block; height: 100%; min-width: 0; }
.dt-split-bar i.productive { background: var(--productive); }
.dt-split-bar i.neutral { background: #94A3B8; }
.dt-split-bar i.unproductive { background: var(--unproductive); }
.dt-split-bar i.idle { background: #CBD5E1; }
.dt-legend { margin-top: 12px; }
.dt-presence { margin: 0; }

.dt-leaders {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.dt-leaders.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dt-leaders .panel { margin-top: 0; }
.dt-mid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }
.dt-mid .panel { margin-top: 0; }
.dt-shot-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.dt-emp-table tbody tr:hover { background: var(--accent-tint); }
.dt-dash .week-strip { margin-bottom: 0; }

@media (max-width: 980px) {
  .dt-hero { grid-template-columns: 1fr; }
  .dt-leaders { grid-template-columns: 1fr; }
  .dt-attendance { grid-template-columns: repeat(2, 1fr); }
  .dt-admin-totals { grid-template-columns: repeat(2, 1fr); }
  .dt-rings { grid-template-columns: 1fr; }
  .dt-mid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dt-admin-totals { grid-template-columns: 1fr; }
}

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

/* Attendance grid */
.attendance-grid th { text-align: center; }
.attendance-grid td { text-align: center; }
.att-cell {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 8px;
  font-weight: 800; font-size: 0.8rem;
}
.att-cell.present { background: rgba(31,157,108,0.14); color: #147A54; }
.att-cell.late { background: rgba(180,83,9,0.14); color: #B45309; }
.att-cell.absent { background: rgba(100,116,139,0.12); color: #64748B; }
.att-cell.off { background: rgba(148,163,184,0.1); color: #94A3B8; }
.att-cell.idle { background: rgba(217,119,6,0.14); color: #B45309; }
.att-cell:hover { filter: brightness(0.96); transform: scale(1.05); }

.absence-month-grid { display: grid; gap: 6px; }
.absence-month-head,
.absence-month-row {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
}
.absence-month-head span {
  text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.absence-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); text-decoration: none; color: inherit;
}
.absence-day.empty { border: none; background: transparent; min-height: 52px; }
.absence-day-num { font-weight: 800; font-size: 0.95rem; }
.absence-day-tag { font-size: 0.65rem; font-weight: 800; opacity: 0.85; }
.absence-day.present { background: rgba(31,157,108,0.12); border-color: rgba(31,157,108,0.25); }
.absence-day.late { background: rgba(180,83,9,0.12); border-color: rgba(180,83,9,0.25); }
.absence-day.idle { background: rgba(217,119,6,0.12); border-color: rgba(217,119,6,0.3); }
.absence-day.absent { background: rgba(100,116,139,0.1); }
.absence-day.off { background: rgba(148,163,184,0.08); opacity: 0.75; }
.absence-day:hover { filter: brightness(0.98); transform: translateY(-1px); }

.absence-day.rich {
  align-items: stretch; justify-content: flex-start;
  min-height: 118px; padding: 8px 8px 10px; gap: 4px;
}
.absence-day.empty.rich { min-height: 118px; }
.absence-day-top {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.absence-day.rich .absence-day-num { font-size: 0.9rem; }
.absence-day-meta {
  display: grid; gap: 2px; font-size: 0.68rem; line-height: 1.25; color: var(--text, #1a2e24);
}
.absence-day-meta em {
  font-style: normal; font-weight: 700; color: var(--muted); margin-right: 4px;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.absence-day-meta .gap-line { color: #B45309; font-weight: 700; }
.absence-day.has-gap { box-shadow: inset 0 0 0 1px rgba(180,83,9,0.35); }
.alert-chip.idle { background: rgba(217,119,6,0.12); }

@media (max-width: 980px) {
  .absence-day.rich { min-height: 96px; padding: 6px; }
  .absence-day-meta { font-size: 0.62rem; }
}

.emp-month-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.emp-month-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 0.82rem; text-decoration: none; color: inherit;
  border: 1px solid var(--border);
}
.emp-month-chip strong { font-size: 1rem; }
.emp-month-chip.present { background: rgba(31,157,108,0.1); }
.emp-month-chip.late { background: rgba(180,83,9,0.1); }
.emp-month-chip.absent { background: rgba(100,116,139,0.08); }
.emp-month-hint { font-size: 0.78rem; margin-left: auto; }

.scroll-x { overflow-x: auto; }

/* ==========================================================================
   My DeskTime (DeskTime day view)
   ========================================================================== */
.dt-my { display: grid; gap: 16px; }
.dt-my-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 4px;
}
.dt-my-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dt-my-title h1 {
  margin: 0; font-family: var(--font-ui); font-size: 1.55rem; font-weight: 750;
  letter-spacing: -0.03em; color: var(--ink);
}
.btn-daily {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; background: var(--daily); color: #fff;
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700;
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-daily:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-daily::before { content: "✦"; font-size: 0.75rem; opacity: 0.9; }
.dt-my-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dt-date-nav {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px; box-shadow: var(--shadow);
}
.dt-date-arrow {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 6px; color: var(--muted); font-weight: 700;
}
.dt-date-arrow:hover { background: var(--bg); color: var(--ink); }
.dt-date-form { margin: 0; }
.dt-date-label {
  position: relative; display: inline-flex; align-items: center;
  padding: 0 10px; min-width: 180px; justify-content: center;
  font-weight: 650; font-size: 0.92rem; color: var(--ink); cursor: pointer;
}
.dt-date-label input[type="date"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.seg-toggle {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 3px; box-shadow: var(--shadow);
}
.seg-toggle a, .seg-toggle span {
  padding: 7px 14px; border-radius: 6px; font-size: 0.84rem; font-weight: 650;
  color: var(--muted);
}
.seg-toggle a:hover { color: var(--ink); background: var(--bg); }
.seg-toggle .is-on {
  background: #EEF1F4; color: var(--ink); cursor: default;
}

.dt-kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  width: 100%;
}
@media (min-width: 1500px) {
  .dt-kpi-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 1100px) { .dt-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dt-kpi-grid { grid-template-columns: 1fr; } }

.dash-metrics-kpi {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  gap: 14px;
}
.dash-metrics-kpi .dash-goal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.dt-kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px 20px; min-height: 108px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dt-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #C5D9CC;
}
.dt-kpi header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; position: relative; z-index: 1;
}
.dt-kpi header span {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
}
.dt-kpi header i {
  font-style: normal; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid #C5CDD6; color: #9AA7B5; font-size: 0.65rem;
  display: grid; place-items: center; font-weight: 700;
}
.dt-kpi strong {
  position: relative; z-index: 1;
  font-family: var(--font-ui); font-size: 1.55rem; font-weight: 750;
  letter-spacing: -0.03em; color: var(--ink); display: block;
}
.dt-kpi strong.ok { color: var(--accent); }
.dt-kpi strong.bad { color: var(--unproductive); }
.dt-kpi strong.warn { color: var(--warn); }
.dt-kpi strong.live { letter-spacing: 0.02em; }
.dt-spark {
  position: absolute; right: 0; bottom: 0; width: 58%; height: 52px;
  pointer-events: none; opacity: 0.9;
}
.dt-spark-line {
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.dt-spark.tone-ok .dt-spark-line { stroke: #0B7A4B; }
.dt-spark.tone-ok .dt-spark-area { fill: rgba(11, 122, 75, 0.14); }
.dt-spark.tone-warn .dt-spark-line { stroke: #D97706; }
.dt-spark.tone-warn .dt-spark-area { fill: rgba(217, 119, 6, 0.14); }
.dt-spark.tone-muted .dt-spark-line { stroke: #8FA89A; }
.dt-spark.tone-muted .dt-spark-area { fill: rgba(143, 168, 154, 0.16); }

.dt-prod-panel { margin-top: 0; }
.dt-prod-chart-panel .panel-head { margin-bottom: 4px; }
.dt-prod-chart-wrap {
  height: 300px;
  position: relative;
  padding: 8px 4px 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #F7FBF8 100%);
  border: 1px solid var(--line);
}
.dt-prod-chart-wrap.is-fine { height: 320px; padding: 10px 6px 6px; }
.dt-presence-strip.is-fine { height: 14px; gap: 0; }
.dt-chart-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 12px 0 4px;
  font-size: 0.72rem; font-weight: 700; color: var(--muted);
}
.dt-chart-legend span {
  display: inline-flex; align-items: center; gap: 6px;
}
.dt-chart-legend span::before {
  content: ""; width: 12px; height: 12px; border-radius: 4px;
}
.dt-chart-legend .hi::before { background: linear-gradient(180deg, #1A9B63, #0B7A4B); }
.dt-chart-legend .mid::before { background: linear-gradient(180deg, #F59E0B, #D97706); }
.dt-chart-legend .lo::before { background: linear-gradient(180deg, #E74C3C, #C0392B); }
.dt-chart-legend .off::before { background: rgba(148, 163, 184, 0.35); border: 1px solid #CBD5E1; }

.two-col .panel canvas {
  max-height: 240px;
}
.two-col .panel:has(#hourly),
.two-col .panel:has(#cats) {
  min-height: 300px;
}
.two-col .panel:has(#hourly) canvas,
.two-col .panel:has(#cats) canvas {
  height: 220px !important;
}
.dt-presence-strip {
  display: flex; height: 18px; gap: 1px; margin-top: 12px;
  border-radius: 8px; overflow: hidden; background: #EEF1F4;
  border: 1px solid var(--line);
}
.dt-presence-strip i { flex: 1 1 0; display: block; min-width: 2px; }
.dt-presence-strip i.on { background: var(--presence); }
.dt-presence-strip i.off { background: transparent; }
.dot.presence { background: var(--presence); }

.dt-projects-panel { margin-top: 0; }
.dt-proj-track {
  position: relative; height: 56px; border-radius: 10px;
  background: #F4F7F5;
  border: 1px solid var(--line); overflow: hidden;
}
.dt-proj-block {
  position: absolute; top: 10px; height: 36px; border-radius: 8px;
  opacity: 0.92; min-width: 4px;
  box-shadow: 0 2px 6px rgba(15, 41, 28, 0.12);
}
.dt-proj-empty {
  display: grid; place-items: center; height: 100%;
  color: var(--muted); font-size: 0.88rem;
}
.prod-hours.pb7-axis-like {
  position: relative; height: 22px; margin-top: 8px;
  font-size: 0.7rem; font-weight: 700; color: #78909C;
  font-variant-numeric: tabular-nums;
}
.prod-hours.pb7-axis-like span {
  position: absolute; transform: translateX(-50%); white-space: nowrap;
}
.prod-hours.pb7-axis-like span:first-child { transform: translateX(0); }
.prod-hours.pb7-axis-like span:last-child { transform: translateX(-100%); }

.dt-my .panel { margin-top: 0; }
.dt-my .two-col { margin-top: 0; }

.dt-kpi-sub {
  display: block; margin-top: 4px; position: relative; z-index: 1;
  font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--muted);
}
.dt-kpi header i.tip {
  font-style: normal; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid #C5CDD6; color: #9AA7B5; font-size: 0.65rem;
  display: grid; place-items: center; font-weight: 700; cursor: help;
}
.prod-bar.tall {
  height: 72px; border-radius: 10px; margin-bottom: 14px;
  background: #EEF1F4;
}
.prod-bar.tall .prod-seg.empty,
.prod-bar.tall .prod-seg.idle { background: transparent; }

.timeline-table .title-cell {
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-chip {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: rgba(91, 141, 239, 0.12); color: #3B6FD8;
  font-size: 0.8rem; font-weight: 650;
}
.grid-wrap { overflow-x: auto; }

.settings-block {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 8px 0 16px;
}
.settings-block legend {
  padding: 0 6px; font-weight: 700; font-size: 0.85rem; color: var(--ink);
}
.day-checks {
  display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0;
}
.two-col.tight { gap: 12px; }
.muted.small { font-size: 0.82rem; margin: 6px 0 0; }
.att-cell.off {
  background: #EEF1F4; color: #94A3B8; font-weight: 600;
}
.emp-status .emp-kpi { margin-top: 8px; }
.emp-status-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Employee My Day + gap fill ---- */
/* ---- Employee My Day dashboard v2 ---- */
.dash-v2 {
  display: grid; gap: 14px; min-width: 0; max-width: none; width: 100%;
  animation: content-in 0.35s ease both;
}
.emp-day {
  display: grid; gap: 14px; min-width: 0; max-width: none; width: 100%;
  animation: content-in 0.35s ease both;
}

.dash-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; min-width: 0; max-width: 100%;
}
.dash-top-left { flex: 1 1 280px; min-width: 0; }
.dash-kicker {
  margin: 0 0 4px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.dash-title-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.dash-title-row h1 {
  margin: 0; font-family: var(--font-ui); font-size: 1.65rem;
  font-weight: 800; letter-spacing: -0.03em; color: var(--ink);
}
.dash-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-top-right {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-left: auto; flex-shrink: 0;
}
.dash-back {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-weight: 700; font-size: 1.1rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-back:hover { background: var(--bg); color: var(--ink); }
.dash-admin-cols { gap: 14px; }
.dash-admin-cols .panel { margin-top: 0; }

.dash-metrics {
  display: grid; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}
.dash-metrics.dash-metrics-kpi {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.dash-metrics-kpi .dash-goal {
  margin-top: 0;
  padding-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.dash-metrics-rings {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.dash-ring-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(180deg, #fff, #F8FBF9);
  border: 1px solid var(--line);
}
.dash-ring-card h2 {
  margin: 0 0 2px; font-size: 0.95rem; font-weight: 750; color: var(--ink);
}
.dash-ring-card p { margin: 0; font-size: 0.78rem; color: var(--muted); }

.dash-metrics-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.dash-stat {
  display: grid; gap: 2px; padding: 12px 14px;
  border-radius: 10px; background: #F7FAF8; border: 1px solid var(--line);
}
.dash-stat span {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}
.dash-stat strong {
  font-family: var(--font-ui); font-size: 1.15rem; font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink);
}
.dash-stat strong.ok { color: var(--accent); }
.dash-stat strong.live { color: var(--online); }
.dash-stat em {
  font-style: normal; font-size: 0.72rem; font-weight: 600; color: var(--muted);
}

.dash-goal { padding-top: 4px; border-top: 1px solid var(--line); }
.dash-goal-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-bottom: 8px; font-size: 0.82rem;
}
.dash-goal-head strong { font-weight: 750; color: var(--ink); }
.dash-goal-head span { color: var(--muted); font-weight: 600; }
.dash-goal-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(26, 35, 50, 0.08);
}
.dash-goal-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px; transition: width 0.5s ease;
}
.dash-goal-hint {
  margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); font-weight: 500;
}

.dash-panel { margin-top: 0; border-radius: 14px; min-width: 0; max-width: 100%; overflow: hidden; }
.dash-panel .grid-wrap { max-width: 100%; }

@media (max-width: 900px) {
  .dash-metrics-rings { grid-template-columns: 1fr; }
  .dash-metrics-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dash-metrics-stats { grid-template-columns: 1fr; }
  .dash-top-right { width: 100%; justify-content: space-between; }
}

.emp-toolbar { margin-bottom: 0; }
.emp-fill-btn { white-space: nowrap; }
.emp-kpi { margin: 0; }
.gap-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.gap-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px dashed var(--accent);
  background: var(--accent-tint); color: var(--ink);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.gap-chip:hover {
  background: var(--accent-soft); border-style: solid; transform: translateY(-1px);
}
.gap-chip strong { font-size: 0.88rem; font-family: var(--font-ui); }
.gap-chip span { font-size: 0.8rem; color: var(--muted); }
.gap-chip em {
  font-style: normal; font-size: 0.75rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em;
}
.emp-requests .empty-state.compact,
.emp-privacy-note .empty { margin: 0; }
.emp-requests .panel-head {
  align-items: flex-start;
}
.emp-section-sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.emp-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.emp-req-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #F7FBF8);
}
.emp-req-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.emp-req-card header strong {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink);
}
.emp-req-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.emp-req-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.emp-req-card.status-pending { border-color: #F5D0A9; background: linear-gradient(180deg, #fff, #FFF8F1); }
.emp-req-card.status-approved { border-color: #B7E0C8; }
.emp-req-card.status-rejected { border-color: #E5C4C4; opacity: 0.92; }
.emp-day-bottom {
  align-items: stretch;
  min-width: 0;
  max-width: none;
  width: 100%;
}
.emp-day-bottom > .panel { min-height: 240px; }
.dash-admin-cols {
  gap: 16px;
  width: 100%;
  max-width: none;
}
.two-col.dash-admin-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 1500px) {
  .two-col.dash-admin-cols {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .pb7-plot { height: 340px; }
  .app-shell .wrap { padding-left: 24px; padding-right: 24px; }
}
.emp-cat-panel .panel-head { margin-bottom: 12px; }
.emp-cat-list.emp-cat-list-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .emp-cat-list.emp-cat-list-row { grid-template-columns: 1fr; }
}
.admin-day-mix { min-width: 0; }
.emp-cat-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.emp-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.emp-cat-label i {
  width: 10px; height: 10px; border-radius: 3px; font-style: normal;
}
.emp-cat-label i.productive { background: #5EBA1C; }
.emp-cat-label i.neutral { background: #42A5F5; }
.emp-cat-label i.unproductive { background: #FFC107; }
.emp-cat-label i.idle { background: #EF5350; }
.emp-cat-bar {
  height: 10px; border-radius: 999px; overflow: hidden;
  background: #EEF2F0;
}
.emp-cat-bar i {
  display: block; height: 100%; border-radius: 999px; font-style: normal;
}
.emp-cat-bar i.productive { background: linear-gradient(90deg, #7BC92E, #5EBA1C); }
.emp-cat-bar i.neutral { background: linear-gradient(90deg, #64B5F6, #42A5F5); }
.emp-cat-bar i.unproductive { background: linear-gradient(90deg, #FFD54F, #FFC107); }
.emp-cat-bar i.idle { background: linear-gradient(90deg, #EF9A9A, #EF5350); }
.emp-cat-row strong {
  font-size: 0.84rem; font-variant-numeric: tabular-nums; color: var(--ink);
  white-space: nowrap;
}
.emp-privacy-inline {
  margin-top: auto;
  box-shadow: none;
}
@media (max-width: 720px) {
  .emp-cat-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }
  .emp-cat-bar { grid-column: 1 / -1; }
}
.emp-empty {
  padding: 18px 16px;
  border-radius: 10px;
  background: #F7FAF8;
  border: 1px dashed var(--line);
  text-align: center;
}
.emp-empty h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 750;
}
.emp-empty p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.emp-privacy-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #F3FBF6 0%, #fff 55%);
  box-shadow: var(--shadow);
  padding: 0;
}
.emp-privacy-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
}
.emp-privacy-inner strong {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.emp-privacy-inner p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.offline-page { animation: content-in 0.35s ease both; }
.offline-layout {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); gap: 16px;
}
@media (max-width: 900px) { .offline-layout { grid-template-columns: 1fr; } }
.fill-kind-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px;
}
.fill-kind {
  display: flex; cursor: pointer;
}
.fill-kind input { position: absolute; opacity: 0; pointer-events: none; }
.fill-kind span {
  flex: 1; text-align: center; padding: 12px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 650; font-size: 0.9rem; color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fill-kind input:checked + span {
  border-color: var(--accent); background: var(--accent-tint); color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.fill-kind:hover span { border-color: var(--accent); }
.form-row.two {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 560px) { .form-row.two { grid-template-columns: 1fr; } }
.request-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.request-list li {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line);
}
.request-list li strong { display: block; font-size: 0.9rem; }
.request-list .muted { display: block; font-size: 0.8rem; margin-top: 2px; }
.request-meta { display: grid; gap: 6px; justify-items: end; font-size: 0.8rem; color: var(--muted); }

.approvals-page { animation: content-in 0.35s ease both; }
.approval-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.approval-card {
  display: grid; gap: 8px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, #fff, #F7FBF8);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.approval-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.approval-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.approval-when { margin: 0; font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }
.approval-note { margin: 0; color: var(--muted); font-size: 0.9rem; }
.approval-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ---- Live now board + website rules ---- */
.live-board { margin-bottom: 18px; }
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.live-card {
  display: grid; gap: 8px; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, #fff, #F7FBF8);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.live-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.live-card.is-idle { background: #F4F6F5; }
.live-card-top { display: flex; align-items: center; gap: 10px; }
.live-who { display: grid; gap: 2px; min-width: 0; flex: 1; }
.live-who strong { font-size: 0.95rem; }
.live-ago { font-size: 0.75rem; color: var(--muted); }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--online);
  box-shadow: 0 0 0 4px rgba(11,122,75,.15);
}
.live-dot.idle { background: #94A3B8; box-shadow: 0 0 0 4px rgba(148,163,184,.18); }
.live-now-app { display: flex; align-items: center; gap: 8px; min-width: 0; }
.live-app-name {
  font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-domain, .live-title {
  font-size: 0.8rem; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.table-now { font-size: 0.72rem; margin-top: 4px; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rules-section-title {
  margin: 22px 0 4px; font-family: var(--font-ui); font-size: 1.05rem;
}
.rules-hint { margin: 0 0 12px; }
.rules-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .rules-grid.two { grid-template-columns: 1fr; }
}

/* ---- App & website categories (admin) ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.cat-page { display: grid; gap: 14px; min-width: 0; max-width: 100%; }
.cat-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.cat-stats {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-stat {
  min-width: 72px; padding: 10px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 2px; text-align: center;
}
.cat-stat strong {
  font-family: var(--font-ui); font-size: 1.15rem; font-weight: 800; color: var(--ink);
}
.cat-stat span {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cat-stat.ok strong { color: var(--productive); }
.cat-stat.warn strong { color: var(--unproductive); }
.cat-stat.muted strong { color: #64748B; }

.cat-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.cat-tabs {
  display: inline-flex; padding: 3px; border-radius: 10px;
  background: #EEF2F0; border: 1px solid var(--line);
}
.cat-tab {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.84rem; font-weight: 700;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
}
.cat-tab.is-on {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 41, 28, 0.08);
}
.cat-search { flex: 1 1 200px; min-width: 160px; max-width: 320px; }
.cat-search input {
  width: 100%; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  padding: 0 12px; color: var(--ink); font: inherit;
}
.cat-filters {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
}
.cat-filter {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font: inherit; font-size: 0.78rem; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.cat-filter.is-on {
  border-color: var(--accent); background: var(--accent-tint); color: var(--accent);
}
.cat-legend {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  margin: 0 0 12px; font-size: 0.78rem; color: var(--muted); font-weight: 600;
}
.cat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cat-tracked-cols { gap: 14px; align-items: start; }
.cat-panel { margin-top: 0; min-width: 0; }
.cat-table-wrap {
  max-height: min(62vh, 560px); overflow: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.cat-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.cat-table th {
  position: sticky; top: 0; z-index: 1;
  background: #F7FAF8; text-align: left; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.cat-table td {
  padding: 10px 12px; border-bottom: 1px solid #EEF2F0;
  vertical-align: middle;
}
.cat-table tr:last-child td { border-bottom: 0; }
.cat-table tr:hover td { background: #FBFDFC; }
.cat-name strong {
  font-weight: 700; color: var(--ink);
  word-break: break-word;
}
.cat-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-select {
  min-width: 128px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 0.8rem; font-weight: 700;
  padding: 0 8px; color: var(--ink);
}
.cat-select.productive {
  border-color: rgba(11, 122, 75, 0.35);
  background: rgba(31, 157, 108, 0.08);
  color: var(--productive);
}
.cat-select.neutral {
  border-color: #D0D7DE;
  background: #F8FAFB;
  color: #64748B;
}
.cat-select.unproductive {
  border-color: rgba(192, 57, 43, 0.35);
  background: rgba(225, 29, 72, 0.06);
  color: var(--unproductive);
}
.cat-note { margin: 12px 0 0; font-size: 0.82rem; }
.cat-pane[hidden] { display: none !important; }
.cat-kw {
  border-top: 3px solid var(--line);
  display: grid;
  gap: 10px;
}
.cat-kw.productive { border-top-color: var(--productive); }
.cat-kw.unproductive { border-top-color: var(--unproductive); }
.cat-kw.neutral { border-top-color: #94A3B8; }
.cat-kw textarea.kw-raw-edit,
.cat-kw textarea.kw-source {
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #F8FAFB;
  color: var(--ink);
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}
.cat-kw-hero {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(11, 122, 75, 0.06), transparent 55%),
    #fff;
}
.cat-kw-hero h2 {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.cat-kw-hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}
.cat-kw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-kw-tips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.cat-kw-tip {
  display: grid; gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #F7FAF8;
}
.cat-kw-tip strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cat-kw-tip span {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.cat-kw-tip code {
  font-size: 0.78rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(26, 35, 50, 0.06);
}
.kw-chip-box {
  display: grid; gap: 10px;
  min-height: 180px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #D0D7DE;
  background: linear-gradient(180deg, #FBFDFC, #F5F8F6);
}
.kw-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-content: flex-start;
  min-height: 84px;
}
.kw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 1px 2px rgba(15, 41, 28, 0.04);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.kw-chip span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kw-chip i {
  font-style: normal;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  background: #EEF2F0;
  cursor: pointer;
  line-height: 1;
}
.kw-chip i:hover {
  background: rgba(192, 57, 43, 0.12);
  color: var(--unproductive);
}
.kw-chip.is-default {
  border-color: rgba(11, 122, 75, 0.22);
  background: rgba(31, 157, 108, 0.06);
}
.cat-kw.unproductive .kw-chip.is-default {
  border-color: rgba(192, 57, 43, 0.22);
  background: rgba(225, 29, 72, 0.05);
}
.kw-empty {
  margin: 0;
  width: 100%;
  padding: 18px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.kw-add {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink);
}
.kw-add:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 122, 75, 0.12);
}
.kw-raw {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.kw-raw summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  user-select: none;
}
.kw-raw[open] summary { margin-bottom: 8px; color: var(--ink-soft); }
.cat-form.is-text-mode .kw-chip-box { display: none; }
.cat-form.is-text-mode .kw-raw { display: block; }
.cat-form.is-text-mode .kw-raw summary { display: none; }
.cat-savebar {
  position: sticky; bottom: 12px; z-index: 5;
  margin-top: 18px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(15, 41, 28, 0.08);
}
@media (max-width: 900px) {
  .cat-tracked-cols { grid-template-columns: 1fr; }
  .cat-kw-tips { grid-template-columns: 1fr; }
}

.login-forgot { margin: -4px 0 10px; text-align: right; }
.login-forgot a {
  font-size: 0.88rem; font-weight: 700; color: var(--accent);
}
.login-forgot a:hover { text-decoration: underline; }

/* ==========================================================================
   Productivity Timeline v2 — SVG column chart
   ========================================================================== */
.pt-panel {
  position: relative;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
.pt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 10px;
}
.pt-head-left h2 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 700; color: #263238; }
.pt-sub { margin: 0; font-size: 0.72rem; font-weight: 600; color: #78909C; }
.pt-stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip {
  display: flex; flex-direction: column; align-items: center;
  min-width: 64px; padding: 6px 10px;
  background: #fff; border: 1px solid #ECEFF1; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.pt-chip em { font-style: normal; font-size: 0.82rem; font-weight: 800; color: #37474F; }
.pt-chip small { font-size: 0.58rem; font-weight: 700; color: #90A4AE; text-transform: uppercase; letter-spacing: 0.03em; }
.pt-chip.productive em { color: #5EBA1C; }
.pt-chip.neutral em { color: #42A5F5; }
.pt-chip.unproductive em { color: #FFC107; }
.pt-chip.idle em { color: #EF5350; }

.pt-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin: 0 0 10px; padding: 0; list-style: none;
  font-size: 0.68rem; font-weight: 600; color: #78909C;
}
.pt-legend li { display: inline-flex; align-items: center; gap: 5px; }
.pt-legend i { width: 10px; height: 10px; border-radius: 2px; font-style: normal; }
.pt-legend i.productive { background: #5EBA1C; }
.pt-legend i.neutral { background: #42A5F5; }
.pt-legend i.unproductive { background: #FFC107; }
.pt-legend i.idle { background: #EF5350; }

.pt-chart {
  display: flex; gap: 0;
  background: #fff; border: 1px solid #E0E0E0; border-radius: 8px;
  padding: 12px 12px 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.pt-yaxis {
  width: 38px; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 2px 6px 30px 0;
  font-size: 0.62rem; font-weight: 600; color: #90A4AE;
  text-align: right; font-variant-numeric: tabular-nums; line-height: 1;
}
.pt-main { flex: 1; min-width: 0; }
.pt-scroll {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #B0BEC5 transparent;
}
.pt-scroll::-webkit-scrollbar { height: 6px; }
.pt-scroll::-webkit-scrollbar-thumb { background: #B0BEC5; border-radius: 3px; }
.pt-canvas { min-height: 226px; }
.pt-panel.is-compact .pt-canvas { min-height: 180px; }
.pt-svg { display: block; }
.pt-bar { transition: y 0.35s ease, height 0.35s ease, filter 0.12s ease; }
.pt-bar-enter { animation: pt-fade-in 0.35s ease both; }
@keyframes pt-fade-in { from { opacity: 0; } to { opacity: 1; } }
.pt-bar.is-hot { filter: brightness(1.1) drop-shadow(0 0 3px rgba(0,0,0,0.15)); }

.pt-axis {
  position: relative; height: 22px; margin-top: 6px;
  font-size: 0.68rem; font-weight: 600; color: #90A4AE;
  font-variant-numeric: tabular-nums;
}
.pt-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

.pt-tooltip {
  position: absolute; z-index: 40; pointer-events: none;
  min-width: 210px; max-width: 290px; padding: 10px 12px;
  background: #1A2332; color: #ECEFF1; border-radius: 10px;
  font-size: 0.78rem; line-height: 1.45;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
.pt-tooltip strong { display: block; font-size: 0.84rem; margin-bottom: 6px; color: #fff; }
.pt-tip-app { font-size: 0.74rem; color: rgba(255,255,255,0.88); margin-bottom: 4px; }
.pt-tip-pct { font-size: 0.9rem; font-weight: 800; color: #A5D6A7; margin-bottom: 4px; }
.pt-tip-cat { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.pt-tip-cat i { width: 8px; height: 8px; border-radius: 2px; font-style: normal; }
.pt-tip-stack {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.pt-tip-stack i { display: block; min-width: 0; font-style: normal; }
.pt-tip-stack i.p { background: #5EBA1C; }
.pt-tip-stack i.n { background: #42A5F5; }
.pt-tip-stack i.u { background: #FFC107; }
.pt-tip-stack i.idle { background: #EF5350; }
.pt-tip-rows {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px;
  font-size: 0.68rem; color: rgba(255,255,255,0.75);
}
.pt-tip-rows b { color: #fff; font-weight: 700; }
.pt-tip-gap { color: #FFE082; font-weight: 600; }
.pt-gaps { margin-top: 10px; }

@media (max-width: 720px) {
  .pt-yaxis { width: 32px; font-size: 0.56rem; }
  .pt-stat-chips { gap: 6px; }
  .pt-chip { min-width: 56px; padding: 5px 8px; }
}

/* ==========================================================================
   Productivity bar — polished 5-min column chart
   ========================================================================== */
.prod-bar-v7 {
  position: relative;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
}
.pb7-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 10px;
  padding: 0;
}
.pb7-head-left { min-width: 0; }
.pb7-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.pb7-head h2 {
  margin: 0 0 3px;
  font-family: var(--font-ui);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pb7-sub {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}
.pb7-range {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #EEF2F0;
  border: 1px solid var(--line);
  gap: 2px;
}
.pb7-range-btn {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.pb7-range-btn:hover { color: var(--ink); background: rgba(255,255,255,0.7); }
.pb7-range-btn.is-on {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(15, 41, 28, 0.08);
}
.pb7-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.pb7-stat {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pb7-stat span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pb7-stat strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pb7-stat.warn {
  border-color: rgba(11, 122, 75, 0.35);
  background: linear-gradient(180deg, #F3FBF6, #fff);
}
.pb7-stat.warn strong { color: var(--accent); }
.pb7-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--muted);
}
.pb7-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.pb7-legend i { width: 9px; height: 9px; border-radius: 2px; font-style: normal; }
.pb7-legend i.productive { background: #5EBA1C; }
.pb7-legend i.neutral { background: #42A5F5; }
.pb7-legend i.unproductive { background: #FFC107; }
.pb7-legend i.idle { background: #EF5350; }
.pb7-legend i.gap {
  background: repeating-linear-gradient(
    -45deg, rgba(11,122,75,0.35) 0 2px, #fff 2px 4px
  );
  border: 1px solid rgba(11,122,75,0.35);
}

.pb7-body {
  display: flex;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
.pb7-yaxis {
  width: 42px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 10px 36px 0;
  font-size: 0.64rem;
  font-weight: 700;
  color: #90A4AE;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.prod-bar-v7.is-compact .pb7-yaxis { padding-bottom: 28px; }

.pb7-main { flex: 1; min-width: 0; max-width: 100%; }
.pb7-scroll {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  scrollbar-width: thin;
}
.pb7-chart { min-width: 100%; width: 100%; }
.prod-bar-v7[data-bar-mode="day"] .pb7-chart {
  min-width: max(100%, 1100px);
}

.pb7-plot {
  position: relative;
  min-width: 100%;
  height: 300px;
  background:
    linear-gradient(180deg, #FBFCFD 0%, #F4F7F5 100%);
  border: 1px solid #E6ECE8;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.prod-bar-v7.is-self .pb7-plot { height: 320px; }
.prod-bar-v7.is-compact .pb7-plot { height: 200px; }

.pb7-grid-h, .pb7-grid-v { position: absolute; inset: 0; pointer-events: none; }
.pb7-grid-h i {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px dashed rgba(15, 41, 28, 0.08);
}
.pb7-grid-v i {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 1px solid rgba(15, 41, 28, 0.04);
  transform: translateX(-50%);
}
.pb7-office {
  position: absolute; inset: 0; z-index: 1;
  border-left: 1px solid rgba(11, 122, 75, 0.2);
  border-right: 1px solid rgba(11, 122, 75, 0.2);
  background: rgba(11, 122, 75, 0.035);
  pointer-events: none;
}
.pb7-away {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  border: 1px dashed #D5DEE3;
  background: rgba(255,255,255,0.45);
  pointer-events: none;
}
.pb7-now {
  position: absolute; top: 0; bottom: 0; width: 2px; z-index: 5;
  background: #F59E0B; transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.2);
}
.pb7-now span {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  font-size: 0.58rem; font-weight: 800; color: #B45309;
  background: #FFFBEB; padding: 2px 6px; border-radius: 4px;
  border: 1px solid rgba(245,158,11,0.35); white-space: nowrap;
}

.pb7-cols {
  position: absolute; inset: 0;
  z-index: 3;
  /* Bottom baseline */
  box-shadow: inset 0 -1px 0 rgba(15, 41, 28, 0.08);
}
.pb7-col {
  position: absolute; bottom: 0; top: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-width: 0;
  padding: 0 0.4px;
  box-sizing: border-box;
  animation: pb7-col-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 4ms);
}
@keyframes pb7-col-in {
  from { opacity: 0; transform: scaleY(0.2); transform-origin: bottom; }
  to { opacity: 1; transform: scaleY(1); }
}
.pb7-col:hover, .pb7-col.is-hot {
  z-index: 6;
}
.pb7-col:hover .pb7-stack, .pb7-col.is-hot .pb7-stack {
  filter: brightness(1.06);
  transform: scaleX(1.06);
  box-shadow: 0 4px 12px rgba(15, 41, 28, 0.14);
}
.pb7-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 1px 1px;
  overflow: hidden;
  font-style: normal;
  transform-origin: bottom center;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.pb7-stack i {
  display: block;
  width: 100%;
  min-height: 0;
  font-style: normal;
}
.pb7-stack i.p { background: linear-gradient(180deg, #7ED957 0%, #5EBA1C 55%, #4CA515 100%); }
.pb7-stack i.n { background: linear-gradient(180deg, #6BB8F7 0%, #42A5F5 55%, #2B93E8 100%); }
.pb7-stack i.u { background: linear-gradient(180deg, #FFD54F 0%, #FFC107 55%, #F0A800 100%); }
.pb7-stack i.idle { background: linear-gradient(180deg, #FF8A80 0%, #EF5350 55%, #E53935 100%); }
.pb7-col.fillable {
  background: repeating-linear-gradient(
    -45deg, rgba(11,122,75,0.1) 0 4px, rgba(255,255,255,0.92) 4px 8px
  );
  border: 1px dashed rgba(11,122,75,0.35);
  border-radius: 3px;
  cursor: pointer;
}
.pb7-col.fillable:hover {
  background: repeating-linear-gradient(
    -45deg, rgba(11,122,75,0.18) 0 4px, rgba(232,245,238,0.95) 4px 8px
  );
}
.pb7-col.fillable .pb7-stack { display: none; }
.pb7-col.requested {
  background: repeating-linear-gradient(
    -45deg, rgba(255,193,7,0.3) 0 4px, rgba(255,248,225,0.95) 4px 8px
  );
  border: 1px solid rgba(255,193,7,0.5);
  border-radius: 3px;
  cursor: default;
}
.pb7-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #B0BEC5; font-size: 0.9rem; text-align: center; padding: 0 24px;
  font-weight: 600;
}

.pb7-footer {
  border: 1px solid #E6ECE8;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  padding: 8px 0 6px;
  /* Keep rails + axis the same full width as the plot (fixes 10 PM–12 AM looking cut off) */
  overflow: visible;
}
.pb7-tracks {
  display: grid;
  gap: 7px;
  padding: 2px 0 8px;
  position: relative;
}
.pb7-track {
  position: relative;
  display: block;
  min-height: 14px;
}
.pb7-track-label {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 750;
  color: #78909C;
  text-align: right;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.pb7-track-label i {
  width: 8px; height: 8px; border-radius: 2px; font-style: normal; flex-shrink: 0;
}
.pb7-track-label i.presence { background: linear-gradient(90deg, #64B5F6, #42A5F5); }
.pb7-track-label i.schedule { background: rgba(11, 122, 75, 0.45); }
.pb7-track-rail {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #EEF2F0;
  border: 1px solid #E6ECE8;
  box-sizing: border-box;
}
.pb7-track-rail i {
  position: absolute;
  top: 0; bottom: 0;
  font-style: normal;
  min-width: 1px;
  border-radius: 999px;
}
.pb7-track-rail.presence { background: #EAF4FC; }
.pb7-track-rail.presence i {
  background: linear-gradient(90deg, #64B5F6, #1E88E5);
  box-shadow: inset 0 0 0 1px rgba(30, 136, 229, 0.15);
}
.pb7-track-rail.schedule { background: #F1F5F3; }
.pb7-track-rail.schedule i {
  background: linear-gradient(90deg, rgba(11,122,75,0.28), rgba(26,155,99,0.38));
}

.pb7-axis {
  position: relative;
  width: 100%;
  height: 26px;
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #78909C;
  font-variant-numeric: tabular-nums;
  overflow: visible;
}
.pb7-axis span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  letter-spacing: 0.01em;
  padding: 2px 0;
}
.pb7-axis span.is-major { color: #546E7A; font-weight: 800; }
.pb7-axis span.is-start { transform: translateX(0); }
.pb7-axis span.is-end { transform: translateX(-100%); }

.pb7-tip {
  position: absolute; z-index: 40; pointer-events: none;
  min-width: 220px; max-width: 300px; padding: 12px 14px;
  background: #1A2332; color: #ECEFF1; border-radius: 12px;
  font-size: 0.78rem; line-height: 1.45;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
.pb7-tip strong { display: block; font-size: 0.88rem; margin-bottom: 6px; color: #fff; }
.pb7-tip-app { font-size: 0.74rem; color: rgba(255,255,255,0.88); margin-bottom: 4px; }
.pb7-tip-pct { font-size: 0.92rem; font-weight: 800; color: #A5D6A7; margin-bottom: 4px; }
.pb7-tip-cat { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.pb7-tip-cat i { width: 8px; height: 8px; border-radius: 2px; font-style: normal; }
.pb7-tip-stack {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.pb7-tip-stack i { display: block; min-width: 0; font-style: normal; }
.pb7-tip-stack i.p { background: #5EBA1C; }
.pb7-tip-stack i.n { background: #42A5F5; }
.pb7-tip-stack i.u { background: #FFC107; }
.pb7-tip-stack i.idle { background: #EF5350; }
.pb7-tip-rows {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px;
  font-size: 0.68rem; color: rgba(255,255,255,0.75);
}
.pb7-tip-rows b { color: #fff; font-weight: 700; }
.pb7-tip-gap { color: #FFE082; font-weight: 600; margin-top: 4px; }
.pb7-gaps { margin-top: 12px; }
.pb7-gaps-label {
  flex: 1 0 100%;
  margin: 0 0 2px;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--muted);
}

@media (max-width: 720px) {
  .pb7-yaxis { width: 34px; font-size: 0.56rem; padding-bottom: 56px; }
  .pb7-plot { height: 220px; }
  .prod-bar-v7.is-self .pb7-plot { height: 240px; }
  .pb7-legend { font-size: 0.62rem; justify-content: flex-start; }
  .pb7-head-right { align-items: stretch; width: 100%; }
  .pb7-range { align-self: flex-start; }
  .pb7-track-label {
    width: 52px;
    font-size: 0.52rem;
    margin-right: 6px;
  }
  .pb7-axis { margin-left: 0; font-size: 0.6rem; }
  .pb7-stats { grid-template-columns: repeat(2, 1fr); }
}
