:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f7f6;
  color: #10201d;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.12), transparent 260px),
    #f4f7f6;
}

button {
  font: inherit;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cad8d4;
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: #10201d;
  font: inherit;
}

input:focus {
  border-color: #0f766e;
  outline: 3px solid rgba(15, 118, 110, 0.14);
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.login-panel {
  padding-top: 18vh;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #39514c;
  font-size: 14px;
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: white;
  font-weight: 750;
}

.form-hint {
  color: #70827e;
  font-size: 13px;
  line-height: 1.5;
}

.status-panel {
  padding: 22px 2px 18px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.eyebrow {
  margin: 0;
  color: #4b635f;
  font-size: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0;
}

.clock {
  margin-top: 10px;
  color: #0f766e;
  font-size: 42px;
  font-weight: 780;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

.punch-button {
  display: flex;
  min-height: 132px;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 0;
  border-radius: 8px;
  padding: 22px;
  color: white;
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 32, 29, 0.14);
  touch-action: manipulation;
}

.punch-button:active {
  transform: translateY(1px);
}

.punch-in {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.punch-out {
  background: linear-gradient(135deg, #b45309, #be123c);
}

.button-title {
  font-size: 25px;
  font-weight: 760;
  letter-spacing: 0;
}

.button-time {
  font-size: 16px;
  opacity: 0.92;
  font-variant-numeric: tabular-nums;
}

.record-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #d9e3e0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  font-size: 18px;
}

.text-button {
  border: 1px solid #cad8d4;
  border-radius: 8px;
  background: white;
  color: #39514c;
  padding: 7px 12px;
}

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

.record-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 12px 0;
  border-top: 1px solid #edf2f0;
}

.record-item:first-child {
  border-top: 0;
}

.record-date {
  font-weight: 700;
}

.record-tag {
  align-self: start;
  border-radius: 999px;
  padding: 3px 9px;
  background: #e7f4f2;
  color: #0f766e;
  font-size: 12px;
}

.record-time {
  color: #526763;
  font-size: 14px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.delete-button {
  grid-column: 2;
  align-self: end;
  border: 1px solid #f0c5c5;
  border-radius: 8px;
  background: #fff8f8;
  color: #be123c;
  padding: 6px 10px;
  font-size: 13px;
}

.empty-state {
  padding: 18px 0 4px;
  color: #70827e;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100vw - 36px);
  transform: translate(-50%, 20px);
  border-radius: 8px;
  background: rgba(16, 32, 29, 0.92);
  color: white;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 460px) {
  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .punch-button {
    min-height: 156px;
  }
}
