/* iTrackSuite · employee dashboard (unslopped)
   Direction: a paper time card and a punch clock. Graphite neutrals, the suite blue as the only accent,
   IBM Plex Sans for the interface, IBM Plex Mono for every clock figure. */

:root,
html[data-theme=dark] {
  color-scheme: dark;
  --side: #0f0f10;
  --bg: #141415;
  --card: #19191b;
  --raised: #232325;
  --raised-2: #2b2b2e;
  --line: rgba(237, 237, 237, .08);
  --line-2: rgba(237, 237, 237, .14);
  --text: #ededed;
  --text-2: #a1a1a6;
  --muted: #85858b;
  --accent: #7b9bff;          /* brand blue, lifted for dark surfaces */
  --accent-fill: #5b86ff;
  --accent-soft: rgba(91, 134, 255, .16);
  --pos: #4cc38a;
  --neg: #e5484d;
  --warn: #d9a441;
  --btn-bg: #ededed;
  --btn-ink: #141415;
  --btn-hover: #ffffff;
  --highlight: inset 0 1px 0 rgba(255, 255, 255, .06);
  --float: 0 12px 32px rgba(0, 0, 0, .45);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(123, 155, 255, .7);
}
html[data-theme=light] {
  color-scheme: light;
  --side: #f4f4f5;
  --bg: #fafafa;
  --card: #ffffff;
  --raised: #f4f4f5;
  --raised-2: #ebebec;
  --line: rgba(23, 23, 23, .08);
  --line-2: rgba(23, 23, 23, .14);
  --text: #171717;
  --text-2: #525252;
  --muted: #737373;
  --accent: #3b63e0;
  --accent-fill: #3b63e0;
  --accent-soft: rgba(59, 99, 224, .12);
  --pos: #16a34a;
  --neg: #dc2626;
  --warn: #b7791f;
  --btn-bg: #171717;
  --btn-ink: #ffffff;
  --btn-hover: #2a2a2a;
  --highlight: 0 1px 2px rgba(0, 0, 0, .05);
  --float: 0 8px 24px rgba(0, 0, 0, .08);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(59, 99, 224, .6);
}

:root {
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 140ms;
  --menu: 180ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font: 400 14px/20px var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
/* Suite rule: links never underline on hover (colour change only). Keeps the app switcher and tiles clean on every app. */
a:hover, a:focus, .suite-item, .suite-item:hover, .suite-item *, .nav-item:hover, .tile:hover, .tile:hover * { text-decoration: none !important; }
svg { flex: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- App shell ---------- */
.app-container { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 900;
  width: 248px; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  background: var(--side);
  border-right: 1px solid var(--line);
  overscroll-behavior: contain;
}
.logo-container {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 8px; margin-bottom: 24px;
  border-radius: 8px;
}
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--accent-fill); color: #fff;
}
.logo-mark svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.logo-text { font-size: 16px; line-height: 1; font-weight: 600; color: var(--text); }
/* Suite logo, same as the homepage (suite.js draws it on every app; this styles it before suite.js runs) */
.its-brand { display: inline-flex; align-items: center; gap: 10px; }
.its-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; font-style: normal; color: #7b9bff; background: color-mix(in srgb, #5b86ff 18%, transparent); box-shadow: none; }
.its-mark svg { width: 18px; height: 18px; stroke: currentColor; }
html[data-theme=light] .its-mark { color: #3b63e0; background: color-mix(in srgb, #3b63e0 12%, transparent); }
.its-word { font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: -.02em; white-space: nowrap; color: var(--text); }
.its-word .its-suite { font-weight: inherit; color: #5b86ff; }
.logo-container.its-brand { display: flex; height: 40px; }

.nav-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 500;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item.active { background: var(--raised); color: var(--text); box-shadow: var(--highlight), inset 0 0 0 1px var(--line); }
.nav-icon { width: 16px; height: 16px; display: grid; place-items: center; color: var(--muted); }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: var(--text-2); }
.nav-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }

