:root {
  --bg: oklch(97.2% 0.008 151);
  --card: oklch(99.4% 0.004 151);
  --surface-muted: oklch(96.2% 0.009 151);
  --surface-chrome: oklch(98.5% 0.006 151);
  --text: oklch(24% 0.02 157);
  --muted: oklch(50% 0.018 157);
  --line: oklch(89.5% 0.012 151);
  --line-strong: oklch(83.5% 0.018 151);
  --green: oklch(47% 0.118 151);
  --green-dark: oklch(39% 0.105 151);
  --green-soft: oklch(94.8% 0.027 151);
  --green-soft-2: oklch(97% 0.014 151);
  --orange: oklch(61% 0.125 68);
  --orange-soft: oklch(96.5% 0.035 78);
  --blue: oklch(52% 0.115 250);
  --blue-soft: oklch(96% 0.025 250);
  --red: oklch(52% 0.15 25);
  --red-soft: oklch(96.2% 0.03 25);
  --shadow: none;
  --phone-width: 480px;
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

.mobile-shell {
  background: var(--bg);
}

.login-card {
  border-color: var(--line);
  background: var(--card);
  box-shadow: none;
  backdrop-filter: none;
}

.app-header {
  background: var(--surface-chrome);
  border-color: var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 20px 0;
  padding: 11px 12px;
  border: 1px solid oklch(86% 0.055 25);
  border-radius: 7px;
  background: var(--red-soft);
  color: oklch(44% 0.13 25);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.connection-status .material-symbols-rounded {
  flex: none;
  font-size: 20px;
}

.header-row {
  min-height: 44px;
}

.brand-inline {
  gap: 10px;
}

.brand-inline h1 {
  color: var(--text);
  font-size: 17px;
  font-weight: 710;
  letter-spacing: 0;
}

.mini-logo {
  width: 40px;
  height: 40px;
}

.icon-btn,
.avatar-chip {
  width: 40px;
  height: 40px;
  border-color: var(--line);
  background: var(--card);
  color: var(--green-dark);
  box-shadow: none;
}

.page,
.page-no-nav {
  padding-left: 20px;
  padding-right: 20px;
}

.page-title-row {
  margin-bottom: 18px;
}

.page-title-row h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 730;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-sub {
  max-width: 65ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.section-card,
.employee-strip,
.branch-card,
.date-card,
.notice-card,
.timer-card,
.quick-card,
.break-card,
.selfie-proof-card,
.summary-card,
.summary-proof,
.history-card,
.request-form-card,
.shift-picker-card,
.today-shift-card,
.schedule-day-card,
.loading-card,
.camera-tip {
  border-color: var(--line);
  background: var(--card);
  box-shadow: none;
}

.employee-strip {
  gap: 12px;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.avatar {
  background: var(--green-soft);
  color: var(--green-dark);
}

.strip-name {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  font-weight: 690;
}

.strip-sub {
  color: var(--muted);
  font-size: 13px;
}

.strip-sub .material-symbols-rounded {
  color: var(--green-dark);
}

.employee-action-state {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.time-in-primary-action {
  width: 100%;
  min-height: 58px;
  margin: 16px 0 0;
  font-size: 17px;
}

#timeInPage {
  overflow: hidden;
}

.time-in-employee-strip {
  display: none;
}

#timeInPage .today-shift-card {
  padding: 14px 0;
}

#timeInPage .shift-picker-card {
  margin: 12px 0 0;
  padding: 12px;
}

.employee-action-state.compact {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  margin: 14px 0 0;
  padding: 10px 12px;
}

.employee-action-state.compact .employee-action-icon {
  width: 34px;
  height: 34px;
}

.employee-action-state.compact .employee-action-copy strong {
  font-size: 14px;
}

.employee-action-state.ready {
  border-color: oklch(84% 0.055 151);
  background: var(--green-soft);
}

.employee-action-state.blocked {
  border-color: oklch(88% 0.05 78);
  background: var(--orange-soft);
}

.employee-action-state.info {
  border-color: oklch(86% 0.04 250);
  background: var(--blue-soft);
}

.employee-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--card);
  color: var(--green-dark);
  font-size: 21px;
}

.employee-action-state.blocked .employee-action-icon {
  color: oklch(48% 0.105 68);
}

.employee-action-copy,
.employee-action-copy strong,
.employee-action-copy span {
  display: block;
  min-width: 0;
}

.employee-action-copy strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 720;
  line-height: 1.25;
}

