:root {
  color-scheme: light;
  --bg: #f7faf9;
  --surface: #ffffff;
  --ink: #10201d;
  --muted: #61716d;
  --line: #ccd9d5;
  --brand: #0f766e;
  --brand-2: #0ea5a2;
  --danger: #b91c1c;
  --shadow: 0 14px 34px rgba(15, 35, 31, 0.12);
  --radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); min-height: 42px; padding: 0 14px; }
button:active { transform: translateY(1px); }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-height: 42px; padding: 9px 10px; }
textarea { resize: vertical; }
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  background: #edf5f3;
}
.login-screen.hidden {
  display: none;
}
.login-panel {
  width: min(520px, 100%);
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.beacon-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: #f8fffd;
}
.beacon-mark span {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 10px #d9efeb;
}
.login-panel h1 {
  font-size: 38px;
  line-height: 1;
}
.login-subtitle {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}
.login-company,
.login-status {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.login-form {
  width: 100%;
  display: grid;
  gap: 10px;
}
.login-button {
  width: 100%;
  min-height: 48px;
  font-weight: 800;
}
.login-refresh {
  justify-self: start;
}
.app-shell { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.app-shell.auth-hidden {
  display: none;
}
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px; background: rgba(247, 250, 249, 0.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.refresh-button { max-width: 96px; min-height: 38px; padding: 0 10px; color: var(--brand); border-color: #9ccbc4; font-size: 12px; font-weight: 800; }
.sync-button { max-width: 148px; min-height: 38px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand); border-color: #9ccbc4; font-size: 12px; font-weight: 800; }
.sync-button.online { color: #fff; background: var(--brand); border-color: var(--brand); }
.sync-button.error { color: var(--danger); border-color: #fecaca; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; }
h2 { font-size: 18px; margin-bottom: 10px; }
main { padding: 14px 14px 96px; max-width: 1180px; width: 100%; margin: 0 auto; }
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.home-head p { margin-bottom: 0; color: var(--muted); }
.student-list { display: grid; gap: 10px; }
.student-card { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 8px; width: 100%; min-height: 76px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.student-open { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 58px; padding: 8px; text-align: left; border: 0; background: transparent; }
.student-open strong { display: block; font-size: 18px; }
.student-open span span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.student-open em { color: var(--brand); font-style: normal; font-weight: 800; }
.student-edit { align-self: stretch; min-width: 74px; color: var(--brand); border-color: #9ccbc4; font-weight: 800; background: #f8fffd; }
.screen { display: none; }
.screen.active { display: block; }
.toolbar, .entry-grid, .summary-strip, .report-actions, .print-options { display: grid; gap: 10px; }
.toolbar { grid-template-columns: 1fr; }
label, .label-text { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.attendance-total {
  display: grid;
  gap: 5px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fffd;
}
.attendance-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.attendance-total strong {
  color: var(--brand);
  font-size: 20px;
}
.interval-panel, .report-sheet, dialog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.interval-panel { margin: 12px 0; padding: 12px; }
.interval-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 10px; text-align: center; }
.interval-head p { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.interval-head h2 { margin-bottom: 0; font-size: 21px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; font-size: 24px; }
.period-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.period-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.period-tabs button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.period-work {
  display: grid;
  grid-template-columns: 1fr 150px 150px;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}
.period-work div {
  display: grid;
  gap: 5px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fffd;
}
.period-work span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.period-work strong {
  color: var(--brand);
  font-size: 20px;
}
.interval-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 12px; }
#intervalSlider { accent-color: var(--brand); }
.logged-intervals {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.logged-intervals span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.logged-intervals button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.logged-intervals button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.logged-intervals button.has-data:not(.active) {
  border-color: var(--brand-2);
  background: #ecfdf5;
}
.behavior-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.behavior-control { display: grid; grid-template-rows: minmax(74px, 1fr) 34px; gap: 5px; min-height: 113px; }
.behavior-control.has-count .behavior-button { background: #ecfdf5; border-color: var(--brand-2); }
.behavior-button { min-height: 74px; padding: 8px; text-align: left; border-color: #bfd5d0; background: var(--surface); }
.behavior-button strong { display: block; font-size: 14px; line-height: 1.18; }
.behavior-button span { display: inline-block; margin-top: 6px; color: var(--brand); font-size: 20px; font-weight: 800; }
.count-adjust { min-width: 0; min-height: 34px; padding: 0; color: var(--brand); font-size: 22px; font-weight: 800; background: #f8fffd; }
.entry-grid { margin-top: 12px; grid-template-columns: 1fr; }
.wide { grid-column: 1 / -1; }
.staff-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 5px; }
.staff-options label { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 7px; min-height: 34px; color: var(--ink); font-weight: 400; }
.staff-options input { width: 16px; min-height: 16px; padding: 0; }
.staff-options button { grid-column: 1 / -1; }
.detail-edit-status {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fffd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.detail-edit-status.warning {
  border-color: #facc15;
  background: #fefce8;
  color: #854d0e;
}
.summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 6px; font-size: 22px; overflow-wrap: anywhere; }
.table-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.table-actions h2 { margin: 0; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 68vh; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #11312d; color: #fff; z-index: 1; }
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 158px;
  max-width: 190px;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line);
}
#weeklyTable {
  min-width: 860px;
}
#weeklyTable th,
#weeklyTable td {
  white-space: nowrap;
  min-width: 112px;
}
#weeklyTable th:first-child,
#weeklyTable td:first-child {
  white-space: normal;
  min-width: 178px;
  max-width: 178px;
  width: 178px;
}
th:first-child {
  z-index: 3;
  background: #11312d;
  color: #ffffff;
}
.chart-area { display: grid; gap: 8px; margin: 10px 0 14px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.bar-track { height: 14px; background: #dbe7e4; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); }
.report-sheet { padding: 14px; }
.report-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.report-option input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}
.print-options {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.print-options strong {
  grid-column: 1 / -1;
}
.print-options label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.print-options input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-line { border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.report-line span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.report-behavior-totals {
  display: grid;
  gap: 8px;
}
.report-behavior-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #ffffff;
}
.report-behavior-row strong,
.report-behavior-row span {
  display: block;
}
.report-behavior-row span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.report-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: #dbe7e4;
}
.report-bar i {
  display: block;
  height: 100%;
  background: var(--brand);
}
.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.tab { border: 0; border-radius: 6px; background: transparent; min-height: 48px; padding: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.tab.active { color: #fff; background: var(--brand); }
dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; }
dialog::backdrop { background: rgba(6, 20, 18, 0.42); }
.settings-form { display: grid; gap: 12px; padding: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; }
.time-row { display: grid; grid-template-columns: 1fr 1fr 96px; gap: 8px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 82px; z-index: 50; display: none; padding: 12px 14px; border-radius: var(--radius); background: #10201d; color: #fff; box-shadow: var(--shadow); }
.toast.show { display: block; }
.update-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #9ccbc4;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 800;
}
.update-banner.show {
  display: grid;
}
@media (min-width: 760px) {
  .toolbar { grid-template-columns: 180px 1fr 180px 150px 120px; }
  .behavior-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .report-actions { grid-template-columns: repeat(3, 1fr); }
  .report-option,
  .report-actions .print-options { grid-column: 1 / -1; }
}
@media (min-width: 1120px) {
  .behavior-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  html,
  body,
  .app-shell,
  main {
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    font-size: 13px;
  }
  .login-screen {
    align-items: start;
    padding: calc(18px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
  }
  .login-panel {
    padding: 18px;
  }
  .login-panel h1 {
    font-size: 31px;
  }
  .login-subtitle {
    font-size: 16px;
  }
  main {
    padding: 6px 8px 76px;
  }
  .topbar {
    align-items: start;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 10px 7px;
  }
  .eyebrow {
    font-size: 10px;
    margin-bottom: 2px;
  }
  h1 {
    font-size: 20px;
    line-height: 1.15;
  }
  h2 {
    font-size: 16px;
    margin-bottom: 7px;
  }
  button,
  input,
  select,
  textarea {
    min-height: 36px;
    font-size: 15px;
    border-radius: 7px;
  }
  label,
  .label-text {
    gap: 3px;
    font-size: 11px;
    line-height: 1.1;
  }
  .refresh-button,
  .sync-button {
    max-width: 84px;
    min-height: 34px;
    font-size: 11px;
    padding: 0 7px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .table-actions {
    align-items: stretch;
    gap: 8px;
  }
  #screenTrack .table-actions button {
    display: none;
  }
  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .toolbar label:nth-child(1),
  .toolbar label:nth-child(2) {
    grid-column: 1 / -1;
  }
  .toolbar label,
  .attendance-total {
    min-width: 0;
  }
  .attendance-total {
    min-height: 40px;
    padding: 7px 8px;
  }
  .attendance-total span {
    font-size: 11px;
  }
  .attendance-total strong {
    font-size: 17px;
  }
  .interval-panel {
    margin: 8px 0 10px;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(15, 35, 31, 0.08);
  }
  .period-tabs,
  .logged-intervals {
    max-width: 100%;
    gap: 4px;
    margin-left: 0;
    margin-right: 0;
    padding: 0 0 5px;
  }
  .period-tabs button,
  .logged-intervals button {
    min-height: 32px;
    padding: 0 7px;
    font-size: 11px;
  }
  .period-work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 5px;
  }
  .period-work label {
    grid-column: 1 / -1;
  }
  .period-work div {
    min-height: 40px;
    padding: 6px 8px;
  }
  .period-work span {
    font-size: 11px;
  }
  .period-work strong {
    font-size: 17px;
  }
  .interval-head {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 5px;
    margin-top: 5px;
  }
  .interval-head h2 {
    font-size: 15px;
    line-height: 1.2;
  }
  .interval-head p {
    font-size: 11px;
  }
  .interval-actions { grid-template-columns: 1fr; }
  .interval-actions {
    gap: 5px;
    margin-top: 6px;
  }
  .interval-actions .primary {
    min-height: 38px;
  }
  #intervalSlider {
    min-height: 30px;
    padding-left: 0;
    padding-right: 0;
  }
  .behavior-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .behavior-control {
    grid-template-rows: minmax(78px, 1fr) 34px;
    width: 100%;
    min-height: 117px;
    gap: 5px;
    overflow: hidden;
  }
  .behavior-button,
  .count-adjust {
    min-width: 0;
  }
  .behavior-button {
    width: 100%;
    min-height: 78px;
    padding: 8px;
  }
  .behavior-button strong {
    font-size: 13px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .behavior-button span {
    margin-top: 2px;
    font-size: 17px;
  }
  .count-adjust {
    min-height: 34px;
    padding: 0;
    font-size: 20px;
  }
  .entry-grid {
    gap: 8px;
    margin-top: 10px;
  }
  .staff-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .staff-options label {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    font-size: 13px;
  }
  textarea {
    min-height: 96px;
  }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .print-options {
    grid-template-columns: 1fr;
  }
  .tabbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    min-height: 40px;
    padding: 3px 1px;
    font-size: 10px;
  }
}

/* ObserveTrack SaaS redesign layer */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --ink: #17201f;
  --muted: #64716f;
  --line: #e1e8e6;
  --brand: #0f766e;
  --brand-2: #14a39a;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(15, 35, 31, 0.09);
  --shadow-soft: 0 8px 24px rgba(15, 35, 31, 0.06);
  --radius: 18px;
}
body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.09), transparent 32rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(15, 35, 31, 0.04);
}
input,
select,
textarea {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 1px 0 rgba(15, 35, 31, 0.03);
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
  border-color: rgba(15, 118, 110, 0.55);
}
.login-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(20, 163, 154, 0.2), transparent 18rem),
    linear-gradient(135deg, #eff7f5 0%, #ffffff 58%, #eef5f3 100%);
}
.login-panel {
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 24px 70px rgba(15, 35, 31, 0.14);
}
.beacon-mark,
.brand-mark {
  border: 0;
  background: linear-gradient(135deg, var(--brand), #0d9488);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.24);
}
.beacon-mark span {
  background: #ffffff;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.22);
}
.login-panel h1 {
  letter-spacing: 0;
}
.login-button,
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}
.app-shell {
  background: transparent;
}
.topbar {
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  border-bottom: 1px solid rgba(225, 232, 230, 0.88);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(15, 35, 31, 0.05);
}
.app-brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 900;
}
.eyebrow {
  color: var(--brand);
  font-size: 11px;
  letter-spacing: 0.04em;
}
h1 {
  color: var(--ink);
  font-size: 25px;
  font-weight: 850;
  line-height: 1.05;
}
.header-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-actions {
  flex-shrink: 0;
}
.refresh-button,
.sync-button,
.student-edit,
.student-archive,
.student-restore,
.student-report,
.student-delete,
#archivedStudentsButton,
#backToStudentsButton {
  border-color: rgba(15, 118, 110, 0.18);
  background: #ecf7f5;
  color: var(--brand);
  box-shadow: none;
}
.sync-button.online {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}
.icon-button {
  border-color: var(--line);
  background: #ffffff;
}
main {
  max-width: 1180px;
  padding: 18px 18px 108px;
}
.home-head,
.table-actions {
  margin: 6px 0 16px;
}
.home-head h2,
.table-actions h2 {
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}
.home-head p {
  color: var(--muted);
  font-weight: 600;
}
.student-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
}
.inline-check input {
  width: 18px;
  height: 18px;
}
.student-card,
.student-summary-card,
.toolbar,
.interval-panel,
.entry-grid,
.metric,
.table-wrap,
.chart-area,
.report-sheet,
.print-options,
.report-option {
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}
.student-list {
  gap: 12px;
}
.student-card {
  padding: 10px;
}
.student-card.archived {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}
.student-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.student-open {
  border-radius: 16px;
}
.student-open strong {
  font-size: 19px;
}
.student-open em {
  padding: 8px 10px;
  border-radius: 999px;
  background: #e8f5f3;
  font-size: 12px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  vertical-align: middle;
}
.student-archive,
.student-restore,
.student-report,
.student-delete {
  min-width: 82px;
  font-weight: 850;
}
.danger-action {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b91c1c;
}
.archive-search {
  margin-bottom: 14px;
}
.archive-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.admin-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}
.admin-card h3 {
  margin: 0;
  font-size: 18px;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-form .primary,
.admin-form button,
.admin-active {
  align-self: end;
}
.compact-form,
.assignment-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
.assignment-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.admin-list {
  display: grid;
  gap: 10px;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.admin-row strong,
.admin-row span {
  display: block;
}
.admin-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.student-summary-card {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}
.student-summary-card div,
.attendance-total,
.period-work div {
  border: 0;
  border-radius: 16px;
  background: var(--surface-soft);
}
.student-summary-card span,
.attendance-total span,
.period-work span,
.metric span,
.report-line span,
label,
.label-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.student-summary-card strong,
.attendance-total strong,
.period-work strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}
.toolbar {
  grid-template-columns: 190px 1fr 180px 150px 120px;
  padding: 14px;
  gap: 12px;
}
.interval-panel,
.entry-grid,
.report-sheet {
  padding: 16px;
}
.period-tabs {
  gap: 8px;
  padding-bottom: 8px;
}
.period-tabs button,
.logged-intervals button {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 999px;
  font-weight: 800;
}
.period-tabs button.active,
.logged-intervals button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}
.period-work {
  margin-top: 8px;
}
.interval-head {
  margin-top: 14px;
}
.interval-head h2 {
  font-size: 24px;
  font-weight: 850;
}
.interval-actions .primary {
  min-height: 48px;
}
#intervalSlider {
  accent-color: var(--brand);
}
.behavior-grid {
  gap: 12px;
}
.behavior-control {
  min-height: 128px;
  gap: 8px;
}
.behavior-button {
  display: grid;
  align-content: space-between;
  min-height: 88px;
  border: 1px solid rgba(225, 232, 230, 0.95);
  border-radius: 20px;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}
