:root {
  --ink: #173f35;
  --text: #243d35;
  --muted: #71827b;
  --green: #286b54;
  --lime: #d8edae;
  --line: #e2e8e0;
  --paper: #f6f7f2;
  --amber: #946222;
  font-family:
    Inter,
    "Noto Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
}
small,
.hint,
.subtle {
  color: var(--muted);
  line-height: 1.7;
}
small {
  display: block;
  font-size: 12px;
}
.demo-bar {
  background: #ece6d6;
  color: #71562d;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 20px;
  font-size: 11px;
  letter-spacing: 0.2px;
}
.demo-bar svg {
  width: 14px;
  height: 14px;
}
.shell {
  display: flex;
  min-height: calc(100vh - 35px);
}
.rail {
  width: 224px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 36px 22px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: calc(100vh - 35px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 55px;
}
.brand-symbol {
  background: var(--ink);
  color: var(--lime);
  font-size: 28px;
  font-weight: 700;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.brand b {
  letter-spacing: 2.5px;
  font-size: 19px;
}
.brand small {
  font-size: 8px;
  letter-spacing: 3px;
  font-weight: 400;
}
.rail-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9ca89f;
  padding-left: 12px;
}
.rail nav {
  display: grid;
  gap: 8px;
}
.rail nav button,
.admin-link {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 14px;
  border-radius: 10px;
  text-align: left;
  color: #74857b;
  font-size: 14px;
}
.rail button.active {
  background: #edf3e8;
  color: var(--ink);
  font-weight: 600;
}
.admin-link {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-top: 24px;
}
.rail-foot {
  margin-top: auto;
  font-size: 12px;
  padding: 20px 12px 0;
  color: var(--muted);
}
.rail-foot small {
  font-size: 9px;
  margin-top: 8px;
}
.mini-dot {
  display: inline-block;
  background: var(--green);
  height: 7px;
  width: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.workspace {
  min-width: 0;
  flex: 1;
}
.topbar {
  min-height: 92px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 36px;
  gap: 20px;
  background: #f9faf6;
}
.context {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
}
.controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.controls label {
  gap: 4px;
}
.controls label span {
  font-size: 10px;
}
.controls select {
  font-size: 11px;
  background: #fff;
  max-width: 260px;
  padding: 8px 28px 8px 10px;
  min-height: 34px;
}
.icon-button {
  font-size: 25px;
  color: var(--muted);
}
.mobile-brand {
  display: none;
}
main {
  padding: 34px 40px 70px;
  max-width: 1200px;
  margin: auto;
}
.phone-content {
  max-width: 940px;
}
.greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.greeting h1 {
  font-size: 30px;
  margin-bottom: 8px;
}
.greeting p:last-child {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  color: #8a9a8e;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.avatar {
  width: 52px;
  height: 52px;
  background: #e4ebd8;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 21px;
}
.clock-card {
  background: var(--ink);
  color: white;
  border-radius: 20px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.clock-card:after {
  content: "";
  position: absolute;
  right: -50px;
  top: -60px;
  width: 310px;
  height: 310px;
  border: 1px solid #ffffff0c;
  border-radius: 50%;
  pointer-events: none;
}
.clock-top {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #d1e0d4;
  margin-bottom: 17px;
}
.clock-icon {
  background: #ffffff12;
  border-radius: 10px;
  padding: 9px;
  margin-right: auto;
  display: flex;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9b4a8;
}
.live-dot.on {
  background: var(--lime);
  box-shadow: 0 0 0 4px #d8edae20;
}
.clock-card h2 {
  font-size: 25px;
  margin-bottom: 8px;
}
.clock-card p {
  color: #c8d7c9;
  font-size: 12px;
}
.clock-card label span {
  color: #c8d7c9;
}
.clock-card select {
  background: #224c40;
  border-color: #547062;
  color: #fff;
}
.clock-card .form-grid {
  gap: 15px;
}
.clock-actions {
  display: flex;
  gap: 14px;
  margin-top: 2px;
}
.clock-actions button {
  flex: 1;
  border-radius: 9px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
}
.clock-in {
  background: var(--lime);
  color: var(--ink);
}
.clock-out {
  border: 1px solid #829689;
  background: #ffffff09;
  color: #f6fff2;
}
.privacy {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px !important;
  margin: 19px 0 0;
}
.privacy svg {
  width: 14px;
  height: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 26px;
}
.metrics > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
}
.metrics b {
  display: block;
  font-size: 30px;
  font-weight: 500;
  margin-top: 6px;
}
.metrics b span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}
.panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel h2 {
  margin-bottom: 20px;
}
.hint {
  font-size: 12px;
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  align-items: end;
}
.form-grid:last-child {
  margin-bottom: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
label > span,
legend {
  font-size: 12px;
  color: #576e60;
}
input,
select,
textarea {
  border: 1px solid #dce3d8;
  border-radius: 7px;
  padding: 11px 12px;
  min-height: 42px;
  color: var(--text);
  background: #fcfdf9;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
input[type="checkbox"] {
  height: 18px;
  width: 18px;
  min-height: 18px;
  margin: 10px 0;
}
input[type="file"] {
  font-size: 11px;
  padding: 9px;
}
.primary,
.secondary {
  padding: 12px 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  font-size: 12px;
}
.primary {
  background: var(--ink);
  color: #fff;
  justify-self: start;
}
.primary svg {
  height: 16px;
  width: 16px;
}
.secondary {
  background: #f0f4eb;
  border: 1px solid #dae4d1;
  color: var(--ink);
}
.full {
  grid-column: 1/-1;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.record {
  border-top: 1px solid #edf0e8;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  align-items: center;
}
.record:first-child {
  border-top: 0;
}
.record strong {
  font-size: 13px;
}
.record small {
  margin-top: 4px;
}
.record-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.record-right b {
  font-size: 17px;
  font-weight: 500;
}
.badge {
  font-size: 10px;
  border-radius: 5px;
  display: inline-block;
  padding: 5px 8px;
  line-height: 1.5;
}
.good {
  background: #edf4e4;
  color: #476b3f;
}
.warn {
  background: #fbf1dd;
  color: #997132;
}
.record .badge {
  max-width: 300px;
}
.notice {
  margin: 17px 0;
  padding: 15px 18px;
  background: #fff3d9;
  border: 1px solid #ead8b1;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.expense {
  flex-wrap: wrap;
}
.expense form {
  width: 100%;
  margin-bottom: 0;
  grid-template-columns: 1fr auto;
  padding-top: 8px;
}
.empty {
  text-align: center;
  padding: 25px;
  color: #98a395;
  font-size: 12px;
}
.text-button {
  color: var(--green);
  font-size: 12px;
  padding: 6px 0;
  text-decoration: underline;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 25px 0;
}
.project-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}
.project-art {
  height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    repeating-linear-gradient(30deg, transparent 0 30px, #ffffff0d 31px 32px),
    #4d6856;
  color: #c9dca8;
}
.art-1 {
  background:
    repeating-linear-gradient(-25deg, transparent 0 30px, #ffffff15 31px 32px),
    #a18d68;
  color: #f9e9ba;
}
.project-art svg {
  width: 55px;
  height: 55px;
  stroke-width: 0.8;
}
.project-art span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 11px;
}
.project-body {
  padding: 22px;
}
.project-body h2 {
  margin-bottom: 7px;
}
.project-body p {
  color: var(--muted);
  font-size: 11px;
}
.message {
  display: flex;
  gap: 18px;
}
.message p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.9;
}
.message-icon {
  padding: 10px;
  background: #edf3e7;
  color: var(--green);
  border-radius: 10px;
  height: 44px;
}
.message small {
  font-size: 11px;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.admin-tabs button {
  padding: 10px 15px;
  background: #eaf0e3;
  border-radius: 7px;
  font-size: 12px;
}
.admin-tabs button.active {
  background: var(--ink);
  color: #fff;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  font-size: 10px;
  letter-spacing: 0.3px;
  background: #f7f9f2;
  color: #72816a;
  font-weight: 500;
}
th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.report-heading p {
  font-size: 12px;
  margin: 0;
}
dl {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 18px;
  font-size: 13px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
}
.extension {
  border: 1px dashed #cbd9c1;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #728766;
  font-size: 13px;
}
.extension span:last-child {
  margin-left: auto;
}
.audit > small {
  margin-top: 8px;
}
.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.audit-grid > div {
  background: #f5f7f0;
  padding: 15px;
  border-radius: 8px;
}
.audit-grid b {
  font-size: 12px;
}
.audit-grid small {
  overflow-wrap: anywhere;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.check-label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  z-index: 20;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 8px 25px #0002;
  opacity: 0;
  pointer-events: none;
  max-width: 90vw;
  font-size: 13px;
}
#toast.show {
  opacity: 1;
}
#toast.bad {
  background: #8b3e28;
}
.bottom-nav,
.mobile-admin {
  display: none;
}
.startup-error {
  padding: 40px;
}
@media (min-width: 1450px) {
  .phone-content {
    max-width: 1000px;
  }
  .clock-card {
    padding: 34px 40px;
  }
}
@media (max-width: 1000px) {
  .rail {
    width: 185px;
    padding: 30px 15px;
  }
  .topbar {
    padding: 14px 24px;
  }
  .context {
    display: none;
  }
  main {
    padding: 28px 24px;
  }
  .controls {
    width: 100%;
    justify-content: flex-end;
  }
  .brand b {
    font-size: 16px;
  }
}
@media (max-width: 650px) {
  .demo-bar {
    font-size: 9px;
    padding: 8px 13px;
    align-items: flex-start;
    line-height: 1.7;
  }
  .demo-bar svg {
    margin-top: 1px;
  }
  .rail {
    display: none;
  }
  .shell {
    display: block;
    min-height: 100vh;
  }
  .topbar {
    min-height: 90px;
    padding: 14px 16px;
    display: block;
  }
  .mobile-brand {
    display: block;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--ink);
  }
  .controls {
    justify-content: space-between;
    gap: 8px;
  }
  .controls label:first-child {
    flex: 1;
  }
  .controls label:last-of-type {
    width: 94px;
  }
  .controls select {
    max-width: 100%;
    font-size: 10px;
    padding: 7px;
    min-height: 32px;
  }
  .controls label span {
    font-size: 9px;
  }
  .icon-button {
    font-size: 21px;
  }
  main {
    padding: 25px 18px 118px;
  }
  .greeting h1 {
    font-size: 25px;
  }
  .greeting {
    margin-bottom: 22px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .greeting p:last-child {
    font-size: 10px;
  }
  .avatar {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .clock-card {
    padding: 23px 21px;
    border-radius: 16px;
  }
  .clock-card h2 {
    font-size: 22px;
  }
  .clock-card p {
    font-size: 10px;
  }
  .clock-card .form-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
    gap: 13px;
  }
  .clock-actions {
    margin-top: 4px;
    gap: 10px;
  }
  .clock-actions button {
    padding: 13px;
    font-size: 13px;
  }
  .privacy {
    font-size: 9px !important;
    line-height: 1.7;
  }
  .clock-card label > span {
    font-size: 10px;
  }
  .clock-card select {
    font-size: 11px;
    padding: 10px;
  }
  .metrics {
    gap: 12px;
    margin: 16px 0 22px;
  }
  .metrics > div {
    padding: 17px;
  }
  .metrics small {
    font-size: 9px;
  }
  .metrics b {
    font-size: 25px;
  }
  .panel {
    padding: 20px 17px;
  }
  .panel h2 {
    font-size: 16px;
    margin-bottom: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  label > span {
    font-size: 11px;
  }
  .record {
    gap: 12px;
  }
  .record strong {
    font-size: 12px;
  }
  .record small {
    font-size: 10px;
  }
  .record-right b {
    font-size: 15px;
  }
  .record .badge {
    max-width: 150px;
    font-size: 9px;
  }
  .hint {
    font-size: 11px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffffed;
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    display: flex;
    padding: 10px 10px max(12px, env(safe-area-inset-bottom));
    z-index: 10;
  }
  .bottom-nav button {
    flex: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    color: #95a08d;
    font-size: 9px;
    padding: 6px 0;
  }
  .bottom-nav button.active {
    color: var(--green);
  }
  .bottom-nav button.active svg {
    background: #eaf1df;
    border-radius: 6px;
    box-shadow: 0 0 0 5px #eaf1df;
  }
  .bottom-nav svg {
    width: 20px;
    height: 20px;
  }
  .mobile-admin {
    display: block;
    position: fixed;
    right: 12px;
    bottom: 86px;
    background: var(--ink);
    color: #fff;
    border-radius: 25px;
    padding: 11px 15px;
    font-size: 10px;
    z-index: 9;
    box-shadow: 0 5px 15px #0002;
  }
  .project-grid {
    gap: 12px;
  }
  .project-art {
    height: 120px;
  }
  .project-body {
    padding: 15px;
  }
  .project-body h2 {
    font-size: 14px;
  }
  .project-body small {
    font-size: 9px;
  }
  .expense form {
    grid-template-columns: 1fr;
  }
  .admin-tabs {
    gap: 6px;
  }
  .admin-tabs button {
    font-size: 10px;
    padding: 9px 12px;
  }
  .wide h1 {
    font-size: 25px;
  }
  .table-wrap {
    margin-left: -5px;
    margin-right: -5px;
  }
  .audit-grid {
    grid-template-columns: 1fr;
  }
  .report-heading .secondary {
    font-size: 10px;
  }
  .message {
    gap: 12px;
  }
  .message p {
    font-size: 12px;
  }
  .message-icon {
    padding: 8px;
    height: 37px;
  }
  .message-icon svg {
    width: 20px;
    height: 20px;
  }
  #toast {
    bottom: 95px;
  }
  .extension {
    font-size: 12px;
  }
  .project-body p {
    overflow-wrap: anywhere;
  }
}
.receipt-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
}
.file-choice {
  display: block;
  padding: 12px;
  border: 1px dashed #c5d3be;
  border-radius: 7px;
  background: #f6f9f1;
  color: var(--green);
  cursor: pointer;
}
.receipt-input:focus-visible + .file-choice {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.module-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.module-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: white;
  text-align: left;
  font-size: 13px;
  color: var(--green);
}
.module-tile svg:last-child {
  margin-left: auto;
  width: 16px;
}
.evidence-record h3 {
  font-size: 13px;
  margin-top: 24px;
  color: var(--muted);
}
.evidence-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 13px;
}
.evidence-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}
.evidence-photos a {
  color: var(--green);
  text-decoration: none;
  max-width: 140px;
}
.evidence-photos img {
  width: 130px;
  height: 100px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #f7f8f2;
  border-radius: 8px;
}
.evidence-photos small {
  overflow-wrap: anywhere;
  font-size: 10px;
}
.follow-up {
  padding: 16px;
  background: #f7f9f3;
  border-radius: 9px;
  margin: 10px 0;
}
.follow-up p {
  margin-bottom: 8px;
}
.preview-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 18px;
}
.preview-counts span {
  background: #f4f6eb;
  padding: 8px;
  border-radius: 6px;
}
.csv-identities {
  margin-bottom: 16px;
}
.csv-identities small {
  overflow-wrap: anywhere;
}
.panel .table-wrap + button {
  margin-top: 18px;
}
/* Mobile-first employee launcher; desktop management remains full width. */
.mobile-home {
  max-width: 560px;
  margin: 0 auto;
}
.home-area {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 22px;
}
.home-area span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mobile-home h1 {
  font-size: 26px;
  margin-bottom: 22px;
}
.home-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.menu-extra {
  margin-top: 12px;
}
.feature-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.feature-heading h1 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.feature-home {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--green);
  display: grid;
  place-items: center;
  padding: 10px;
}
.feature-home svg {
  width: 24px;
  height: 24px;
}
.feature-home:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.home-module {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  font-size: 13px;
}
.home-module:hover:enabled {
  border-color: var(--green);
  background: #f0f5e9;
}
.module-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: #edf3e5;
  color: var(--green);
}
.module-icon > svg {
  width: 65px;
  height: 65px;
}
.module-lock {
  position: absolute;
  right: -6px;
  bottom: -2px;
  background: #eee;
  border-radius: 50%;
  padding: 2px;
  display: flex;
}
.module-lock svg {
  width: 15px;
  height: 15px;
}
.home-module:disabled {
  opacity: 1;
  background: #eeefec;
  color: #92978f;
}
.home-module:disabled .module-icon {
  background: #e4e6e1;
  color: #92978f;
}
.home-module small {
  font-size: 10px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.menu-list {
  margin: 20px 0;
  border-radius: 16px;
  background: white;
  padding: 8px 16px;
}
.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.round-clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0;
}
.round-clock {
  border-radius: 50%;
  width: 210px;
  height: 210px;
  background: var(--lime);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 0 0 12px #ffffff15;
  font-size: 25px;
}
.round-clock small {
  color: inherit;
  font-size: 20px;
}
.round-clock [data-clock-title] {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 190px;
  overflow-wrap: anywhere;
}
.round-clock.on-duty {
  background: #e5efdd;
}
.round-clock-wrap p {
  margin: 24px 0 0;
  text-align: center;
}
@media (max-width: 700px) {
  .topbar {
    padding: 10px 18px;
    min-height: 56px;
  }
  .topbar .context {
    display: none;
  }
  .topbar .controls {
    flex: 0 1 auto;
  }
  .topbar .controls label {
    min-width: 0;
  }
  .topbar .controls label > span {
    display: none;
  }
  .topbar .controls select {
    max-width: 125px;
  }
  .phone-content {
    padding-top: 14px;
  }
  .demo-bar {
    font-size: 10px;
  }
  .home-area {
    margin-bottom: 14px;
  }
  .mobile-home h1 {
    margin-bottom: 16px;
  }
  .home-modules {
    gap: 10px;
  }
  .home-module {
    min-height: 108px;
  }
}
@media (max-width: 700px) {
  .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .mobile-brand {
    margin-bottom: 0;
  }
}

