:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-raised: #fbfdfc;
  --surface-muted: #eef4f2;
  --ink: #172126;
  --muted: #607178;
  --line: #d9e1df;
  --line-strong: #b8c6c1;
  --nav: #102226;
  --nav-soft: #183236;
  --teal: #0f8b8d;
  --teal-dark: #0b6768;
  --teal-soft: #e7f5f4;
  --coral: #e85d4f;
  --coral-soft: #fff0ed;
  --amber: #c78916;
  --amber-soft: #fff6df;
  --green: #2f7d4e;
  --green-soft: #eaf6ef;
  --blue: #2d6cdf;
  --blue-soft: #edf4ff;
  --shadow: 0 18px 42px rgba(23, 33, 38, 0.11);
  --shadow-soft: 0 8px 22px rgba(23, 33, 38, 0.07);
  --radius: 8px;
  --sidebar-width: 264px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Hiragino Sans",
    "Yu Gothic UI",
    "Yu Gothic",
    Meiryo,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, #eef5f3 0, #f7f8f6 380px, var(--bg) 100%);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

.app-root {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 139, 141, 0.12), transparent 43%),
    linear-gradient(315deg, rgba(245, 178, 63, 0.13), transparent 38%),
    var(--bg);
}

.login-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-intro {
  padding: 32px;
  background:
    linear-gradient(160deg, #102226 0%, #143034 62%, #203c35 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: space-between;
  min-height: 520px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #12a0a3, var(--teal-dark));
  color: #ffffff;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.14), 0 8px 20px rgba(15, 139, 141, 0.22);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.login-intro h1 {
  max-width: 460px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.login-intro p {
  margin: 10px 0 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.intro-points {
  display: grid;
  gap: 10px;
}

.intro-point {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.intro-point strong {
  display: block;
  font-size: 0.94rem;
}

.intro-point span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.55;
}

.login-form-wrap {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.invite-panel .login-intro {
  background: linear-gradient(155deg, #102226 0%, #0b6768 70%, #0f8b8d 100%);
}

.invite-eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.invite-card {
  width: min(560px, 100%);
  display: grid;
  gap: 22px;
}

.invite-management {
  border-color: rgba(15, 139, 141, 0.28);
  background: linear-gradient(145deg, #ffffff 0%, #f1fbfa 100%);
}

.invite-form {
  align-items: end;
}

.invite-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 139, 141, 0.32);
  border-radius: var(--radius);
  background: var(--teal-soft);
}

.invite-url-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.invite-history {
  margin-top: 22px;
}

.invite-history h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.employee-welcome {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid rgba(15, 139, 141, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #ffffff 0%, var(--teal-soft) 100%);
  box-shadow: var(--shadow-soft);
}

.employee-welcome h2,
.employee-welcome p {
  margin: 0;
}

.employee-welcome p:last-child {
  margin-top: 6px;
  color: var(--muted);
}

.tracking-notice {
  align-items: center;
}

.tracking-notice p {
  flex: 1;
}

.tracking-notice .status-pill {
  margin-left: 8px;
  vertical-align: middle;
}

.punch-location-summary {
  padding: 14px;
  border: 1px solid rgba(79, 111, 220, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
}

.punch-location-title,
.punch-location-title > span,
.punch-location-item-head,
.punch-location-foot,
.punch-location-coordinates {
  display: flex;
  align-items: center;
}

.punch-location-title {
  gap: 10px;
}

.punch-location-title > span {
  width: 36px;
  height: 36px;
  justify-content: center;
  border-radius: 50%;
  background: #e9ecff;
  color: #4f6fdc;
}

.punch-location-title strong,
.punch-location-title small {
  display: block;
}

.punch-location-title small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
}

.punch-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.punch-location-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #4f6fdc;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.punch-location-item.good { border-left-color: #0f9f91; }
.punch-location-item.fair { border-left-color: #d89a16; }
.punch-location-item.low,
.punch-location-item.missing { border-left-color: #d05263; }

.punch-location-item-head,
.punch-location-foot,
.punch-location-coordinates {
  justify-content: space-between;
  gap: 8px;
}

.punch-location-item-head span,
.punch-location-item-head strong {
  font-size: 0.82rem;
}

.punch-location-item > p {
  margin: 8px 0;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.45;
}

.punch-location-coordinates {
  align-items: flex-start;
}

.punch-location-coordinates code {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.punch-location-coordinates span {
  flex: none;
  font-size: 0.68rem;
  font-weight: 800;
}

.punch-location-item.good .punch-location-coordinates span { color: #087a70; }
.punch-location-item.fair .punch-location-coordinates span { color: #9a6900; }
.punch-location-item.low .punch-location-coordinates span { color: #b53f51; }

.punch-location-foot {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.68rem;
}

.punch-location-foot a {
  flex: none;
  color: #2f68c5;
  font-weight: 800;
  text-decoration: none;
}

.punch-location-missing {
  color: #a44654 !important;
}

.punch-location-guidance {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.btn.is-capturing {
  cursor: progress;
  opacity: 0.82;
}

.btn.is-capturing svg {
  animation: gps-capture-pulse 1.1s ease-in-out infinite;
}

@keyframes gps-capture-pulse {
  50% { transform: scale(1.18); opacity: 0.55; }
}

.location-monitor {
  border-color: rgba(45, 108, 223, 0.24);
  background: linear-gradient(145deg, #ffffff 0%, #f5f8ff 100%);
}

.location-monitor-list {
  margin-top: 8px;
}

.location-monitor-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.location-policy-note {
  margin-top: 14px;
}

.tracking-top-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tracking-top-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.tracking-top-status.live > span {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 125, 78, 0.12);
}

.tracking-employee-card {
  padding: 18px 20px;
  border: 1px solid rgba(15, 139, 141, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #eefaf8 100%);
  box-shadow: var(--shadow-soft);
}

.tracking-employee-card.attention {
  border-color: rgba(199, 137, 22, 0.38);
  background: linear-gradient(135deg, #ffffff 0%, #fff8e8 100%);
}

.tracking-employee-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.tracking-employee-head h3,
.tracking-employee-head p {
  margin: 0;
}

.tracking-employee-head h3 {
  font-size: 1.08rem;
}

.tracking-employee-head p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.tracking-pulse {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.tracking-pulse > span {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 50%;
  animation: tracking-pulse 2.2s ease-out infinite;
}

@keyframes tracking-pulse {
  0% { transform: scale(0.84); opacity: 0.8; }
  75%, 100% { transform: scale(1.18); opacity: 0; }
}

.tracking-employee-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.tracking-employee-stats > div {
  padding: 11px 12px;
  border: 1px solid rgba(15, 139, 141, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

.tracking-employee-stats span,
.tracking-employee-stats strong {
  display: block;
}

.tracking-employee-stats span {
  color: var(--muted);
  font-size: 0.72rem;
}

.tracking-employee-stats strong {
  margin-top: 3px;
  font-size: 0.95rem;
}

.tracking-employee-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 13px;
}

.tracking-employee-foot p {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.location-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.location-overview-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.84);
}

.location-overview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--line-strong);
}

.location-overview-card.healthy::before { background: var(--green); }
.location-overview-card.outside::before,
.location-overview-card.stale::before { background: var(--amber); }
.location-overview-card.missing::before { background: var(--muted); }

.location-overview-card span,
.location-overview-card strong,
.location-overview-card small {
  display: block;
}

.location-overview-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.location-overview-card strong {
  margin: 3px 0;
  font-size: 1.65rem;
}

.location-overview-card small {
  color: var(--muted);
  font-size: 0.7rem;
}

.tracking-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tracking-filter button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tracking-filter button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.7rem;
}

.tracking-filter button.active {
  border-color: var(--nav);
  background: var(--nav);
  color: #ffffff;
}

.tracking-filter button.active span {
  background: rgba(255, 255, 255, 0.18);
}

.location-person {
  display: flex;
  gap: 11px;
  align-items: center;
}

.location-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 900;
}

.location-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tracking-detail {
  border-color: rgba(15, 139, 141, 0.25);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.tracking-detail-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.tracking-detail-metrics > div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.tracking-detail-metrics span,
.tracking-detail-metrics strong,
.tracking-detail-metrics small {
  display: block;
}

.tracking-detail-metrics span,
.tracking-detail-metrics small {
  color: var(--muted);
  font-size: 0.72rem;
}

.tracking-detail-metrics strong {
  margin: 3px 0;
  font-size: 1.25rem;
}

.tracking-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.route-card,
.tracking-alert-card,
.tracking-timeline {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.route-card h3,
.route-card p,
.tracking-alert-card h3,
.tracking-alert-card p,
.tracking-timeline h3 {
  margin: 0;
}

.route-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.route-card-head p,
.route-latest,
.tracking-alert-card > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.route-legend {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.7rem;
}

.route-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.route-legend .outside::before { background: var(--amber); }
.route-legend .low::before { background: var(--muted); }

.location-route-canvas,
.location-detail-map {
  width: 100%;
  height: 300px;
  display: block;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.location-detail-map {
  min-height: 360px;
  background: #e9eef1;
}

.tracking-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gps-gap-list {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(199, 137, 22, 0.24);
  border-radius: 10px;
  background: #fffaf0;
}

.gps-gap-list h3 {
  margin: 0 0 8px;
}

.gps-gap-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(199, 137, 22, 0.14);
  color: var(--muted);
  font-size: 0.76rem;
}

.gps-gap-list > div:last-child { border-bottom: 0; }
.gps-gap-list strong { color: var(--amber); }

.tracking-alert-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tracking-alert-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 6px;
  background: var(--surface-muted);
  font-size: 0.8rem;
}

.tracking-alert-row.ok strong { color: var(--green); }
.tracking-alert-row.warning strong { color: var(--amber); }
.tracking-alert-row.danger strong { color: var(--coral); }

.tracking-timeline {
  margin-top: 14px;
}

.tracking-timeline-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.tracking-timeline-row:last-child {
  border-bottom: 0;
}

.tracking-timeline-row time,
.tracking-timeline-row span {
  color: var(--muted);
  font-size: 0.75rem;
}

.tracking-timeline-row time small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}

.tracking-timeline-row strong,
.tracking-timeline-row span {
  display: block;
}

.all-employee-map-panel {
  overflow: hidden;
  border-color: rgba(66, 133, 244, 0.24);
  background: linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow);
}

.all-employee-map-head {
  margin-bottom: 16px;
}

.gps-history-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1fr) minmax(190px, auto);
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(79, 111, 220, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.gps-history-toolbar label,
.gps-evidence-count {
  display: grid;
  gap: 5px;
}

.gps-history-toolbar label > span,
.gps-evidence-count span,
.gps-evidence-count small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.gps-history-toolbar input,
.gps-history-toolbar select {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.gps-evidence-count {
  justify-items: end;
  text-align: right;
}

.gps-evidence-count strong { color: var(--indigo); }

.map-head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.map-head-actions > span,
.map-head-actions strong,
.map-head-actions small {
  display: block;
}

.map-head-actions > span {
  text-align: right;
}

.map-head-actions strong {
  color: var(--green);
  font-size: 0.78rem;
}

.map-head-actions small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.live-map-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #f6f9fc, #edf4f8);
  color: var(--muted);
}

.live-map-loading > span {
  width: 34px;
  height: 34px;
  border: 3px solid #d7e5ed;
  border-top-color: #4285f4;
  border-radius: 50%;
  animation: map-loading-spin 0.8s linear infinite;
}

@keyframes map-loading-spin {
  to { transform: rotate(360deg); }
}

.live-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.72fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.live-map-stage-wrap {
  position: relative;
  min-width: 0;
}

.live-map-stage {
  width: 100%;
  height: 100%;
  min-height: 560px;
  background: #e9eef1;
}

.live-map-stage .maplibregl-canvas {
  outline: none;
}

.live-map-stage .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 9px;
  box-shadow: 0 5px 16px rgba(23, 33, 38, 0.12);
}

.live-map-stage .maplibregl-popup-content {
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(23, 33, 38, 0.18);
}

/* Security operations center */
.security-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(130deg, #191453 0%, #4035b5 52%, #087f87 100%);
  box-shadow: 0 20px 50px rgba(45, 39, 127, .2);
}
.security-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -60px;
  top: -105px;
  border: 34px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.security-hero h2 { margin: 5px 0 8px; font-size: clamp(26px, 3vw, 42px); line-height: 1.18; }
.security-hero p { margin: 0; color: rgba(255,255,255,.76); }
.security-hero .section-eyebrow { color: #6ff0d7; }
.security-grade {
  position: relative;
  z-index: 1;
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}
.security-grade .icon { width: 30px; height: 30px; color: #6ff0d7; }
.security-grade span { display: grid; gap: 2px; }
.security-grade strong { font-size: 17px; }
.security-grade small { color: rgba(255,255,255,.68); }
.security-grade.is-alert .icon { color: #ffcc6e; }
.security-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.security-metrics article {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 20px;
  border: 1px solid rgba(71, 62, 146, .1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(47, 42, 104, .07);
}
.security-metrics article > span, .security-metrics article > small { color: #726e8e; font-size: 13px; }
.security-metrics article > strong { color: #20195f; font-size: 32px; line-height: 1; }
.security-metrics article > strong small { margin-left: 4px; font-size: 13px; }
.security-metrics article > button { justify-self: start; padding: 0; border: 0; color: #4e46d9; background: none; font-weight: 800; cursor: pointer; }
.security-metrics .metric-safe { background: linear-gradient(145deg, #f5fffc, #eefffb); }
.security-metrics .metric-alert { background: linear-gradient(145deg, #fff8f7, #fff0ef); }
.security-control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.security-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  border: 1px solid #e9e7f4;
  border-radius: 17px;
  background: #fbfaff;
}
.security-control .icon { flex: 0 0 auto; width: 20px; height: 20px; color: #0e9c8f; }
.security-control span { display: grid; gap: 3px; }
.security-control strong { color: #24204b; font-size: 14px; }
.security-control small { color: #77728d; line-height: 1.45; }
.security-session-list, .security-event-list { display: grid; gap: 2px; }
.security-session, .security-event {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid #eceaf5;
}
.security-session:last-child, .security-event:last-child { border-bottom: 0; }
.security-session > div, .security-event > div { min-width: 0; flex: 1; display: grid; gap: 3px; }
.security-session strong, .security-event strong { overflow: hidden; color: #282351; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.security-session small, .security-event small { color: #79758d; font-size: 12px; }
.security-device-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #4e46d9; background: #efedff; }
.security-event > i { width: 9px; height: 9px; border-radius: 50%; background: #14a295; box-shadow: 0 0 0 5px rgba(20,162,149,.1); }
.security-event.severity-warning > i, .security-event.severity-danger > i { background: #ee795d; box-shadow: 0 0 0 5px rgba(238,121,93,.1); }
.security-event > span { color: #76718a; font-size: 12px; font-weight: 800; }
.security-data-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.security-data-actions > div:last-child { display: flex; gap: 10px; flex-wrap: wrap; }
.secure-action-modal { max-width: 520px; }

@media (max-width: 1100px) {
  .security-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .security-hero { align-items: stretch; flex-direction: column; padding: 24px 20px; border-radius: 24px; }
  .security-grade { min-width: 0; }
  .security-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .security-metrics article { min-height: 126px; padding: 15px; border-radius: 18px; }
  .security-metrics article > strong { font-size: 27px; }
  .security-control-grid { grid-template-columns: 1fr; }
  .security-detail-grid { grid-template-columns: 1fr; }
  .security-data-actions { align-items: stretch; flex-direction: column; }
  .security-data-actions > div:last-child { display: grid; }
  .security-session strong { max-width: 48vw; }
}

.live-map-legend {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid rgba(23, 33, 38, 0.13);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 16px rgba(23, 33, 38, 0.13);
  color: var(--muted);
  font-size: 0.68rem;
}

.live-map-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.live-map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.live-map-legend i.current { box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.16); }
.live-map-legend i.history { width: 18px; border-radius: 999px; background: #52727a; }
.live-map-legend i.punch { background: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 111, 220, 0.18); }
.live-map-legend i.outside { background: var(--amber); }

.live-map-sidebar {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #fbfcfc;
}

.map-list-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.map-list-title span {
  color: var(--muted);
  font-size: 0.72rem;
}

.live-map-employees {
  max-height: 510px;
  overflow-y: auto;
}

.live-map-employee {
  display: grid;
  gap: 7px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.live-map-employee:last-child {
  border-bottom: 0;
}

.live-map-employee-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.live-map-employee-main:disabled {
  cursor: default;
  opacity: 0.62;
}

.live-map-employee-main strong,
.live-map-employee-main small {
  display: block;
}

.live-map-employee-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.live-map-employee-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding-left: 48px;
}

.live-map-employee-meta a {
  color: #2f68c5;
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: none;
}

.map-text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f68c5;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
}

.live-map-employee-meta a:hover {
  text-decoration: underline;
}

.map-policy-foot {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.map-policy-foot a {
  color: var(--teal-dark);
  font-weight: 750;
}

.five-minute-map-pin,
.employee-current-map-pin {
  border: 2px solid #ffffff;
  background: var(--employee-color, #0f8b8d);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(23, 33, 38, 0.28);
  cursor: pointer;
  font-family: inherit;
}

.five-minute-map-pin {
  min-width: 42px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
}

.five-minute-map-pin.punch {
  min-width: 48px;
  background: var(--indigo, #4f6fdc);
  outline: 3px solid rgba(79, 111, 220, 0.2);
}

.five-minute-map-pin.outside,
.employee-current-map-pin.outside {
  outline: 3px solid rgba(199, 137, 22, 0.55);
}

.employee-current-map-pin {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.employee-current-map-pin > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.live-map-info {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 4px;
  color: #172126;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.live-map-info span {
  color: #607178;
  font-size: 0.76rem;
}

.live-map-info a {
  margin-top: 4px;
  color: #2f68c5;
  font-size: 0.76rem;
  font-weight: 750;
}

.live-map-runtime-error {
  height: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--coral);
  background: #fff4f2;
  text-align: center;
  line-height: 1.7;
}

.open-map-setting-field {
  padding: 12px;
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 8px;
  background: #f4fbfa;
}

.map-provider-status {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 8px;
  color: var(--teal-dark);
}

.map-provider-status svg {
  width: 20px;
  height: 20px;
}

.map-provider-status strong,
.map-provider-status small {
  display: block;
}

.map-provider-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 21, 24, 0.72);
  backdrop-filter: blur(6px);
}

.consent-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.consent-modal-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.consent-modal-head h2,
.consent-modal-head p {
  margin: 0;
}

.consent-modal-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.consent-modal-head p:last-child {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.65;
}

.consent-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.25rem;
}

.consent-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.consent-summary-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
}

.consent-summary-grid span,
.consent-summary-grid strong {
  display: block;
}

.consent-summary-grid span {
  color: var(--muted);
  font-size: 0.7rem;
}

.consent-summary-grid strong {
  margin-top: 3px;
  font-size: 0.88rem;
}

.consent-details {
  display: grid;
  gap: 9px;
}

.consent-details > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 11px 12px;
  border-radius: 7px;
  background: var(--surface-muted);
}

.consent-details p,
.consent-details strong,
.consent-details span {
  margin: 0;
  display: block;
}

.consent-details span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.consent-form {
  margin-top: 18px;
}

.consent-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid rgba(15, 139, 141, 0.28);
  border-radius: 7px;
  background: var(--teal-soft);
  font-weight: 700;
  line-height: 1.5;
}

.consent-checkbox input {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  accent-color: var(--teal);
}

.consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
}

.section-eyebrow {
  margin: 0 0 6px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.25;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-users {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.auth-switch-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-switch-button.active {
  background: var(--surface);
  color: var(--teal-dark);
  box-shadow: var(--shadow-soft);
}

.quick-user {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  min-height: 92px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}

.quick-user::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.quick-user:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 22px rgba(15, 139, 141, 0.12);
  transform: translateY(-1px);
}

.quick-user strong,
.user-line strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-user span,
.user-line span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.login-form {
  display: grid;
  gap: 12px;
}

.remember-session {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, #f8f7ff, #effcf8);
  cursor: pointer;
}

.remember-session input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.remember-session strong,
.remember-session small {
  display: block;
}

.remember-session a,
.login-legal-links a,
.policy-link-grid a {
  color: #5650df;
  font-weight: 800;
}

.login-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-top: 4px;
  font-size: 0.76rem;
}

.legal-consent-check {
  background: linear-gradient(145deg, #f4f2ff, #ebfbf7);
}

.legal-acceptance-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.legal-acceptance-card h2,
.legal-acceptance-card p {
  margin-top: 0;
}

.legal-acceptance-card > p {
  color: var(--muted);
  line-height: 1.7;
}

.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.legal-summary-grid > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 14px;
  border-radius: 16px;
  background: #f4f2ff;
  color: #5650df;
}

.legal-summary-grid strong,
.legal-summary-grid small {
  display: block;
}

.legal-summary-grid small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.settings-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-company-shortcut {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(34, 166, 164, 0.2);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(224, 251, 247, 0.92), rgba(241, 239, 255, 0.92));
  box-shadow: 0 12px 28px rgba(43, 48, 96, 0.07);
}

.admin-company-shortcut-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #12a69d, #6258ff);
  color: #fff;
}

.admin-company-shortcut-icon svg {
  width: 22px;
  height: 22px;
}

.admin-company-shortcut strong,
.admin-company-shortcut span {
  display: block;
}

.personal-data-shortcut {
  border-color: rgba(94, 84, 245, 0.2);
  background: linear-gradient(120deg, rgba(244, 242, 255, 0.96), rgba(232, 251, 249, 0.96));
}

.people-page {
  --vault-navy: #1c175d;
  --vault-teal: #0b9f97;
  --vault-indigo: #5d54f5;
}

.people-privacy-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(94, 84, 245, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 198, 49, 0.18) 0 84px, transparent 85px),
    radial-gradient(circle at 0 120%, rgba(20, 201, 190, 0.18) 0 130px, transparent 131px),
    linear-gradient(135deg, #fff, #f7f5ff 55%, #ecfbf9);
  box-shadow: 0 18px 42px rgba(42, 48, 94, 0.08);
}

.people-privacy-hero h2 {
  max-width: 720px;
  margin: 4px 0 10px;
  color: var(--vault-navy);
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.25;
}

.people-privacy-hero p:not(.section-eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.people-security-badges {
  display: grid;
  gap: 9px;
  min-width: 210px;
}

.people-security-badges span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(94, 84, 245, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  color: #36317e;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(44, 42, 104, 0.06);
}

.people-security-badges svg {
  width: 18px;
  height: 18px;
  color: var(--vault-teal);
}

.people-selector-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: 18px;
}

.people-selector-panel .panel-header {
  margin: 0;
}

.people-employee-select select {
  min-height: 50px;
  border-color: rgba(94, 84, 245, 0.18);
  background: #f8f7ff;
  font-weight: 800;
}

.personal-profile-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
}

.personal-profile-form {
  display: grid;
  gap: 16px;
}

.personal-profile-card {
  border-color: rgba(94, 84, 245, 0.12);
  box-shadow: 0 12px 30px rgba(37, 42, 88, 0.06);
}

.personal-profile-card .panel-header {
  align-items: flex-start;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.personal-profile-card .form-grid,
.my-number-current {
  margin-top: 18px;
}

.personal-updated-at {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.emergency-card {
  background: linear-gradient(145deg, #fff, #fffaf0);
}

.my-number-card {
  border-color: rgba(94, 84, 245, 0.2);
  background: linear-gradient(145deg, #fff, #f8f7ff);
}

.my-number-current {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(94, 84, 245, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.86);
}

.my-number-lock {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--vault-teal), var(--vault-indigo));
  color: #fff;
  box-shadow: 0 10px 24px rgba(75, 68, 205, 0.2);
}

.my-number-lock svg {
  width: 24px;
  height: 24px;
}

.my-number-current strong,
.my-number-current span {
  display: block;
}

.my-number-current strong {
  color: var(--vault-navy);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.my-number-current span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.my-number-register-grid {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.my-number-verification {
  border-color: rgba(11, 159, 151, 0.2);
  background: linear-gradient(120deg, #f1fffc, #f7f5ff);
}

.my-number-policy-note {
  margin-top: 14px;
}

.personal-profile-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(94, 84, 245, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 44px rgba(34, 36, 82, 0.16);
  backdrop-filter: blur(16px);
}

.personal-profile-savebar > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--vault-teal);
}

.personal-profile-savebar strong,
.personal-profile-savebar small {
  display: block;
}

.personal-profile-savebar small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.my-number-modal-backdrop {
  z-index: 170;
}

.my-number-security-modal {
  width: min(520px, 100%);
  padding: 25px;
  border: 1px solid rgba(94, 84, 245, 0.18);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(19, 17, 68, 0.34);
}

.my-number-security-modal > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.revealed-my-number {
  margin: 22px 0 16px;
  padding: 22px 14px;
  border: 1px solid rgba(94, 84, 245, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #f6f4ff, #effcf9);
  color: #211b72;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

.admin-company-shortcut span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.company-profile-page {
  --profile-teal: #0da79f;
  --profile-indigo: #5d54f5;
}

.company-profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(94, 84, 245, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 198, 49, 0.2) 0 76px, transparent 77px),
    radial-gradient(circle at 4% 108%, rgba(33, 205, 193, 0.22) 0 110px, transparent 111px),
    linear-gradient(135deg, #fff 0%, #f9f8ff 52%, #effcfb 100%);
  box-shadow: 0 18px 42px rgba(42, 48, 94, 0.09);
}

.company-profile-hero h2 {
  margin: 3px 0 8px;
  color: #171458;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.25;
}

.company-profile-hero p:not(.section-eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.company-profile-security {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-top: 18px;
  padding: 10px 13px;
  border: 1px solid rgba(13, 167, 159, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--profile-teal);
}

.company-profile-security strong,
.company-profile-security small {
  display: block;
}

.company-profile-security small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.company-profile-score {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 22px 18px;
  border: 1px solid rgba(94, 84, 245, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 28px rgba(45, 40, 110, 0.08);
}

.company-profile-score strong {
  color: #24206d;
  font-size: 2.15rem;
  line-height: 1;
}

.company-profile-score strong small {
  font-size: 0.85rem;
}

.company-profile-score span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.company-profile-score > div {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceaf8;
}

.company-profile-score i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--profile-teal), var(--profile-indigo));
}

.company-profile-form {
  display: grid;
  gap: 16px;
}

.company-profile-section {
  border-color: rgba(94, 84, 245, 0.12);
  box-shadow: 0 12px 30px rgba(37, 42, 88, 0.06);
}

.company-profile-section .panel-header {
  align-items: flex-start;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.company-profile-section .form-grid {
  margin-top: 18px;
}

.company-profile-section .field input:focus,
.company-profile-section .field select:focus {
  border-color: var(--profile-indigo);
  box-shadow: 0 0 0 4px rgba(94, 84, 245, 0.1);
}

.company-profile-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border: 1px solid rgba(94, 84, 245, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(34, 36, 82, 0.16);
  backdrop-filter: blur(16px);
}

.company-profile-savebar > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--profile-teal);
}

.company-profile-savebar strong,
.company-profile-savebar small {
  display: block;
}

.company-profile-savebar small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.settings-company-notice {
  margin-bottom: 18px;
}

.inline-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: #5148e8;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.policy-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.policy-link-grid a {
  padding: 12px 8px;
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: 12px;
  background: #f6f4ff;
  text-align: center;
  text-decoration: none;
}

.danger-zone {
  border-color: rgba(220, 53, 69, 0.25);
  background: linear-gradient(145deg, #fff, #fff3f4);
}

@media (max-width: 640px) {
  .legal-acceptance-backdrop { padding: 10px; }
  .legal-acceptance-card { padding: 20px; border-radius: 20px; }
  .legal-summary-grid, .policy-link-grid { grid-template-columns: 1fr; }
  .company-profile-hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 22px; }
  .company-profile-score { grid-template-columns: auto minmax(0, 1fr); justify-items: start; padding: 16px; }
  .company-profile-score > div { grid-column: 1 / -1; }
  .company-profile-security { width: 100%; }
  .company-profile-savebar { bottom: 92px; align-items: stretch; flex-direction: column; }
  .company-profile-savebar .btn { width: 100%; }
  .admin-company-shortcut { grid-template-columns: 42px minmax(0, 1fr); }
  .admin-company-shortcut .btn { grid-column: 1 / -1; width: 100%; }
  .people-privacy-hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 22px; }
  .people-security-badges { min-width: 0; grid-template-columns: 1fr; }
  .people-selector-panel { grid-template-columns: 1fr; }
  .my-number-current { grid-template-columns: 46px minmax(0, 1fr); align-items: start; }
  .my-number-current .row-actions { grid-column: 1 / -1; width: 100%; }
  .my-number-current .row-actions .btn { flex: 1; }
  .personal-profile-savebar { bottom: 92px; align-items: stretch; flex-direction: column; }
  .personal-profile-savebar .btn { width: 100%; }
  .my-number-security-modal { padding: 20px; border-radius: 20px; }
}

.remember-session strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.remember-session small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field-help {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 0;
  background:
    linear-gradient(180deg, var(--nav) 0%, #13292d 56%, #0f1c20 100%);
  color: #ffffff;
  backdrop-filter: blur(16px);
  box-shadow: 8px 0 32px rgba(16, 34, 38, 0.12);
}

.sidebar .brand {
  padding: 4px 4px 8px;
  color: #ffffff;
}

.user-line {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--nav);
  font-weight: 800;
}

.sidebar .user-line span {
  color: rgba(255, 255, 255, 0.68);
}

.sidebar .brand-mark {
  box-shadow: none;
}

.sidebar .badge {
  background: rgba(232, 93, 79, 0.18);
  color: #ffbbb4;
}

.sidebar .btn.ghost {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
}

.sidebar .btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-bottom: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.nav-group { display: grid; gap: 5px; }
.nav-group + .nav-group { margin-top: 7px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.nav-group-title { margin: 0; padding: 0 12px; color: rgba(255, 255, 255, 0.48); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; }
.nav-group-list { display: grid; gap: 6px; }

.nav-button {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  padding: 11px 12px;
  text-align: left;
  min-height: 44px;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-button.active {
  background: #ffffff;
  color: var(--nav);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.nav-button svg,
.icon {
  width: 19px;
  height: 19px;
  flex: none;
  stroke-width: 2.2;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  background: rgba(244, 247, 246, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.2;
}

.topbar-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #ead7a4;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8b6315;
  font-weight: 800;
}

.demo-badge.server-badge {
  border-color: #b9dfc6;
  background: var(--green-soft);
  color: var(--green);
}

.storage-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.storage-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.topbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.content {
  width: min(1360px, 100%);
  margin: 0 auto;
  padding: 26px;
}

.content-stack {
  display: grid;
  gap: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.sidebar-main {
  grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.18fr);
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.metric {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--teal);
}

.grid.four .metric:nth-child(2)::before {
  background: var(--blue);
}

.grid.four .metric:nth-child(3)::before {
  background: var(--amber);
}

.grid.four .metric:nth-child(4)::before {
  background: var(--coral);
}

.metric .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.metric .value {
  margin-top: 10px;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  font-weight: 850;
  line-height: 1;
}

.metric .sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.hero-status {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 20px;
  align-items: stretch;
}

.clock-face {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 302px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #102226 0%, #153238 58%, #0f8b8d 140%);
  color: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.clock-face::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--coral));
}

.clock-face > * {
  position: relative;
  z-index: 1;
}

.clock-time {
  font-size: clamp(3.15rem, 7vw, 5.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
}

.clock-date {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid rgba(23, 33, 38, 0.06);
}

.clock-face .status-pill {
  border-color: rgba(255, 255, 255, 0.3);
}

.status-working,
.status-approved {
  color: var(--green);
  background: var(--green-soft);
}

.status-break {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-closed {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-pending,
.status-warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-off,
.status-rejected {
  color: var(--coral);
  background: var(--coral-soft);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 13px;
  background: var(--surface-muted);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled:hover {
  transform: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn.primary {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 139, 141, 0.22);
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.dark {
  background: var(--nav);
  color: #ffffff;
}

.btn.danger {
  background: var(--coral);
  color: #ffffff;
}

.btn.warning {
  background: var(--amber);
  color: #ffffff;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.btn.full {
  width: 100%;
}

.btn.small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(23, 33, 38, 0.08);
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline time {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.timeline strong {
  display: block;
}

.timeline span {
  color: var(--muted);
  font-size: 0.82rem;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--surface);
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  background: #f2f6f5;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-raised);
  text-align: center;
  line-height: 1.7;
}

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

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 1px 0 rgba(23, 33, 38, 0.03);
}

.list-item strong {
  display: block;
}

.list-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.day-card {
  min-height: 174px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: 0 1px 0 rgba(23, 33, 38, 0.03);
}

.day-card.today {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.1);
}

.day-card time {
  display: block;
  font-weight: 850;
}

.day-card .weekday {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.shift-chip {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 9px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
  font-size: 0.82rem;
}

.shift-chip.off {
  background: var(--surface-muted);
  border-left-color: var(--line-strong);
}

.shift-chip strong {
  font-size: 0.86rem;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  padding: 12px;
  border: 1px solid rgba(184, 198, 193, 0.4);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.kpi strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.15;
}

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

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.payslip-preview {
  display: grid;
  gap: 16px;
}

.payslip-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

.payslip-head h3 {
  margin: 0;
  font-size: 1.22rem;
}

.payslip-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.payslip-net {
  min-width: 180px;
  text-align: right;
}

.payslip-net span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.payslip-net strong {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
}

.amount-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.amount-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  overflow: hidden;
}

.amount-box .panel-header {
  align-items: center;
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.amount-table {
  min-width: 0;
}

.amount-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.amount-total td {
  font-weight: 850;
  background: var(--surface);
}

.notice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.notice.warning {
  background: var(--amber-soft);
  border-color: #efd79d;
}

.notice.danger {
  background: var(--coral-soft);
  border-color: #ffc5bf;
}

.notice.success {
  background: var(--green-soft);
  border-color: #bde4cb;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.notice strong {
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #102226;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.hide-mobile {
  display: initial;
}

.show-mobile {
  display: none;
}

@media (max-width: 1100px) {
  .grid.four,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-status,
  .grid.sidebar-main {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-overview-grid,
  .tracking-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .live-map-sidebar {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .live-map-employees {
    max-height: 320px;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 84px;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

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

  .login-intro h1 {
    font-size: clamp(1.72rem, 7.2vw, 2.1rem);
    line-height: 1.15;
  }

  .login-form-wrap {
    padding: 24px;
  }

  .quick-users,
  .form-grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .invite-result {
    grid-template-columns: 1fr;
  }

  .employee-welcome {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-notice {
    align-items: flex-start;
  }

  .tracking-employee-head,
  .tracking-employee-foot,
  .location-monitor-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tracking-employee-stats,
  .location-overview-grid,
  .consent-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-monitor-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tracking-timeline-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .tracking-timeline-row span {
    grid-column: 2;
  }

  .consent-modal {
    padding: 22px;
  }

  .all-employee-map-head,
  .map-head-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-head-actions > span {
    text-align: left;
  }

  .gps-history-toolbar {
    grid-template-columns: 1fr;
  }

  .gps-evidence-count {
    justify-items: start;
    text-align: left;
  }

  .location-detail-map {
    min-height: 420px;
  }

  .live-map-stage,
  .live-map-layout {
    min-height: 470px;
  }

  .live-map-stage {
    height: 470px;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    height: 82px;
    display: block;
    padding: 9px 10px 10px;
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    box-shadow: 0 -8px 28px rgba(23, 33, 38, 0.12);
    overflow-x: auto;
    white-space: nowrap;
  }

  .sidebar .brand,
  .user-line,
  .sidebar-footer {
    display: none;
  }

  .nav {
    display: flex;
    gap: 6px;
    overflow: visible;
    padding: 0;
  }

  .nav-group,
  .nav-group-list { display: contents; }

  .nav-group-title { display: none; }

  .nav-button {
    width: 82px;
    min-width: 82px;
    height: 58px;
    grid-template-columns: 1fr;
    grid-template-rows: 23px 1fr;
    gap: 2px;
    justify-items: center;
    padding: 7px 6px;
    font-size: 0.72rem;
    text-align: center;
    color: var(--muted);
  }

  .nav-button:hover {
    background: var(--surface-muted);
    color: var(--ink);
  }

  .nav-button.active {
    background: var(--nav);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(16, 34, 38, 0.18);
  }

  .nav-button .badge {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .topbar-right {
    width: auto;
  }

  .topbar-meta {
    display: none;
  }

  .topbar-actions {
    display: none;
  }

  .content {
    padding: 14px;
  }

  .panel {
    padding: 14px;
  }

  .clock-face {
    min-height: 224px;
    padding: 20px 16px;
  }

  .clock-time {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .action-grid,
  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 72px 1fr;
  }

  .timeline .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .list-item {
    grid-template-columns: 1fr;
  }

  .payslip-head,
  .amount-columns {
    grid-template-columns: 1fr;
    display: grid;
  }

  .payslip-net {
    text-align: left;
  }

  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: initial;
  }

  .toast {
    bottom: 96px;
  }
}

/* Joyful clarity theme — cream canvas, navy typography and purposeful color. */
:root {
  --bg: #f8f7f2;
  --surface: #ffffff;
  --surface-raised: #fffefa;
  --surface-muted: #f4f2fb;
  --ink: #17135d;
  --muted: #6e6b8d;
  --line: rgba(32, 25, 98, 0.1);
  --line-strong: rgba(32, 25, 98, 0.2);
  --nav: #2f238c;
  --nav-soft: #4b3cc5;
  --teal: #05a79f;
  --teal-dark: #087d78;
  --teal-soft: #ddf7f4;
  --coral: #ff5268;
  --coral-soft: #ffe8ec;
  --amber: #f5a900;
  --amber-soft: #fff2cf;
  --green: #078c77;
  --green-soft: #def7ef;
  --blue: #5f4cff;
  --blue-soft: #eeebff;
  --violet: #5f4cff;
  --violet-soft: #eeebff;
  --shadow: 0 24px 60px rgba(43, 32, 116, 0.12);
  --shadow-soft: 0 10px 28px rgba(43, 32, 116, 0.08);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

body {
  background:
    radial-gradient(circle at 4% 7%, rgba(32, 201, 190, 0.18) 0 42px, transparent 43px),
    radial-gradient(circle at 97% 4%, rgba(255, 193, 34, 0.18) 0 130px, transparent 131px),
    radial-gradient(circle at 85% 100%, rgba(32, 201, 190, 0.1) 0 210px, transparent 211px),
    linear-gradient(180deg, #fffefa 0%, #f8f7f2 55%, #f5f3fb 100%);
  color: var(--ink);
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
}

button,
.btn,
.nav-button,
.panel,
.metric,
.mobile-quick-card {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(95, 76, 255, 0.34);
  outline-offset: 3px;
}

.panel,
.metric,
.card,
.mobile-today-card,
.mobile-month-card,
.mobile-quick-card {
  border: 1px solid rgba(32, 25, 98, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.panel {
  border-radius: 24px;
}

.panel-title,
.section-title,
.topbar h1,
.metric .value {
  color: var(--ink);
  letter-spacing: -0.025em;
}

.panel-subtitle,
.section-copy,
.topbar-sub,
.muted {
  color: var(--muted);
}

.btn {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 850;
  letter-spacing: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #04a79e 0%, #5f4cff 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(70, 64, 214, 0.22);
}

.btn.warning {
  border-color: rgba(245, 169, 0, 0.2);
  background: linear-gradient(135deg, #ffc638, #f5a900);
  color: #4a3600;
}

.btn.danger {
  border-color: transparent;
  background: linear-gradient(135deg, #ff6f7f, #ff405d);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(255, 64, 93, 0.2);
}

.btn.ghost {
  border-color: rgba(95, 76, 255, 0.14);
  background: #f7f5ff;
  color: #413893;
}

.brand-mark {
  border-radius: 15px;
  background: linear-gradient(145deg, #6250ff, #3824c9);
  box-shadow: 0 12px 24px rgba(75, 54, 216, 0.24);
}

.login-page {
  background:
    radial-gradient(circle at 0 100%, rgba(95, 76, 255, 0.85) 0 210px, transparent 211px),
    radial-gradient(circle at 100% 0, rgba(255, 196, 38, 0.84) 0 150px, transparent 151px),
    radial-gradient(circle at 92% 92%, rgba(29, 204, 190, 0.22) 0 180px, transparent 181px),
    #fffefa;
}

.login-panel {
  border: 1px solid rgba(32, 25, 98, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(37, 27, 107, 0.16);
}

.login-intro {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 2% 98%, rgba(95, 76, 255, 0.94) 0 180px, transparent 181px),
    radial-gradient(circle at 96% 6%, rgba(29, 204, 190, 0.13) 0 100px, transparent 101px),
    #fffdf8;
  color: var(--ink);
}

.login-intro p {
  color: #625f80;
}

.login-intro-title {
  color: #17135d;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.intro-point {
  border-color: rgba(32, 25, 98, 0.08);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(42, 32, 112, 0.07);
}

.intro-point span {
  color: #6e6b8d;
}

.sidebar {
  background: linear-gradient(180deg, #231875, #312595 65%, #0b8d86 145%);
}

.nav-button.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.13));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(17, 10, 70, 0.18);
}

.topbar {
  border-color: rgba(32, 25, 98, 0.08);
  background: rgba(255, 254, 250, 0.9);
  backdrop-filter: blur(18px) saturate(1.25);
}

.clock-face,
.mobile-focus-card {
  color: var(--ink);
  border: 1px solid rgba(32, 25, 98, 0.08);
  background:
    radial-gradient(circle at 96% 4%, rgba(255, 196, 38, 0.25) 0 80px, transparent 81px),
    radial-gradient(circle at 5% 95%, rgba(29, 204, 190, 0.13) 0 105px, transparent 106px),
    #fffefa;
  box-shadow: var(--shadow);
}

.clock-face::before,
.mobile-focus-card::before {
  border-color: rgba(95, 76, 255, 0.1);
}

.clock-time,
.mobile-focus-clock strong {
  color: #17135d;
  font-weight: 900;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.clock-date,
.mobile-focus-head small,
.mobile-focus-clock > span,
.mobile-focus-clock small {
  color: #6e6b8d;
}

.mobile-focus-greeting {
  color: #17135d;
}

.mobile-focus-foot {
  border-color: rgba(32, 25, 98, 0.09);
  color: #5e5a80;
}

.mobile-focus-foot strong {
  color: #17135d;
}

.status-pill {
  border-width: 0;
  font-weight: 850;
}

.status-working,
.status-approved {
  background: #ddf7f4;
  color: #058b84;
}

.status-break,
.status-pending,
.status-warning {
  background: #fff0cb;
  color: #b97300;
}

.status-closed {
  background: #eeebff;
  color: #5b49e7;
}

.status-off,
.status-rejected {
  background: #ffe8ec;
  color: #df3852;
}

.metric {
  min-height: 150px;
  border-radius: 22px;
}

.grid.four .metric:nth-child(4n + 1) {
  background: linear-gradient(145deg, #ffffff, #e7fbf7);
}

.grid.four .metric:nth-child(4n + 2) {
  background: linear-gradient(145deg, #ffffff, #f0edff);
}

.grid.four .metric:nth-child(4n + 3) {
  background: linear-gradient(145deg, #ffffff, #fff3d3);
}

.grid.four .metric:nth-child(4n + 4) {
  background: linear-gradient(145deg, #ffffff, #ffecef);
}

.metric::before {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #05a79f, #5f4cff);
}

.field input,
.field select,
.field textarea,
input,
select,
textarea {
  border-color: rgba(32, 25, 98, 0.11);
  border-radius: 14px;
  background: #faf9ff;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #6958ff;
  box-shadow: 0 0 0 4px rgba(95, 76, 255, 0.1);
}

.punch-feedback {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(5, 167, 159, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, #e4fbf7, #f4f1ff);
  color: #087d78;
  box-shadow: 0 10px 25px rgba(8, 125, 120, 0.09);
  animation: feedback-in 0.34s ease both;
}

.punch-feedback > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(8, 125, 120, 0.12);
}

.punch-feedback strong,
.punch-feedback small {
  display: block;
}

.punch-feedback small {
  margin-top: 2px;
  color: #676381;
}

.account-security-panel {
  padding: 0;
  overflow: hidden;
}

.account-security-panel summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.account-security-panel summary::-webkit-details-marker {
  display: none;
}

.account-security-panel summary > span:first-child {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #eeebff;
  color: #5f4cff;
}

.account-security-panel summary strong,
.account-security-panel summary small {
  display: block;
}

.account-security-panel summary small {
  margin-top: 2px;
  color: var(--muted);
}

.account-security-panel form {
  padding: 0 18px 18px;
}

.punch-confirm-card {
  position: relative;
  width: min(470px, calc(100% - 28px));
  padding: 30px;
  border: 1px solid rgba(32, 25, 98, 0.1);
  border-radius: 28px;
  background: #fffefa;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 32px 90px rgba(29, 20, 99, 0.28);
}

.punch-confirm-backdrop {
  display: grid;
  place-items: center;
}

.punch-confirm-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: #ffe8ec;
  color: #ff405d;
}

.punch-confirm-icon svg {
  width: 30px;
  height: 30px;
}

.punch-confirm-card h2 {
  margin: 6px 0 8px;
  font-size: 1.5rem;
}

.punch-confirm-card > p:not(.section-eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.punch-confirm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}

.punch-confirm-summary div {
  padding: 12px 6px;
  border-radius: 15px;
  background: #f6f4fc;
}

.punch-confirm-summary span,
.punch-confirm-summary strong {
  display: block;
}

.punch-confirm-summary span {
  color: var(--muted);
  font-size: 0.75rem;
}

.punch-confirm-summary strong {
  margin-top: 3px;
  font-size: 1.05rem;
}

.punch-confirm-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.toast[data-kind="success"] {
  background: linear-gradient(135deg, #087d78, #5f4cff);
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(-7px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(circle at 0 7%, rgba(29, 204, 190, 0.13) 0 80px, transparent 81px),
      radial-gradient(circle at 100% 1%, rgba(255, 196, 38, 0.13) 0 105px, transparent 106px),
      linear-gradient(180deg, #fffefa, #f7f5fc 58%, #f4f2fa);
  }

  .sidebar,
  .employee-shell .sidebar,
  .admin-shell .sidebar {
    border-top: 1px solid rgba(32, 25, 98, 0.08);
    background: rgba(255, 254, 250, 0.96);
    box-shadow: 0 -14px 36px rgba(36, 26, 107, 0.12);
    backdrop-filter: blur(18px) saturate(1.2);
  }

  .nav-button,
  .employee-shell .nav-button,
  .admin-shell .nav-button {
    color: #716d8c;
  }

  .nav-button.active,
  .employee-shell .nav-button.active,
  .admin-shell .nav-button.active {
    background: linear-gradient(145deg, #5f4cff, #08a49c);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(68, 55, 205, 0.24);
  }

  .topbar,
  .employee-shell .topbar,
  .admin-shell .topbar {
    background: rgba(255, 254, 250, 0.92);
    box-shadow: 0 8px 24px rgba(38, 28, 105, 0.07);
  }

  .mobile-user-menu-button {
    background: linear-gradient(145deg, #e1faf5, #eeebff);
  }

  .mobile-user-avatar,
  .mobile-account-avatar {
    background: linear-gradient(145deg, #08b0a7, #6250ff);
  }

  .mobile-focus-card {
    padding: 18px;
    border-radius: 27px;
  }

  .mobile-focus-action,
  .clock-primary-action {
    min-height: 58px;
    padding-inline: 24px;
    border-radius: 18px;
    font-size: 1.02rem;
  }

  .clock-primary-action {
    width: min(300px, 100%);
    margin: 18px auto 0;
  }

  .clock-next-desktop {
    display: none;
  }

  .clock-progress {
    width: min(330px, 100%);
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: start;
    gap: 7px;
    margin: 22px auto 0;
  }

  .clock-progress > div {
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #8a86a1;
  }

  .clock-progress > div > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid #d8d4e7;
    border-radius: 50%;
    background: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
  }

  .clock-progress > div.done > span {
    border-color: #06a79f;
    background: #06a79f;
    color: #ffffff;
  }

  .clock-progress > div.current > span {
    border-color: #5f4cff;
    color: #5f4cff;
    box-shadow: 0 0 0 5px rgba(95, 76, 255, 0.09);
  }

  .clock-progress > div svg {
    width: 14px;
    height: 14px;
  }

  .clock-progress > i {
    height: 2px;
    margin-top: 13px;
    border-radius: 99px;
    background: #ddd9e9;
  }

  .clock-progress > i.done {
    background: #06a79f;
  }

  .clock-action-grid .btn:disabled {
    display: none;
  }

  .clock-action-grid .btn.is-capturing {
    display: inline-flex;
    grid-column: 1 / -1;
  }

  .clock-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clock-action-grid .btn:not(:disabled) {
    min-height: 54px;
  }

  .punch-location-grid {
    grid-template-columns: 1fr;
  }

  .punch-location-item {
    padding: 11px;
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric {
    min-height: 132px;
    padding: 15px;
  }

  .metric .value {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .mobile-record-list,
  .mobile-request-list {
    display: grid;
    gap: 11px;
  }

  .mobile-record-card,
  .mobile-request-card {
    padding: 16px;
    border: 1px solid rgba(32, 25, 98, 0.08);
    border-radius: 20px;
    background: #fffefa;
    box-shadow: 0 9px 24px rgba(42, 32, 112, 0.08);
  }

  .mobile-record-card header,
  .mobile-request-card header,
  .mobile-record-card footer,
  .mobile-request-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-record-card header small,
  .mobile-record-card header strong {
    display: block;
  }

  .mobile-record-card header small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.74rem;
  }

  .mobile-record-card header strong {
    font-size: 1.03rem;
  }

  .mobile-record-times {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 15px 0 10px;
    padding: 14px;
    border-radius: 17px;
    background: linear-gradient(135deg, #eefbf8, #f0edff);
  }

  .mobile-record-times div:last-child {
    text-align: right;
  }

  .mobile-record-times small,
  .mobile-record-times strong {
    display: block;
  }

  .mobile-record-times small {
    color: var(--muted);
    font-size: 0.72rem;
  }

  .mobile-record-times strong {
    margin-top: 2px;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
  }

  .mobile-record-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .mobile-record-summary strong {
    color: var(--ink);
  }

  .mobile-record-card footer {
    padding-top: 12px;
    border-top: 1px solid rgba(32, 25, 98, 0.08);
  }

  .mobile-record-card footer > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-record-card footer svg {
    width: 15px;
    flex: 0 0 auto;
  }

  .mobile-request-type {
    padding: 5px 9px;
    border-radius: 999px;
    background: #eeebff;
    color: #5946df;
    font-size: 0.75rem;
    font-weight: 850;
  }

  .mobile-request-card > strong {
    display: block;
    margin-top: 13px;
  }

  .mobile-request-card > p {
    margin: 5px 0 14px;
    color: var(--muted);
    line-height: 1.65;
  }

  .mobile-request-card footer {
    padding-top: 12px;
    border-top: 1px solid rgba(32, 25, 98, 0.08);
  }

  .mobile-request-card footer time {
    color: var(--muted);
    font-size: 0.74rem;
  }

  .mobile-request-card footer > div {
    display: flex;
    gap: 7px;
  }

  .mobile-account-sheet {
    background: #fffefa;
  }

  .punch-confirm-backdrop {
    align-items: end;
  }

  .punch-confirm-card {
    width: 100%;
    padding: 28px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 30px 30px 0 0;
  }
}

@media (max-width: 380px) {
  .punch-confirm-summary {
    gap: 5px;
  }

  .punch-confirm-summary strong {
    font-size: 0.94rem;
  }
}

@media (max-width: 640px) {
  .grid.four,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .tracking-employee-stats,
  .location-overview-grid,
  .tracking-detail-metrics,
  .consent-summary-grid {
    grid-template-columns: 1fr;
  }

  .tracking-top-status {
    max-width: 148px;
  }

  .live-map-legend {
    right: 8px;
    bottom: 20px;
    left: 8px;
  }

  .live-map-employee-meta {
    padding-left: 0;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .metric {
    padding: 15px;
  }

  .metric .value {
    font-size: 1.75rem;
  }
}

/* Pop visual refresh */
:root {
  --bg: #f7f6ff;
  --surface: #ffffff;
  --surface-raised: #fdfcff;
  --surface-muted: #f0eefb;
  --ink: #27233f;
  --muted: #716c86;
  --line: #e4e0f1;
  --line-strong: #c9c2df;
  --nav: #2d2658;
  --nav-soft: #403776;
  --teal: #0f837c;
  --teal-dark: #09645f;
  --teal-soft: #ddf8f3;
  --coral: #d94f6d;
  --coral-soft: #ffe8ee;
  --amber: #b87300;
  --amber-soft: #fff2c9;
  --green: #187b50;
  --green-soft: #ddf6e9;
  --blue: #635bff;
  --blue-soft: #ebe9ff;
  --shadow: 0 22px 54px rgba(57, 44, 107, 0.16);
  --shadow-soft: 0 10px 26px rgba(57, 44, 107, 0.09);
  --radius: 17px;
  --sidebar-width: 276px;
}

body {
  background:
    radial-gradient(circle at 12% 4%, rgba(90, 224, 203, 0.28), transparent 24rem),
    radial-gradient(circle at 92% 2%, rgba(129, 116, 255, 0.24), transparent 28rem),
    linear-gradient(180deg, #fbfbff 0, var(--bg) 42rem, #f8fbff 100%);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(99, 91, 255, 0.32);
  outline-offset: 3px;
}

.login-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(89, 224, 201, 0.42), transparent 24rem),
    radial-gradient(circle at 92% 88%, rgba(255, 142, 158, 0.32), transparent 25rem),
    linear-gradient(135deg, #fafaff, #f2f0ff);
}

.login-panel {
  border: 6px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  box-shadow: 0 34px 90px rgba(57, 44, 107, 0.22);
}

.login-intro,
.invite-panel .login-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 38px;
  background: linear-gradient(145deg, #342b68 0%, #5146a3 48%, #0c9b91 120%);
}

.login-intro::before,
.login-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
}

.login-intro::before {
  width: 230px;
  height: 230px;
  top: -105px;
  right: -80px;
}

.login-intro::after {
  width: 150px;
  height: 150px;
  right: 36px;
  bottom: -80px;
  border: 24px solid rgba(255, 214, 112, 0.19);
  background: transparent;
}

.login-intro h1,
.login-intro-title {
  max-width: none;
  font-size: clamp(2rem, 3.05vw, 3rem);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-wrap: initial;
  text-shadow: 0 5px 24px rgba(18, 13, 52, 0.18);
}

.login-intro-title > span {
  display: block;
  white-space: nowrap;
}

.login-intro > div > p:not(.section-eyebrow) {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.login-intro .section-eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.brand-mark {
  border-radius: 14px 14px 14px 5px;
  background: linear-gradient(145deg, #20c7b9, #635bff);
  box-shadow: 0 10px 24px rgba(24, 21, 63, 0.26);
  transform: rotate(-3deg);
}

.intro-point {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
}

.login-form-wrap {
  padding: 38px;
  background: linear-gradient(160deg, #ffffff, #fbfaff);
}

.section-eyebrow {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-title,
.topbar h1,
.panel-title,
.employee-welcome h2 {
  letter-spacing: -0.025em;
}

.auth-switch,
.segmented {
  padding: 5px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-muted);
}

.auth-switch-button,
.segmented button {
  border-radius: 12px;
}

.auth-switch-button.active,
.segmented button.active {
  color: var(--blue);
  box-shadow: 0 7px 18px rgba(57, 44, 107, 0.12);
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #f6f4fc;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  background: #f1effb;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.13);
}

.sidebar {
  padding: 20px 16px;
  background:
    radial-gradient(circle at 20% 8%, rgba(80, 214, 198, 0.22), transparent 13rem),
    linear-gradient(180deg, #332b68 0%, #2d2658 54%, #211c43 100%);
  box-shadow: 12px 0 40px rgba(49, 39, 91, 0.16);
}

.user-line {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.avatar {
  background: linear-gradient(145deg, #fff3bd, #ffffff);
  color: var(--nav);
  box-shadow: 0 6px 16px rgba(22, 17, 52, 0.2);
}

.nav {
  gap: 7px;
}

.nav-button {
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.76);
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.nav-button:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.11);
}

.nav-button.active {
  color: #2d2658;
  background: linear-gradient(135deg, #ffffff, #edfff9);
  box-shadow: 0 12px 25px rgba(18, 13, 51, 0.24);
}

.topbar {
  margin: 14px 18px 0;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 30px rgba(57, 44, 107, 0.08);
}

.content {
  padding: 24px 26px 34px;
}

.content-stack {
  gap: 22px;
}

.panel,
.card,
.metric,
.list-item,
.day-card,
.quick-user,
.table-wrap {
  border-color: rgba(217, 210, 236, 0.78);
  box-shadow: var(--shadow-soft);
}

.panel,
.card {
  border-radius: 21px;
}

.panel {
  padding: 22px;
}

.metric {
  min-height: 138px;
  padding: 19px;
  border: 0;
  border-radius: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric:hover,
.quick-user:hover,
.day-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(57, 44, 107, 0.14);
}

.grid.four .metric:nth-child(1) { background: linear-gradient(145deg, #ffffff, #dcfaf4); }
.grid.four .metric:nth-child(2) { background: linear-gradient(145deg, #ffffff, #e9e7ff); }
.grid.four .metric:nth-child(3) { background: linear-gradient(145deg, #ffffff, #fff0c7); }
.grid.four .metric:nth-child(4) { background: linear-gradient(145deg, #ffffff, #ffe5ec); }

.metric::before {
  inset: 12px auto auto 12px;
  width: 36px;
  height: 7px;
  border-radius: 999px;
}

.metric .label {
  color: #5f5977;
}

.metric .value {
  color: var(--nav);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.clock-face {
  isolation: isolate;
  min-height: 320px;
  border: 0;
  border-radius: 27px;
  background: linear-gradient(145deg, #4d43a3 0%, #30295f 54%, #087c76 130%);
  box-shadow: 0 26px 54px rgba(48, 41, 95, 0.27);
}

.clock-face::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 190px;
  height: 190px;
  top: -90px;
  right: -50px;
  border: 28px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.clock-face::after {
  right: 22px;
  bottom: 18px;
  left: 22px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #36d8c6, #ffe07e, #ff8da2);
}

.clock-time {
  font-weight: 900;
  letter-spacing: -0.07em;
  text-shadow: 0 10px 28px rgba(16, 13, 46, 0.2);
}

.status-pill {
  min-height: 30px;
  padding: 6px 11px;
  border: 0;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(39, 35, 63, 0.05);
}

.btn {
  min-height: 46px;
  border-radius: 14px;
  padding: 10px 15px;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(57, 44, 107, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(57, 44, 107, 0.16);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn.primary {
  background: linear-gradient(135deg, #0f837c, #635bff);
  box-shadow: 0 10px 22px rgba(75, 68, 188, 0.25);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #096f69, #5048e5);
}

.btn.dark {
  background: linear-gradient(135deg, #37306c, #272149);
}

.btn.danger {
  background: linear-gradient(135deg, #d94f6d, #b83b5a);
}

.btn.warning {
  background: linear-gradient(135deg, #ffd463, #f1a833);
  color: #4c3500;
}

.btn.ghost {
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.employee-welcome {
  padding: 24px 26px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(120deg, #ffffff 0%, #ddfaf4 58%, #eceaff 100%);
  box-shadow: var(--shadow-soft);
}

.kpi,
.tracking-employee-stats > div,
.tracking-detail-metrics > div,
.consent-summary-grid > div {
  border-color: rgba(214, 207, 234, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.list-item,
.day-card,
.quick-user,
.empty-state,
.notice,
.table-wrap,
.amount-box,
.payslip-head {
  border-radius: 16px;
}

.list-item {
  background: linear-gradient(145deg, #ffffff, #fbfaff);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.list-item:hover {
  transform: translateX(3px);
  box-shadow: 0 12px 24px rgba(57, 44, 107, 0.11);
}

th {
  background: #f0edfb;
  color: #5b5574;
}

.notice {
  border-width: 0;
  box-shadow: inset 0 0 0 1px rgba(39, 35, 63, 0.06);
}

.tracking-employee-card,
.tracking-detail,
.all-employee-map-panel,
.location-monitor,
.consent-modal {
  border-radius: 22px;
}

.all-employee-map-panel {
  border-color: rgba(99, 91, 255, 0.2);
  background: linear-gradient(145deg, #ffffff 0%, #f3f1ff 58%, #e9faf7 100%);
}

.live-map-layout {
  border-radius: 17px;
}

.live-map-legend {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(57, 44, 107, 0.14);
}

.toast {
  border-radius: 15px;
  background: linear-gradient(135deg, #322a67, #5048a0);
  box-shadow: 0 18px 40px rgba(43, 34, 91, 0.3);
}

@media (max-width: 820px) {
  .sidebar {
    border-top: 1px solid rgba(99, 91, 255, 0.14);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 34px rgba(57, 44, 107, 0.14);
  }

  .nav-button:hover {
    transform: none;
  }

  .nav-button.active {
    background: linear-gradient(145deg, #443a8a, #0f837c);
    color: #ffffff;
    box-shadow: 0 9px 20px rgba(57, 44, 107, 0.22);
  }

  .topbar {
    margin: 10px 10px 0;
    padding: 13px 15px;
    border-radius: 17px;
  }

  .content {
    padding: 14px 12px 26px;
  }

  .panel {
    padding: 16px;
  }

  .login-intro,
  .invite-panel .login-intro,
  .login-form-wrap {
    padding: 26px;
  }

  .login-panel {
    border-radius: 24px;
  }

  .login-intro-title {
    font-size: clamp(1.7rem, 7.4vw, 2.5rem);
    line-height: 1.16;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Employee mobile experience */
.mobile-account-backdrop {
  display: none;
}

.mobile-dashboard {
  display: none;
}

@media (max-width: 820px) {
  html {
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: transparent;
  }

  button,
  a {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .employee-shell .topbar {
    top: 0;
    min-height: calc(62px + env(safe-area-inset-top));
    margin: 0;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    align-items: center;
    border: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 8px 22px rgba(57, 44, 107, 0.09);
  }

  .employee-shell .topbar h1 {
    font-size: 1.08rem;
  }

  .employee-shell .topbar-sub,
  .employee-shell .topbar-right {
    display: none;
  }

  .mobile-user-status {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .mobile-user-status .status-pill {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 0.72rem;
  }

  .mobile-user-menu-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(145deg, #e5fff8, #ece9ff);
    box-shadow: 0 6px 14px rgba(57, 44, 107, 0.12);
  }

  .mobile-user-avatar,
  .mobile-account-avatar {
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #23c8ba, #635bff);
    color: #ffffff;
    font-weight: 900;
  }

  .mobile-user-avatar {
    width: 30px;
    height: 30px;
  }

  .employee-shell .content {
    padding: 10px 12px calc(24px + env(safe-area-inset-bottom));
  }

  .employee-shell .content-stack {
    gap: 12px;
  }

  .mobile-dashboard {
    display: grid !important;
    gap: 12px;
  }

  .employee-dashboard-desktop {
    display: none !important;
  }

  .mobile-focus-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 17px;
    border-radius: 25px;
    background: linear-gradient(145deg, #49409a 0%, #342d6b 58%, #087d78 130%);
    color: #ffffff;
    box-shadow: 0 20px 42px rgba(48, 41, 95, 0.24);
  }

  .mobile-focus-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 150px;
    height: 150px;
    top: -78px;
    right: -45px;
    border: 22px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
  }

  .mobile-focus-head,
  .mobile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-focus-greeting,
  .mobile-focus-head small {
    display: block;
  }

  .mobile-focus-greeting {
    font-size: 0.98rem;
    font-weight: 900;
  }

  .mobile-focus-head small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
  }

  .mobile-focus-head .status-pill {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  .mobile-focus-clock {
    display: grid;
    justify-items: center;
    margin-top: 17px;
  }

  .mobile-focus-clock > span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .mobile-focus-clock > strong {
    margin-top: 2px;
    font-size: clamp(3.1rem, 15vw, 3.9rem);
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.07em;
    text-shadow: 0 9px 24px rgba(20, 15, 58, 0.24);
  }

  .mobile-focus-clock > small {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.74rem;
  }

  .mobile-focus-action {
    width: 100%;
    min-height: 52px;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.98rem;
  }

  .mobile-focus-card .mobile-focus-action.ghost {
    background: rgba(255, 255, 255, 0.94);
  }

  .mobile-focus-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.7rem;
  }

  .mobile-focus-foot strong {
    color: #ffffff;
    font-size: 0.88rem;
  }

  .mobile-location-strip {
    width: 100%;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 0;
    border-radius: 17px;
    background: #e7faf2;
    color: var(--ink);
    text-align: left;
  }

  .mobile-location-strip.attention {
    background: #fff2d4;
  }

  .mobile-location-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22a86f;
    box-shadow: 0 0 0 5px rgba(34, 168, 111, 0.13);
  }

  .mobile-location-strip.attention .mobile-location-dot {
    background: #d58a13;
    box-shadow: 0 0 0 5px rgba(213, 138, 19, 0.13);
  }

  .mobile-location-strip strong,
  .mobile-location-strip small {
    display: block;
  }

  .mobile-location-strip strong {
    font-size: 0.8rem;
  }

  .mobile-location-strip small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.68rem;
  }

  .mobile-today-card,
  .mobile-month-card {
    padding: 16px;
    border: 1px solid rgba(217, 210, 236, 0.78);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 25px rgba(57, 44, 107, 0.08);
  }

  .mobile-card-eyebrow {
    display: block;
    color: var(--blue);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.11em;
  }

  .mobile-card-head h2 {
    margin: 2px 0 0;
    font-size: 1rem;
    letter-spacing: -0.025em;
  }

  .mobile-section-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 0;
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--blue);
    font-size: 0.7rem;
    font-weight: 900;
  }

  .mobile-section-link span {
    font-size: 1.05rem;
    line-height: 1;
  }

  .mobile-today-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
  }

  .mobile-today-grid > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 1px 9px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border-radius: 15px;
    background: #f8f7fc;
  }

  .mobile-data-icon {
    width: 34px;
    height: 34px;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    border-radius: 11px;
  }

  .mobile-data-icon svg {
    width: 17px;
    height: 17px;
  }

  .mobile-data-icon.mint { background: #ddf8f0; color: #0b7b63; }
  .mobile-data-icon.violet { background: #ebe8ff; color: #564de2; }
  .mobile-data-icon.amber { background: #fff0cb; color: #aa7000; }
  .mobile-data-icon.coral { background: #ffe6ed; color: #c74364; }

  .mobile-today-grid small {
    color: var(--muted);
    font-size: 0.65rem;
  }

  .mobile-today-grid strong {
    overflow: hidden;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-quick-card {
    position: relative;
    min-width: 0;
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border: 0;
    border-radius: 20px;
    color: var(--ink);
    text-align: left;
    box-shadow: 0 9px 22px rgba(57, 44, 107, 0.08);
  }

  .mobile-quick-card.shift {
    background: linear-gradient(145deg, #e1faf4, #f7fffd);
  }

  .mobile-quick-card.request {
    background: linear-gradient(145deg, #ece9ff, #fbfaff);
  }

  .mobile-quick-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--blue);
  }

  .mobile-quick-card.shift .mobile-quick-icon {
    color: var(--teal-dark);
  }

  .mobile-quick-copy,
  .mobile-quick-copy small,
  .mobile-quick-copy strong,
  .mobile-quick-copy em {
    display: block;
    min-width: 0;
  }

  .mobile-quick-copy small {
    color: var(--muted);
    font-size: 0.67rem;
  }

  .mobile-quick-copy strong {
    margin-top: 4px;
    font-size: 0.86rem;
    line-height: 1.38;
  }

  .mobile-quick-copy em {
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.67rem;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--muted);
    font-size: 1.2rem;
  }

  .mobile-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 13px;
  }

  .mobile-month-grid > div {
    min-width: 0;
    padding: 11px 8px;
    border-radius: 14px;
    background: #f8f7fc;
    text-align: center;
  }

  .mobile-month-grid small,
  .mobile-month-grid strong {
    display: block;
  }

  .mobile-month-grid small {
    color: var(--muted);
    font-size: 0.64rem;
  }

  .mobile-month-grid strong {
    overflow: hidden;
    margin-top: 5px;
    color: var(--nav);
    font-size: 1.08rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-month-grid strong span {
    margin-left: 1px;
    font-size: 0.68rem;
  }

  .employee-dashboard > .employee-welcome,
  .employee-dashboard > .tracking-notice {
    display: none;
  }

  .employee-dashboard > .hero-status {
    order: 1;
  }

  .employee-dashboard > .tracking-employee-card {
    order: 2;
  }

  .employee-dashboard > .grid.four {
    order: 3;
  }

  .employee-dashboard > .grid.two {
    order: 4;
  }

  .employee-shell .hero-status {
    gap: 12px;
  }

  .employee-shell .clock-face {
    min-height: 244px;
    gap: 9px;
    padding: 18px 16px 25px;
    border-radius: 24px;
  }

  .employee-shell .clock-face::before {
    width: 150px;
    height: 150px;
    top: -76px;
    right: -42px;
    border-width: 22px;
  }

  .employee-shell .clock-face::after {
    right: 18px;
    bottom: 14px;
    left: 18px;
    height: 6px;
  }

  .employee-shell .clock-time {
    font-size: clamp(3.25rem, 16vw, 4.15rem);
  }

  .employee-shell .clock-date {
    font-size: 0.83rem;
  }

  .employee-shell .clock-face > .btn {
    width: min(78%, 270px);
    min-height: 54px;
    margin-top: 3px;
    font-size: 1rem;
  }

  .employee-dashboard .hero-status > .panel {
    padding: 15px;
  }

  .employee-dashboard .panel-header {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 9px;
  }

  .employee-dashboard .panel-title {
    font-size: 0.95rem;
  }

  .employee-dashboard .panel-subtitle {
    margin-top: 2px;
    font-size: 0.74rem;
  }

  .employee-dashboard .timeline {
    gap: 0;
  }

  .employee-dashboard .timeline li {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px 0;
  }

  .employee-dashboard .timeline time {
    font-size: 0.92rem;
  }

  .employee-dashboard .timeline strong {
    font-size: 0.86rem;
  }

  .employee-dashboard .timeline span {
    grid-column: auto;
    justify-self: end;
    font-size: 0.7rem;
  }

  .employee-dashboard .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px !important;
  }

  .employee-dashboard .kpi {
    min-width: 0;
    padding: 8px 5px;
    text-align: center;
  }

  .employee-dashboard .kpi strong {
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .employee-dashboard .kpi span {
    margin-top: 3px;
    font-size: 0.64rem;
  }

  .employee-dashboard > .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .employee-dashboard .metric {
    min-height: 106px;
    padding: 14px;
  }

  .employee-dashboard .metric::before {
    top: 10px;
    left: 10px;
    width: 28px;
    height: 5px;
  }

  .employee-dashboard .metric .label {
    gap: 5px;
    font-size: 0.72rem;
  }

  .employee-dashboard .metric .label svg {
    width: 16px;
    height: 16px;
  }

  .employee-dashboard .metric .value {
    margin-top: 8px;
    font-size: 1.48rem;
  }

  .employee-dashboard .metric .sub {
    margin-top: 5px;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .employee-dashboard > .grid.two {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .employee-shell .tracking-employee-card {
    padding: 15px;
    border-radius: 19px;
  }

  .employee-shell .tracking-employee-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-shell .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-shell .panel,
  .employee-shell .metric,
  .employee-shell .card {
    scroll-margin-bottom: 90px;
  }

  .employee-shell .table-wrap,
  .employee-shell .calendar-grid {
    -webkit-overflow-scrolling: touch;
  }

  .employee-shell .sidebar {
    height: calc(70px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .employee-shell .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .employee-shell .nav-button {
    width: auto;
    min-width: 0;
    height: 56px;
    grid-template-columns: 1fr;
    grid-template-rows: 23px 1fr;
    gap: 1px;
    padding: 6px 2px 5px;
    border-radius: 14px;
    font-size: 0.67rem;
    line-height: 1;
    background: transparent;
    color: #6a647f;
    opacity: 1;
  }

  .employee-shell .nav-button svg {
    width: 21px;
    height: 21px;
    color: inherit;
    stroke: currentColor;
    opacity: 1;
  }

  .employee-shell .nav-button > span {
    color: inherit;
    opacity: 1;
  }

  .employee-shell .nav-button:not(.active):hover,
  .employee-shell .nav-button:not(.active):active {
    background: #f0eef9;
    color: #332d61;
  }

  .employee-shell .nav-button.active {
    background: linear-gradient(145deg, #443a8a, #0f837c);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(57, 44, 107, 0.22);
  }

  .admin-shell .nav {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .admin-shell .nav::-webkit-scrollbar {
    display: none;
  }

  .admin-shell .nav-button {
    color: #6a647f;
    opacity: 1;
    scroll-snap-align: center;
  }

  .admin-shell .nav-button svg,
  .admin-shell .nav-button > span {
    color: inherit;
    opacity: 1;
  }

  .admin-shell .nav-button svg {
    stroke: currentColor;
  }

  .admin-shell .nav-button:not(.active):hover,
  .admin-shell .nav-button:not(.active):active {
    background: #f0eef9;
    color: #332d61;
  }

  .admin-shell .nav-button.active {
    background: linear-gradient(145deg, #443a8a, #0f837c);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(57, 44, 107, 0.22);
  }

  .employee-shell .nav-button[data-nav-view="reports"],
  .employee-shell .nav-button[data-nav-view="payslips"] {
    display: none;
  }

  .mobile-account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    align-items: end;
    background: rgba(25, 20, 57, 0.5);
    backdrop-filter: blur(5px);
  }

  .mobile-account-sheet {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 25px 25px 0 0;
    background: linear-gradient(160deg, #ffffff, #f8f6ff);
    box-shadow: 0 -24px 60px rgba(31, 24, 75, 0.24);
  }

  .mobile-account-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    gap: 11px;
    align-items: center;
  }

  .mobile-account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.15rem;
  }

  .mobile-account-head strong,
  .mobile-account-head span {
    display: block;
  }

  .mobile-account-head strong {
    font-size: 1rem;
  }

  .mobile-account-head div > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
  }

  .mobile-account-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 16px 0 12px;
  }

  .mobile-account-links button {
    min-height: 90px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(217, 210, 236, 0.84);
    border-radius: 17px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
    box-shadow: 0 8px 18px rgba(57, 44, 107, 0.07);
  }

  .mobile-account-links button > svg {
    width: 24px;
    height: 24px;
    color: var(--blue);
  }

  .mobile-account-links strong,
  .mobile-account-links small {
    display: block;
  }

  .mobile-account-links small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .modal-backdrop {
    place-items: end center;
    padding: 0;
  }

  .consent-modal {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - 10px);
    padding: 19px 16px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 25px 25px 0 0;
  }

  .consent-modal-head {
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .consent-icon {
    width: 42px;
    height: 42px;
  }

  .consent-modal-head h2 {
    font-size: 1.2rem;
  }

  .consent-modal-head p:last-child {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .consent-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0;
  }

  .consent-details {
    gap: 7px;
  }

  .consent-details > div {
    padding: 9px 10px;
  }

  .consent-form {
    margin-top: 12px;
  }

  .consent-actions {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 8px;
  }

  .consent-actions .btn {
    min-width: 0;
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .toast {
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 380px) {
  .employee-shell .content {
    padding-right: 9px;
    padding-left: 9px;
  }

  .employee-shell .clock-time {
    font-size: 3.05rem;
  }

  .employee-shell .nav-button {
    font-size: 0.62rem;
  }

  .employee-dashboard .panel-header > .status-pill {
    display: none;
  }

  .mobile-account-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .mobile-quick-grid {
    grid-template-columns: 1fr;
  }

  .mobile-quick-card {
    min-height: 108px;
    grid-template-columns: 38px minmax(0, 1fr);
    align-content: center;
  }

  .mobile-quick-icon {
    grid-row: 1;
  }
}

.offline-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(15, 131, 124, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, #ecfff9, #f5f3ff);
  box-shadow: 0 10px 24px rgba(57, 44, 107, 0.08);
}

.offline-status.is-offline {
  border-color: rgba(199, 125, 0, 0.25);
  background: linear-gradient(145deg, #fff7dc, #fff1ea);
}

.offline-status.has-queue {
  border-color: rgba(99, 91, 255, 0.22);
}

.offline-status-icon {
  display: grid;
  min-width: 62px;
  min-height: 34px;
  place-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #3f3877;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(57, 44, 107, 0.1);
}

.offline-status strong,
.offline-status span {
  display: block;
}

.offline-status > div > span {
  margin-top: 2px;
  color: #716a85;
  font-size: 0.8rem;
  line-height: 1.55;
}

.offline-queue-list {
  display: grid;
  gap: 8px;
}

.offline-queue-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #f7f5ff;
}

.offline-queue-list span {
  color: #716a85;
  font-size: 0.82rem;
}

@media (max-width: 520px) {
  .offline-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .offline-status .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Stable mobile viewport: every page shares one five-item navigation and only
   wide data tables scroll inside their own card. */
@media (max-width: 820px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    font-size: 16px;
  }

  .shell,
  .main,
  .content,
  .content-stack,
  .panel,
  .grid,
  .card,
  .hero-status {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .sidebar,
  .employee-shell .sidebar,
  .admin-shell .sidebar {
    height: calc(70px + env(safe-area-inset-bottom));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .nav,
  .employee-shell .nav,
  .admin-shell .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .nav-button,
  .employee-shell .nav-button,
  .admin-shell .nav-button {
    width: auto;
    min-width: 0;
    height: 56px;
    grid-template-columns: 1fr;
    grid-template-rows: 23px 1fr;
    gap: 1px;
    justify-items: center;
    padding: 6px 2px 5px;
    border-radius: 14px;
    font-size: 0.67rem;
    line-height: 1;
    text-align: center;
    background: transparent;
    color: #6a647f;
  }

  .nav-button:not(.mobile-primary) {
    display: none;
  }

  .nav-button svg {
    width: 21px;
    height: 21px;
  }

  .topbar,
  .employee-shell .topbar,
  .admin-shell .topbar {
    top: 0;
    min-height: calc(62px + env(safe-area-inset-top));
    margin: 0;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    align-items: center;
    border: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(255, 255, 255, 0.92);
  }

  .topbar h1,
  .employee-shell .topbar h1,
  .admin-shell .topbar h1 {
    font-size: 1.08rem;
  }

  .topbar-sub,
  .topbar-right {
    display: none;
  }

  .content,
  .employee-shell .content,
  .admin-shell .content {
    padding: 10px 12px calc(24px + env(safe-area-inset-bottom));
  }

  .table-wrap,
  .employee-shell .table-wrap,
  .admin-shell .table-wrap,
  .calendar-grid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap > table {
    width: max-content;
    min-width: 680px;
  }

  .mobile-account-links {
    max-height: min(54vh, 460px);
    overflow-y: auto;
  }
}
