@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Michroma";
  src: url("fonts/michroma-latin.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  --bg: #070b13;
  --bg2: #0b111d;
  --panel: rgba(18, 27, 44, .72);
  --panel2: rgba(26, 38, 60, .8);
  --line: rgba(140, 170, 220, .14);
  --line2: rgba(140, 170, 220, .26);
  --ink: #e9eef7;
  --mute: #8f9db4;
  --dim: #5d6a80;
  --blue: #3b7cff;
  --cyan: #56d9f2;
  --ok: #3ddc84;
  --warn: #ffb547;
  --bad: #ff6b6b;
  --site: #56d9f2;
  --remote: #3b7cff;
  --r: 18px;
  --r2: 12px;
  --top: 60px;
  --gx: clamp(14px, 4vw, 28px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font: 400 16px/1.45 "Bricolage", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.defs { position: absolute; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ backdrop */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg__glow {
  position: absolute; inset: -30% -20% auto; height: 80vh;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(59, 124, 255, .18), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(86, 217, 242, .10), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}
.bg__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(150, 180, 230, .10) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
@keyframes drift { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }

/* ------------------------------------------------------------ mark */
.mark { width: 30px; height: 30px; }
.mark .mark__l path { stroke: var(--blue); stroke-width: 3.4; opacity: .9; }
.mark .mark__d circle { fill: var(--cyan); stroke: none; }
.mark .mark__d circle:first-child { fill: var(--blue); }

/* ------------------------------------------------------------ top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--top) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gx) 0;
  background: linear-gradient(to bottom, rgba(7, 11, 19, .92), rgba(7, 11, 19, .72));
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.locked .top { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__name { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand__tag {
  font: 9px/1 "Michroma", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); padding: 5px 7px 4px; border: 1px solid rgba(86, 217, 242, .35); border-radius: 6px;
}
.iconbtn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 20px; color: var(--mute);
  transition: background .2s, color .2s, border-color .2s;
}
.iconbtn:hover { color: var(--ink); border-color: var(--line2); }
.iconbtn:active { transform: scale(.96); }

/* ------------------------------------------------------------ layout */
.view {
  width: 100%; max-width: 760px; margin: 0 auto;
  padding: 10px var(--gx) calc(110px + var(--safe-b));
  outline: none;
}
.view.enter > * { animation: rise .45s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
.view.enter > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.label {
  font: 9.5px/1.2 "Michroma", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 10px; }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------ month switch */
.period { display: flex; align-items: center; gap: 4px; }
.period__btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 0; background: transparent; color: var(--mute); font-size: 20px;
}
.period__btn:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.period__label {
  min-width: 0; border: 0; background: transparent; padding: 6px 4px; font-weight: 600; font-size: 15px;
  white-space: nowrap;
}
.period__label.is-now::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%;
  background: var(--ok); vertical-align: middle; box-shadow: 0 0 8px var(--ok);
}

/* ------------------------------------------------------------ ZaiSis card */
.hq { padding: 18px 18px 8px; overflow: hidden; }
.hq::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 0% 0%, rgba(59, 124, 255, .16), transparent 55%);
}
.hq__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hq__title { display: flex; align-items: center; gap: 10px; }
.hq__title h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.hq__title .mark { width: 34px; height: 34px; }
.hq__stats { position: relative; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin: 18px 0 6px; }
.stat__v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat__v small { font-size: 15px; font-weight: 500; color: var(--mute); margin-left: 3px; }
.stat--site .stat__v { color: var(--site); font-size: 22px; }
.stat--remote .stat__v { color: #7ea6ff; font-size: 22px; }
.split { position: relative; display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .06); margin: 12px 0 4px; }
.split i { display: block; height: 100%; transition: width .6s var(--ease); }
.split .s { background: var(--site); }
.split .r { background: var(--remote); }

