:root {
  color-scheme: light;
  --ink: #202437;
  --muted: #6c7285;
  --line: #dfe3ee;
  --panel: #ffffff;
  --page: #f3f6fb;
  --primary: #2357c6;
  --primary-dark: #153f9a;
  --in: #147d64;
  --out: #a84242;
  --warn: #9b5c00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.auth-panel,
.dashboard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(24, 31, 54, 0.08);
}

.auth-panel {
  width: min(480px, 100%);
  margin: 56px auto;
  padding: 28px;
}

.brand,
.topbar,
.actions,
.month-tools {
  display: flex;
  gap: 16px;
}

.brand {
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

h1,
p {
  margin: 0;
}

.brand h1,
.topbar h1 {
  font-size: 26px;
  line-height: 1.25;
}

.brand p,
.eyebrow,
.current-clock,
.hint,
.message,
.field span,
.month-tools span {
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  padding: 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: #e9eefb;
  color: var(--primary-dark);
  font-weight: 700;
}

.auth-form,
.field {
  display: grid;
  gap: 10px;
}

.auth-form {
  gap: 16px;
}

.field input,
.month-tools input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
}

.primary-button,
.secondary-button,
.ghost-button,
.stamp-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  padding: 14px 18px;
  background: var(--primary);
  color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--primary-dark);
}

.dashboard {
  padding: 24px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.current-clock {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
}

.ghost-button,
.secondary-button {
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stamp-button {
  min-height: 128px;
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 24px;
  color: #fff;
  text-align: left;
}

.stamp-button span {
  font-size: 18px;
}

.stamp-button strong {
  font-size: 36px;
  line-height: 1.1;
}

.stamp-button.in {
  background: var(--in);
}

.stamp-button.out {
  background: var(--out);
}

.month-tools {
  align-items: end;
  margin-bottom: 12px;
}

.month-tools label {
  display: grid;
  flex: 1;
  gap: 8px;
}

.message {
  min-height: 24px;
  margin: 4px 0 12px;
}

.message.error {
  color: var(--out);
}

.message.success {
  color: var(--in);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: #f8f9fc;
  color: var(--muted);
  font-size: 13px;
}

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

.status-normal {
  color: var(--in);
  font-weight: 700;
}

.status-warn {
  color: var(--warn);
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0;
  }

  .auth-panel {
    margin: 18px auto;
    padding: 18px;
  }

  .dashboard {
    padding: 16px;
  }

  .topbar,
  .month-tools {
    align-items: stretch;
    flex-direction: column;
  }

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