.sidebar-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 8px 0; border-top: 1px solid var(--line);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--raised); color: var(--text-2);
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--line);
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 12px; line-height: 16px; color: var(--muted); }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-grid; place-items: center; color: var(--muted);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn:active { transform: scale(.97); }

.main-content { flex: 1; min-width: 0; margin-left: 248px; }

/* ---------- Top bar ---------- */
.top-bar {
  position: sticky; top: 0; z-index: 800;
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 32px;
  border-top: env(safe-area-inset-top, 0px) solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.page-header { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.page-header h1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.page-subtitle { color: var(--muted); font-size: 13px; }
.top-bar-actions { display: flex; align-items: center; gap: 8px; }

/* suite.js injects these */
.suite-switch { position: relative; display: inline-flex; flex: none; }
.suite-switch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px 0 8px; border-radius: 8px;
  background: var(--raised); color: var(--text); font-weight: 500; font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--fast) var(--ease);
}
.suite-switch-btn:hover { background: var(--raised-2); }
.suite-switch .suite-ic { width: 16px; height: 16px; color: var(--muted); display: grid; place-items: center; }
.suite-switch .suite-ic svg { width: 16px; height: 16px; stroke-width: 1.5; }
.suite-caret { color: var(--muted); font-size: 10px; }
.suite-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1000;
  min-width: 264px; padding: 4px; border-radius: 12px;
  background: var(--card); box-shadow: var(--float), inset 0 0 0 1px var(--line);
  display: none;
}
.suite-switch.open .suite-menu { display: block; animation: rise var(--menu) var(--ease); }
.suite-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); }
.suite-item:hover { background: var(--raised); }
.suite-item.current { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.suite-item b { display: block; font-size: 13px; font-weight: 500; }
.suite-item small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.suite-tile { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.suite-tile svg { width: 16px; height: 16px; stroke-width: 1.5; }
.suite-theme-btn {
  width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.suite-theme-btn:hover { background: var(--raised); color: var(--text); }
.suite-theme-btn svg { width: 16px; height: 16px; stroke-width: 1.5; }
.suite-theme-btn .i-sun { display: none; }
html[data-theme=light] .suite-theme-btn .i-sun { display: block; }
html[data-theme=light] .suite-theme-btn .i-moon { display: none; }
.suite-theme-btn.floating { position: fixed; top: 16px; right: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: var(--highlight); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { background: var(--raised-2); }
.btn-ghost { color: var(--text-2); padding: 0 8px; }
.btn-ghost:hover { background: var(--raised); color: var(--text); }
.btn-danger { color: var(--neg); padding: 0 8px; }
.btn-danger:hover { background: color-mix(in srgb, var(--neg) 12%, transparent); }
.btn-small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-ghost.btn-small, .btn-danger.btn-small { padding: 0 8px; }

/* ---------- Content ---------- */
.content-area { max-width: 1440px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }

.notice {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 10px 16px; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
}
.notice[hidden] { display: none; }
.notice .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notice .dot.urgent { background: var(--neg); }
.notice .dot.high { background: var(--warn); }
.notice .icon { color: var(--muted); }
.notice b { color: var(--text); font-weight: 500; }
.notice .more { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.notice-body { flex: 1; min-width: 0; }

.salary-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--pos);
  animation: rise 360ms var(--ease);
}
.salary-banner .sb-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.salary-banner .sb-title { font-weight: 500; }
.salary-banner .sb-msg { color: var(--text-2); font-size: 13px; }
.salary-banner .btn { margin-left: auto; }

/* Overview: time card + week figures */
.overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.panel { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }

.timecard { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.timecard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.label { font-size: 13px; color: var(--text-2); }
.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.01em; margin-top: 4px; }
.figure .unit { font-size: 18px; color: var(--muted); margin-left: 2px; margin-right: 8px; }
.figure .unit:last-child { margin-right: 0; }
.timecard-caption { font-size: 13px; color: var(--muted); text-align: right; }

.ruler { position: relative; }
.ruler-track {
  position: relative; height: 48px; border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--hours, 12))),
    var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.ruler-block {
  position: absolute; top: 6px; bottom: 6px; min-width: 6px;
  border-radius: 4px; padding: 0 8px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--accent-fill); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  overflow: hidden; white-space: nowrap; z-index: 1;
  font-size: 12px; line-height: 16px;
}
.ruler-block span { overflow: hidden; text-overflow: ellipsis; }
.ruler-block .t { font-family: var(--mono); font-size: 11px; opacity: .8; }
.ruler-block.past { background: color-mix(in srgb, var(--accent-fill) 70%, var(--raised)); }
.ruler-now { position: absolute; z-index: 0; top: -4px; bottom: -4px; width: 0; border-left: 1px solid var(--text); }
.ruler-now::before { content: ''; position: absolute; top: 0; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.ruler-ticks { position: relative; height: 16px; margin-top: 8px; }
.ruler-ticks span { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; line-height: 16px; color: var(--muted); }
.ruler-ticks span:first-child { transform: none; }
.ruler-ticks span:last-child { transform: translateX(-100%); }
.ruler-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.figures { padding: 8px 24px; display: flex; flex-direction: column; }
.figures-row { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.figures-row + .figures-row { border-top: 1px solid var(--line); }
.figures-row .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 20px; line-height: 28px; font-weight: 500; }
.figures-row .val .unit { font-size: 13px; color: var(--muted); margin: 0 4px 0 1px; }
.figures-row .val .unit:last-child { margin-right: 0; }

/* Sections */
.section { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); min-height: 60px; }
.section-title { font-size: 15px; line-height: 20px; font-weight: 500; }
.section-title .count { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* Tasks */
.task-list, .history-list { display: flex; flex-direction: column; }
.task-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; align-items: center; gap: 24px;
  padding: 16px 20px; border-top: 1px solid var(--line);
  transition: background-color var(--fast) var(--ease);
}
.task-item:first-child { border-top: 0; }
.task-item:hover { background: color-mix(in srgb, var(--raised) 50%, transparent); }
.task-title { font-weight: 500; }
.task-desc { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.task-meta .project { color: var(--text-2); }
.priority { display: inline-flex; align-items: center; gap: 6px; }
.priority::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .6; }
.priority.urgent { color: var(--neg); } .priority.urgent::before { background: var(--neg); opacity: 1; }
.priority.high { color: var(--warn); } .priority.high::before { background: var(--warn); opacity: 1; }
.fixed { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fixed .num { color: var(--text-2); font-size: 12px; }
.fixed .btn-small { height: 24px; font-size: 12px; }

.budget-head { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: var(--muted); margin-bottom: 6px; }
.budget-head .num { color: var(--text-2); }
.budget-bar { height: 4px; border-radius: 2px; background: var(--raised-2); overflow: hidden; }
.budget-bar i { display: block; height: 100%; border-radius: 2px; background: var(--text-2); transform-origin: left; }
.budget-bar i.warn { background: var(--warn); }
.budget-bar i.over { background: var(--neg); }
.budget-head.over .num { color: var(--neg); }

/* Time entries */
.entries-filter { display: flex; align-items: center; gap: 8px; }
.filter-field { display: flex; align-items: center; gap: 8px; }
.filter-field label { font-size: 12px; color: var(--muted); }
.entries-filter input[type=date] {
  height: 32px; padding: 0 8px; border-radius: 8px;
  background: var(--raised); border: 0; box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--text);
}
.history-item {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 88px 72px; align-items: center; gap: 16px;
  min-height: 56px; padding: 12px 20px; border-top: 1px solid var(--line);
  transition: background-color var(--fast) var(--ease);
}
.history-item:first-child { border-top: 0; }
.history-item:hover { background: color-mix(in srgb, var(--raised) 50%, transparent); }
.history-when { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.history-when .d { display: block; color: var(--muted); }
.history-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-title .project { color: var(--muted); font-weight: 400; }
.history-notes { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.history-duration { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }
.history-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity var(--fast) var(--ease); }
.history-item:hover .history-actions, .history-item:focus-within .history-actions { opacity: 1; }
.history-actions .icon-btn.del:hover { color: var(--neg); }
.list-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.list-foot .num { color: var(--text); font-size: 13px; }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; color: var(--muted); text-align: center; }
.empty-state .icon { width: 20px; height: 20px; }