.behavior-control.has-count .behavior-button {
  background: #ecfdf8;
  border-color: rgba(15, 118, 110, 0.28);
}
.behavior-button strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}
.behavior-button span {
  justify-self: start;
  min-width: 42px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e8f5f3;
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
}
.count-adjust {
  min-height: 40px;
  border-color: rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  background: #f1faf8;
  box-shadow: none;
}
.entry-grid {
  gap: 12px;
}
.staff-options label,
.print-options label,
.report-option {
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
}
.summary-strip {
  gap: 12px;
}
.metric {
  padding: 16px;
}
.metric strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
}
.chart-area {
  padding: 16px;
}
.bar-row {
  grid-template-columns: minmax(130px, 190px) 1fr 50px;
  gap: 12px;
}
.bar-track {
  height: 12px;
  border-radius: 999px;
}
.bar-fill {
  border-radius: 999px;
}
.table-wrap {
  border-radius: 20px;
}
table {
  border-spacing: 0;
}
th,
td {
  border-color: #edf2f0;
  padding: 10px;
}
th {
  background: #0f2f2b;
}
.report-line,
.report-behavior-row {
  border-color: #edf2f0;
  border-radius: 16px;
  background: #ffffff;
}
.tabbar {
  left: 12px;
  right: 12px;
  bottom: 10px;
  gap: 4px;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  border: 1px solid rgba(225, 232, 230, 0.95);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 40px rgba(15, 35, 31, 0.14);
}
.tab {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 56px;
  border-radius: 18px;
  color: var(--muted);
  font-size: 11px;
  box-shadow: none;
}
.tab-icon {
  display: block;
  font-size: 17px;
  line-height: 1;
}
.tab.active {
  background: #e8f5f3;
  color: var(--brand);
}

