:root {
  color-scheme: dark;
  font-family: -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;
  background: #111214;
  color: #f6f6f7;
  --muted: #a8abb2;
  --panel: #1b1d20;
  --line: #303238;
  --field: #141518;
  --red: #e30613;
  --green: #7cdda5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
.bar { background: #18191b; color: #fff; border-bottom: 1px solid #303238; }
.bar-inner { max-width: 1312px; min-height: 76px; padding: 12px 32px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: block; max-width: 100%; height: auto; }
nav, .actions { display: flex; align-items: center; gap: 8px; }
button, input, select { font: inherit; }
button, .button {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #282a2f; border: 1px solid #373940; border-radius: 11px;
  color: inherit; padding: 10px 15px; font-weight: 650; cursor: pointer; text-decoration: none;
}
button:hover:not(:disabled), .button:hover { filter: brightness(1.16); }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #93bdff; outline-offset: 3px; }
nav button { color: #f6f6f7; background: #282a2e; border-color: #3b3d42; font-size: .9rem; }
nav button[aria-current] { color: white; background: #33353a; border-color: var(--red); }
.logout svg { color: var(--red); flex: none; }
.primary { background: #b92432; border-color: var(--red); color: white; }
.danger, .error { color: #ffabad; }
.workspace { max-width: 1312px; padding: 34px 32px 64px; margin: auto; }
.login-stage { min-height: calc(100svh - 76px); display: grid; place-items: center; padding: 28px 16px 72px; background: radial-gradient(ellipse at 50% 22%, #24252a 0, #111214 65%); }
.card, dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 19px; padding: 25px; }
.login-card { width: min(100%, 432px); padding: 35px; box-shadow: 0 20px 65px #0005; }
.app-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 15px; color: #ff979d; background: #442529; margin-bottom: 26px; }
.eyebrow { color: #b9bbc2; font-size: .77rem; font-weight: 750; letter-spacing: .13em; margin: 0 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.05; margin: 0; }
.login-card h1 { margin-bottom: 12px; }
h2 { font-size: 1.24rem; line-height: 1.22; letter-spacing: -.025em; margin-bottom: 10px; }
h3 { font-size: 1.42rem; margin-bottom: 12px; }
.muted { color: var(--muted); line-height: 1.48; }
form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; min-width: 0; font-weight: 600; font-size: .9rem; }
input, select {
  display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 12px;
  background: var(--field); border: 1px solid #3b3d44; border-radius: 10px;
  color: #f6f6f7; font-size: 1rem;
}
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%23aaa' stroke-width='1.5'/%3E%3C/svg%3E"); background-size: 18px; background-position: right 8px center; background-repeat: no-repeat; }
input::placeholder { color: #9a9ca5; }
input:disabled, select:disabled { opacity: .55; }
.login-card form { margin-top: 24px; }
.error { margin: 0; }
.notice { border: 1px solid #385c49; border-radius: 12px; background: #1c3528; color: #a9efc2; padding: 12px 15px; margin-bottom: 20px; }
.notice.is-error { background: #43272b; color: #ffb4bb; border-color: #734449; }
.page-heading, .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-heading { margin-bottom: 24px; align-items: end; }
.card-head h2 { margin: 0; }
.profile { display: flex; gap: 10px; align-items: center; position: relative; text-align: right; font-size: .95rem; }
.profile .avatar { background: #393035; border-color: #543d46; color: #ffd4d8; border-radius: 50%; }
.profile-menu { position: absolute; z-index: 1; top: calc(100% + 7px); right: 0; background: #1c1d20; border-radius: 12px; padding: 4px; box-shadow: 0 8px 30px #0006; }
.time-layout { display: grid; grid-template-columns: minmax(280px, 365px) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-column, .calendar-column { display: grid; gap: 20px; }
.two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.icon { width: 44px; padding: 0; flex: none; font-size: 1.15rem; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 7px; }
.weekdays { margin: 21px 0 8px; color: var(--muted); text-align: center; font-size: .88rem; }
.calendar-grid button { width: 100%; min-height: 51px; padding: 0; font-weight: 600; background: #24262a; }
.calendar-grid button.has-time { background: #234334; border-color: #3d6d52; color: #bcf5d1; }
.calendar-grid button[aria-pressed=true] { box-shadow: inset 0 0 0 2px #f0f1f4; }
.calendar-grid button[aria-current=date] { font-weight: 850; }
.legend { color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 17px; font-size: .91rem; }
.legend span { display: inline-block; height: 10px; width: 10px; background: var(--green); border-radius: 50%; }
.day-item, .summary, .manage-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.day-item strong, .manage-row strong { overflow-wrap: anywhere; }
.day-item small, .manage-row small { display: block; color: var(--muted); margin-top: 4px; font-size: .875rem; }
.summary { border-bottom: 0; color: var(--muted); flex-wrap: wrap; padding-bottom: 0; }
.summary strong { color: #f6f6f7; }
.admin-toolbar { justify-content: end; margin-bottom: 14px; }
.filters { grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: end; margin: 21px 0; }
.filters button { min-height: 48px; }
.report-group { padding: 23px 0; border-top: 1px solid var(--line); }
.report-group:last-child { padding-bottom: 0; }
.report-day { background: #17181a; padding: 14px; border-radius: 12px; margin: 10px 0 0; }
.report-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.report-table th, .report-table td { padding: 7px 8px; overflow-wrap: anywhere; vertical-align: top; }
.report-table th { font-size: .9rem; color: var(--muted); }
.report-table td { border-top: 1px solid #2c2e34; }
.report-table th:nth-child(1) { width: 17%; }
.report-table th:nth-child(2) { width: 47%; }
.report-table th:nth-child(3) { width: 21%; }
.report-table th:nth-child(4) { width: 15%; }
dialog { width: min(620px,calc(100% - 24px)); max-height: 85vh; overflow-y: auto; color: inherit; }
dialog::backdrop { background: #000b; }
dialog .card-head { margin-bottom: 18px; }
dialog .error { margin-top: 14px; }
.manage-row .actions { flex-wrap: wrap; justify-content: end; }
.manage-row > div:first-child { min-width: 0; }
.dialog-list { margin-top: 18px; }
.checkbox { display: flex; align-items: center; }
.checkbox input { width: 21px; min-height: auto; height: 21px; }
@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .bar-inner, .workspace { padding-left: 15px; padding-right: 15px; }
  .bar-inner { flex-wrap: wrap; gap: 9px; min-height: 64px; padding-top: 13px; padding-bottom: 9px; }
  .bar-inner nav { width: 100%; flex-wrap: wrap; gap: 4px; }
  nav button { padding-inline: 9px; }
  nav .logout { margin-left: auto; }
  .workspace { padding-top: 24px; }
  .page-heading { align-items: center; flex-wrap: wrap; }
  .profile { margin-left: auto; }
  .time-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .form-column, .calendar-column { gap: 15px; }
  .card, dialog { padding: 17px; }
  .login-card { padding: 27px; }
  .calendar-grid, .weekdays { gap: 4px; }
  .calendar-grid button { min-height: 45px; }
  .report-table th, .report-table td { padding-inline: 4px; }
  .report-table { font-size: .875rem; }
  .report-day { padding: 8px; }
  .report .card-head { flex-wrap: wrap; }
}
.site-options { display: grid; gap: 5px; max-height: 220px; overflow: auto; margin-top: -9px; }
.site-options button { justify-content: start; text-align: left; overflow-wrap: anywhere; }
.site-options .muted { margin: 3px 0; }

.login-card { position: relative; }
.login-help { position: absolute; top: 18px; right: 18px; }
.help-steps { padding-left: 1.5rem; }
.help-steps li { margin-bottom: .65rem; }
