/* روزنگار — visual language from roozegar_1.html + glass surfaces */
@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn"), url("https://cdn.jsdelivr.net/npm/vazirmatn@33.0.3/fonts/webfonts/Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ECEDEF; --surface: #FFFFFF; --surface-2: #F4F5F6; --line: #D9DCE0; --line-2: #E7E9EC;
  --ink: #141B24; --muted: #5B6676; --faint: #8993A1;
  --accent: #3D4654; --accent-ink: #FFFFFF; --accent-soft: #E3E6EA;
  --amber: #A86A12; --amber-soft: #FAF0DC; --amber-line: #EED9B0;
  --good: #1F8A5B; --good-soft: #E0F2E9; --bad: #C2410C; --bad-soft: #FCE8DD;
  --fri: #F8EFEF;
  --cat-net: #1F5FBF; --cat-srv: #7A4FC9; --cat-sec: #C2410C; --cat-sup: #1F8A5B; --cat-me: #7A8594;
  --glass: rgba(255, 255, 255, .62); --glass-strong: rgba(255, 255, 255, .82); --glass-line: rgba(255, 255, 255, .7);
  --blob-1: rgba(90, 100, 115, .16); --blob-2: rgba(140, 146, 156, .14); --blob-3: rgba(60, 66, 76, .08);
  --shadow: 0 1px 2px rgba(20, 27, 36, .05), 0 8px 28px rgba(20, 27, 36, .07);
  --r: 14px;
  --f-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121315; --surface: #1B1D20; --surface-2: #222428; --line: #33363C; --line-2: #2A2C31;
    --ink: #E5EAF1; --muted: #9BA6B5; --faint: #6E7989;
    --accent: #C9CED6; --accent-ink: #121315; --accent-soft: #2C2F35;
    --amber: #E3AB4E; --amber-soft: #2A2215; --amber-line: #4A3B1F;
    --good: #4DC48B; --good-soft: #16291F; --bad: #F08A5D; --bad-soft: #321F18;
    --fri: #211A1E;
    --cat-net: #72A2FF; --cat-srv: #A98BF0; --cat-sec: #F08A5D; --cat-sup: #4DC48B; --cat-me: #8C97A6;
    --glass: rgba(30, 32, 36, .6); --glass-strong: rgba(30, 32, 36, .86); --glass-line: rgba(255, 255, 255, .07);
    --blob-1: rgba(200, 205, 214, .07); --blob-2: rgba(150, 156, 166, .06); --blob-3: rgba(120, 126, 136, .05);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121315; --surface: #1B1D20; --surface-2: #222428; --line: #33363C; --line-2: #2A2C31;
  --ink: #E5EAF1; --muted: #9BA6B5; --faint: #6E7989;
  --accent: #C9CED6; --accent-ink: #121315; --accent-soft: #2C2F35;
  --amber: #E3AB4E; --amber-soft: #2A2215; --amber-line: #4A3B1F;
  --good: #4DC48B; --good-soft: #16291F; --bad: #F08A5D; --bad-soft: #321F18;
  --fri: #211A1E;
  --cat-net: #72A2FF; --cat-srv: #A98BF0; --cat-sec: #F08A5D; --cat-sup: #4DC48B; --cat-me: #8C97A6;
  --glass: rgba(30, 32, 36, .6); --glass-strong: rgba(30, 32, 36, .86); --glass-line: rgba(255, 255, 255, .07);
  --blob-1: rgba(200, 205, 214, .07); --blob-2: rgba(150, 156, 166, .06); --blob-3: rgba(120, 126, 136, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(40vmax 40vmax at 85% -10%, var(--blob-1), transparent 70%),
    radial-gradient(35vmax 35vmax at -10% 30%, var(--blob-2), transparent 70%),
    radial-gradient(30vmax 30vmax at 70% 110%, var(--blob-3), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-size: .85em; direction: ltr; unicode-bidi: isolate; }
.app { max-width: 860px; margin: 0 auto; padding-inline: 16px; padding-block: 24px 72px; }

/* glass */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow);
}

