:root {
  --bg: #f4f5f1;
  --paper: #fff;
  --ink: #20342f;
  --muted: #728079;
  --line: #e4e9e1;
  --green: #174b3f;
  --lime: #d9edb6;
  --orange: #b36b26;
  --red: #a9423c;
  --radius: 18px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--green);
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 11px 16px;
  color: var(--ink);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #f0f4eb;
}
button:active {
  transform: translateY(1px);
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: #22634f;
}
button.danger {
  color: var(--red);
  background: #fff5f3;
}
.small {
  padding: 7px 10px;
  font-size: 12px;
}
svg {
  flex-shrink: 0;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dbe2d8;
  border-radius: 9px;
  padding: 12px;
  background: white;
  color: var(--ink);
  min-height: 44px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
label {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
form label[hidden] {
  display: none;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
label:has(input[type="checkbox"]) {
  display: flex;
  gap: 8px;
  align-items: center;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a7c78e;
  outline-offset: 2px;
}
:focus-visible {
  outline: 3px solid #91b66c;
  outline-offset: 3px;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand-mark {
  width: 37px;
  height: 37px;
  background: var(--green);
  color: var(--lime);
  display: grid;
  place-items: center;
  border-radius: 11px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
  margin-top: 3px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #8b968f;
  margin: 40px 12px 12px;
  font-weight: 700;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  justify-content: flex-start;
  border: 0;
  background: none;
  padding: 13px;
  color: #718077;
  font-size: 13px;
  font-weight: 500;
  gap: 12px;
}
.nav button.active {
  background: #eaf1e2;
  color: var(--green);
  font-weight: 650;
}
.nav button.active:after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 16px 9px 0;
}
.user-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
}
.avatar {
  width: 35px;
  height: 35px;
  background: #e5ebdb;
  color: var(--green);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.user-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 84px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff91;
  gap: 12px;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
.live {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--green);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7aa750;
  box-shadow: 0 0 0 4px #ecf3e5;
}
.main {
  max-width: 1560px;
  margin: auto;
  padding: 38px 44px 50px;
}
.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  color: #85917b;
  font-weight: 700;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.15px;
  margin: 0 0 10px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
p {
  line-height: 1.65;
}
.sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.metric:first-child {
  background: var(--green);
  color: white;
  border: 0;
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric:first-child .metric-label {
  color: #b8cdc2;
}
.metric-value {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 600;
  margin: 16px 0 11px;
}
.metric-value small {
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 400;
  color: #9eafa4;
}
.metric-foot {
  font-size: 10px;
  color: #88957f;
}
.metric:first-child .metric-foot {
  color: #d0e3bf;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: 22px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.card-head {
  padding: 23px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0f2eb;
}
.card-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}
.card-body {
  padding: 24px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th {
  background: #fafbf8;
  color: #819078;
  font-weight: 500;
  text-align: left;
  padding: 14px 22px;
  font-size: 10px;
  letter-spacing: 0.3px;
}
td {
  border-top: 1px solid #f0f2eb;
  padding: 17px 22px;
}
td strong {
  font-weight: 600;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 10px;
}
.badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 500;
  background: #edf4e8;
  color: #507445;
}
.badge.orange {
  background: #fbf1e4;
  color: #a27230;
}
.badge.red {
  background: #fbece8;
  color: #a75248;
}
.badge.gray {
  background: #f0f2ef;
  color: #78837c;
}
.badge.blue {
  background: #eaf0f8;
  color: #5c7a97;
}
.empty {
  padding: 40px 25px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.empty svg {
  margin-bottom: 10px;
  color: #92a884;
}
.empty strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 5px;
}
.person {
  display: flex;
  gap: 10px;
  align-items: center;
}
.person .avatar {
  width: 29px;
  height: 29px;
  font-size: 10px;
}
.activity {
  padding: 0 24px;
}
.activity-row {
  display: flex;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #f0f2eb;
  font-size: 12px;
}
.activity-row:last-child {
  border-bottom: 0;
}
.activity-icon {
  background: #f1f5eb;
  border-radius: 9px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #6d8b56;
  flex-shrink: 0;
}
.activity-row p {
  margin: 0;
}
.activity-row small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  font-size: 10px;
}
.activity-row time {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.welcome-panel {
  border-radius: var(--radius);
  background: #e8eddf;
  padding: 25px;
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
}
.welcome-panel .eyebrow {
  color: #6b805d;
}
.welcome-panel h3 {
  font-size: 21px;
  max-width: 240px;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: -0.7px;
}
.welcome-panel p {
  font-size: 12px;
  color: #6e7e64;
  max-width: 280px;
}
.welcome-panel:after {
  content: "✓";
  position: absolute;
  right: 5px;
  bottom: -48px;
  font-size: 200px;
  color: #d6e1c7;
  transform: rotate(-12deg);
  pointer-events: none;
}
.welcome-panel > * {
  position: relative;
  z-index: 1;
}
.notice {
  padding: 14px 18px;
  background: #fff6e7;
  border: 1px solid #efdfbc;
  color: #8b6c36;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 22px;
}
.notice.info {
  background: #eef3e8;
  border-color: #dce5d1;
  color: #647958;
}
.note-text {
  min-width: 12rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice a {
  color: inherit;
}
.section-space {
  margin-top: 26px;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filters input,
.filters select {
  width: auto;
  min-width: 160px;
}
.filters .search {
  flex: 1;
  max-width: 400px;
}
.cards3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.site-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.site-card .site-icon {
  background: #edf1e6;
  color: var(--green);
  width: 43px;
  height: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.site-card p {
  font-size: 12px;
  color: var(--muted);
}
.site-card .actions {
  margin-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
dialog:has([data-zone-fields]:not([hidden])) {
  width: min(780px, calc(100% - 20px));
}
.geofence-map {
  height: clamp(245px, 43dvh, 410px);
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #eef2e9;
  isolation: isolate;
}
.span2 {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 24px;
}
.hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
}
.form-error {
  color: var(--red);
  background: #fff0ed;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  margin: 14px 0;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  background: var(--green);
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-art:after {
  content: "";
  position: absolute;
  border: 1px solid #ffffff15;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  bottom: -330px;
  right: -150px;
  box-shadow:
    0 0 0 90px #ffffff06,
    0 0 0 180px #ffffff04;
}
.login-art .brand {
  color: white;
}
.login-art h1 {
  font-size: 54px;
  max-width: 480px;
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: -2px;
}
.login-art p {
  color: #bdcec3;
  font-size: 15px;
  max-width: 370px;
}
.login-art .eyebrow {
  color: #b9d59b;
}
.login-art footer {
  font-size: 11px;
  color: #a8c0b1;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 360px;
}
.login-form h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.login-form label {
  margin-top: 20px;
}
.login-form button {
  width: 100%;
  margin-top: 24px;
}
.login-footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 35px;
  text-align: center;
}
.mobile-clock {
  font-size: 62px;
  letter-spacing: -3px;
  font-weight: 450;
  margin: 20px 0 0;
  line-height: 1.2;
}
.scanner-card {
  padding: 30px;
  background: var(--green);
  color: white;
  border-radius: 20px;
  margin-bottom: 23px;
}
.scanner-card .sub {
  color: #b3cbbc;
}
.scanner-card button {
  background: var(--lime);
  color: var(--green);
  border: 0;
  width: 100%;
  padding: 17px;
}
#clock-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.scanner-card .badge {
  background: #ffffff17;
  color: #d0e4bc;
}
.mobile-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mobile-status small {
  font-size: 11px;
  color: #b3cbbc;
}
.detail-list {
  display: grid;
  gap: 18px;
}
.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
}
.detail-line span {
  color: var(--muted);
}
.month-total {
  font-size: 30px;
  letter-spacing: -1px;
}
.employee-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.inline-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  width: 600px;
  max-width: calc(100vw - 30px);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #173d3133;
}
dialog::backdrop {
  background: #112d2560;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
}
.modal-head button {
  padding: 5px;
  border: 0;
  background: transparent;
}
.modal-body {
  padding: 25px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--green);
  color: white;
  font-size: 13px;
  padding: 15px 22px;
  border-radius: 12px;
  box-shadow: 0 5px 30px #173d3125;
  z-index: 100;
  display: none;
}
#toast.error {
  background: #984e40;
}
.loading {
  height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mobile-tabs {
  display: none;
}
.settings-block {
  padding: 25px;
}
.shift-time {
  font-size: 27px;
  letter-spacing: -1px;
  margin: 16px 0;
}
.password-box {
  font-family: monospace;
  font-size: 19px;
  padding: 20px;
  background: #f1f5ea;
  border-radius: 10px;
  word-break: break-all;
}
.no-margin {
  margin: 0;
}
.desktop-only {
  display: initial;
}
.report-warning {
  font-size: 11px;
  color: var(--muted);
  margin: 18px 0 0;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 20px;
  color: #8e9988;
  font-size: 10px;
}
.pill-count {
  background: #f0f2e9;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
  color: #7b8b70;
}
@media (min-width: 1500px) {
  .main {
    padding-top: 45px;
  }
  .metrics {
    gap: 22px;
  }
  .metric {
    padding: 26px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 195px 1fr;
  }
  .sidebar {
    padding: 28px 12px;
  }
  .brand {
    font-size: 18px;
  }
  .main {
    padding: 30px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .cards3 {
    grid-template-columns: 1fr 1fr;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 18px;
  }
  .metric-value {
    font-size: 28px;
  }
  .login-art {
    padding: 40px;
  }
  .login-art h1 {
    font-size: 42px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 20px;
  }
  .topbar .crumb {
    font-size: 11px;
  }
  .main {
    padding: 26px 18px 105px;
  }
  .heading {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 22px;
  }
  h1 {
    font-size: 27px;
  }
  .heading .actions {
    width: 100%;
  }
  .heading .actions button {
    flex: 1;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .metric {
    border-radius: 14px;
    padding: 18px;
  }
  .metric-value {
    font-size: 29px;
    margin: 12px 0;
  }
  .metric-foot {
    font-size: 9px;
  }
  .metric-label {
    font-size: 10px;
  }
  .cards3 {
    grid-template-columns: 1fr;
  }
  .card-head {
    padding: 20px;
  }
  .card-body {
    padding: 20px;
  }
  .grid2 {
    gap: 0;
  }
  .mobile-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-x: auto;
    background: white;
    border-top: 1px solid var(--line);
    z-index: 30;
    padding: 8px 5px max(8px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobile-tabs button {
    border: 0;
    background: none;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 57px;
    color: var(--muted);
    font-size: 9px;
  }
  .mobile-tabs button.active {
    color: var(--green);
    background: #edf3e6;
    border-radius: 10px;
  }
  .login {
    display: block;
  }
  .login-art {
    min-height: 230px;
    padding: 25px;
  }
  .login-art h1 {
    font-size: 32px;
    max-width: 320px;
    margin-top: 35px;
  }
  .login-art p,
  .login-art footer,
  .login-art .eyebrow {
    display: none;
  }
  .login-form {
    padding: 38px 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .desktop-only {
    display: none;
  }
  .filters {
    gap: 8px;
  }
  .filters input,
  .filters select {
    min-width: 120px;
    max-width: 100%;
    flex: 1;
  }
  .page-footer {
    font-size: 9px;
  }
  .notice {
    font-size: 11px;
  }
  .mobile-clock {
    font-size: 58px;
  }
  td,
  th {
    padding: 14px 16px;
  }
  #absence-list table {
    white-space: normal;
  }
  #absence-list :is(td, th) {
    padding-inline: 8px;
  }
  .actions {
    gap: 7px;
  }
  .scanner-card {
    padding: 24px;
  }
}