.home-module {
  min-height: 128px;
  padding: 8px 6px;
  gap: 4px;
}

/* Stop native overscroll reload; custom touch handling only claims a downward
   gesture started at the document top, outside controls and nested scrollers. */
html,
body {
  overscroll-behavior-y: none;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr 76px;
  gap: 16px;
}
.group-wordmark {
  text-align: center;
  min-width: 0;
  color: var(--ink);
}
.group-wordmark b {
  font-size: 17px;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.desktop-context {
  font-size: 10px;
  margin-top: 4px;
}
.nsg-placeholder {
  border: 1px dashed #9aa89f;
  padding: 4px;
  text-align: center;
  color: var(--muted);
}
.nsg-placeholder span {
  font-size: 13px;
}
.nsg-placeholder small {
  font-size: 9px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
#refresh-status {
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 20px #173f3520;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}
#refresh-status[hidden] {
  display: none;
}
#refresh-status[data-state="refreshFailed"] {
  border-color: #b8864a;
}
@media (max-width: 700px) {
  .topbar {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 62px;
    gap: 8px;
    padding: 10px 18px;
    min-height: 56px;
  }
  .topbar .controls,
  .topbar .controls label {
    width: 100%;
    min-width: 0;
  }
  .topbar .controls select {
    width: 100%;
    max-width: 100%;
    font-size: 11px;
    padding: 7px 4px;
  }
  .group-wordmark b {
    font-size: 13px;
    letter-spacing: 0.3px;
  }
  .desktop-context {
    display: none;
  }
}