@media (min-width: 760px) {
  main {
    padding-bottom: 116px;
  }
  .student-card {
    max-width: 760px;
  }
  .behavior-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .behavior-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  main {
    padding: 12px 12px 104px;
  }
  .topbar {
    align-items: center;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }
  .app-brand {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 11px;
  }
  .header-subtitle {
    max-width: 190px;
  }
  .top-actions {
    gap: 5px;
  }
  .refresh-button,
  .sync-button {
    max-width: 76px;
  }
  .home-head,
  .table-actions {
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .home-head h2,
  .table-actions h2 {
    font-size: 21px;
  }
  .student-summary-card,
  .toolbar {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }
  .student-summary-card div:first-child,
  .toolbar label:nth-child(1),
  .toolbar label:nth-child(2) {
    grid-column: 1 / -1;
  }
  .interval-panel,
  .entry-grid,
  .report-sheet,
  .chart-area {
    padding: 12px;
  }
  .period-tabs button,
  .logged-intervals button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }
  .period-work {
    grid-template-columns: 1fr 1fr;
  }
  .interval-head h2 {
    font-size: 19px;
  }
  .behavior-grid {
    gap: 10px;
  }
  .behavior-control {
    min-height: 132px;
  }
  .behavior-button {
    min-height: 90px;
    padding: 12px;
  }
  .tabbar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 22px;
  }
  .tab {
    min-height: 54px;
    font-size: 10px;
  }
  .tab-icon {
    font-size: 15px;
  }
}