.employee-action-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.readiness-panel {
  margin-bottom: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.readiness-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.readiness-head p {
  max-width: 36ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.readiness-count {
  flex: none;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  white-space: nowrap;
}

.readiness-list {
  display: grid;
}

.readiness-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 52px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.readiness-item > .material-symbols-rounded {
  color: oklch(58% 0.02 157);
  font-size: 20px;
}

.readiness-item.ready > .material-symbols-rounded {
  color: var(--green);
}

.readiness-item strong,
.readiness-item small {
  display: block;
}

.readiness-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.25;
}

.readiness-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 480;
  line-height: 1.35;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
select,
textarea {
  min-height: 48px;
  height: auto;
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: oklch(62% 0.014 157);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px oklch(47% 0.118 151 / 0.14);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.btn {
  min-height: 50px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.btn-primary,
.btn-soft {
  background: var(--green);
  color: oklch(98.5% 0.006 151);
  box-shadow: none;
}

.btn-primary:hover:not(:disabled),
.btn-soft:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: none;
  transform: none;
}

.btn-outline {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--green-dark);
  box-shadow: none;
}

.btn-danger {
  background: var(--red);
  box-shadow: none;
}

@media (hover: hover) {
  .btn:not(:disabled):hover,
  .branch-card:hover,
  .icon-btn:hover,
  .back-btn:hover {
    border-color: var(--line-strong);
    box-shadow: none;
    transform: none;
  }

  .nav-btn:hover {
    background: var(--surface-muted);
    color: var(--green-dark);
  }
}

.message {
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 580;
  box-shadow: none;
}

.message.info {
  background: var(--blue-soft);
  border-color: oklch(86% 0.04 250);
  color: oklch(40% 0.08 250);
}

.message.success {
  background: var(--green-soft);
  border-color: oklch(84% 0.055 151);
  color: var(--green-dark);
}

.message.error {
  background: var(--red-soft);
  border-color: oklch(86% 0.055 25);
  color: oklch(44% 0.13 25);
}

.today-shift-card {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.today-shift-icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.today-shift-kicker,
.schedule-day-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 660;
  letter-spacing: 0;
}

.today-shift-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.schedule-chip {
  border-color: var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: oklch(39% 0.02 157);
  font-weight: 620;
}

.schedule-chip .material-symbols-rounded {
  color: var(--green-dark);
}

.date-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 3px 12px;
  padding: 18px;
  text-align: left;
}

.date-card .circle-icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.date-card .date-label,
.date-card .date-main,
.date-card .date-day {
  grid-column: 2;
  margin: 0;
}

.date-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.date-main {
  color: var(--text);
  font-size: 21px;
  font-weight: 710;
  letter-spacing: 0;
}

.date-day {
  color: var(--muted);
  font-size: 13px;
}

.date-card .btn {
  grid-column: 1 / -1;
  margin-top: 15px;
}

#timeInBtn:disabled {
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  opacity: 1;
}

.notice-card {
  gap: 12px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.notice-icon,
.circle-icon {
  background: var(--green-soft);
  color: var(--green-dark);
}

.notice-icon {
  width: 42px;
  height: 42px;
  border-radius: 7px;
}

.notice-title,
.proof-title,
.request-title,
.shift-picker-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 690;
}

.notice-text,
.proof-sub,
.request-copy,
.shift-picker-copy,
.lock-note {
  color: var(--muted);
  font-size: 13px;
}

.status-banner {
  border-color: oklch(84% 0.055 151);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 650;
}

#shiftStatusBanner span {
  min-width: 0;
}

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

.timer-value {
  color: var(--text);
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.timer-label,
.quick-label {
  color: var(--muted);
}

.quick-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
}