/* ---------- Notifications ---------- */
.notif-wrap { position: relative; }
.notif-bell { position: relative; }
.notif-ping { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1200;
  width: 340px; max-width: 88vw; border-radius: 12px; overflow: hidden;
  background: var(--card); box-shadow: var(--float), inset 0 0 0 1px var(--line);
  animation: rise var(--menu) var(--ease);
}
.notif-head { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.notif-head strong { font-weight: 500; }
.notif-readall { color: var(--text-2); font-size: 12px; }
.notif-readall:hover { color: var(--text); }
.notif-list { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.notif-empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: var(--accent-soft); }
.notif-ico { color: var(--muted); padding-top: 2px; }
.notif-item[data-type=salary_paid] .notif-ico { color: var(--pos); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 500; font-size: 13px; }
.notif-msg { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.notif-time { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- Modals and forms ---------- */
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .5); }
html[data-theme=light] .modal { background: rgba(23, 23, 23, .28); }
.modal.show { display: flex; animation: fade 200ms var(--ease); }
.modal-content {
  width: 100%; max-width: 480px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 16px; box-shadow: var(--float), inset 0 0 0 1px var(--line);
}
.modal.show .modal-content { animation: rise 300ms var(--ease); }
.modal-content.wide { max-width: 640px; }
.modal-header { padding: 20px 24px 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.modal-header h3 { font: inherit; }
.modal-body { padding: 16px 24px 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: flex; gap: 6px; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.form-group label .day { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.form-group input, .form-group select, .form-group textarea, .fc-row input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 0;
  background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow var(--fast) var(--ease);
}
.form-group textarea { height: auto; padding: 8px 12px; resize: vertical; }
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .fc-row input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
input[type=datetime-local], input[type=date], input[type=number] { font-family: var(--mono); font-size: 13px; }
select:disabled { opacity: .5; }
.hint { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.form-actions .btn { min-width: 96px; }
.fc-row { display: grid; grid-template-columns: 120px 148px minmax(0, 1fr) 28px; gap: 8px; align-items: center; margin-bottom: 8px; }
.fc-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.fc-total strong { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--text); }

#confettiCanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3000; }

/* ---------- Mobile (sidebar.js adds the menu button + overlay) ---------- */
.mobile-menu-btn { display: none; width: 36px; height: 36px; border-radius: 8px; place-items: center; color: var(--text-2); }
.mobile-menu-btn svg { width: 18px; height: 18px; stroke-width: 1.5; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 850; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity 240ms var(--ease); }
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 1100px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
  .figures { flex-direction: row; padding: 0; }
  .figures-row { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 16px 20px; }
  .figures-row + .figures-row { border-top: 0; border-left: 1px solid var(--line); }
  .task-item { grid-template-columns: minmax(0, 1fr) 160px auto; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 300ms var(--ease); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: inline-grid; }
  .top-bar { padding: 8px 16px; gap: 8px; flex-wrap: wrap; }
  .page-header { order: 10; flex-basis: 100%; flex-direction: column; gap: 0; padding: 4px 0; }
  .page-header h1 { font-size: 18px; line-height: 24px; }
  .top-bar-actions { margin-left: auto; }
  .top-bar-actions .btn-label { display: none; }
  .top-bar-actions .btn { width: 36px; padding: 0; }
  .suite-cur { display: none; }
  .suite-menu { position: fixed; left: 12px; right: 12px; top: 64px; min-width: 0; }
  .content-area { padding: 16px; gap: 16px; }
  .timecard { padding: 20px; gap: 20px; }
  .timecard-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .timecard-caption { text-align: left; }
  .ruler-block .t { display: none; }
  .figures-row { padding: 12px 16px; }
  .figures-row .val { font-size: 16px; line-height: 24px; }
  .section-header { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .entries-filter { flex-wrap: wrap; }
  .filter-field { flex: 1 1 130px; }
  .filter-field input { flex: 1; min-width: 0; }
  .task-item { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; padding: 16px; }
  .task-item .budget { grid-column: 1 / -1; grid-row: 2; }
  .task-item .log { grid-column: 2; grid-row: 1; align-self: start; }
  .history-item { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; }
  .history-when { grid-column: 1; grid-row: 2; }
  .history-when .d { display: inline; margin-right: 6px; }
  .history-main { grid-column: 1; grid-row: 1; }
  .history-duration { grid-column: 2; grid-row: 1; }
  .history-actions { grid-column: 2; grid-row: 2; opacity: 1; }
  .history-title { white-space: normal; }
  .fc-row { grid-template-columns: 1fr 1fr 36px; }
  .fc-row .fc-note { grid-column: 1 / 3; }
  .modal { padding: 12px; align-items: flex-end; }
  .salary-banner { flex-wrap: wrap; }
  .salary-banner .btn { margin-left: 44px; }
  /* iOS zooms on focused fields under 16px */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
  .btn, .nav-item, .icon-btn, .suite-switch-btn, .suite-theme-btn { min-height: 40px; }
  .icon-btn, .suite-theme-btn { min-width: 40px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.content-area > * { animation: rise 400ms var(--ease) both; }
.content-area > *:nth-child(2) { animation-delay: 40ms; }
.content-area > *:nth-child(3) { animation-delay: 80ms; }
.content-area > *:nth-child(4) { animation-delay: 120ms; }
.content-area > *:nth-child(5) { animation-delay: 160ms; }

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

/* ---------- App icons (launcher tiles, app switcher, sidebar app badge) ----------
   Tinted tile: the icon in the app colour on a 16% tint of that colour (no fill, no glow).
   New app? Add one --app-<key> colour here; suite.js already tags items with data-app. */
:root {
  --app-payroll: #5b86ff;
  --app-expenses: #e0a33a;
  --app-betting-ai: #e0609a;
  --app-client-hunting: #3fbf7f;
  --app-client-profiles: #36b3cc;
  --app-affiliates-profile: #9b87f5;
  --app-todo: #2fb3a3;
  --app-nuc: #3d9be6;
  --app-ai-tracker: #ec7f3f;
  --app-account-profiles: #a17cf0;
  --app-sales-pipeline: #3fbf7f;
  --app-job-tracker: #b48af0;
}
html[data-theme=light] {
  --app-payroll: #3b63e0;
  --app-expenses: #b7791f;
  --app-betting-ai: #c0407c;
  --app-client-hunting: #16a34a;
  --app-client-profiles: #0e8aa3;
  --app-affiliates-profile: #6d4fd8;
  --app-todo: #0f8f80;
  --app-nuc: #1d7fc4;
  --app-ai-tracker: #c2571c;
  --app-account-profiles: #7a4fd6;
  --app-sales-pipeline: #16a34a;
  --app-job-tracker: #8a4fd6;
}
.t-payroll, .suite-item[data-app="payroll"], html[data-app="payroll"] #appIcon { --c: var(--app-payroll); }
.t-expenses, .suite-item[data-app="expenses"], html[data-app="expenses"] #appIcon { --c: var(--app-expenses); }
.t-betting-ai, .suite-item[data-app="betting-ai"], html[data-app="betting-ai"] #appIcon { --c: var(--app-betting-ai); }
.t-client-hunting, .suite-item[data-app="client-hunting"], html[data-app="client-hunting"] #appIcon { --c: var(--app-client-hunting); }
.t-client-profiles, .suite-item[data-app="client-profiles"], html[data-app="client-profiles"] #appIcon { --c: var(--app-client-profiles); }
.t-affiliates-profile, .suite-item[data-app="affiliates-profile"], html[data-app="affiliates-profile"] #appIcon { --c: var(--app-affiliates-profile); }
.t-todo, .suite-item[data-app="todo"], html[data-app="todo"] #appIcon { --c: var(--app-todo); }
.t-nuc, .suite-item[data-app="nuc"], html[data-app="nuc"] #appIcon { --c: var(--app-nuc); }
.t-ai-tracker, .suite-item[data-app="ai-tracker"], html[data-app="ai-tracker"] #appIcon { --c: var(--app-ai-tracker); }
.t-account-profiles, .suite-item[data-app="account-profiles"], html[data-app="account-profiles"] #appIcon { --c: var(--app-account-profiles); }
.t-sales-pipeline, .suite-item[data-app="sales-pipeline"], html[data-app="sales-pipeline"] #appIcon { --c: var(--app-sales-pipeline); }
.t-job-tracker, .suite-item[data-app="job-tracker"], html[data-app="job-tracker"] #appIcon { --c: var(--app-job-tracker); }
.tile .ic, .suite-tile, #appIcon {
  color: var(--c, var(--accent)) !important;
  background: color-mix(in srgb, var(--c, var(--accent-fill)) 16%, transparent) !important;
  box-shadow: none !important;
}
.tile .ic svg, .suite-tile svg, #appIcon svg { stroke: var(--c, var(--accent)); }
.suite-item.suite-home .suite-tile { --c: var(--text-2); }

/* Icon tiles never shrink when a description wraps */
.suite-tile, .tile .ic, #appIcon { flex: 0 0 auto !important; }
.suite-tile, #appIcon { width: 32px !important; height: 32px !important; min-width: 32px; border-radius: 8px; }
.suite-item { align-items: flex-start; }
.suite-item > span:last-child { min-width: 0; padding-top: 1px; }

/* ---------- Sidebar menu icons: small tinted tiles like the app icons (colours cycle through the suite palette) ---------- */
.nav-item .nav-icon {
  width: 24px !important; height: 24px !important; flex: 0 0 auto; border-radius: 7px;
  color: var(--nc, var(--accent)) !important;
  background: color-mix(in srgb, var(--nc, var(--accent-fill)) 16%, transparent);
}
.nav-item .nav-icon svg { width: 14px !important; height: 14px !important; stroke: var(--nc, var(--accent)); stroke-width: 1.75; }
.nav-item { gap: 10px; }
.nav-menu .nav-item:nth-of-type(8n+1) { --nc: var(--app-payroll); }
.nav-menu .nav-item:nth-of-type(8n+2) { --nc: var(--app-expenses); }
.nav-menu .nav-item:nth-of-type(8n+3) { --nc: var(--app-betting-ai); }
.nav-menu .nav-item:nth-of-type(8n+4) { --nc: var(--app-client-hunting); }
.nav-menu .nav-item:nth-of-type(8n+5) { --nc: var(--app-client-profiles); }
.nav-menu .nav-item:nth-of-type(8n+6) { --nc: var(--app-affiliates-profile); }
.nav-menu .nav-item:nth-of-type(8n+7) { --nc: var(--app-todo); }
.nav-menu .nav-item:nth-of-type(8n+8) { --nc: var(--app-ai-tracker); }

/* Sidebar app badge (2026-11-07): suite.js puts the current app's icon + name under the logo in every app, then the menu */
.side-app { display: flex; align-items: center; gap: 10px; height: auto; padding: 0 8px; margin: 0 0 16px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.side-app .side-app-name, .side-app > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user:not(:has(.user-avatar)) .user-info { padding-left: 4px; }
