:root {
  --blue: #1757ad;
  --blue-dark: #0d4698;
  --yellow: #f3ff00;
  --ink: #33363a;
  --muted: #777b80;
  --line: #e4e5e7;
  --soft: #f4f6fa;
  --green: #00843d;
  --content-width: 920px;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; margin: 0; min-height: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #f4ed8d;
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
main { position: relative; min-width: 0; overflow: hidden; background: rgba(255, 255, 255, .015); }
.app-view > .range-row, .app-view > .home-summary, .app-view > .home-insights, .app-view > .clock-panel, .app-view > .home-actions, .app-view > .hours-list { width: min(calc(100% - 20px), var(--content-width)); margin-inline: auto; }
.app-view > .range-row { margin-top: 0; }
.app-view > .hours-list { overflow: hidden; border-inline: 1px solid var(--line); }
.app-view { position: relative; min-height: calc(100vh - 128px); animation-duration: .28s; animation-timing-function: cubic-bezier(.22,.8,.22,1); will-change: opacity, transform; }
.app-view.view-dragging { animation: none !important; transition: none !important; pointer-events: none; }
.app-view.view-preview { position: absolute; inset: 0; width: 100%; min-height: 100%; overflow: hidden; }
.app-view.view-snap-back { transition: transform .26s cubic-bezier(.2,.85,.25,1), opacity .26s ease !important; transform: translate3d(0, 0, 0) scale(1) !important; opacity: 1 !important; }
.view-enter-right { animation-name: view-enter-right; }
.view-enter-left { animation-name: view-enter-left; }
@keyframes view-enter-right { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes view-enter-left { from { opacity: 0; transform: translate3d(-18px, 0, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
.view-enter-right .hour-row, .view-enter-left .hour-row { animation: row-reveal .24s both; }
.view-enter-right .hour-row:nth-child(2), .view-enter-left .hour-row:nth-child(2) { animation-delay: .03s; }
.view-enter-right .hour-row:nth-child(3), .view-enter-left .hour-row:nth-child(3) { animation-delay: .06s; }
.view-enter-right .hour-row:nth-child(4), .view-enter-left .hour-row:nth-child(4) { animation-delay: .09s; }
.admin-page-user, .admin-activity { animation: row-reveal .28s both; }
@keyframes row-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
button, .action-btn, .primary-btn { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.phone-shell {
  width: min(100%, 620px);
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
  touch-action: pan-y;
}

.app-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  min-height: 70px;
  padding: 18px 14px 8px;
  background: #fff;
}
.app-header > *, .header-actions, main, .app-view { min-width: 0; }
.app-name { font-size: 18px; font-weight: 400; }
.logo-button { border: 0; padding: 0; background: transparent; }
.app-logo { width: 72px; height: 28px; padding: 5px 7px; border-radius: 5px; object-fit: contain; background: var(--green); }
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 0;
  background: transparent;
  color: #4b4f53;
  font-size: 22px;
  line-height: 1;
  min-width: 30px;
  padding: 4px;
}
.main-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 46px;
  border-bottom: 1px solid var(--line);
}
.main-tab {
  position: relative;
  border: 0;
  background: #fff;
  color: #4f5357;
  font-size: 12px;
}
.main-tab.active { color: var(--blue); font-weight: 700; }
.main-tab:hover { color: var(--blue); background: color-mix(in srgb, var(--soft) 72%, transparent); }
.main-tab { transition: color .25s ease, background-color .25s ease, transform .25s cubic-bezier(.2,.8,.2,1); }
.main-tab:active { transform: translateY(1px); }
.main-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
  box-shadow: 0 0 12px color-mix(in srgb, var(--blue) 38%, transparent);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 24px;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.filter-row select {
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  padding: 2px 0;
}
.plus-date-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.plus-date-filter label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.plus-date-filter input { min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: #fff; color: var(--ink); }
.plus-date-filter .action-btn { padding: 8px 10px; }
.plus-date-status { grid-column: 1 / -1; min-height: 16px; color: var(--muted); font-size: 11px; }
.filter-arrow { border: 0; background: #fff; font-size: 17px; color: var(--muted); }
.date-entry-control { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; }
.date-entry-control .date-text-input { width: 0; min-width: 0; flex: 1 1 auto; }
.date-entry-control .date-picker-btn { min-width: 42px; }
.date-picker-btn { position: relative; flex: 0 0 auto; display: inline-flex !important; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--blue); border-radius: 7px; background: #fff; color: var(--blue); font-size: 19px; cursor: pointer; }
.range-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.range-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 0;
  background: #fff;
  color: #55595d;
  padding: 0;
  font-size: 13px;
}
.range-option i {
  width: 15px;
  height: 15px;
  border: 2px solid #73777b;
  border-radius: 50%;
}
.range-option.selected i { border-color: #fbff00; box-shadow: inset 0 0 0 3px #fff; background: #fbff00; }
.home-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 10px; background: #f4f6fa; border-bottom: 1px solid var(--line); }
.home-summary > div:first-child { min-width: 0; }
.home-summary div { display: grid; gap: 4px; }
.home-summary span { color: var(--muted); font-size: 12px; }
.home-summary strong { font-size: 20px; }
.home-insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; background: #fbfcfe; border-bottom: 1px solid var(--line); }
.insight-card { min-width: 0; padding: 11px; border: 1px solid #dce4ec; border-radius: 9px; background: #fff; animation: row-reveal .35s both; }
.insight-card:nth-child(2) { animation-delay: .04s; }
.insight-card:nth-child(3) { animation-delay: .08s; }
.insight-card span, .insight-card small { display: block; color: var(--muted); font-size: 11px; }
.insight-card strong { display: block; margin: 4px 0 3px; color: var(--blue); font-size: 18px; font-variant-numeric: tabular-nums; }
.insight-card { box-shadow: 0 8px 22px rgba(26, 75, 48, .06); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
.insight-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(26, 75, 48, .12); }
.clock-btn, .today-btn, .action-btn { border: 0; border-radius: 7px; padding: 10px 13px; background: var(--blue); color: #fff; font-weight: 700; }
.today-btn { background: #fff; border: 1px solid var(--blue); color: var(--blue); }
.clock-btn.active { background: #d71920; }
.clock-controls { display: grid; gap: 7px; justify-items: stretch; }
.pause-btn { border: 1px solid #d99a00; border-radius: 7px; padding: 8px 13px; background: #fff7dc; color: #8a5b00; font-weight: 700; }
.clock-panel { display: grid; justify-items: center; gap: 3px; padding: 18px 10px; background: #eef7ef; border-bottom: 1px solid var(--line); }
.clock-panel span, .clock-panel small { color: var(--muted); font-size: 12px; }
.clock-panel strong { color: var(--green); font-size: clamp(34px, 10vw, 56px); line-height: 1; font-variant-numeric: tabular-nums; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.home-actions { align-items: stretch; }
.home-actions > * { min-height: 42px; }
.rosters-panel { width: min(calc(100% - 20px), var(--content-width)); margin: 14px auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbf8; }
.rosters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rosters-head h2 { margin: 3px 0 0; font-size: 18px; }
.rosters-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.rosters-list { display: grid; gap: 8px; }
.roster-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.roster-week-btn, .roster-dept-btn { border: 1px solid #b8d7bd; border-radius: 7px; padding: 8px 10px; background: #fff; color: #17653a; font-size: 12px; font-weight: 700; }
.roster-week-btn.active, .roster-dept-btn.active { background: #17653a; color: #fff; border-color: #17653a; }
.roster-custom-week { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; color: var(--muted); font-size: 12px; }
.roster-custom-week input { padding: 7px; border: 1px solid var(--line); border-radius: 7px; }
.roster-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #cfe1d2; border-radius: 9px; background: #fff; }
.roster-card-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #dff3e2; color: var(--green); font-size: 18px; }
.roster-card strong, .roster-card span, .roster-card small { display: block; }
.roster-card span { margin-top: 2px; color: var(--ink); font-size: 12px; }
.roster-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.roster-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.roster-card button { border: 1px solid var(--blue); border-radius: 6px; padding: 7px 10px; background: transparent; color: var(--blue); font-weight: 700; }
.home-actions .action-btn { min-width: 0; }
.action-btn.secondary { background: #fff; border: 1px solid var(--blue); color: var(--blue); }
.calendar-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-picker-label { position: relative; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.home-actions .today-btn { min-width: 0; }

.hours-list { background: #fff; }
.month-header, .period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}
.month-header { background: var(--yellow); color: #20231c; }
.period-header { background: #3867b9; color: #fff; }
.hour-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 74px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.hour-times { font-size: 14px; line-height: 1.45; }
.hour-times small { display: block; color: #55595d; font-size: 12px; }
.hour-total { text-align: right; line-height: 1.4; white-space: nowrap; }
.hour-total small { display: block; color: #777b80; font-size: 12px; }
.hour-dot, .job-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); }
.hour-actions { display: flex; gap: 2px; }
.hour-actions button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 17px; }
.hour-actions button:hover { background: var(--soft); color: var(--blue); }

.floating-add {
  position: fixed;
  right: max(18px, calc((100vw - 620px) / 2 + 18px));
  bottom: 24px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 13px;
  background: var(--yellow);
  color: #1d2100;
  font-size: 29px;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}

.jobs-content, .plus-summary, .plus-notice { padding: 14px 10px; }
.jobs-content h3 { margin: 0; padding: 8px 8px; color: var(--blue); font-size: 12px; }
.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.job-row strong, .job-row span { display: block; }
.job-row span { margin-top: 3px; color: #5d6166; font-size: 12px; }
.job-row-actions { display: flex; align-items: center; gap: 4px; }
.job-row-actions button { border: 0; border-radius: 5px; padding: 5px 7px; background: transparent; color: var(--muted); font-size: 16px; }
.job-row-actions button:hover { background: var(--soft); color: var(--blue); }
.add-job { margin: 14px 8px; border: 1px solid var(--blue); border-radius: 5px; background: #fff; color: var(--blue); padding: 9px 14px; }
.plus-summary { margin: 14px 10px; background: var(--soft); border-radius: 8px; box-shadow: 0 2px 7px rgba(0,0,0,.1); }
.summary-head, .summary-line { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid #e2e5eb; }
.summary-line:last-child { border-bottom: 0; }
.plus-notice { display: flex; align-items: center; gap: 12px; margin: 12px 10px; background: var(--green); color: #fff; border-radius: 8px; }
.plus-notice img { width: 78px; height: 31px; object-fit: contain; }
.plus-notice span { display: block; margin-top: 3px; font-size: 12px; opacity: .85; }

.landing-view, .login-view { width: 100%; min-height: 100vh; padding: 66px 22px; text-align: left; background: #032c20; }
.landing-logo, .auth-logo { width: 190px; padding: 20px; background: var(--green); }
.landing-view h1 { margin: 22px 0 10px; font-size: 42px; }
.landing-view p { color: var(--muted); }
.primary-btn { border: 0; border-radius: 8px; padding: 12px 20px; background: var(--blue); color: #fff; font-weight: 700; }
.auth-card { width: min(520px, 100%); margin: 0 auto; padding: 36px; background: #0e2c21; border: 1px solid rgba(139, 226, 164, .22); border-radius: 17px; box-shadow: 0 24px 60px rgba(0, 0, 0, .16); }
.auth-logo { width: 150px; margin: 0 auto 18px; }
.auth-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.auth-heading img { width: 46px; height: 30px; object-fit: contain; }
.auth-card h2 { margin: 0; font-size: 28px; color: #fff; }
.auth-subtitle { margin: 0 0 24px; color: #29463b; font-size: 17px; }
.auth-form, #login-form { display: grid; width: 100%; gap: 14px; }
.auth-form input, #login-form input { width: 100%; min-height: 52px; border: 1px solid #aeb5b1; border-radius: 10px; padding: 14px 15px; background: #fff; color: var(--ink); font-size: 15px; }
.auth-form input:focus, #login-form input:focus { outline: 3px solid rgba(126, 190, 22, .18); border-color: #7fbe16; }
.terms-check { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 8px; color: #d6eee0; font-size: 13px; line-height: 1.4; }
.terms-check input { width: 18px !important; min-height: 18px !important; margin-top: 1px; }
.inline-link { border: 0; padding: 0; background: transparent; color: #b8f2c8; text-decoration: underline; cursor: pointer; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; background: #052217; border-radius: 8px; }
.auth-tab { border: 0; border-radius: 6px; padding: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.auth-tab { color: #c4d9cc; }
.auth-tab.active { background: #207c50; color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.08); }
.login-note, .auth-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.text-link { border: 0; background: transparent; color: var(--blue); font-weight: 700; padding: 4px; }
.password-field { display: flex; align-items: center; width: 100%; border: 1px solid #aeb5b1; border-radius: 10px; overflow: hidden; background: #fff; }
.password-field input { border: 0; border-radius: 0; }
.password-field button { border: 0; background: #fff; color: #777; padding: 0 14px; }
.forgot-link { border: 0; background: transparent; color: #29463b; text-decoration: underline; font-size: 14px; padding: 4px 0; justify-self: start; }
#login-form .primary-btn, #signup-form .primary-btn { min-height: 52px; border-radius: 26px 26px 26px 6px; background: #80c900; color: #fff; font-size: 16px; box-shadow: 0 9px 20px rgba(112, 184, 12, .2); }
#login-form .primary-btn:hover, #signup-form .primary-btn:hover { background: linear-gradient(135deg, #a2d72a, #62a90a); transform: translateY(-1px); }
#login-form .forgot-link { margin-top: 0; }
#login-form { gap: 14px; }
.account-photo-preview { width: 64px; height: 64px; border-radius: 50%; object-fit: contain; background: var(--green); padding: 8px; }

.modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.45); z-index: 5; }
.modal-card { position: relative; width: min(430px, 100%); max-width: 100%; display: grid; gap: 12px; padding: 22px; background: #fff; border-radius: 12px; }
.modal-card h2 { margin: 0 0 4px; }
.modal-card p { margin: 0; color: var(--muted); }
.contact-card a { color: var(--blue); font-weight: 700; }
.contact-card .contact-mail-link { color: #fff; text-decoration: none; text-align: center; }
.terms-card { padding: 8px; }
.terms-card img { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 8px; }
.terms-card .modal-close { width: 34px; height: 34px; font-size: 20px; }
.report-card { max-height: calc(100vh - 36px); overflow-y: auto; }
.report-result { display: grid; gap: 4px; min-height: 64px; padding: 12px; border-radius: 8px; background: var(--soft); }
.week-plan-card { width: min(560px, 100%); padding: 24px; background: linear-gradient(145deg, #ffffff, #f4faf5); border: 1px solid #d8eadb; box-shadow: 0 20px 55px rgba(19, 75, 39, .18); }
.week-plan-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.week-plan-head h2 { margin: 3px 0 5px; font-size: 24px; letter-spacing: 0; }
.week-plan-head p { max-width: 390px; margin-bottom: 0; }
.week-plan-score { display: grid; justify-items: end; gap: 2px; min-width: 70px; padding-top: 3px; }
.week-plan-score strong { color: var(--green); font-size: 25px; line-height: 1; }
.week-plan-score span { color: var(--muted); font-size: 10px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.week-plan-progress { height: 8px; overflow: hidden; border-radius: 99px; background: #e7ece8; }
.week-plan-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4dbb74, #b2dc45); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.week-plan-target-status { margin: 10px 0 12px; color: var(--muted); font-size: 12px; }
.week-plan-list { display: grid; gap: 6px; }
.week-plan-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 13px; border: 1px solid #dbe9dd; border-radius: 10px; background: rgba(255, 255, 255, .8); }
.week-plan-row.is-complete { border-color: #b9dcbc; background: #eff9f0; }
.week-plan-day { display: grid; gap: 3px; }
.week-plan-day strong, .week-plan-time { font-size: 13px; }
.week-plan-day small, .week-plan-state { color: var(--muted); font-size: 11px; }
.week-plan-state { padding: 4px 7px; border-radius: 99px; background: #edf1ee; }
.week-plan-row.is-complete .week-plan-state { background: #d6f0d9; color: #24713a; }
.week-plan-empty { padding: 18px 12px; border: 1px dashed #b9d6bd; border-radius: 10px; color: var(--muted); text-align: center; }
.report-result strong { font-size: 24px; }
.faq-card h3 { margin: 6px 0 0; font-size: 14px; }
.admin-user { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-user small { color: var(--muted); }
.admin-user button { grid-column: 2; grid-row: 1 / span 2; border: 1px solid #d71920; border-radius: 6px; padding: 6px 9px; background: #fff; color: #b31319; }
.modal-card label { display: grid; gap: 5px; color: #5b6065; font-size: 13px; }
.modal-card > label { min-width: 0; }
.modal-card .check-label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.modal-card .check-label input { width: 18px; height: 18px; }
.modal-card input { border: 1px solid var(--line); border-radius: 7px; padding: 10px; }
.time-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: transparent; font-size: 25px; line-height: 1; }
.more-menu {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 4;
  width: 190px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.more-menu button { display: block; width: 100%; border: 0; border-radius: 7px; padding: 11px 10px; background: transparent; color: var(--ink); text-align: left; }
.more-menu button:hover { background: var(--soft); color: var(--blue); }
.main-menu { left: 12px; right: auto; }
.app-header { position: relative; }
.toggle-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; }
.toggle-row input { width: 18px; height: 18px; }
.schedule-fields { display: grid; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.location-settings { display: grid; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.location-settings p, .location-status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.location-settings .action-btn { justify-self: start; }
.schedule-fields legend { padding: 0 5px; font-weight: 700; }
.notification-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.notification-setting div { display: grid; gap: 3px; }
.notification-setting small { color: var(--muted); font-size: 11px; }
.notification-setting .action-btn { flex: 0 0 auto; padding: 8px 10px; }
.schedule-row { display: grid !important; grid-template-columns: 18px minmax(0, 1fr) 82px 82px 58px; align-items: center; gap: 6px; min-width: 0; }
.schedule-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.schedule-row input[type="checkbox"] { width: 16px; height: 16px; }
.schedule-row .time-text-input { min-width: 0; padding: 7px; }
.ai-content { max-width: 700px; margin: 0 auto; padding: 24px 16px; }
.ai-content h2 { margin: 0 0 6px; }
.ai-content > p { margin: 0 0 18px; color: var(--muted); }
.ai-form { display: grid; gap: 10px; }
.ai-form input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--ink); }
.ai-response { display: grid; gap: 6px; min-height: 68px; margin: 16px 0 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.ai-response p { margin: 0; }

body.auth-dark .login-view,
body.auth-dark .landing-view { background: linear-gradient(145deg, #071d14, #0e3c2b); color: #f4fff8; }
body.auth-dark .login-view { background: #032c20; color: #f4fff8; }
body.auth-dark .auth-card { background: #0e2c21; border: 1px solid rgba(139, 226, 164, .22); box-shadow: 0 22px 55px rgba(0,0,0,.3); }
body.auth-dark .auth-card h2 { color: #fff; }
body.auth-dark .auth-subtitle,
body.auth-dark .forgot-link { color: #d6eee0; }
body.auth-dark .forgot-link { text-decoration-color: #d6eee0; }
body.auth-dark .auth-card input { background: #0a2118; border-color: rgba(139, 226, 164, .25); color: #fff; }
body.auth-dark .auth-tab.active { background: #207c50; color: #fff; }
body.auth-dark .auth-tab { color: #b8d8c4; }
body.auth-dark .auth-switch { background: #0a2118; }
body.auth-dark .primary-btn { background: #80c900; color: #fff; }
body.auth-dark .landing-view p { color: #b8d8c4; }
body.auth-dark .phone-shell { background: #0c2419; color: #ecfff2; }
body.auth-dark .phone-shell .app-header,
body.auth-dark .phone-shell .main-tab,
body.auth-dark .phone-shell .filter-row,
body.auth-dark .phone-shell .range-option,
body.auth-dark .phone-shell .hours-list { background: #0c2419; color: #ecfff2; }
body.auth-dark .phone-shell .app-header { border-bottom-color: rgba(167, 230, 182, .15); }
body.auth-dark .phone-shell .main-tab { color: #a9c9b4; }
body.auth-dark .phone-shell .main-tab.active { color: #81df9d; }
body.auth-dark .phone-shell .filter-row,
body.auth-dark .phone-shell .range-row,
body.auth-dark .phone-shell .hour-row { border-color: rgba(167, 230, 182, .15); }
body.auth-dark .phone-shell .filter-row,
body.auth-dark .phone-shell .range-row { background: #164d34; }
body.auth-dark .phone-shell .filter-row select,
body.auth-dark .phone-shell .filter-arrow,
body.auth-dark .phone-shell .range-option { background: #164d34; color: #ecfff2; }
body.auth-dark .phone-shell .hours-list { border-left: 1px solid rgba(167, 230, 182, .25); border-right: 1px solid rgba(167, 230, 182, .25); }
body.auth-dark .phone-shell .hour-row { background: #1b563b; }
body.auth-dark .phone-shell .home-summary,
body.auth-dark .phone-shell .home-actions { background: #123a29; border-color: rgba(167, 230, 182, .15); }
body.auth-dark .phone-shell .home-insights { background: #102c21; border-color: rgba(167, 230, 182, .15); }
body.auth-dark .phone-shell .insight-card { background: #1b563b; border-color: rgba(167, 230, 182, .25); }
body.auth-dark .phone-shell .insight-card strong { color: #b8f2c8; }
body.auth-dark .rosters-panel { background: #102c21; border-color: #3d7650; }
body.auth-dark .roster-card { background: #164d34; border-color: #68c58b; color: #f1fff5; }
body.auth-dark .roster-card span, body.auth-dark .roster-card small { color: #b8d8c4; }
body.auth-dark .roster-card-mark { background: #1f7049; color: #b8f2c8; }
body.auth-dark .roster-week-btn, body.auth-dark .roster-dept-btn { background: #164d34; border-color: #68c58b; color: #d8f2df; }
body.auth-dark .roster-week-btn.active, body.auth-dark .roster-dept-btn.active { background: #68c58b; color: #062214; }
body.auth-dark .phone-shell .home-summary span,
body.auth-dark .phone-shell .home-summary strong { color: #ecfff2; }
body.auth-dark .phone-shell .clock-btn,
body.auth-dark .phone-shell .today-btn,
body.auth-dark .phone-shell .action-btn { background: #52b978; color: #062214; }
body.auth-dark .phone-shell .today-btn { background: transparent; color: #b8f2c8; border-color: #81df9d; }
body.auth-dark .phone-shell .action-btn.secondary { background: transparent; border-color: #81df9d; color: #b8f2c8; }
body.auth-dark .phone-shell .month-header { background: #b7d83d; color: #123018; }
body.auth-dark .phone-shell .period-header { background: #287b52; color: #fff; }
body.auth-dark .phone-shell .hour-times,
body.auth-dark .phone-shell .hour-total { color: #ecfff2; }
body.auth-dark .phone-shell .hour-actions button { color: #b8f2c8; }
body.auth-dark .phone-shell .ai-content { color: #ecfff2; }
body.auth-dark .phone-shell .ai-history { border-color: rgba(167, 230, 182, .2); }
body.auth-dark .phone-shell .ai-history-item { color: #ecfff2; }
body.auth-dark .phone-shell .ai-history-item.active,
body.auth-dark .phone-shell .ai-history-item:hover { background: #164d34; color: #fff; }
body.auth-dark .phone-shell .ai-content > p { color: #b8d8c4; }
body.auth-dark .phone-shell .ai-form input,
body.auth-dark .phone-shell .ai-response { background: #164d34; border-color: rgba(167, 230, 182, .25); color: #ecfff2; }
body.auth-dark .phone-shell .ai-message.user { background: #b8e6c5; color: #06351f; }
body.auth-dark .phone-shell .ai-message.assistant { background: #1f7049; color: #f1fff5; }
body.auth-dark .phone-shell .ai-message.assistant strong,
body.auth-dark .phone-shell .ai-message.assistant span { color: #f1fff5; }
body.auth-dark .phone-shell .ai-response { background: #1f7049; color: #f1fff5; }
body.auth-dark .report-result,
body.auth-dark .phone-shell .schedule-fields { background: #1f7049; border-color: #68c58b; color: #f1fff5; }
body.auth-dark .week-plan-head > strong { background: #1f7049; color: #b8f2c8; }
body.auth-dark .week-plan-progress { background: #24543a; }
body.auth-dark .week-plan-row { background: #164d34; border-color: #68c58b; color: #f1fff5; }
body.auth-dark .week-plan-row.planned { background: #1f7049; }
body.auth-dark .report-result span,
body.auth-dark .report-result strong,
body.auth-dark .report-result b { color: #f1fff5; }
body.auth-dark .modal-card { background: #0e2c21; color: #f1fff5; border: 1px solid #3b8e62; }
body.auth-dark .modal-card p,
body.auth-dark .modal-card label,
body.auth-dark .modal-card legend { color: #d7f4df; }
body.auth-dark .modal-card input,
body.auth-dark .modal-card select { background: #164d34; border-color: #68c58b; color: #fff; }
body.auth-dark .modal-card .modal-close { color: #f1fff5; }
body.auth-dark .phone-shell .plus-summary { background: #174b33; border: 1px solid #63bd83; box-shadow: 0 3px 10px rgba(0, 0, 0, .22); }
body.auth-dark .phone-shell .plus-summary .summary-head,
body.auth-dark .phone-shell .plus-summary .summary-line { border-color: rgba(190, 244, 203, .3); }
body.auth-dark .phone-shell .plus-summary strong,
body.auth-dark .phone-shell .plus-summary span,
body.auth-dark .phone-shell .plus-summary b { color: #f2fff5; }
body.auth-dark .phone-shell .plus-notice { background: #008b45; border: 1px solid #64d995; }
.ai-chat { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; margin-bottom: 12px; }
.ai-layout { display: grid; grid-template-columns: 190px minmax(0, 700px); gap: 18px; max-width: 920px; margin: 0 auto; }
.ai-history { padding: 18px 0; border-right: 1px solid var(--line); }
.ai-history .action-btn { width: calc(100% - 14px); margin-right: 14px; }
.ai-history-actions { display: grid; gap: 6px; }
.ai-history-actions .text-link { justify-self: start; color: var(--muted); font-size: 12px; }
.ai-history-list { display: grid; gap: 4px; margin-top: 12px; }
.ai-history-item { width: calc(100% - 14px); overflow: hidden; border: 0; border-radius: 6px; padding: 9px; background: transparent; color: var(--ink); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ai-history-item.active, .ai-history-item:hover { background: var(--soft); color: var(--blue); }
.ai-message { max-width: 88%; padding: 9px 12px; border-radius: 10px; line-height: 1.4; }
.ai-message.user { justify-self: end; background: #e5f1e8; }
.ai-message.assistant { background: #edf0f5; }
.admin-page { min-height: 100vh; padding: 30px 20px; background: #eef6e9; color: var(--ink); }
.admin-page-card { width: min(100%, 980px); margin: 0 auto; padding: 28px; border: 1px solid #b4d4b7; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(22, 70, 38, .12); }
.admin-page-head, .admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-page-head { justify-content: flex-start; margin-bottom: 24px; }
.admin-page-head img { width: 78px; height: 36px; padding: 6px; border-radius: 5px; background: var(--green); object-fit: contain; }
.admin-page h1, .admin-page h2 { margin: 0 0 6px; }
.admin-page-head p { margin: 0; color: var(--muted); }
.admin-page label { display: grid; gap: 6px; max-width: 420px; margin-bottom: 12px; }
.admin-page input { padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.admin-page-user, .admin-activity { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.admin-overview div { display: grid; gap: 4px; padding: 14px; border: 1px solid #b4d4b7; border-radius: 8px; background: #eef6e9; }
.admin-overview strong { font-size: 20px; }
.admin-overview span, .admin-user-metrics { color: var(--muted); font-size: 12px; }
.admin-user-metrics { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }
.admin-user-metrics button { border: 1px solid var(--blue); border-radius: 6px; padding: 6px 9px; background: #fff; color: var(--blue); }
.admin-page-user small, .admin-activity span, .admin-activity small { display: block; color: var(--muted); }
.admin-page-user button { border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: #fff; color: var(--blue); }
.admin-user-detail { width: min(900px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; }
.admin-detail-head, .admin-detail-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-detail-head h2, .admin-detail-title h3 { margin: 0; }
.admin-detail-head p { margin-top: 4px; }
.admin-status-badge { padding: 6px 9px; border-radius: 999px; background: #e7f5e8; color: #17653a; font-size: 12px; font-weight: 700; }
.admin-status-badge.is-blocked { background: #fde8e8; color: #a0181e; }
.admin-detail-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-detail-form label { margin: 0; }
.admin-detail-form .primary-btn { align-self: end; }
.admin-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-detail-actions button { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; background: #fff; color: var(--blue); }
.admin-detail-actions button[data-admin-detail-action="delete"], .admin-detail-actions button[data-admin-detail-action="reset-data"] { border-color: #e4a8aa; color: #a0181e; }
.admin-detail-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; padding-top: 16px; }
.admin-detail-entry, .admin-job-edit { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.admin-detail-entry small { display: block; margin-top: 3px; color: var(--muted); }
.admin-detail-entry button, .admin-job-edit button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: #fff0f0; color: #a0181e; }
.admin-job-edit { grid-template-columns: minmax(0, 1fr) 92px auto; }
.admin-job-edit input { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.admin-detail-title { margin-bottom: 5px; }
.admin-detail-title span { color: var(--muted); font-size: 12px; }
.admin-muted { color: var(--muted); font-size: 12px; }
.admin-panel { margin: 16px 0; padding: 14px; border: 1px solid #d3e5d2; border-radius: 10px; background: #f8fcf6; }
.admin-panel-head, .admin-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-panel h3, .admin-section-title h3 { margin: 0; font-size: 15px; }
.admin-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.admin-tool-grid button { min-height: 38px; border: 1px solid #b7d3b8; border-radius: 7px; padding: 7px 8px; background: #fff; color: #17653a; font-size: 12px; text-align: left; }
.admin-tool-grid button:hover { background: #e8f5e6; transform: translateY(-1px); }
.admin-capability-search { width: min(260px, 45%); margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; }
.admin-capability-summary { margin: 12px 0; color: var(--muted); font-size: 12px; }
.admin-capabilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-function-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-function-group { padding: 12px; border: 1px solid #d3e5d2; border-radius: 9px; background: #fff; }
.admin-function-group-title { display: flex; justify-content: space-between; width: 100%; margin: 0 0 8px; border: 0; padding: 0; background: transparent; color: #17653a; font-size: 13px; font-weight: 700; text-align: left; text-transform: capitalize; }
.admin-function-group-title span:last-child { color: var(--muted); font-weight: 400; }
.admin-function-group-title b { display: inline-block; margin-left: 4px; transition: transform .2s ease; }
.admin-function-group.is-collapsed > div { display: none; }
.admin-function-group.is-collapsed .admin-function-group-title b { transform: rotate(180deg); }
.admin-function-group > div { display: grid; gap: 6px; }
.admin-function-action, .admin-function-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 1px solid #b7d3b8; border-radius: 6px; padding: 8px; background: #f8fcf6; color: #17653a; text-align: left; font-size: 12px; }
.admin-function-action:hover, .admin-function-toggle:hover { background: #e8f5e6; }
.admin-function-toggle[aria-pressed="true"] { background: #17653a; color: #fff; }
.admin-function-toggle i { flex: 0 0 auto; width: 28px; height: 16px; border-radius: 20px; background: #cbd5ce; }
.admin-function-toggle[aria-pressed="true"] i { background: #b7e88b; }
.admin-capability-group { padding: 12px; border: 1px solid #d3e5d2; border-radius: 9px; background: #fff; }
.admin-capability-group h4 { display: flex; justify-content: space-between; margin: 0 0 8px; color: #17653a; font-size: 13px; }
.admin-capability-group h4 span { color: var(--muted); font-weight: 400; }
.admin-capability-group > div { display: grid; gap: 6px; }
.admin-capability-toggle { display: flex !important; grid-template-columns: 1fr auto; align-items: center; justify-content: space-between; gap: 8px; margin: 0 !important; max-width: none !important; color: var(--ink); font-size: 12px; cursor: pointer; }
.admin-capability-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.admin-capability-toggle i { position: relative; flex: 0 0 auto; width: 34px; height: 19px; border-radius: 20px; background: #cbd5ce; transition: background .2s ease; }
.admin-capability-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.admin-capability-toggle input:checked + i { background: #4cae68; }
.admin-capability-toggle input:checked + i::after { transform: translateX(15px); }
.admin-capability-action { border: 1px solid #b7d3b8; border-radius: 6px; padding: 7px 8px; background: #f8fcf6; color: #17653a; text-align: left; font-size: 12px; }
.admin-capability-action:hover { background: #e8f5e6; }
.admin-message-form { display: grid; grid-template-columns: 1fr 2fr 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.admin-message-form label { min-width: 0; margin: 0; max-width: none; }
.admin-message-form textarea { min-height: 42px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; padding: 9px; }
.admin-message-form input, .admin-message-form select { width: 100%; }
.admin-message-list { display: grid; gap: 8px; margin-top: 14px; }
.admin-message-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px; border: 1px solid #d3e5d2; border-radius: 8px; background: #fff; }
.admin-message-row p { margin: 3px 0; color: var(--ink); }
.admin-message-row small { color: var(--muted); font-size: 11px; }
.admin-message-row button { flex: 0 0 auto; border: 1px solid #e4a8aa; border-radius: 6px; padding: 7px 9px; background: #fff5f5; color: #a0181e; }
.admin-roster-form { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1.4fr auto auto; gap: 10px; align-items: end; margin-top: 12px; }
.admin-roster-form label { margin: 0; max-width: none; }
.admin-file-label input { padding: 7px; }
.admin-check { display: flex !important; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
.admin-check input { width: 18px; height: 18px; }
.admin-roster-list { display: grid; gap: 8px; margin-top: 14px; }
.admin-roster-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px; border: 1px solid #d3e5d2; border-radius: 8px; background: #fff; }
.admin-roster-row strong, .admin-roster-row span { display: block; }
.admin-roster-row span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-roster-row button { border: 1px solid #e4a8aa; border-radius: 6px; padding: 7px 9px; background: #fff5f5; color: #a0181e; }
.dashboard-message-layer { position: fixed; top: 50%; left: 50%; z-index: 30; display: grid; gap: 12px; width: min(390px, calc(100vw - 32px)); transform: translate(-50%, -50%); pointer-events: none; }
.dashboard-popup { position: relative; pointer-events: auto; padding: 20px 20px 16px; border: 1px solid #8dd39e; border-radius: 14px; background: #0d3a28; color: #f1fff5; box-shadow: 0 18px 45px rgba(0, 45, 25, .3); animation: popup-in .4s cubic-bezier(.2,.85,.2,1) both; }
.dashboard-popup-kicker { display: block; margin-bottom: 7px; color: #a8e879; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-popup h2 { margin: 0 28px 7px 0; font-size: 18px; }
.dashboard-popup p { margin: 0 0 10px; color: #d8f2df; line-height: 1.5; white-space: pre-wrap; }
.dashboard-popup small { color: #a7cdb2; font-size: 11px; }
.dashboard-popup-close { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: #d8f2df; font-size: 22px; }
.dashboard-popup-close:hover { background: rgba(255,255,255,.12); }
@keyframes popup-in { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.96); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
.roster-preview-card { width: min(920px, 100%); height: min(90vh, 820px); grid-template-rows: auto minmax(0, 1fr); }
.roster-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.roster-preview-head h2 { margin: 3px 0 0; overflow-wrap: anywhere; }
.roster-preview-content { min-height: 0; overflow: auto; display: grid; place-items: center; background: #fff; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: auto; }
.roster-preview-content iframe { display: block; width: 100%; height: 100%; min-height: 620px; border: 0; background: #fff; touch-action: auto; }
.roster-preview-open { overscroll-behavior: none; }
.roster-preview-content img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
.roster-preview-content canvas { display: block; max-width: none; background: #fff; }
.roster-preview-controls { display: grid; gap: 8px; padding-top: 10px; }
.roster-zoom-controls, .roster-page-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.roster-preview-controls span { min-width: 72px; color: var(--muted); font-size: 12px; text-align: center; }
.roster-zoom-controls button { min-width: 42px; padding: 7px 10px; font-size: 18px; line-height: 1; }
.roster-preview-controls button:disabled { opacity: .45; cursor: not-allowed; }
.admin-page.admin-large-text { font-size: 16px; }
.admin-page.admin-large-text .admin-capability-group h4, .admin-page.admin-large-text .admin-page-user strong { font-size: 15px; }
.admin-page.admin-high-contrast { filter: contrast(1.15); }
.admin-page.admin-no-motion *, .admin-page.admin-no-motion *::before, .admin-page.admin-no-motion *::after { animation: none !important; transition: none !important; }
.admin-fullscreen #admin-page { padding: 0; }
.admin-filter-panel { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.admin-filter-panel label { margin: 0; max-width: none; }
.admin-filter-panel input, .admin-filter-panel select { width: 100%; background: #fff; }
.admin-section-title { margin: 20px 0 4px; }
.admin-extra-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.admin-extra-stats div { padding: 10px; border-radius: 8px; background: #eaf5e7; }
.admin-extra-stats strong, .admin-extra-stats span { display: block; }
.admin-extra-stats strong { font-size: 18px; }
.admin-extra-stats span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.admin-page-user.is-selected { background: #eef8e9; box-shadow: inset 3px 0 #55a841; padding-left: 8px; }
.admin-page-user input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); }
.admin-page.compact .admin-page-user, .admin-page.compact .admin-activity { padding-top: 6px; padding-bottom: 6px; }
.admin-page.admin-night { background: #10261c; color: #effff2; }
.admin-page.admin-night .admin-page-card, .admin-page.admin-night .admin-panel, .admin-page.admin-night .admin-tool-grid button, .admin-page.admin-night .admin-page-user button, .admin-page.admin-night .admin-filter-panel input, .admin-page.admin-night .admin-filter-panel select { background: #183b2a; color: #effff2; border-color: #3d7650; }
.admin-page.admin-night .admin-overview div, .admin-page.admin-night .admin-extra-stats div { background: #205038; border-color: #3d7650; }
.admin-page.admin-night .admin-muted, .admin-page.admin-night .admin-page-user small, .admin-page.admin-night .admin-activity span, .admin-page.admin-night .admin-activity small { color: #b6d5be; }
body.admin-maintenance::before { content: "Onderhoudsmodus actief"; position: fixed; inset: 0 0 auto; z-index: 20; padding: 7px; background: #f4c542; color: #2c2500; text-align: center; font-weight: 700; font-size: 12px; }
body.admin-warning-banner::after { content: "Admin-waarschuwingen actief"; position: fixed; right: 14px; bottom: 14px; z-index: 20; padding: 9px 12px; border: 1px solid #e4b23a; border-radius: 8px; background: #fff5ce; color: #684b00; box-shadow: 0 5px 18px rgba(0,0,0,.14); font-size: 12px; font-weight: 700; }
@media print { .admin-page { padding: 0; background: #fff; } .admin-page-card { width: 100%; border: 0; box-shadow: none; } .admin-tools-panel, #admin-page-login, .admin-page-head .action-btn { display: none !important; } }
body.auth-dark .phone-shell .pause-btn { background: #3e3920; border-color: #e5c34e; color: #ffe58b; }
body.auth-dark .clock-panel { background: #102c21; border-color: rgba(167, 230, 182, .15); }
body.auth-dark .clock-panel strong { color: #81df9d; }
body.auth-dark .phone-shell select,
body.auth-dark .phone-shell .filter-arrow { background: #0c2419; color: #ecfff2; }
body.auth-dark .plus-date-filter { background: #123a29; border-color: rgba(167, 230, 182, .15); }
body.auth-dark .plus-date-filter label { color: #b8d8c4; }
body.auth-dark .plus-date-filter input { background: #164d34; border-color: #68c58b; color: #f1fff5; }
body.auth-dark .plus-date-filter .plus-date-status { color: #b8d8c4; }
body.auth-dark .phone-shell .hour-times small,
body.auth-dark .phone-shell .hour-total small { color: #a9c9b4; }
body.auth-dark .more-menu { background: #102c21; border-color: rgba(167, 230, 182, .2); }
body.auth-dark .more-menu button { color: #ecfff2; }
body.auth-dark .modal-card { background: #102c21; color: #ecfff2; }
body.auth-dark .modal-card input,
body.auth-dark .modal-card select,
body.auth-dark .modal-card input { background: #164d34; color: #f1fff5; border-color: #68c58b; }
body.auth-dark .modal-card input::placeholder { color: #b8d8c4; opacity: 1; }
body.auth-dark .modal-card input:focus,
body.auth-dark .modal-card select:focus { outline: 2px solid #b7e88b; outline-offset: 1px; }
body.auth-dark .modal-card input[type="checkbox"] { accent-color: #80c900; }

@media (min-width: 900px) {
  body { background: #032c20; }
  body:has(.phone-shell:not(.hidden)) { background: linear-gradient(135deg, #dff0d7, #f8fbdc); }
  body:has(.login-view:not(.hidden)), body:has(.landing-view:not(.hidden)) { background: #032c20; }
  .phone-shell { width: min(100% - 80px, 1180px); min-height: calc(100vh - 50px); margin: 25px auto; border-radius: 12px; overflow: hidden; }
  .app-header { grid-template-columns: 50px 1fr auto; min-height: 82px; padding: 20px 28px 10px; }
  .app-name { font-size: 24px; }
  .main-tabs { width: min(620px, 100%); margin-left: auto; margin-right: auto; }
  .filter-row, .range-row, .hours-list, .jobs-content, .plus-summary, .plus-notice, .home-summary, .home-insights, .home-actions { max-width: var(--content-width); margin-left: auto; margin-right: auto; }
  .hours-list { border: 1px solid var(--line); }
  .hour-row { grid-template-columns: minmax(0, 1fr) 160px auto; min-height: 82px; }
  .floating-add { right: 34px; bottom: 34px; }
}

@media (max-width: 640px) {
  body { background: #0c2419; }
  .phone-shell { width: 100%; margin: 0; box-shadow: none; }
  .main-tabs { width: 100%; height: 52px; margin: 0; display: flex; grid-template-columns: none; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin; }
  .main-tab { flex: 0 0 92px; min-height: 46px; padding: 7px 4px; font-size: 12px; line-height: 1.1; scroll-snap-align: start; }
  .main-tab.active::after { left: 10%; right: 10%; }
  .range-row { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
  .range-option { justify-content: flex-start; min-width: max-content; font-size: 12px; }
  .modal { place-items: center; overflow-y: auto; padding: 8px; }
  .modal-card { width: 100%; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 14px; gap: 9px; }
  .settings-card { max-height: calc(100vh - 24px); overflow-y: auto; }
  .settings-card .schedule-row { grid-template-columns: 18px minmax(0, 1fr) minmax(52px, 58px) minmax(52px, 58px) 44px; gap: 4px; }
  .settings-card .schedule-row .time-text-input { padding: 7px 4px; }
  .admin-page { padding: 14px 10px; }
  .admin-page-card { padding: 18px 14px; }
  .admin-page-head, .admin-toolbar, .admin-panel-head, .admin-section-title { align-items: flex-start; flex-direction: column; }
  .admin-page-head { gap: 10px; margin-bottom: 18px; }
  .admin-toolbar { gap: 10px; }
  .admin-toolbar .action-btn, .admin-message-form .primary-btn, .admin-roster-form .primary-btn { width: 100%; }
  .admin-panel { padding: 10px; }
  .admin-tool-grid, .admin-function-grid { grid-template-columns: 1fr; }
  .admin-capability-search { width: 100%; }
  .admin-message-row, .admin-roster-row { align-items: stretch; flex-direction: column; }
  .admin-message-row button, .admin-roster-row button { width: 100%; }
  .admin-page-user { gap: 8px; }
  .admin-page-user button { width: 100%; }
  .admin-user-metrics { align-items: flex-start; flex-direction: column; gap: 5px; }
  .admin-detail-head { align-items: flex-start; }
  .admin-detail-actions button { flex: 1 1 100%; }
  .admin-overview { grid-template-columns: 1fr; }
  .admin-tool-grid, .admin-extra-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-filter-panel { grid-template-columns: 1fr; }
  .admin-capabilities { grid-template-columns: 1fr; }
  .admin-capability-search { width: 100%; }
  .admin-message-form { grid-template-columns: 1fr; }
  .admin-roster-form { grid-template-columns: 1fr; }
  .admin-message-row { align-items: flex-start; flex-direction: column; }
  .dashboard-message-layer { top: 50%; left: 50%; right: auto; width: min(390px, calc(100vw - 24px)); transform: translate(-50%, -50%); }
  .week-plan-row { grid-template-columns: 1fr auto; }
  .week-plan-row small { grid-column: 1 / -1; text-align: left; }
  .rosters-panel { width: 100%; margin-inline: 0; border-radius: 0; border-inline: 0; }
  .roster-filters { display: grid; gap: 7px; margin: 9px 0; overflow: visible; white-space: normal; }
  .roster-week-filters, .roster-department-filters { display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .roster-week-btn { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; }
  .roster-dept-btn { flex: 0 0 auto; padding: 6px 10px; font-size: 11px; }
  .roster-custom-week { flex: 0 0 auto; gap: 4px; font-size: 11px; }
  .roster-custom-week input { width: 100px; padding: 6px; font-size: 12px; }
  .roster-card { grid-template-columns: 34px 1fr; }
  .roster-card-actions { grid-column: 2; justify-content: flex-start; }
  .roster-card > div:nth-child(2) { min-width: 0; }
  .roster-card strong, .roster-card span, .roster-card small { overflow-wrap: anywhere; }
  .admin-roster-row { align-items: flex-start; flex-direction: column; }
  .admin-page-user { grid-template-columns: 1fr; }
  .admin-detail-form, .admin-detail-columns { grid-template-columns: 1fr; }
  .ai-layout { display: block; }
  .plus-date-filter { grid-template-columns: 1fr 1fr; }
  .home-summary { align-items: flex-start; }
  .home-insights { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px; }
  .insight-card { padding: 7px 5px; border-radius: 6px; }
  .insight-card span, .insight-card small { font-size: 9px; line-height: 1.15; }
  .insight-card strong { margin: 3px 0 2px; font-size: 13px; }
  .app-view > .range-row, .app-view > .home-summary, .app-view > .home-insights, .app-view > .clock-panel, .app-view > .home-actions, .app-view > .hours-list { width: 100%; }
  .clock-controls { flex: 0 1 auto; min-width: 0; }
  .clock-btn, .pause-btn { padding-left: 9px; padding-right: 9px; white-space: nowrap; }
  .today-btn { padding-left: 9px; padding-right: 9px; white-space: normal; }
  .hour-actions button { width: 32px; height: 32px; }
  .hour-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hour-actions { grid-column: 1 / -1; justify-content: flex-end; }
  input, select, textarea { font-size: 16px; }
  .plus-date-filter .action-btn, .plus-date-filter .text-link { justify-self: start; }
  .ai-history { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .ai-history-list { display: flex; overflow-x: auto; }
  .ai-history-item { flex: 0 0 150px; }
  .ai-content { padding-top: 18px; }
  .date-entry-control { width: min(100%, calc(100vw - 44px)); }
}