.workflow-record {
  overflow-wrap: anywhere;
}
.workflow-record form {
  margin-top: 1rem;
  border-top: 1px solid var(--line, #ddd);
  padding-top: 1rem;
}
.workflow-record pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
  font-size: 0.75rem;
}
.workflow-record details {
  margin: 0.75rem 0;
}
.workflow-record small {
  display: block;
  overflow-wrap: anywhere;
}

.pc-record {
  overflow-wrap: anywhere;
}
.pc-record form {
  margin-top: 1rem;
  border-top: 1px solid #dde3df;
  padding-top: 0.8rem;
}
.pc-photo,
.pc-record video,
.evidence-record video {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  margin: 0.5rem 0;
}
select[multiple] {
  min-height: 100px;
  max-width: 100%;
}

/* Authentication screens use the same mobile layout; no protected data is cached. */
.auth-screen {
  max-width: 440px;
  margin: 5vh auto;
  padding: 24px;
  width: calc(100% - 24px);
}
.auth-screen header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.auth-screen header select {
  max-width: 160px;
}
.auth-screen .form-grid {
  grid-template-columns: minmax(0, 1fr);
}
.auth-screen input {
  min-width: 0;
  width: 100%;
}
body {
  padding-bottom: env(safe-area-inset-bottom);
}

