:root {
  color-scheme: light;
  --graphite: #24262a;
  --accent: #b51025;
  --ink: #222328;
  --muted: #575960;
  --line: #e3e4e8;
  --surface: #fff;
  --canvas: #f5f5f7;
  --red-tint: #f9e5e9;
  --status-ok: #f6e9eb;
  --amber: #fff0d4;
  --rust: #984825;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 310px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #b51025; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(31px,4vw,50px); line-height: 1.1; letter-spacing: -.055em; font-weight: 710; }
h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.04em; font-weight: 730; }
h3 { font-size: 16px; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.boot { display: grid; place-items: center; min-height: 100vh; background: var(--surface); }
.boot img { display: block; width: min(200px, 64vw); height: auto; }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { border-top: 3px solid var(--accent); border-right: 1px solid var(--line); background: #fff; color: var(--ink); padding: 32px 22px 22px; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--graphite); font-size: 14px; font-weight: 700; }
.brand img { display: block; width: 104px; height: auto; }
.brand span { border-inline-start: 1px solid var(--line); padding-inline-start: 12px; }
nav { display: grid; gap: 5px; margin-top: 34px; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; color: var(--muted); border: 0; padding: 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.nav:hover { background: #f8f0f1; color: var(--ink); }
.nav.active { background: #f9e9ed; color: #8f1021; box-shadow: inset 3px 0 var(--accent); }
.nav .navcount { margin-left: auto; font-size: 13px; }
.icon { width: 1.15em; font-size: 19px; display: inline-flex; justify-content: center; line-height: 1; flex: 0 0 auto; }
.side-bottom { margin-top: auto; }
.identity { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 18px 0 12px; border-top: 1px solid var(--line); }
.identity .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity .role { color: var(--muted); display: block; }
.avatar { flex: 0 0 34px; height: 34px; width: 34px; display: grid; place-content: center; background: #f4e4e8; border-radius: 9px; color: var(--accent); font-weight: 720; font-size: 12px; }
.identity .avatar { color: var(--graphite); background: #f0dbe0; }
.side .logout { display: inline-block; background: transparent; color: var(--accent); border: 0; font-size: 14px; padding: 8px 0; }
.main { min-width: 0; }
.top { min-height: 72px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 36px; color: var(--muted); font-size: 14px; }
.top .context { font-weight: 700; color: var(--ink); }
.top-right { display: flex; align-items: center; gap: 14px; }
.mobile-exit { display: none; }
.content { padding: 32px 36px 48px; max-width: 1450px; margin: 0 auto; }
.title { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 25px; }
.title p { margin-top: 7px; color: var(--muted); }
.period { min-width: 155px; align-self: end; }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--status-ok); color: var(--accent); padding: 5px 9px; border-radius: 20px; font-size: 13px; font-weight: 650; }
.badge::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; background: currentColor; border-radius: 50%; }
.badge.amber { background: var(--amber); color: #7a5419; }
.badge:not(.red):not(.neutral):not(.amber) { background: #eaf2eb; color: #31583b; }
.badge.red { background: #f8e6e0; color: var(--rust); }
.badge.neutral { background: #eef0ed; color: var(--muted); }
.banner { border-left: 4px solid var(--accent); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 27px; background: #fff; border-top: 1px solid #e4dbe0; border-right: 1px solid #e4dbe0; border-bottom: 1px solid #e4dbe0; border-radius: 12px; margin-bottom: 19px; }
.banner h2 { font-size: 23px; }
.banner p { color: var(--muted); margin-top: 4px; }
.banner .message { display: flex; align-items: center; gap: 15px; }
.banner .symbol { border-radius: 13px; background: #fae9ed; border: 1px solid #f1dce2; width: 47px; height: 47px; flex: 0 0 47px; display: grid; place-items: center; font-size: 23px; }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dcdde2; background: white; color: var(--ink); border-radius: 9px; padding: 8px 13px; font-weight: 690; font-size: 14px; text-decoration: none; text-align: center; line-height: 1.2; }
.btn:hover { background: #f8f5f6; border-color: #cbb9be; }
.btn.primary { color: white; background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #8f0e20; }
.btn.destructive { color: var(--rust); }
.btn[disabled] { opacity: .55; cursor: wait; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border-radius: 15px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.stat { padding: 16px 17px 17px; }
.stat .icon { background: var(--status-ok); color: var(--accent); width: 33px; height: 33px; border-radius: 9px; align-items: center; margin-bottom: 12px; }
.stat .icon.amber { background: var(--amber); color: #806028; }
.stat .label { font-weight: 650; color: var(--muted); font-size: 14px; display: block; }
.stat strong { display: block; font-size: clamp(23px, 3vw, 35px); letter-spacing: -.05em; margin: 2px 0; line-height: 1.18; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 13px; color: var(--muted); }
.split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin-bottom: 19px; }
.card + .card.stack { margin-top: 17px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 19px 14px; }
.card-head p { color: var(--muted); margin-top: 3px; font-size: 14px; }
.text-btn { border: 0; background: transparent; font-weight: 700; color: var(--accent); padding: 6px 0; white-space: nowrap; font-size: 14px; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.text-btn:hover { text-decoration-color: currentColor; }
.chart { padding: 7px 19px 15px; display: grid; grid-template-columns: 46px 1fr; align-items: end; gap: 5px; }
.chart-axis { display: grid; height: 123px; grid-template-rows: repeat(4, 1fr); align-items: end; color: var(--muted); font-size: 12px; margin-bottom: 23px; }
.plot { height: 123px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; align-items: end; border-bottom: 1px solid #e9e9ed; background: repeating-linear-gradient(to top, transparent 0, transparent 30px, #e9e9ed 30px, #e9e9ed 31px); }
.column { display: grid; justify-items: center; align-items: end; height: 100%; min-width: 0; }
.bar { display: flex; align-items: flex-end; border: 0; width: min(64%,38px); height: 100%; padding: 0; background: none; }
.bar::-webkit-meter-bar { height: 100%; background: transparent; border: 0; }
.bar-fill { width: 100%; border-radius: 6px 6px 0 0; align-self: end; background: #d9949e; min-height: 2px; }
.bar-fill.current { background: #b51025; }
.plot-labels { grid-column: 2; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; color: var(--muted); font-size: 12px; text-align: center; }
.list { padding: 0 19px 9px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); min-width: 0; }
.list-row .detail { flex: 1; min-width: 0; }
.list-row .name { font-weight: 710; display: block; overflow-wrap: anywhere; }
.list-row .meta { color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 14px; }
th { color: var(--muted); background: #f8f8fa; font-weight: 660; }
th, td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
td:last-child { white-space: normal; }
td details { white-space: nowrap; }
details summary { cursor: pointer; }
details .detail-line { margin: 7px 0; }
.empty { padding: 17px 19px; color: var(--muted); }
.list .empty { padding-inline: 0; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; margin: 0 0 16px; }
.filters label { margin: 0; }
label { display: grid; gap: 6px; font-weight: 680; color: var(--ink); font-size: 14px; min-width: 0; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; border: 1px solid #d2d3da; border-radius: 9px; color: var(--ink); background: #fff; padding: 9px 11px; min-height: 41px; }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 7px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar { padding: 0 18px 18px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-head { color: var(--muted); text-align: center; font-weight: 650; font-size: 13px; padding: 4px; }
.calendar-day { min-height: 78px; border-radius: 7px; background: #f5f5f8; padding: 6px; font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.calendar-day.weekend { background: #f6f6f5; }
.calendar-day.current { border: 1px solid #b51025; }
.calendar-person { font-size: 12px; margin-top: 3px; padding: 2px 4px; border-radius: 4px; background: var(--status-ok); color: var(--accent); }
.calendar-person.pending { background: var(--amber); color: #7a5419; }
.punch { background: #fff4f3; color: var(--ink); border-color: #f0d8dc; padding: clamp(23px, 5vw, 37px); margin-bottom: 17px; display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.punch p { color: var(--muted); }
.punch .stamp { display: block; font-size: clamp(42px,9vw,69px); font-weight: 690; letter-spacing: -.05em; line-height: 1.07; margin: 8px 0 3px; font-variant-numeric: tabular-nums; }
.punch .btn { min-height: 47px; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0,1fr); align-items: center; padding: 20px; background: #fff; }
.login-art { color: var(--ink); background: var(--surface); padding: clamp(28px,4vw,60px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 26px; width: 100%; max-width: 780px; justify-self: end; }
.login-art .brand { font-size: 17px; }
.login-art .brand img { width: clamp(130px,15vw,175px); }
.login-text { margin-top: clamp(22px,4vh,45px); }
.login-text h1 { font-size: clamp(38px,5.4vw,75px); max-width: 490px; }
.login-text p { color: var(--muted); margin-top: 12px; max-width: 410px; }
.welcome-artwork { display: block; width: 100%; height: clamp(180px,34vh,315px); margin-top: clamp(22px,4vh,40px); border-radius: 14px; object-fit: cover; object-position: 60% 61%; background: var(--canvas); }
.login-area { display: grid; place-items: center; padding: clamp(24px,5vw,64px); }
.login-card { max-width: 425px; width: 100%; }
.login-card h2 { font-size: clamp(26px,3.3vw,38px); }
.login-card > p { margin: 6px 0 20px; }
.login-card .quick { margin-top: 20px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--canvas); }
.login-card .quick p { margin-bottom: 8px; }
.form { display: grid; gap: 13px; }
.mail-form { max-width: 570px; }
.form .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.form .error, .error { color: #9a392b; font-size: 14px; }
.feedback { border-radius: 9px; border: 1px solid #dfb7a9; background: #fff0e9; padding: 10px; margin-bottom: 12px; }
dialog { width: min(550px, calc(100% - 24px)); max-height: 90vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
dialog::backdrop { background: #20202795; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 19px 20px; }
.pause-pair { padding: 9px; border: 1px solid var(--line); border-radius: 8px; margin: 7px 0; }
#toast { position: fixed; right: 18px; bottom: 18px; max-width: calc(100vw - 36px); z-index: 10; pointer-events: none; }
#toast:not(:empty) { background: #fff; color: var(--ink); padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; box-shadow: 0 10px 24px #4523231a; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 203px minmax(0,1fr); }
  .top, .content { padding-inline: 23px; }
  .side { padding-inline: 16px; }
  .stats { gap: 9px; }
  .stat { padding: 13px; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 14px 16px 8px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
  .nav { width: auto; padding: 8px; font-size: 13px; gap: 5px; }
  .nav .icon { font-size: 16px; }
  .side-bottom { display: none; }
  .mobile-exit { display: inline-flex; }
  .top { min-height: 52px; }
}
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; padding: 12px; align-content: start; }
  .login-art { padding: clamp(16px,4vw,28px); border-radius: 18px; max-width: 580px; justify-self: center; }
  .login-art .brand img { width: 118px; }
  .login-text { margin-top: 16px; }
  .login-text h1 { font-size: clamp(27px,7.5vw,40px); }
  .login-text p { margin-top: 6px; font-size: 14px; }
  .welcome-artwork { height: clamp(104px,32vw,220px); margin-top: 14px; border-radius: 10px; }
  .login-area { padding: 22px 13px 12px; }
}
@media (max-width: 620px) {
  .top, .content { padding-inline: 13px; }
  .content { padding-top: 22px; }
  .title { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .period { align-self: start; }
  .stats, .stats.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stats.three .stat:last-child { grid-column: span 2; }
  .split { grid-template-columns: 1fr; }
  .banner { padding: 14px; flex-wrap: wrap; }
  .banner .symbol { display: none; }
  .card-head { flex-wrap: wrap; }
  .calendar { padding: 0 7px 10px; gap: 2px; }
  .calendar-day { padding: 3px; min-height: 51px; }
  .calendar-person { padding: 1px; font-size: 11px; }
  .form .field-pair { grid-template-columns: 1fr; }
  .top .date { display: none; }
}
.bar { position: relative; }
.bar progress { appearance: none; -webkit-appearance: none; position: absolute; left: 50%; bottom: 0; transform-origin: 0 100%; transform: rotate(-90deg) translateY(-50%); width: 123px; height: 22px; border: 0; background: transparent; }
.bar progress::-webkit-progress-bar { background: transparent; }
.bar progress::-webkit-progress-value { background: #d9949e; border-radius: 0 6px 6px 0; }
.bar progress.current::-webkit-progress-value { background: #b51025; }
.bar progress::-moz-progress-bar { background: #d9949e; border-radius: 0 6px 6px 0; }
.bar progress.current::-moz-progress-bar { background: #b51025; }
.balance-card { margin-bottom: 17px; }
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; }
.model-grid input { text-align: center; padding-inline: 3px; }
.model-grid strong { display: block; min-height: 39px; padding-top: 7px; }
@media (max-width: 480px) { .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

[hidden] { display: none !important; }
.report-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 23px 0 12px; }
.report-title h2 { margin-right: 4px; }
.time-controls { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px; }
.segments { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 10px; background: #f0f0f3; }
.segments button { border: 1px solid transparent; border-radius: 7px; padding: 8px 14px; color: var(--ink); font-weight: 670; font-size: 14px; background: transparent; }
.segments button[aria-pressed=true] { color: white; background: var(--accent); }
.segments button[aria-pressed=false]:hover { background: #fff; }
.report-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.report-controls input[type=number] { width: 90px; }
.report-person { min-width: 180px; }
.report-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,150px),1fr)); gap: 11px; margin: 0 0 17px; }
.report-metrics > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 15px 16px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.report-metrics > div:first-child { background: #fff7f6; color: var(--ink); border-color: #efdadd; border-top: 3px solid var(--accent); }
.report-metrics span { font-size: 14px; font-weight: 650; }
.report-metrics strong { font-size: clamp(20px,2.5vw,32px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.report-metrics small { color: var(--muted); font-size: 13px; }
.report-section { margin-bottom: 17px; }
.report-table { font-variant-numeric: tabular-nums; }
.report-table tbody th { background: white; color: var(--ink); }
.report-table tbody .badge { margin-left: 7px; }
.report-table th .text-btn { padding-block: 0; }
.profile-name { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; padding: 6px 19px 19px; }
.profile-details dt { color: var(--muted); font-size: 14px; }
.profile-details dd { font-weight: 700; margin: 3px 0 0; }
.access-list { padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin: 0; }
.access-list legend { padding-inline: 6px; font-weight: 700; }
.access-list .check { padding-top: 5px; }
input[type=checkbox] { accent-color: var(--accent); }
@media (max-width: 850px) {
  .side .brand img { width: 90px; }
}
@media (max-width: 680px) {
  .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-metrics > div { padding: 13px 11px; }
  .time-controls { align-items: start; padding: 10px; }
  .report-controls { width: 100%; }
  .report-person { min-width: min(100%,180px); }
}
.timo-form { padding: 0 19px 16px; }
.timo-form input[type=file] { max-width: 500px; }
.timo-form select { max-width: 500px; }
.timo-confirm { border-top: 3px solid var(--accent); }
@media print {
  .shell { display: block; }
  .side, .top, .time-controls, .title .actions, .card-head .btn, #toast { display: none; }
  .content { padding: 0; }
  .card { box-shadow: none; }
  .report-metrics > div, .report-table tr { break-inside: avoid; }
  .table-wrap { overflow: visible; }
}
@media (min-width: 761px) and (max-height: 650px) {
  .login { padding: 12px; align-items: start; }
  .login-art { padding: clamp(17px,3.2vw,36px); }
  .login-art .brand img { width: 109px; }
  .login-text { margin-top: 18px; }
  .login-text h1 { font-size: clamp(32px,4.45vw,56px); }
  .login-text p { margin-top: 8px; font-size: 15px; }
  .welcome-artwork { height: clamp(96px,27vh,170px); margin-top: 14px; }
  .login-area { padding: 14px clamp(12px,3vw,44px); }
  .login-card > p { margin: 5px 0 13px; }
  .login-card .form { gap: 8px; }
  .login-card .quick { margin-top: 11px; padding: 10px; }
}