/* Final polish pass: premium ObserveTrack app shell */
.login-screen {
  place-items: center;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
}
.login-panel {
  position: relative;
  overflow: hidden;
  gap: 16px;
}
.login-panel::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.08);
  pointer-events: none;
}
.beacon-mark {
  position: relative;
  overflow: hidden;
}
.beacon-mark::before {
  content: "OT";
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}
.beacon-mark span {
  position: absolute;
  inset: 12px;
  width: auto;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: transparent;
  box-shadow: none;
}
.login-panel .eyebrow {
  margin-top: 2px;
}
.login-panel h1 {
  margin-bottom: -6px;
  font-size: clamp(36px, 7vw, 50px);
}
.login-subtitle {
  max-width: 360px;
  font-size: 19px;
}
.login-company {
  padding-bottom: 4px;
}
.login-button {
  border-radius: 16px;
  min-height: 52px;
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.24);
}
.login-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--brand);
  font-size: 12px;
}
.login-refresh {
  min-height: 38px;
}
.brand-mark {
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}
.topbar {
  min-height: 72px;
}
.header-subtitle {
  max-width: min(48vw, 520px);
}
.top-actions button {
  border-radius: 14px;
}
.screen {
  animation: screenFade 160ms ease-out;
}
@keyframes screenFade {
  from { opacity: 0.76; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.empty-state {
  max-width: 680px;
  padding: 28px;
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0) 48%),
    #ffffff;
  box-shadow: var(--shadow-soft);
}
.empty-state span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}
.empty-state p {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}
.student-card,
.student-summary-card,
.toolbar,
.interval-panel,
.entry-grid,
.metric,
.table-wrap,
.chart-area,
.report-sheet,
.print-options {
  box-shadow: 0 10px 30px rgba(15, 35, 31, 0.055);
}
.student-card:hover,
.behavior-button:hover,
.tab:hover {
  border-color: rgba(15, 118, 110, 0.22);
}
.student-open em,
.behavior-button span {
  font-variant-numeric: tabular-nums;
}
.student-summary-card div,
.period-work div,
.attendance-total,
.metric,
.report-line {
  min-width: 0;
}
.student-summary-card strong,
.metric strong,
.report-line strong {
  overflow-wrap: anywhere;
}
.toolbar,
.entry-grid {
  align-items: end;
}
.interval-panel {
  display: grid;
  gap: 12px;
}
.period-work {
  margin-top: 0;
}
.interval-head {
  padding: 8px 0 2px;
}
.interval-head p {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.logged-intervals {
  padding-top: 2px;
}
.behavior-control {
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.behavior-control:active {
  transform: scale(0.992);
}
.behavior-button {
  min-height: 96px;
}
.count-adjust {
  color: #0b5f59;
}
.report-sheet h2,
.screen > .table-actions h2,
.home-head h2 {
  color: var(--ink);
}
.table-actions .action-row button,
.report-actions button,
.print-tab,
.share-tab {
  border-color: rgba(15, 118, 110, 0.16);
  background: #f2faf8;
  color: var(--brand);
  box-shadow: none;
}
.tabbar {
  backdrop-filter: blur(18px);
}
.tab {
  grid-template-rows: 22px auto;
  align-content: center;
}
.tab-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  color: inherit;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
}
.tab.active {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.1);
}
.info-page {
  display: none;
}
.info-page.active {
  display: block;
}
.info-hero,
.info-card,
.app-footer {
  border: 1px solid rgba(225, 232, 230, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(15, 35, 31, 0.055);
}
.info-hero {
  margin-bottom: 14px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0) 52%),
    #ffffff;
}
.info-hero span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-hero h2 {
  max-width: 720px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.05;
}
.info-hero p,
.info-card p,
.info-card li {
  color: var(--muted);
  font-size: 15px;
  font-weight: 620;
  line-height: 1.55;
}
.info-hero p {
  max-width: 760px;
  margin-bottom: 0;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.info-card {
  padding: 20px;
}
.info-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 880;
}
.info-card p {
  margin: 0;
}
.info-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}
.info-card a,
.contact-card a {
  color: var(--brand);
  font-weight: 850;
}
.wide-info {
  grid-column: 1 / -1;
}
.legal-card {
  background: #fbfdfc;
}
.legal-card h3,
.legal-card p {
  color: #7a8884;
  font-size: 12px;
  font-weight: 620;
}
.contact-card span {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
}
.contact-card .legal-owner {
  color: #7a8884;
  font-size: 11px;
  font-weight: 620;
  text-transform: none;
  letter-spacing: 0;
}
.app-footer {
  width: min(1180px, calc(100% - 36px));
  margin: 6px auto 108px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.app-footer strong,
.login-footer strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.app-footer span,
.login-footer span,
.app-footer p {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}
.app-footer p,
.login-footer span:last-child {
  color: #7a8884;
  font-size: 11px;
  font-weight: 600;
}
.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.footer-link {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2faf8;
  color: var(--brand);
  font-size: 12px;
  box-shadow: none;
}
.login-footer {
  width: 100%;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .login-screen {
    padding: calc(18px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
  }
  .login-panel {
    border-radius: 24px;
    padding: 22px;
  }
  .beacon-mark {
    width: 58px;
    height: 58px;
  }
  .login-subtitle {
    font-size: 17px;
  }
  .topbar {
    min-height: 66px;
  }
  .header-subtitle {
    max-width: 150px;
  }
  .top-actions .refresh-button {
    display: none;
  }
  .sync-button {
    max-width: 92px;
  }
  main {
    padding-top: 14px;
  }
  .student-card,
  .student-summary-card,
  .toolbar,
  .interval-panel,
  .entry-grid,
  .metric,
  .table-wrap,
  .chart-area,
  .report-sheet,
  .print-options {
    border-radius: 18px;
  }
  .empty-state {
    padding: 22px;
    border-radius: 22px;
  }
  .empty-state strong {
    font-size: 22px;
  }
  .student-open {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .student-open em {
    justify-self: start;
  }
  .student-actions {
    grid-column: 1 / -1;
  }
  .student-actions button {
    flex: 1 1 0;
    min-width: 0;
  }
  .student-edit,
  .student-archive,
  .student-restore,
  .student-report,
  .student-delete {
    min-width: 66px;
  }
  .student-toolbar {
    width: 100%;
    justify-content: stretch;
  }
  .student-toolbar > * {
    flex: 1 1 140px;
  }
  .inline-check {
    justify-content: center;
  }
  .student-summary-card strong,
  .attendance-total strong,
  .period-work strong,
  .metric strong {
    font-size: 18px;
  }
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric {
    padding: 13px;
  }
  .metric span {
    line-height: 1.2;
  }
  .behavior-button strong {
    font-size: 14px;
  }
  .behavior-button span {
    font-size: 22px;
  }
  .entry-grid {
    gap: 10px;
  }
  .tabbar {
    padding-top: 7px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .info-hero,
  .info-card {
    border-radius: 20px;
    padding: 18px;
  }
  .app-footer {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
    margin-bottom: 104px;
  }
  .app-footer nav {
    justify-content: flex-start;
  }
  .admin-grid,
  .admin-form,
  .compact-form,
  .assignment-form,
  .admin-row {
    grid-template-columns: 1fr;
  }
}
@media print {
  body { background: #fff; }
  .topbar, .tabbar, .app-footer, .report-actions, .print-options, .table-actions button, .toast, .update-banner { display: none !important; }
  main { padding: 0; max-width: none; }
  .screen { display: none !important; }
  body[data-print-screen="screenTrack"] #screenTrack,
  body[data-print-screen="screenDaily"] #screenDaily,
  body[data-print-screen="screenWeekly"] #screenWeekly,
  body[data-print-screen="screenMonthly"] #screenMonthly,
  body[data-print-screen="screenReport"] #screenReport {
    display: block !important;
  }
  .table-actions { display: block; margin: 0 0 8px; }
  .table-wrap { max-height: none; overflow: visible; border: 0; }
  table { min-width: 0; font-size: 10px; page-break-inside: auto; }
  th, td { padding: 4px; }
  th:first-child, td:first-child { position: static; min-width: 0; max-width: none; box-shadow: none; }
  tr { page-break-inside: avoid; }
  .report-sheet { box-shadow: none; border: 0; }
}