/* header */
.hd { display: grid; gap: 4px; padding-bottom: 18px; }
.hd-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.greet { color: var(--muted); font-weight: 500; }
.sync { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync[data-s="ok"]::before { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.sync[data-s="warn"]::before { background: var(--amber); }
.hd h1 { margin: 0; font-size: clamp(28px, 6vw, 38px); font-weight: 800; line-height: 1.3; text-wrap: balance; }
.hd-sub { color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.prog { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.prog-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--good), color-mix(in srgb, var(--good) 70%, #fff)); border-radius: 99px; transition: width .35s ease; }
.prog-text { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* tabs */
.tabs { position: sticky; top: 0; z-index: 8; padding-block: 8px; margin-bottom: 6px; }
.tabs-in { display: flex; gap: 4px; border-radius: 14px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; border: 0; background: transparent; border-radius: 10px; padding: 8px 12px; font-weight: 500; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--glass-strong); color: var(--accent); font-weight: 700; box-shadow: var(--shadow); }
.tb { font-size: 11px; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); line-height: 18px; font-weight: 700; }
.tb:empty { display: none; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 4px 12px; font-size: 13.5px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--glass-strong); color: var(--accent); font-weight: 700; box-shadow: var(--shadow); }

/* blocks */
.blk { margin-top: 22px; }
.blk-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.blk-h h2 { margin: 0; font-size: 16px; font-weight: 700; }
.blk-h .aside { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.hint { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; max-width: 64ch; }
.list { list-style: none; margin: 0; padding: 0; border-radius: var(--r); overflow: hidden; }
.list:empty { display: none; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.item:first-child { border-top: 0; }
.item.click { cursor: pointer; }
.item.click:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.item .body { flex: 1; min-width: 0; display: grid; }
.ttl { overflow-wrap: anywhere; }
.item.done .ttl { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line); }
.meta { font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat-me); display: inline-block; flex: none; }
.dot.c-net { background: var(--cat-net); } .dot.c-srv { background: var(--cat-srv); } .dot.c-sec { background: var(--cat-sec); } .dot.c-sup { background: var(--cat-sup); }
.note { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.empty-row { padding: 14px; color: var(--faint); font-size: 13.5px; border: 1px dashed var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.ghost { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 2px 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.del { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 2px 8px; font-size: 12.5px; color: var(--faint); }
.del:hover { color: var(--bad); }
.del.armed { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.chk { width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; border: 1.5px solid var(--line); background: var(--surface-2); display: grid; place-items: center; padding: 0; color: transparent; transition: background .15s, border-color .15s; }
.chk svg { width: 15px; height: 15px; }
.chk:hover { border-color: var(--good); }
.chk[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.pill { display: inline-block; font-size: 11.5px; padding: 0 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; line-height: 20px; border: 1px solid var(--line-2); }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* forms */
.add { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.add input[type=text] { flex: 1 1 220px; min-width: 0; }
input[type=text], input[type=password], input[type=number], input[type=time], input[type=tel], input[type=email], select, textarea {
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; min-height: 40px; width: auto;
}
textarea { width: 100%; min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { padding-inline: 10px; }
.btn { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 9px; padding: 8px 16px; font-weight: 700; min-height: 40px; white-space: nowrap; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.good { background: var(--good); color: #fff; }
.btn.quiet { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.block { width: 100%; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; border-radius: var(--r); padding: 12px; }
.add-grid .full, .form-grid .full { grid-column: 1 / -1; }
.add-grid label, .form-grid label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.add-grid label > *, .form-grid label > * { font-size: 15px; color: var(--ink); width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.card { border-radius: var(--r); padding: 14px; }
.card + .card { margin-top: 12px; }
.card h3 { margin: 0 0 10px; font-size: 14.5px; }
.wd-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.wd { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--faint); padding: 0; }
.wd[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.wd.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 7px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.grow { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass-strong); font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* yearly */
.remind { background: color-mix(in srgb, var(--amber-soft) 80%, transparent); border: 1px solid var(--amber-line); }
.remind .item { border-top-color: var(--amber-line); }
.amber-h { color: var(--amber); }
.ybadge { width: 46px; flex-shrink: 0; border-radius: 9px; overflow: hidden; border: 1px solid var(--amber-line); background: var(--surface); text-align: center; line-height: 1.2; }
.ybadge b { display: block; font-size: 18px; padding: 4px 0 3px; font-variant-numeric: tabular-nums; }
.ybadge span { display: block; font-size: 10.5px; background: var(--amber); color: var(--surface); padding: 2px 0; font-weight: 700; }
.due { font-size: 12.5px; font-weight: 700; color: var(--amber); }
.due.over { color: var(--bad); }
.due.ok { color: var(--good); }
.overdue h2 { color: var(--bad); }

/* calendar */
.cal-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.cal-h h2 { margin: 0; font-size: 20px; font-weight: 800; text-align: center; }
.cal-h small { display: block; font-weight: 400; color: var(--faint); font-size: 11.5px; }
.cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { margin-top: 12px; margin-bottom: 4px; }
.cal-wd span { text-align: center; font-size: 12px; color: var(--faint); font-weight: 700; }
.cal-wd span:last-child { color: var(--bad); }
.cell { height: 62px; border-radius: 10px; background: var(--glass); border: 1px solid var(--glass-line); display: grid; grid-template-rows: auto auto 1fr; justify-items: center; align-content: start; padding: 5px 2px 4px; }
.cell.empty { background: transparent; border: 0; }
.cell .dn { font-size: 16px; font-weight: 700; line-height: 1.2; }
.cell .gd { font-size: 9.5px; color: var(--faint); line-height: 1.2; }
.cell .dots { display: flex; gap: 3px; align-items: end; padding-top: 3px; }
.cell .dots i, .legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.d-task { background: var(--accent); }
.d-task.all { background: var(--good); }
.d-year { background: var(--amber); }
.cell.fri { background: color-mix(in srgb, var(--fri) 80%, transparent); }
.cell.fri .dn { color: var(--bad); }
.cell.past .dn { color: var(--muted); font-weight: 500; }
.cell.today { border: 2px solid var(--accent); }
.cell.sel { background: var(--accent-soft); border-color: var(--accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--faint); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dd-routines { font-size: 13px; color: var(--muted); margin-top: 8px; }
.d-rep { background: var(--cat-srv); }
.d-tk { background: var(--bad); }
.d-act { background: var(--faint); }

/* work log */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.person { display: grid; gap: 4px; text-align: start; border-radius: var(--r); padding: 12px; cursor: pointer; }
.person[aria-pressed="true"] { outline: 2px solid var(--accent); }
.time { color: var(--faint); min-width: 44px; }

/* tickets & chat */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--faint); font-size: 13px; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.them { align-self: flex-start; background: var(--glass-strong); border: 1px solid var(--line-2); border-start-start-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--accent-soft); border-start-end-radius: 4px; }
.msg.note { align-self: center; background: var(--amber-soft); border: 1px dashed var(--amber-line); }
.msg .when { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.msg.ai { white-space: normal; }
.md h4 { margin: 10px 0 4px; font-size: 14.5px; }
.md h4:first-child { margin-top: 0; }
.md p { margin: 4px 0; }
.md ul, .md ol { margin: 4px 0; padding-inline-start: 20px; }
.md li { margin: 2px 0; }
.ai-panel { border-radius: var(--r); padding: 14px 16px; margin-top: 12px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* service report editor */
.rows { width: 100%; border-collapse: collapse; }
.rows th { font-size: 12px; color: var(--faint); font-weight: 500; text-align: start; padding: 4px; }
.rows td { padding: 3px; vertical-align: top; }
.rows td input, .rows td select { width: 100%; min-height: 36px; padding: 6px 8px; }
.rows .n { width: 34px; text-align: center; color: var(--faint); padding-top: 10px; }
.rows .x { width: 34px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; max-width: 360px; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.totals b { font-size: 17px; }

/* dialog */
dialog { border: 1px solid var(--glass-line); border-radius: 18px; padding: 0; color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--glass-strong); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(14, 19, 26, .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog form { padding: 20px; }
dialog h3 { margin: 0 0 14px; }
.foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.secret { font-family: var(--f-mono); font-size: 12.5px; direction: ltr; text-align: left; padding: 10px; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }

/* login */
.login { max-width: 400px; margin: 14vh auto 0; padding: 28px; border-radius: 20px; }
.login h1 { font-size: 22px; margin: 0 0 4px; }
.block-input { width: 100%; }
.field-row { display: grid; gap: 3px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.login .btn.block { margin-top: 6px; }

.ft { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.toast { position: fixed; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 440px; background: color-mix(in srgb, var(--ink) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 14px; text-align: center; z-index: 50; }
.toast.error { background: var(--bad); color: #fff; }

#print-root { display: none; }

@media (max-width: 520px) {
  .tab { font-size: 13px; padding: 8px 10px; }
  .cell { height: 54px; }
  .cell .dn { font-size: 14px; }
  .item { padding: 10px 12px; gap: 10px; }
  .item.wrap { flex-wrap: wrap; }
  .rows .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ───────── print: service report (A4) ───────── */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body { background: #fff !important; color: #000; font-size: 11.5pt; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
}
.pr { color: #111; direction: rtl; font-family: var(--f-body); }
.pr-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #1F5FBF; padding-bottom: 8px; margin-bottom: 12px; }
.pr-head h1 { margin: 0; font-size: 17pt; }
.pr-head .brand { font-size: 10pt; color: #444; }
.pr-num { text-align: left; font-size: 10pt; }
.pr-num b { display: block; font-size: 13pt; color: #1F5FBF; }
.pr h2 { font-size: 11.5pt; margin: 14px 0 6px; padding: 3px 8px; background: #EEF3FB; border-inline-start: 3px solid #1F5FBF; }
.pr table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.pr td, .pr th { border: 1px solid #C9D2DE; padding: 5px 7px; text-align: start; vertical-align: top; }
.pr th { background: #F3F6FA; font-weight: 700; }
.pr .info td:nth-child(odd) { background: #F7F9FC; width: 18%; color: #444; }
.pr .types { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 10.5pt; }
.pr .box { border: 1px solid #C9D2DE; padding: 7px 9px; min-height: 36px; white-space: pre-wrap; font-size: 10.5pt; }
.pr .sum td { font-weight: 700; }
.pr .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.pr .sign div { border: 1px solid #C9D2DE; height: 84px; padding: 6px 9px; font-size: 10pt; color: #444; }
.pr .foot-note { margin-top: 12px; font-size: 9pt; color: #555; border-top: 1px solid #ddd; padding-top: 6px; }

/* reports & work log */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.kpi { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r); }
.kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
.kpi.accent b { color: var(--accent); } .kpi.good b { color: var(--good); }
table.jr { background: var(--glass); border-radius: var(--r); overflow: hidden; }
table.jr th { background: var(--surface-2); padding: 8px; }
table.jr td { padding: 7px 8px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
input.mins { width: 78px; min-height: 34px; text-align: center; }

/* ───────── print: journal (A4) ───────── */
.pr-journal .pr-cover { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, #1F5FBF, #3A7BD5); color: #fff; border-radius: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-journal .pr-cover h1 { font-size: 19pt; margin: 2px 0; color: #fff; }
.pr-journal .pr-brand { font-size: 10pt; opacity: .9; }
.pr-journal .pr-range { font-size: 11pt; font-weight: 700; }
.pr-journal .pr-sub { font-size: 9.5pt; opacity: .9; }
.pr-journal .pr-cover .pr-num { color: #fff; }
.pr-journal .pr-cover .pr-num b { color: #fff; }
.pr-journal .pr-cover .brand { color: #EAF1FC; }
.pr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.pr-kpi { border: 1px solid #C9D2DE; border-radius: 8px; padding: 7px 10px; background: #F7F9FC; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-kpi span { display: block; font-size: 9pt; color: #555; }
.pr-kpi b { font-size: 12.5pt; color: #1F5FBF; }
.pr-journal table { margin-bottom: 6px; }
.pr-journal tbody tr:nth-child(even) td { background: #FAFBFD; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-journal tr.day-start td { border-top: 2px solid #9FB7DC; }
.pr-journal tfoot td { background: #EEF3FB; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pr-journal thead { display: table-header-group; }
.pr-journal tr { page-break-inside: avoid; }
.pr-journal h2 { page-break-after: avoid; }
.pr th, .pr h2, .pr-num b { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* layout fixes: all tabs visible, aligned forms, settings sub-navigation */
@media (min-width: 700px) {
  .tabs-in { flex-wrap: wrap; justify-content: center; overflow: visible; }
  .tab { flex: 0 1 auto; }
}
.form-grid { align-items: end; }
.form-grid label > span:first-child { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 22px; }
.card { overflow-wrap: anywhere; }
.kv { grid-template-columns: minmax(120px, auto) 1fr; }
.kv > * { min-width: 0; }
.set-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.set-nav button { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 10px; padding: 8px 14px; color: var(--muted); }
.set-nav button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.brand-logo { height: 34px; width: auto; }
.login .brand-logo { height: 54px; display: block; margin: 0 auto 10px; }
.pr-logo { height: 46px; width: auto; }
.pr-journal .pr-cover .pr-logo { background: #fff; border-radius: 8px; padding: 4px 8px; height: 48px; }

/* print: clear table rules on every page */
.pr table { border-collapse: collapse; border: 1.2px solid #5E7394; }
.pr td, .pr th { border: 1px solid #7F93B3 !important; }
.pr th { background: #DCE6F5 !important; color: #10223F; }
.pr .info td:nth-child(odd) { background: #EEF3FB !important; }
.pr .box { border: 1px solid #7F93B3; }
.pr .sign div { border: 1px solid #7F93B3; }
.pr-head { align-items: center; gap: 14px; border-bottom: 2.5px solid #1F5FBF; }
.pr-head .grow { flex: 1; }
.pr-journal .pr-cover { align-items: center; }
.pr-journal .pr-cover .grow { flex: 1; }
@media print {
  .pr td, .pr th, .pr .box, .pr .sign div, .pr-kpi { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.cat-ico { font-size: 20px; width: 28px; text-align: center; flex: none; }

/* ───────── gray print theme + table rules that survive Chrome's PDF export ─────────
   (border-collapse + cell backgrounds drops random lines in PDF; use separate borders instead) */
.pr { --pr-ink: #2F3640; --pr-line: #8A9099; --pr-head: #E4E6EA; --pr-soft: #F2F3F5; }
.pr table { border-collapse: separate !important; border-spacing: 0; border: 1.2px solid #5F6670 !important; border-bottom: 0 !important; }
.pr td, .pr th { border: 0 !important; border-bottom: 1.2px solid var(--pr-line) !important; border-inline-end: 1px solid var(--pr-line) !important; }
.pr tr > :last-child { border-inline-end: 0 !important; }
.pr th { background: var(--pr-head) !important; color: #1E232A; }
.pr .info td:nth-child(odd) { background: var(--pr-soft) !important; color: #3A414B; }
.pr .sum td, .pr tfoot td { background: var(--pr-soft) !important; }
.pr-head { border-bottom: 2.5px solid var(--pr-ink) !important; }
.pr-num b, .pr-kpi b { color: var(--pr-ink) !important; }
.pr h2 { background: var(--pr-soft) !important; border-inline-start: 3px solid var(--pr-ink) !important; }
.pr .box, .pr .sign div, .pr-kpi { border: 1px solid var(--pr-line) !important; }
.pr-journal .pr-cover { background: linear-gradient(135deg, #2F3640, #56606C) !important; }
.pr-journal tr.day-start td { border-top: 2px solid #5F6670 !important; }
.pr col.c-no { width: 7%; } .pr col.c-min { width: 16%; } .pr col.c-st { width: 16%; }
.pr .empty td { color: #777; text-align: center; }
@media print { .pr * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ───────── forms: calmer, clearer ───────── */
input[type=text], input[type=password], input[type=number], input[type=time], input[type=tel], input[type=email], input[type=date], select, textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 42px; padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.form-grid, .add-grid { gap: 14px 16px; }
.add-grid label, .form-grid label { gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.card { padding: 18px 20px; }
.card h3 { font-size: 15px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.card .foot, form .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.add { padding: 10px; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1px solid var(--line-2); }
.btn { border-radius: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }

/* permanent portal links */
.link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--glass-strong); border: 1px solid var(--line); flex-wrap: wrap; }
.link-card .link-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); font-size: 20px; flex: none; }
.link-card .grow { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.link-card .link-ttl { font-weight: 700; }
.link-card .secret { font-size: 12.5px; }
.link-card a.btn { text-decoration: none; display: inline-flex; align-items: center; }
/* portal: pick your own name (shared company link) */
.people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; }
.person-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-strong); text-align: start; font-weight: 600; transition: border-color .15s, transform .15s; }
.person-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.person-btn .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; flex: none; }
.login-form { display: grid; gap: 12px; text-align: start; }
.login-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login-form input { width: 100%; font-size: 15px; color: var(--ink); }
.hint.small { font-size: 12.5px; margin-top: 10px; text-align: center; }

/* login details card (company users) */
.pass-row { display: flex; gap: 8px; align-items: center; }
.pass-row input { flex: 1; min-width: 0; }
.cred-card { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--good); background: var(--good-soft); }
.cred-ttl { font-weight: 700; margin-bottom: 8px; }
.cred-rows { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 10px; }
.cred-rows dt { color: var(--muted); font-size: 13px; }
.cred-rows dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; text-align: start; }
.cred-rows dd.mono { font-size: 14px; }
.cred-rows dd[dir=ltr] { text-align: right; }
.pass-row { flex-wrap: wrap; }
.pass-row input { flex: 1 1 140px; width: auto !important; }
.pass-row .ghost { flex: none; min-height: 38px; }
dialog form { overflow-x: hidden; }
.pass-card { max-width: 520px; margin-inline: auto; }
.check-row { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
dialog form.wide-dlg { width: min(680px, 92vw); }