.todos { position: relative; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.todo-add { display: flex; gap: 8px; margin: 10px 0 6px; }
.todo-add input { flex: 1; }
.todo { display: flex; align-items: flex-start; gap: 12px; padding: 9px 2px; border-bottom: 1px solid rgba(140, 170, 220, .07); }
.todo:last-child { border-bottom: 0; }
.todo__box {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 8px; border: 1.5px solid var(--line2); background: transparent; color: transparent; font-size: 15px; padding: 0;
  transition: background .2s, border-color .2s, color .2s;
}
.todo.done .todo__box { background: var(--ok); border-color: var(--ok); color: #05210f; }
.todo__text { flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.todo.done .todo__text { color: var(--dim); text-decoration: line-through; }
.todo__del { flex: none; border: 0; background: none; color: var(--dim); font-size: 16px; padding: 4px; opacity: .7; }
.todo__more { border: 0; background: none; color: var(--mute); padding: 10px 2px; font-size: 14px; }

/* ------------------------------------------------------------ clients */
.clients { display: grid; gap: 10px; }
.client {
  display: block; padding: 16px 16px 14px 20px; text-decoration: none; overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.client:hover { border-color: var(--line2); background: var(--panel2); }
.client:active { transform: scale(.99); }
.client__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.client__name { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.client__h { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.client__h small { font-size: 13px; color: var(--mute); font-weight: 500; margin-left: 2px; }
.client__meta { margin-top: 4px; color: var(--mute); font-size: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.client__last { margin-top: 8px; font-size: 14px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client__last b { color: var(--ink); font-weight: 500; }
.client .split { margin: 12px 0 0; height: 4px; }
.addclient {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px;
  border: 1px dashed var(--line2); border-radius: var(--r); background: transparent; color: var(--mute);
}
.addclient:hover { color: var(--ink); border-color: var(--cyan); }

.c0 { --c: #3b7cff; } .c1 { --c: #56d9f2; } .c2 { --c: #3ddc84; } .c3 { --c: #ffb547; }
.c4 { --c: #9b7bff; } .c5 { --c: #ff6fa8; } .c6 { --c: #ff8a4c; } .c7 { --c: #2ec4b6; }

/* ------------------------------------------------------------ client view */
.crumb { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.crumb h1 { flex: 1; min-width: 0; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb h1::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 12px var(--c); vertical-align: 3px;
}
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px;
  border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.seg button {
  min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--mute); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg button svg { font-size: 18px; }
.seg button[aria-pressed="true"] { background: var(--panel2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.seg--mode button[data-mode="remote"][aria-pressed="true"] { color: #9ab9ff; box-shadow: inset 0 0 0 1px rgba(59, 124, 255, .55); background: rgba(59, 124, 255, .14); }
.seg--mode button[data-mode="site"][aria-pressed="true"] { color: var(--site); box-shadow: inset 0 0 0 1px rgba(86, 217, 242, .5); background: rgba(86, 217, 242, .1); }
.seg--mode button[data-mode="both"][aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }
.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.tot { padding: 11px 12px; border-radius: var(--r2); background: var(--panel); border: 1px solid var(--line); }
.tot__v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tot--all { background: linear-gradient(135deg, rgba(59, 124, 255, .28), rgba(86, 217, 242, .1)); border-color: rgba(86, 217, 242, .3); }

.days { display: grid; gap: 8px; }
.day { padding: 12px 14px; }
.day.today { border-color: rgba(86, 217, 242, .4); box-shadow: 0 0 0 1px rgba(86, 217, 242, .15), 0 10px 40px -20px rgba(86, 217, 242, .5); }
.day__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day__name { font-weight: 600; font-size: 15px; }
.day__name span { color: var(--mute); font-weight: 400; margin-left: 6px; }
.day.today .day__name::after { content: "azi"; margin-left: 8px; font: 9px/1 "Michroma", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.day__sum { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.day.empty { background: transparent; border-style: dashed; padding: 0; }
.day.empty .day__add {
  width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border: 0; background: transparent; color: var(--dim); text-align: left;
}
.day.empty .day__add:hover { color: var(--mute); }
.day.empty.weekend { opacity: .6; }

.entry {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; margin-top: 10px;
  padding: 10px 12px; border-radius: var(--r2); border: 1px solid transparent; background: rgba(255, 255, 255, .035);
  transition: background .2s, border-color .2s;
}
.entry:hover { background: rgba(255, 255, 255, .06); border-color: var(--line); }
.entry__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.entry__tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 13px; white-space: nowrap;
  font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .05);
}
.tag svg { font-size: 13px; }
.tag--site { color: var(--site); background: rgba(86, 217, 242, .1); }
.tag--remote { color: #9ab9ff; background: rgba(59, 124, 255, .14); }
.entry__rt { display: block; margin-top: 4px; font-size: 12.5px; color: var(--dim); }

.empty-state { text-align: center; color: var(--mute); padding: 40px 16px; }
.empty-state .mark { width: 46px; height: 46px; opacity: .5; margin-bottom: 8px; }

.reportbtn {
  width: 100%; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; border-radius: 16px; border: 1px solid rgba(86, 217, 242, .35);
  background: linear-gradient(135deg, rgba(59, 124, 255, .22), rgba(86, 217, 242, .08)); font-weight: 650; font-size: 16px;
}
.reportbtn svg { font-size: 20px; color: var(--cyan); }
.reportbtn:hover { border-color: var(--cyan); }

.fab {
  position: fixed; z-index: 15; right: max(var(--gx), calc(50% - 380px + var(--gx))); bottom: calc(22px + var(--safe-b));
  width: 62px; height: 62px; border-radius: 20px; border: 0; display: grid; place-items: center; font-size: 28px; color: #fff;
  background: linear-gradient(140deg, #4f8bff, #2a63e6); box-shadow: 0 12px 30px -8px rgba(59, 124, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s var(--ease);
}
.fab:active { transform: scale(.94); }
.fab svg { stroke-width: 2.4; }

/* ------------------------------------------------------------ forms */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 13px; color: var(--mute); }
.input, .textarea, select.input {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: rgba(5, 9, 16, .6);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(86, 217, 242, .15); }
.input[type="date"] { min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row > .input { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  min-height: 40px; min-width: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .03); color: var(--mute); font-weight: 600; font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--cyan); background: rgba(86, 217, 242, .12); }
.hours { display: grid; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper__btn {
  flex: none; width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .04); display: grid; place-items: center; font-size: 22px;
}
.stepper__btn:active { transform: scale(.95); }
.stepper__val { flex: 1; position: relative; }
.stepper__val input { text-align: center; font-size: 26px; font-weight: 700; min-height: 52px; padding: 6px 30px 6px 14px; font-variant-numeric: tabular-nums; }
.stepper__val em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--mute); pointer-events: none; }
.stepper__label { font-size: 13px; color: var(--mute); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

.btn {
  min-height: 52px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .04); font-weight: 650; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn--primary { border: 0; color: #fff; background: linear-gradient(140deg, #4f8bff, #2a63e6); box-shadow: 0 10px 26px -10px rgba(59, 124, 255, .8); }
.btn--primary:disabled { opacity: .6; }
.btn--danger { color: var(--bad); border-color: rgba(255, 107, 107, .35); background: transparent; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.actions { display: grid; gap: 10px; margin-top: 8px; }
.actions--2 { grid-template-columns: 1fr 2fr; }
details.more { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
details.more summary { cursor: pointer; padding: 13px 0; color: var(--mute); font-size: 14px; list-style: none; }
details.more summary::before { content: "+"; display: inline-block; width: 16px; color: var(--cyan); }
details.more[open] summary::before { content: "–"; }
details.more .field { margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--dim); margin: -6px 0 16px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 8px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 3px var(--bg2); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch input { width: 22px; height: 22px; accent-color: var(--blue); }

/* report preview */
.rp { display: grid; gap: 10px; margin-bottom: 16px; }
.rp__item { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.rp__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--mute); margin-bottom: 8px; }
.rp__item .textarea { min-height: 70px; font-size: 15px; }
.rp__note { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.rp__sum { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: rgba(59, 124, 255, .1); margin-bottom: 16px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ sheet */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(2, 5, 10, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .25s both; }
.sheet__panel {
  position: relative; width: 100%; max-width: 620px; max-height: 92dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #111a2b, #0b111d); border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 24px 24px 0 0; box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .7);
  animation: up .38s var(--ease) both;
}
.sheet.closing .sheet__panel { animation: down .22s ease-in both; }
.sheet.closing .sheet__scrim { animation: fade .22s reverse both; }
.sheet__grip { width: 42px; height: 5px; border-radius: 5px; background: var(--line2); margin: 9px auto 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px 6px 20px; }
.sheet__head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px calc(22px + var(--safe-b)); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 700px) {
  .sheet { align-items: center; }
  .sheet__panel { border-radius: 24px; border-bottom: 1px solid var(--line2); max-height: 88dvh; animation-name: pop; }
  .sheet.closing .sheet__panel { animation: fade .18s reverse both; }
  .sheet__grip { display: none; }
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
body.modal { overflow: hidden; }

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 20px);
  padding: 11px 18px; border-radius: 12px; background: #1b2a44; border: 1px solid var(--line2); color: var(--ink);
  font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(255, 107, 107, .5); }

/* ------------------------------------------------------------ login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gx); margin-top: calc(-1 * var(--top)); }
.locked .view { padding-bottom: 24px; }
.login__box { width: 100%; max-width: 360px; text-align: center; }
.login__mark { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; }
.login__mark .mark { width: 100%; height: 100%; }
.login__mark::before, .login__mark::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(86, 217, 242, .25);
  animation: ping 3.2s var(--ease) infinite;
}
.login__mark::after { animation-delay: 1.6s; }
@keyframes ping { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.login .mark .mark__l path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 1s var(--ease) forwards; }
.login .mark .mark__d circle { transform-box: fill-box; transform-origin: center; animation: dot .6s var(--ease) both; }
.login .mark .mark__d circle:nth-child(2) { animation-delay: .35s; }
.login .mark .mark__d circle:nth-child(3) { animation-delay: .45s; }
.login .mark .mark__d circle:nth-child(4) { animation-delay: .55s; }
.login .mark .mark__d circle:nth-child(5) { animation-delay: .65s; }
.login .mark .mark__d circle:nth-child(6) { animation-delay: .75s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { from { transform: scale(0); } }
.login h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.login p { margin: 6px 0 26px; color: var(--mute); }
.login form { display: grid; gap: 12px; text-align: left; }
.login .input { text-align: center; font-size: 18px; letter-spacing: .04em; }

.noscript { padding: 40px; text-align: center; }

/* ------------------------------------------------------------ larger screens */
@media (min-width: 700px) {
  .clients { grid-template-columns: 1fr 1fr; }
  .addclient { grid-column: 1 / -1; }
  .hq { padding: 22px 24px 10px; }
  .stat__v { font-size: 36px; }
}
@media (max-width: 420px) {
  .totals { gap: 6px; }
  .tot { padding: 9px 9px 8px; }
  .tot__v { font-size: 17px; }
  .tot .label { font-size: 8px; letter-spacing: .12em; }
}
@media (max-width: 380px) {
  .hq__stats { grid-template-columns: 1fr 1fr; }
  .hq__stats .stat--all { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ calm mode */
.calm .bg__glow { animation: none; }
.calm .view.enter > *, .calm .login__mark::before, .calm .login__mark::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.hours .chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hours .chip { min-width: 0; padding: 0; }
.reportbtn--top { margin: 0 0 16px; }
.actions--sticky {
  position: sticky; bottom: calc(-22px - var(--safe-b)); margin: 0 -20px; padding: 12px 20px calc(16px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(11, 17, 29, 0), #0b111d 28%);
}
.rp__item .textarea { resize: none; overflow: hidden; }

/* ------------------------------------------------------------ v2: logos, lighter layout */
.bg__grid { display: none; }
.brand__tag { display: none; }
.hq { padding: 18px 18px 10px; }
.hq__sum { position: relative; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 18px 0 4px; }
.hq__total { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: .95; font-variant-numeric: tabular-nums; }
.hq__total small { font-size: 18px; font-weight: 500; color: var(--mute); margin-left: 4px; letter-spacing: 0; }
.hq__split, .sumline { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--mute); font-size: 14px; padding-bottom: 4px; }
.k { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k--site::before, .k--remote::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--site); }
.k--remote::before { background: var(--remote); }
.todos { margin-top: 16px; padding-top: 4px; border-top: 0; }
.todo-add { margin: 6px 0 2px; }

.clients { margin-top: 14px; }
.client {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px;
  padding: 18px 18px 16px;
}
.client__id { display: flex; align-items: center; min-width: 0; height: 36px; }
.logo { display: block; max-height: 34px; max-width: 100%; width: auto; object-fit: contain; }
.client__h { grid-row: span 2; font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.client__h small { font-size: 14px; color: var(--mute); font-weight: 500; margin-left: 2px; }
.client__h.zero { color: var(--dim); }
.client__meta { color: var(--dim); font-size: 13.5px; }
.addclient { margin-top: 12px; border-color: var(--line); padding: 12px; font-size: 15px; }

.crumb h1 { display: flex; align-items: center; justify-content: center; height: 42px; font-size: 21px; }
.crumb h1::before { display: none; }
.logo--head { max-height: 36px; }
.bar { margin: 12px 0 2px; }
.sum b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sumline { margin: 0 2px 14px; font-size: 13.5px; }
.totals { display: none; }
.tag { padding: 3px 8px 3px 7px; }

.logo-edit { display: flex; align-items: center; gap: 8px; }
.logo-prev {
  flex: 1; min-width: 0; height: 56px; display: flex; align-items: center; padding: 0 12px;
  border: 1px dashed var(--line2); border-radius: 12px; color: var(--dim); font-size: 14px;
}
.logo-prev img { max-height: 38px; max-width: 100%; }
.logo-prev img.raw { background: #fff; border-radius: 6px; padding: 3px; }

/* Galaxy Z Fold: cover screen ~410px wide, inner screen ~750-840px, nearly square */
@media (min-width: 700px) {
  .view { max-width: 900px; }
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .days { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
  .day.empty { min-height: 48px; }
}
@media (max-width: 420px) {
  .hq__total { font-size: 40px; }
  .client { padding: 16px; }
  .logo { max-height: 30px; }
}

.install { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 6px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 124, 255, .18), rgba(86, 217, 242, .06)); border: 1px solid rgba(86, 217, 242, .25); }
.install div { flex: 1; display: grid; gap: 2px; }
.install span { font-size: 13px; color: var(--mute); }
.login h1 { margin-bottom: 26px; }