.time-dialog{width:min(360px,calc(100vw - 32px));border:0;border-radius:20px;padding:20px;color:var(--ink,#182536)}
.time-dialog::backdrop{background:#17253688}.time-wheels{display:grid;grid-template-columns:1fr 1fr;gap:18px;text-align:center}
.time-wheel{height:220px;overflow-y:auto;overscroll-behavior:contain;scroll-snap-type:y mandatory;padding:88px 0;box-sizing:border-box;background:#f2f5f8;border-radius:12px;scrollbar-width:none}
.time-wheel button{display:block;width:100%;height:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#536274;scroll-snap-align:center;font-size:22px;line-height:44px}
.time-wheel button[aria-selected=true]{font-weight:800;color:#172d47;background:#dce7f2}.time-wheel:focus-visible,.time-picker-open:focus-visible{outline:3px solid #1878bb;outline-offset:3px}
.time-actions{display:flex;gap:8px;justify-content:flex-end}.time-actions button{min-height:44px}.time-picker-open{text-align:left;min-height:44px;background:#f6f8fa;color:#20344b;border:1px solid #cbd5df}
.time-repeat[hidden]{display:none}.time-dialog [data-time-error]{color:#ab2323}

.brand-logo{display:block;width:160px;height:auto}.header-logo{display:block;width:100%;max-width:90px;height:auto;object-fit:contain}@media(max-width:800px){.brand-logo{width:52px}}

.personal-profile details{margin-top:16px}.personal-profile form{display:grid;gap:12px;margin:16px 0}.profile-document{border-top:1px solid #dce3de;padding:14px 0;overflow-wrap:anywhere}.profile-document a,.profile-document small{display:block;margin-top:8px}

.company-field{padding:10px 0;border-bottom:1px solid #e0e6e1;overflow-wrap:anywhere}.company-field dd{margin-left:0}.company-field button,.company-field a{display:inline-block;min-height:36px}.personal-profile dd{overflow-wrap:anywhere}[data-form="company-info"]{display:grid;gap:12px;margin:16px 0}

@media(max-width:600px){dl.company-details{grid-template-columns:minmax(0,1fr)}}
