:root {
  color-scheme: light;
  --navy: #10243d;
  --navy-2: #173252;
  --bg: #eef2f6;
  --panel: #ffffff;
  --line: #d7e0ea;
  --text: #152033;
  --muted: #5d6d80;
  --accent: #0f8f7a;
  --accent-strong: #0c7a68;
  --accent-text: #ffffff;
  --accent-soft: #e6f6f2;
  --danger: #b42318;
  --danger-text: #ffffff;
  --warn: #b45309;
  --shadow: 0 10px 30px rgba(16, 36, 61, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

html {
  overflow: hidden;
}

body {
  overflow: auto;
}

body.is-app {
  overflow: hidden;
}

.login-portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
  background: var(--bg);
}

.login-brand {
  background:
    radial-gradient(circle at 22% 16%, rgba(56, 140, 255, 0.26), transparent 44%),
    radial-gradient(circle at top left, rgba(15, 143, 122, 0.18), transparent 42%),
    linear-gradient(180deg, var(--navy-2), var(--navy));
  color: #e8eef5;
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.login-brand-top .eyebrow {
  margin: 0;
}

.brand-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 0 22px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-brand h1 {
  margin: 0;
  font-size: 3rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.login-brand .lede {
  max-width: 28rem;
  color: #b7c5d6;
}

.login-points {
  margin: 28px 0 0;
  padding: 0;
  max-width: 22rem;
  list-style: none;
  color: #c5d3e2;
}

.login-points li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.95rem;
}

.login-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg);
}

.login-card {
  width: min(420px, 100%);
}

#login-form {
  display: grid;
}

.login-heading {
  margin: 0 0 20px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 8px;
  color: #7ee0cb;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid #99d9cc;
  outline-offset: 1px;
}

