:root {
  --ink: #172c3c;
  --muted: #738390;
  --bg: #f5f8fa;
  --line: #e7edf1;
  --brand: #078b91;
  --navy: #122e3b;
  --accent: #e3f6f3;
  --white: #ffffff;
  --shadow: 0 5px 22px rgba(29, 55, 72, .035);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
button:hover, .button:hover { background: #06777d; text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: wait; }
.secondary { background: #fff; color: var(--ink); border-color: #dce5e8; }
.secondary:hover { background: #f4faf9; border-color: #b8d8d6; }
.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  vertical-align: middle;
  stroke-width: 1.8;
}

/* Persistent workspace navigation */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 246px;
  padding: 26px 18px 22px;
  overflow-y: auto;
  background: var(--navy);
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 82px;
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: .5px;
}
.brand:hover { text-decoration: none; }
.brand img {
  display: block;
  width: 100%;
  height: 82px;
  padding: 13px 12px;
  border-radius: 13px;
  object-fit: contain;
  background: #fff;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: var(--brand);
  font-size: 23px;
  font-weight: 800;
}
.portal-label {
  margin: 27px 14px 16px;
  color: #8ca7b3;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 2.5px;
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #a9c0cb;
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav a .icon { color: #8aa8b5; }
.sidebar nav a:hover {
  background: rgba(255, 255, 255, .045);
  color: #fff;
  text-decoration: none;
}
.sidebar nav a.active {
  border-color: rgba(113, 219, 207, .10);
  background: #204653;
  color: #fff;
}
.sidebar nav a.active .icon { color: #71d9cb; }
.nav-dot { width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 3px; }
.sidebar nav a.active .nav-dot { background: #71d9cb; border-color: #71d9cb; }
.brand-help {
  margin: 24px 4px 12px;
  padding: 15px;
  border: 1px solid rgba(165, 204, 215, .14);
  border-radius: 11px;
  background: rgba(255, 255, 255, .03);
  color: #a7bfca;
  font-size: 11px;
  line-height: 1.65;
}
.brand-help strong { display: block; margin-bottom: 4px; color: #dcecee; font-size: 12px; }
.sidebar-bottom { margin-top: auto; padding: 22px 13px 0; border-top: 1px solid rgba(155, 184, 194, .14); }
.sidebar-bottom > strong { font-size: 13px; font-weight: 600; }
.sidebar-bottom small { display: block; margin: 5px 0 10px; color: #89a8b8; font-size: 11px; }
.logout { min-height: 32px; padding: 6px 0; background: none; color: #b8ced7; font-size: 12px; }
.logout:hover { background: none; color: #fff; }
.logout .icon { width: 16px; height: 16px; }

/* Workspace frame */
.main { margin-left: 246px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 75px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}
.topbar > span:first-child { font-weight: 600; }
.topbar > span:first-child .muted { margin-left: 6px; font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 15px; color: var(--muted); }
.topbar-date { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.topbar-date .icon { width: 16px; height: 16px; }
.topbar-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 3px solid #fff;
  border-radius: 50%;
  outline: 1px solid #dbece8;
  background: #daf0eb;
  color: #19756e;
  font-size: 12px;
  font-weight: 700;
}
.mobile-menu-toggle { display: none; }
.content { max-width: 1640px; margin: auto; padding: 27px 34px 20px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 9px; color: var(--brand); font-size: 9px; font-weight: 700; letter-spacing: 2px; }
h1 { margin: 0 0 7px; font-size: 29px; font-weight: 700; line-height: 1.25; letter-spacing: -.9px; }
h2 { margin: 0 0 17px; font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
h3 { margin: 14px 0 8px; font-size: 14px; }
p { margin: 9px 0 16px; line-height: 1.65; }
.page-heading p.muted { margin: 0; font-size: 13px; }
.muted { color: var(--muted); }
.small, small { font-size: 11px; }
.card {
  min-width: 0;
  margin-bottom: 20px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}
.grid { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(340px, 1.2fr); gap: 20px; }
.dashboard-grid { grid-template-columns: 1.2fr 1fr; }

/* Overview welcome and metric cards */
.welcome-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 154px;
  margin-bottom: 22px;
  padding: 26px 30px;
  overflow: hidden;
  border: 1px solid #cce9e8;
  border-radius: 16px;
  background: linear-gradient(112deg, #e6f6f2 5%, #dff3f3 65%, #d8eff2 100%);
}
.welcome-banner::before, .welcome-banner::after {
  position: absolute;
  pointer-events: none;
  content: "";
  width: 230px;
  height: 230px;
  border: 1px solid rgba(29, 129, 137, .10);
  border-radius: 50%;
  right: -80px;
  top: -85px;
}
.welcome-banner::after { width: 320px; height: 320px; right: -120px; top: -130px; }
.welcome-copy, .welcome-actions { position: relative; z-index: 1; }
.welcome-copy .eyebrow { margin-bottom: 8px; color: #327c78; }
.welcome-copy h2 { margin: 0 0 9px; font-size: 25px; letter-spacing: -.65px; color: #163f46; }
.welcome-copy h1 { font-size: 27px; }
.welcome-copy p { max-width: 530px; margin: 0; color: #53787b; font-size: 12px; line-height: 1.7; }
.welcome-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 10px; }
.welcome-actions .button { min-height: 42px; }
.welcome-actions .secondary { border-color: #c4dfdc; background: rgba(255, 255, 255, .82); color: #275b5b; }
.welcome-actions .secondary:hover { background: #fff; }
.welcome-copy .welcome-actions { margin-top: 19px; }
.welcome-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #3b8780; font-size: 9px; font-weight: 650; letter-spacing: 1.5px; }
.welcome-kicker .icon { width: 14px; height: 14px; }
.welcome-date { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; width: 106px; min-width: 106px; height: 128px; padding: 15px; border: 1px solid rgba(129, 180, 177, .22); border-radius: 13px; background: rgba(255, 255, 255, .46); color: #709994; text-align: center; }
.welcome-date > .icon { width: 23px; height: 23px; margin-bottom: 5px; color: #5ba9a0; }
.welcome-date span { font-size: 10px; }
.welcome-date strong { color: #2b6766; font-size: 21px; font-weight: 650; }
.welcome-date small { font-size: 9px; }
.topbar-title { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.topbar-title .muted { padding-left: 7px; font-weight: 400; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.sidebar-user .avatar { width: 32px; height: 32px; border: 1px solid #36535f; background: #244755; color: #a9d3cd; font-size: 11px; }
.sidebar-user strong { font-size: 12px; font-weight: 600; }
.sidebar-user small { margin: 3px 0 0; font-size: 10px; }
.heading-period, .period-label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e2e9ee; border-radius: 8px; background: #fff; color: #81929e; font-size: 10px; white-space: nowrap; }
.heading-period .icon { width: 14px; height: 14px; }
.period-label { padding: 6px 9px; border-color: #e9eef2; background: #f9fbfc; font-size: 9px; }
.stat-head > span:first-child { color: #71818d; font-size: 12px; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 23px; }
.stat { position: relative; min-width: 0; padding: 21px 22px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stat p { margin: 0; color: #71818d; font-size: 12px; font-weight: 500; }
.stat strong { display: block; margin: 0 0 10px; font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -1px; }
.stat small { display: block; color: #89959e; font-size: 10px; line-height: 1.4; }
.stat-icon { display: grid; place-items: center; flex-shrink: 0; width: 37px; height: 37px; border-radius: 10px; background: #e5f5f1; color: #12918c; }
.stat-icon .icon { width: 19px; height: 19px; }
.stat:nth-child(2) .stat-icon { background: #fff0e9; color: #db8e55; }
.stat:nth-child(3) .stat-icon { background: #f0ecfc; color: #9270c8; }
.stat:nth-child(4) .stat-icon { background: #e7f2fc; color: #5595c7; }
.stat > p { margin-bottom: 15px; }
.stat > .stat-icon { position: absolute; right: 20px; top: 20px; }
.stat-link { display: block; color: inherit; text-decoration: none; }
.stat-link:hover { border-color: #bbd9d5; text-decoration: none; }

/* Dashboard charts use server-generated values, with no inline styles. */
.dashboard-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dashboard-top > .card, .dashboard-bottom > .card { margin-bottom: 0; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.section-title h2 { margin-bottom: 5px; }
.section-title p { margin: 0; font-size: 11px; color: var(--muted); }
.section-title > a { padding-top: 3px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.section-title > .badge { font-size: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; margin: 10px 0 0; color: #7f8d96; font-size: 10px; }
.chart-legend > span, .chart-legend > div { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #0caaa4; }
.legend-dot.attendance, .legend-dot.attendance-bar { background: #0caaa4; }
.legend-dot.report, .legend-dot.report-bar, .chart-legend > :nth-child(2) .legend-dot { background: #94d3d6; }
.weekly-chart { display: block; width: 100%; min-width: 0; margin-top: 14px; }
.weekly-chart > svg { display: block; width: 100%; height: auto; overflow: visible; }
svg.weekly-chart { height: auto; }
.chart-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 15px;
  min-height: 160px;
  padding: 0 6px;
  background: repeating-linear-gradient(to top, transparent 0, transparent 39px, #eff3f5 40px, transparent 41px);
}
.chart-day { min-width: 0; text-align: center; }
.bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 145px; }
.bar-pair > svg { display: block; width: 16px; height: 145px; }
.chart-bar { display: block; width: 16px; border-radius: 5px 5px 0 0; color: #0caaa4; }
.chart-bar rect { fill: currentColor; }
.attendance-bar { color: #0caaa4; }
.report-bar { color: #94d3d6; }
.chart-label { display: block; margin-top: 12px; color: #8a98a1; font-size: 10px; }
.chart-axis { fill: #8a98a1; font-size: 11px; }
.chart-grid { stroke: #eef2f4; stroke-width: 1; }
.chart-note { margin: 14px 0 0; color: #91a0a8; font-size: 10px; }
.weekly-chart { display: flex; gap: 12px; align-items: flex-start; }
.chart-bars { flex: 1; }
.chart-bars { background-size: 100% 145px; background-repeat: no-repeat; background-position: top; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0; width: 12px; height: 139px; padding-top: 11px; color: #99a7af; font-size: 9px; }
.chart-day > small { display: block; margin-top: 3px; color: #a3afb6; font-size: 8px; }
.chart-count { display: block; margin-top: 6px; color: #879ea8; font-size: 8px; }
.chart-day.is-today .chart-label { color: #088f88; font-weight: 650; }
.chart-day.is-today .chart-count { color: #088f88; }
.chart-bar .bar-background { fill: #f0f6f5; }
.bar-pair > svg { width: 24px; }
.legend-dot.teal { background: #0caaa4; }
.legend-dot.blue { background: #94d3d6; }
.donut-wrap { position: relative; width: 152px; height: 152px; flex-shrink: 0; margin: 10px auto 15px; }
.task-donut { display: block; width: 100%; height: 100%; overflow: visible; }
.donut-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; text-align: center; pointer-events: none; }
.donut-center strong { font-size: 29px; font-weight: 700; letter-spacing: -.7px; }
.donut-center span, .donut-center small { color: #8b99a1; font-size: 10px; }
.status-legend { display: grid; gap: 10px; max-width: 270px; margin: 0 auto; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #778794; font-size: 11px; }
.legend-row > span { display: inline-flex; align-items: center; gap: 8px; }
.legend-row strong { color: #364e5a; font-size: 11px; font-weight: 600; }
.status-legend .legend-row:nth-child(1) .legend-dot { background: #12a5a0; }
.status-legend .legend-row:nth-child(2) .legend-dot { background: #66bdce; }
.status-legend .legend-row:nth-child(3) .legend-dot { background: #a395d9; }
.status-legend .legend-row:nth-child(4) .legend-dot { background: #d4e6e2; }
.status-legend .legend-row .legend-dot.assigned { background: #9eb2c4; }
.status-legend .legend-row .legend-dot.in-progress { background: #3894ed; }
.status-legend .legend-row .legend-dot.submitted { background: #a08ae8; }
.status-legend .legend-row .legend-dot.approved { background: #11a797; }
.progress-track { display: block; width: 100%; height: 6px; margin: 12px 0; border: 0; border-radius: 4px; overflow: hidden; background: #edf4f3; }
.progress-track svg { display: block; width: 100%; height: 6px; }
progress.progress-track { accent-color: #0caaa4; }
progress.progress-track::-webkit-progress-bar { background: #edf4f3; border-radius: 4px; }
progress.progress-track::-webkit-progress-value { background: #0caaa4; border-radius: 4px; }
progress.progress-track::-moz-progress-bar { background: #0caaa4; border-radius: 4px; }
.progress-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: #7d8e97; font-size: 10px; }

/* Daily submissions and upcoming work */
.table-wrap { width: 100%; overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.team-table th { padding: 12px 0; border-bottom: 1px solid var(--line); color: #8a99a3; font-size: 10px; font-weight: 500; white-space: nowrap; }
.team-table td { padding: 14px 0; border-bottom: 1px solid #f0f3f5; color: #718390; vertical-align: middle; }
.team-table th + th, .team-table td + td { padding-left: 13px; }
.team-table tr:last-child td { border-bottom: 0; }
.team-table td:first-child { color: var(--ink); }
.team-member { display: flex; align-items: center; gap: 10px; }
.team-member strong { display: block; font-size: 12px; font-weight: 600; }
.team-member small { display: block; margin-top: 3px; color: #8b99a2; font-size: 10px; }
.table-scroll { width: 100%; overflow-x: auto; }
.team-person { display: flex; align-items: center; gap: 10px; }
.team-person strong { display: block; font-size: 12px; font-weight: 600; }
.team-person small { display: block; margin-top: 3px; color: #8b99a2; font-size: 10px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf1f4; }
.person-row strong { font-size: 12px; }
.person-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; background: #e4f3ef; color: #388e82; font-size: 12px; font-weight: 650; }
.team-table tr:nth-child(3n + 2) .avatar { background: #eaf0fa; color: #6489b1; }
.team-table tr:nth-child(3n) .avatar { background: #f2edfa; color: #9683bf; }
.submission-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; background: #f1f4f6; color: #8e9ba3; font-size: 9px; font-weight: 500; white-space: nowrap; }
.submission-pill .icon { width: 12px; height: 12px; }
.submission-pill.entered, .submission-pill.submitted, .submission-pill.done { background: #e6f6ef; color: #338d6f; }
.submission-pill.missing { background: #f3f5f6; color: #99a4ab; }
.submission-pill:hover { text-decoration: none; }
.task-summary { display: block; padding: 15px 0; border-bottom: 1px solid #edf2f4; color: var(--ink); }
.task-summary:last-child { border-bottom: 0; padding-bottom: 0; }
.task-summary:hover { text-decoration: none; }
.task-summary strong { font-size: 12px; font-weight: 600; }
.task-summary small { display: block; margin: 7px 0; color: var(--muted); font-size: 10px; }
.task-summary-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.task-summary-top strong { flex: 1; line-height: 1.5; }
.task-summary-top .badge { flex-shrink: 0; font-size: 9px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; }
.text-link .icon { width: 13px; height: 13px; }
.review-strip { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 17px 21px; border: 1px solid #e7e3f3; border-radius: 13px; background: #f4f1fa; color: #9787b4; }
.review-strip > .icon { width: 22px; height: 22px; }
.review-strip strong { color: #78648f; font-size: 12px; font-weight: 600; }
.review-strip p { margin: 4px 0 0; color: #9b8dae; font-size: 10px; }
.review-links { display: flex; gap: 16px; margin-left: auto; }
.review-links a { display: inline-flex; align-items: center; gap: 4px; color: #856e9e; font-size: 11px; font-weight: 600; }
.review-links .icon { width: 13px; height: 13px; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid #eef2f5; color: var(--ink); }
.task-row:last-child { border-bottom: 0; padding-bottom: 0; }
.task-row:hover { text-decoration: none; }
.task-row > .icon, .task-row-icon { flex-shrink: 0; width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: #f0f6f5; color: #509a94; }
.task-row-body { flex: 1; min-width: 0; }
.task-row strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; }
.task-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.task-row .badge { margin-top: 3px; font-size: 9px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 6px; background: #edf3f6; color: #6e8290; font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge.approved, .badge.active { background: #e4f5ec; color: #328363; }
.badge.flagged, .badge.inactive { background: #ffebe8; color: #b2665b; }
.badge.submitted, .badge.pending { background: #fbf1dc; color: #b48e42; }
.badge.in-progress { background: #e6f1fa; color: #578eb7; }
.priority { color: var(--muted); font-size: 10px; }
.empty-state { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; min-height: 175px; padding: 26px 18px; text-align: center; }
.empty-state > .icon, .empty-state-icon { width: 47px; height: 47px; margin-bottom: 3px; padding: 12px; border-radius: 13px; background: #edf7f5; color: #6baaa1; }
.empty-state h3 { margin: 0; color: #566f7c; font-size: 13px; font-weight: 600; }
.empty-state p { max-width: 270px; margin: 0; color: #94a1a9; font-size: 11px; line-height: 1.7; }
.empty-state .button { min-height: 35px; margin-top: 6px; padding: 8px 12px; font-size: 11px; }
.empty-state .empty-icon { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 3px; border-radius: 13px; background: #edf7f5; color: #6baaa1; }
.empty-icon .icon { width: 23px; height: 23px; }
.empty-state.compact { min-height: 173px; }
.notice.brand-help { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 13px 16px; border-color: #cbe6dc; background: #e8f6f0; color: #507568; font-size: 11px; }
.notice.brand-help .icon { flex-shrink: 0; width: 19px; height: 19px; }
.empty { padding: 34px 10px; color: var(--muted); font-size: 13px; text-align: center; }

/* Shared task, attendance, reporting and account forms */
label { display: block; margin: 0 0 18px; color: #516875; font-size: 12px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-height: 43px; margin-top: 8px; padding: 11px 12px; border: 1px solid #dce5e9; border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; }
input::placeholder, textarea::placeholder { color: #a0adb5; }
textarea { min-height: 95px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 3px solid #e1f4f0; border-color: #73bdb5; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #71c9bd; outline-offset: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin: 22px 0; }
.filters label { min-width: 170px; margin: 0; }
.filters button, .filters .button { margin-bottom: 0; }
.notice { margin-bottom: 22px; padding: 14px 17px; border: 1px solid #cbe6dc; border-radius: 10px; background: #e8f6f0; font-size: 12px; line-height: 1.7; color: #507568; }
.error { border-color: #f2d2cc; background: #fff1ee; color: #af5b50; }
.record { padding: 18px 0; border-bottom: 1px solid var(--line); }
.record:first-of-type { padding-top: 0; }
.record:last-child { border-bottom: 0; }
.record h3 { margin-top: 0; }
.record form { margin-bottom: 12px; }
details summary { padding: 5px 0; cursor: pointer; color: #355b65; font-size: 13px; font-weight: 600; }
details summary::marker { color: #71aaa6; }
details[open] > summary { margin-bottom: 20px; }
details details, .record details { margin-top: 12px; }
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.task-grid .card { margin: 0; }
.task-grid .card h2 { line-height: 1.5; }
.note { margin: 15px 0; padding: 14px; border: 1px solid #e6efee; border-radius: 9px; background: #f6faf9; font-size: 12px; }
.note p:last-child { margin-bottom: 0; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.attendance-line { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 17px; border-radius: 10px; background: #f0f7f6; color: #65817f; font-size: 12px; }
.attendance-line strong { color: #397c77; font-size: 19px; }
.record-card { margin-bottom: 16px; }
.narrow { max-width: 560px; }
.history-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.history-item:last-of-type { border-bottom: 0; }
pre { padding: 15px; border-radius: 9px; background: var(--bg); font-family: Consolas, monospace; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.pagination { display: flex; gap: 25px; padding-top: 20px; font-size: 12px; }
footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: #9aabb5; font-size: 10px; }

/* Branded sign-in */
.auth-main { min-height: 100vh; background: radial-gradient(ellipse at 85% 15%, #d8f2ee, transparent 50%), radial-gradient(ellipse at 10% 80%, #e3edf6, transparent 50%), #f7fafb; }
.auth-main .content { max-width: 495px; padding-top: 8vh; }
.auth-main .page-heading { justify-content: center; text-align: center; }
.auth-main h1 { font-size: 31px; }
.auth-main .eyebrow { font-size: 9px; letter-spacing: 1.5px; }
.auth-card { padding: 30px; border-color: #e1ebea; box-shadow: 0 15px 60px rgba(23, 75, 79, .055); }
.auth-card button { width: 100%; margin-top: 6px; }
.auth-logo { display: block; width: 230px; max-width: 100%; height: 100px; margin: 0 auto 24px; padding: 4px; object-fit: contain; }
.auth-card > .muted { margin-bottom: 0; text-align: center; line-height: 1.7; }
.auth-main footer { justify-content: center; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand .auth-logo { margin: 0; }
.auth-brand .brand-mark { background: #e6f4ef; }
.auth-brand > strong { color: #1c5361; font-size: 18px; }
.logo-preview { margin: 0 0 24px; padding: 20px; border: 1px dashed #d8e5e2; border-radius: 12px; background: #fbfdfc; }
.logo-preview .auth-logo { margin: 0 auto; }
[hidden] { display: none !important; }

@media (min-width: 1450px) {
  .content { padding: 31px 40px 24px; }
  .topbar { padding: 0 40px; }
  .welcome-banner { min-height: 164px; }
  .stat { padding: 23px 25px 20px; }
  .dashboard-top { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .card { padding: 26px; }
}

@media (max-width: 1180px) {
  .sidebar { width: 220px; padding: 23px 16px 20px; }
  .main { margin-left: 220px; }
  .content { padding: 25px 24px 20px; }
  .topbar { padding: 0 24px; }
  .welcome-banner { gap: 18px; padding: 24px; }
  .welcome-actions { flex-direction: column; }
  .stats { gap: 12px; }
  .stat { padding: 18px 17px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat p { font-size: 11px; }
  .stat strong { font-size: 29px; }
  .dashboard-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .dashboard-bottom { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .task-grid { grid-template-columns: 1fr; }
  .task-row strong { font-size: 13px; }
  .chart-bars { gap: 8px; }
}

@media (max-width: 940px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-head { margin-bottom: 10px; }
  .stat strong { font-size: 31px; }
  .welcome-copy h2, .welcome-copy h1 { font-size: 23px; }
  .welcome-banner { align-items: flex-start; flex-direction: column; gap: 18px; }
  .welcome-actions { flex-direction: row; }
  .dashboard-top { grid-template-columns: 1fr; }
  .chart-bars { gap: 16px; }
  .status-legend { max-width: 310px; }
  .donut-wrap { width: 146px; height: 146px; }
}

@media (max-width: 700px) {
  .sidebar { position: static; display: block; width: auto; padding: 15px 18px 12px; overflow: visible; }
  .brand { justify-content: flex-start; min-height: 48px; font-size: 12px; }
  .brand img { width: 165px; height: 61px; padding: 8px 10px; border-radius: 10px; }
  .brand-mark { width: 42px; height: 42px; font-size: 19px; }
  .portal-label { display: none; }
  .sidebar nav { display: flex; overflow-x: auto; gap: 5px; margin-top: 15px; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: #41656f transparent; }
  .sidebar nav a { flex-shrink: 0; gap: 7px; min-height: 37px; padding: 9px 11px; font-size: 11px; white-space: nowrap; }
  .sidebar nav a .icon { width: 15px; height: 15px; }
  .nav-dot { display: none; }
  .sidebar-bottom { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 0 0; }
  .sidebar-bottom > strong { font-size: 11px; }
  .sidebar-bottom small { margin: 0; font-size: 10px; }
  .sidebar-bottom form { margin-left: auto; }
  .logout { min-height: 25px; padding: 2px 0; font-size: 10px; }
  .logout .icon { width: 13px; height: 13px; }
  .brand-help { display: none; }
  .main { margin-left: 0; }
  .topbar { min-height: 53px; height: auto; padding: 12px 18px; gap: 10px; font-size: 10px; }
  .topbar > span:first-child .muted { display: none; }
  .topbar-date { font-size: 10px; gap: 5px; }
  .topbar-date .icon { width: 13px; height: 13px; }
  .topbar-right { gap: 10px; }
  .topbar-avatar { width: 29px; height: 29px; font-size: 10px; }
  .content { padding: 22px 17px 18px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 19px; }
  h1 { font-size: 25px; }
  .page-heading p.muted { font-size: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.7px; }
  .welcome-banner { min-height: auto; margin-bottom: 16px; padding: 21px; border-radius: 13px; }
  .welcome-copy h2, .welcome-copy h1 { font-size: 22px; }
  .welcome-copy p { font-size: 11px; }
  .welcome-actions { gap: 8px; }
  .welcome-actions .button { min-height: 37px; padding: 9px 12px; font-size: 11px; }
  .welcome-actions .icon { width: 16px; height: 16px; }
  .stats { gap: 10px; margin-bottom: 17px; }
  .stat { padding: 15px; border-radius: 12px; }
  .stat-head { gap: 6px; margin-bottom: 10px; }
  .stat p { font-size: 10px; }
  .stat-icon { width: 29px; height: 29px; border-radius: 8px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat strong { margin-bottom: 8px; font-size: 28px; }
  .stat small { font-size: 9px; line-height: 1.5; }
  .dashboard-top, .dashboard-bottom { gap: 16px; margin-bottom: 16px; }
  .card { margin-bottom: 16px; padding: 19px; border-radius: 13px; }
  .section-title { gap: 8px; margin-bottom: 14px; }
  .section-title h2 { font-size: 15px; }
  .section-title p { font-size: 10px; }
  .section-title > a { font-size: 10px; }
  .weekly-chart { margin-top: 12px; }
  .chart-bars { gap: 9px; min-height: 150px; }
  .chart-legend { gap: 13px; font-size: 9px; }
  .chart-label { font-size: 9px; }
  .chart-note { font-size: 9px; line-height: 1.6; }
  .team-table th, .team-table td { padding-top: 11px; padding-bottom: 11px; }
  .team-table th + th, .team-table td + td { padding-left: 10px; }
  .team-table { min-width: 330px; }
  .team-member { gap: 8px; }
  .team-member strong { font-size: 11px; }
  .team-member small { font-size: 9px; }
  .avatar { width: 29px; height: 29px; border-radius: 9px; font-size: 11px; }
  .submission-pill { padding: 4px 6px; font-size: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .filters { gap: 10px; }
  .filters label { flex: 1; min-width: 125px; }
  .filters button, .filters .button { min-height: 40px; font-size: 12px; }
  .attendance-line { gap: 10px; padding: 14px; }
  .attendance-line span { display: block; width: 100%; }
  footer { flex-direction: column; gap: 6px; margin-top: 23px; font-size: 9px; }
  .auth-main .content { padding-top: 5vh; }
  .auth-main .page-heading { align-items: center; }
  .auth-card { padding: 24px; }
  .auth-main h1 { font-size: 28px; }
  .history-item summary { font-size: 12px; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  button, .button { transition: none; }
}

/* On phones, navigation opens from the topbar without pushing down the page. */
@media (max-width: 700px) {
  .sidebar { position: fixed; inset: 59px auto 0 0; z-index: 25; display: flex; flex-direction: column; width: 239px; padding: 20px 17px; overflow-y: auto; transform: translateX(-100%); transition: transform .18s ease; }
  .navigation-open .sidebar { transform: translateX(0); }
  .navigation-open::after { position: fixed; z-index: 24; inset: 59px 0 0; background: rgba(16, 39, 49, .26); content: ""; pointer-events: none; }
  .sidebar .brand { justify-content: center; }
  .sidebar .brand img { width: 100%; height: 78px; padding: 11px; }
  .sidebar .portal-label { display: block; margin: 25px 12px 16px; font-size: 9px; }
  .sidebar nav { display: grid; gap: 5px; margin: 0; overflow: visible; }
  .sidebar nav a { min-height: 43px; padding: 11px 13px; font-size: 12px; }
  .sidebar nav a .icon { width: 17px; height: 17px; }
  .sidebar-bottom { display: block; margin-top: auto; padding: 20px 9px 0; }
  .sidebar-user strong { font-size: 12px; }
  .sidebar-user small { font-size: 10px; }
  .sidebar-bottom form { margin-left: 0; }
  .logout { min-height: 30px; font-size: 11px; }
  .topbar { position: sticky; top: 0; z-index: 30; min-height: 59px; }
  .topbar-title { gap: 8px; font-size: 10px; }
  .topbar-title .muted { display: none; }
  .topbar-right { font-size: 9px; }
  .mobile-menu-toggle { display: inline-flex; width: 32px; min-height: 32px; padding: 6px; border-color: #e2eae9; border-radius: 8px; }
  .mobile-menu-toggle .icon { width: 18px; height: 18px; }
  .page-heading { flex-direction: row; align-items: flex-end; }
  .heading-period { padding: 7px 8px; gap: 4px; font-size: 9px; }
  .heading-period .icon { width: 12px; height: 12px; }
  .welcome-banner { flex-direction: row; align-items: center; gap: 15px; }
  .welcome-kicker { gap: 4px; font-size: 7px; letter-spacing: 1px; }
  .welcome-kicker .icon { width: 12px; height: 12px; }
  .welcome-date { display: none; }
  .welcome-copy .welcome-actions { margin-top: 16px; }
  .stat-head > span:first-child { font-size: 10px; }
  .bar-pair > svg { width: 20px; }
  .weekly-chart { gap: 9px; }
  .chart-bars { gap: 6px; padding: 0; }
  .team-person { gap: 8px; }
  .team-person strong { font-size: 11px; }
  .team-person small { font-size: 9px; }
  .task-summary-top { gap: 8px; }
  .task-summary-top .badge { font-size: 8px; padding: 4px 6px; }
  .review-strip { flex-wrap: wrap; padding: 15px; gap: 10px; }
  .review-strip strong { font-size: 11px; }
  .review-links { flex-basis: 100%; margin-left: 32px; }
  .review-links a { font-size: 10px; }
}