.quick-card {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.quick-card:last-child {
  border-right: 0;
}

.quick-value {
  color: var(--text);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.status-pill,
.verification-line {
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 660;
}

.status-pill,
.verification-line.verified {
  background: var(--green-soft);
  border-color: oklch(86% 0.045 151);
  color: var(--green-dark);
}

.status-pill.missed,
.verification-line.flagged,
.verification-line.declined {
  background: var(--red-soft);
  border-color: oklch(87% 0.05 25);
  color: oklch(46% 0.13 25);
}

.verification-line.pending {
  background: var(--orange-soft);
  border-color: oklch(88% 0.055 78);
  color: oklch(48% 0.105 68);
}

.summary-card {
  overflow: hidden;
  padding: 0 16px;
}

.summary-row {
  min-height: 56px;
  border-color: var(--line);
}

.language-setting {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 14px 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.language-setting > .material-symbols-rounded {
  color: var(--green-dark);
  font-size: 21px;
}

.language-setting label {
  color: var(--text);
  font-size: 14px;
  font-weight: 670;
}

.language-setting select {
  min-width: 112px;
  min-height: 40px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background-color: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.camera-page {
  height: 100svh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  overflow: hidden;
  padding: calc(var(--safe-top) + 12px) 16px calc(14px + var(--safe-bottom));
}

.camera-page .page-title-row,
.camera-frame,
.camera-page .message {
  margin: 0;
}

.camera-frame,
.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.camera-frame {
  max-height: 620px;
}

.camera-actions {
  grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
}

.camera-actions .btn {
  min-width: 0;
  min-height: 54px;
  padding-left: 10px;
  padding-right: 10px;
}

.face-validation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #d9e1dd;
  border-radius: 8px;
  background: #f7f9f8;
  color: #49564f;
  font-size: 14px;
  font-weight: 700;
}

.face-validation-status.valid {
  border-color: #a9d9bb;
  background: #eef8f1;
  color: #17683a;
}

.face-validation-status.invalid {
  border-color: #efc1c1;
  background: #fff4f4;
  color: #a12e2e;
}

.face-validation-status .material-symbols-rounded {
  flex: 0 0 auto;
  font-size: 20px;
}

.summary-left {
  color: var(--muted);
  font-weight: 560;
}

.summary-value {
  color: var(--text);
  font-weight: 670;
  font-variant-numeric: tabular-nums;
}

.total-box {
  margin: 0 -16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-muted);
}

.total-box strong {
  color: var(--green-dark);
  font-weight: 720;
  letter-spacing: 0;
}

.history-card {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.history-card,
.schedule-day-card,
.request-form-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.history-date {
  color: var(--text);
  font-weight: 680;
}

.history-sub,
.history-label {
  color: var(--muted);
}

.history-times {
  border-color: var(--line);
}

.history-value {
  color: var(--text);
  font-weight: 660;
  font-variant-numeric: tabular-nums;
}

.request-form-card {
  padding: 18px;
}

.request-status-box {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-weight: 590;
}

.schedule-week-list {
  gap: 0;
}

.schedule-day-card {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.schedule-day-card.today {
  padding: 16px;
  border: 1px solid oklch(84% 0.055 151);
  background: var(--green-soft-2);
}

.empty {
  border: 1px dashed var(--line-strong);
  background: var(--surface-muted);
  color: var(--muted);
  box-shadow: none;
}

.bottom-nav {
  border-color: var(--line);
  background: var(--surface-chrome);
  box-shadow: none;
  backdrop-filter: none;
  padding-top: 7px;
  gap: 2px;
}

.nav-btn {
  min-width: 0;
  min-height: 56px;
  padding: 7px 2px;
  gap: 5px;
  color: var(--muted);
}

.nav-btn .material-symbols-rounded {
  font-size: 22px;
}

.nav-btn span.label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: 10px;
  font-weight: 570;
  white-space: nowrap;
}

.nav-btn.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.app-loading-overlay {
  background: oklch(24% 0.02 157 / 0.34);
  backdrop-filter: none;
}

.loading-spinner {
  border-color: var(--line);
  border-top-color: var(--green);
}

.loading-title {
  color: var(--text);
  font-weight: 690;
}

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

.leave-work-dialog {
  border-color: var(--line);
  background: var(--card);
}

.low-resource-mode button,
.low-resource-mode input,
.low-resource-mode select,
.low-resource-mode textarea,
.low-resource-mode .nav-btn,
.low-resource-mode .branch-card,
.low-resource-mode .employee-action-state {
  transition: none !important;
}

.low-resource-mode .mobile-shell,
.low-resource-mode .app-header,
.low-resource-mode .bottom-nav {
  box-shadow: none !important;
  backdrop-filter: none !important;
}

@media (max-width: 360px) {
  .page,
  .page-no-nav {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .quick-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-card:last-child {
    border-bottom: 0;
  }

  .history-top {
    flex-direction: column;
  }

  .history-top > div:last-child {
    align-items: flex-start !important;
  }

  .bottom-nav {
    padding-left: 6px;
    padding-right: 6px;
  }

  .camera-actions {
    grid-template-columns: minmax(86px, 0.75fr) minmax(0, 1.5fr);
  }

  .nav-btn span.label {
    font-size: 9px;
  }
}

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