button {
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

button.secondary:hover:not(:disabled) {
  background: #f3f7fb;
}

button.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

button.danger:hover:not(:disabled) {
  background: #fee2e2;
}

button.compact {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.icon-btn {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  display: none;
}

.error {
  min-height: 1.2em;
  margin: 0 0 8px;
  color: var(--danger);
  font-size: 0.9rem;
}

.alerts {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  color: var(--warn);
  font-size: 0.88rem;
}

.share-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.share-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.share-brand h1 {
  margin: 0;
  font-size: 1.6rem;
}

.hint,
.status-label {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.status-label.is-work {
  color: var(--accent);
}

.status-label.is-break {
  color: var(--warn);
}

.portal {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  background: var(--navy);
  color: #d7e2ee;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: auto;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: block;
  width: 56px;
  height: auto;
  flex-shrink: 0;
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-owner {
  margin: 0;
  color: #93a6bb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-product {
  margin: 1px 0 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-org {
  margin: 4px 0 0;
  color: #93a6bb;
  font-size: 0.8rem;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
  align-content: start;
  flex: 1;
}

.nav-label {
  margin: 14px 10px 6px;
  color: #7f93a8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-item {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c5d3e2;
  font-weight: 600;
  text-align: left;
}

.nav-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.is-active {
  background: var(--accent);
  color: #fff;
}

.sidebar-user {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user .compact {
  grid-column: 1 / -1;
  background: transparent;
  color: #d7e2ee;
  border-color: rgba(255, 255, 255, 0.18);
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #23476d;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.sidebar-user-copy p {
  margin: 0;
}

#app-user-name {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
}

#app-user-role {
  color: #93a6bb;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.portal-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.portal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.portal-heading h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.portal-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-body {
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 48px;
}

.timer-page {
  display: grid;
  gap: 20px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.timer-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.timer-card {
  padding: 24px 22px 22px;
}

.today-hours {
  margin: 0 0 6px;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.today-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.today-kpis div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.today-kpis dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.today-kpis dd {
  margin: 4px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.timer-display {
  margin: 0 0 8px;
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--navy);
}

.timer-detail {
  min-height: 0;
  margin: 0 0 14px;
  color: var(--muted);
}

.location-card {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.location-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.location-pin {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.location-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#timer-location-name {
  margin: 0;
  font-weight: 700;
  color: var(--navy);
}

.location-address,
.location-policy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.timer-map {
  position: relative;
  height: 148px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: #d7e0ea;
}

.timer-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(16, 36, 61, 0.28);
  transform: translate(-50%, -50%);
}

.map-attrib {
  position: absolute;
  right: 8px;
  bottom: 6px;
  margin: 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 0.64rem;
}

.stack {
  display: grid;
  gap: 4px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill.work,
.pill.approved {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pill.break,
.pill.pending {
  background: #fff7ed;
  color: var(--warn);
}

.pill.off,
.pill.cancelled {
  background: #eef2f6;
  color: var(--muted);
}

.pill.submitted {
  background: #eff6ff;
  color: #1d4ed8;
}

.pill.rejected {
  background: #fef2f2;
  color: #b91c1c;
}

.timesheet-card {
  padding: 20px 22px 10px;
}

.timesheet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.timesheet-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.timesheet-toolbar-left label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}

.timesheet-toolbar-left select {
  width: auto;
  min-width: 180px;
  margin: 0;
}

.week-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.week-label {
  min-width: 132px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 16px;
}

.day-cell {
  width: auto;
  margin: 0;
  padding: 10px 8px 12px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  text-align: left;
  border-radius: 12px;
  min-height: 92px;
}

.day-cell:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #c5d3e2;
}

.day-cell.is-today .day-name {
  color: var(--accent-strong);
}

.day-cell.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 3px 0 var(--accent);
}

.day-cell.is-empty .day-hours {
  color: #9aabbd;
  font-weight: 600;
}

.day-cell .day-name {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.day-cell .day-num {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.day-cell .day-hours {
  display: block;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 700;
}

.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.totals div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

#week-totals.totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

#week-totals.totals div {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  min-width: 104px;
}

#week-totals.totals div:last-child {
  border-right: 0;
}

#week-totals.totals dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#week-totals.totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

#week-totals .is-hero {
  background: var(--accent-soft);
  border-right-color: #cfe8e0;
  border-radius: 10px;
  min-width: 132px;
}

#week-totals .is-hero dd {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

#week-totals .is-zero {
  opacity: 0.48;
}

.timesheet-daybar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 16px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.timesheet-daybar h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.timesheet-day-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.timesheet-day-meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.timesheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.timesheet-toolbar .timesheet-actions {
  margin-bottom: 0;
}

.timesheet-actions button {
  width: auto;
  margin: 0;
}

.timesheet-table {
  min-width: 720px;
}

.timesheet-table th:nth-child(1),
.timesheet-table td:nth-child(1),
.timesheet-table th:nth-child(2),
.timesheet-table td:nth-child(2) {
  width: 128px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timesheet-table th:nth-child(3),
.timesheet-table td:nth-child(3) {
  width: 96px;
}

.timesheet-table th:nth-child(5),
.timesheet-table td:nth-child(5) {
  width: 108px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.timesheet-table th:nth-child(6),
.timesheet-table td:nth-child(6) {
  width: 148px;
  text-align: right;
}

.timesheet-table td.muted {
  color: var(--muted);
}

.timesheet-table tr.is-live {
  background: var(--accent-soft);
}

.timesheet-table .pill {
  margin: 0;
}

.timesheet-empty {
  color: var(--muted);
  text-align: left !important;
  font-weight: 500;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.shift-sheet {
  padding: 20px 22px 8px;
}

.shift-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shift-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.shift-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.shift-range {
  width: auto;
  margin: 0;
  padding: 6px 12px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

button.shift-range:hover:not(:disabled) {
  background: #fff;
  border-color: var(--accent);
}

button.shift-range[aria-expanded='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

button.shift-range::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}

.week-picker {
  position: fixed;
  z-index: 40;
  width: min(640px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.week-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.week-picker-head p {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.week-picker-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.week-picker-pane {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.week-picker-pane.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.week-picker-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.week-picker-pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.week-picker-month-title {
  margin: 2px 0 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.week-picker-value {
  margin: 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.week-picker-weekdays,
.week-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.week-picker-weekdays span {
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.week-picker-grid button {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 650;
}

.week-picker-grid button:hover:not(:disabled) {
  background: #fff;
}

.week-picker-grid button.is-outside {
  color: #9aabbd;
  font-weight: 500;
}

.week-picker-grid button.is-in-range {
  background: var(--accent-soft);
  border-radius: 0;
}

.week-picker-grid button.is-range-start {
  border-radius: 8px 0 0 8px;
}

.week-picker-grid button.is-range-end {
  border-radius: 0 8px 8px 0;
}

.week-picker-grid button.is-range-start.is-range-end {
  border-radius: 8px;
}

.week-picker-grid button.is-in-range:hover:not(:disabled) {
  background: #d8efe8;
}

.week-picker-grid button.is-today {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.week-picker-grid button.is-from,
.week-picker-grid button.is-to {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}

.week-picker-grid button.is-from:hover:not(:disabled),
.week-picker-grid button.is-to:hover:not(:disabled) {
  background: var(--accent-strong);
}

.week-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.week-picker-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.week-picker-foot-actions {
  display: flex;
  gap: 8px;
}

.week-picker-foot-actions button {
  width: auto;
  margin: 0;
}

.shift-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.shift-summary strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.shift-table {
  min-width: 860px;
}

.shift-table th:nth-child(n + 5),
.shift-table td:nth-child(n + 5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shift-table td.muted {
  color: var(--muted);
}

.shift-table td.total {
  font-weight: 700;
  color: var(--navy);
}

.shift-table tr.is-live {
  background: var(--accent-soft);
}

.shift-table .pill {
  margin: 0;
}

.shift-empty {
  color: var(--muted);
  text-align: left !important;
}

dialog {
  width: min(440px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(16, 36, 61, 0.45);
}

dialog h2 {
  margin: 0 0 12px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.filters-grid select[multiple] {
  min-height: 84px;
}

.workspace-grid {
  display: grid;
  gap: 20px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.check-row input {
  display: inline-block;
  width: auto;
  margin: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.kpi {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.kpi dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.kpi dd {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 650;
}

.kpi .delta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.insights-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(72px, 28%) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.86rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.bar-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-wrap input,
.table-wrap select {
  margin: 0;
  padding: 6px 8px;
}

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 36, 61, 0.4);
  z-index: 15;
}

@media (max-width: 960px) {
  .login-portal {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 36px 24px 24px;
    min-height: auto;
  }

  .login-brand h1 {
    font-size: 2.2rem;
  }

  .brand-logo {
    width: min(220px, 100%);
    margin-bottom: 16px;
  }

  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  body.nav-open .sidebar {
    transform: none;
  }

  .icon-btn {
    display: inline-flex;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .timer-card {
    position: static;
  }

  .portal-body {
    padding: 16px;
  }

  body.is-app {
    overflow: auto;
  }
}

@media (max-width: 720px) {
  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .week-picker-months {
    grid-template-columns: 1fr;
  }

  .week-grid {
    grid-template-columns: repeat(7, minmax(76px, 1fr));
    overflow-x: auto;
  }

  #week-totals.totals {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}
