:root {
  --bg: #f3f6f4;
  --ink: #14201a;
  --muted: #5a6b62;
  --accent: #1f7a4c;
  --accent-press: #165c39;
  --client: #2a5f8f;
  --client-press: #1e476c;
  --danger: #a33b3b;
  --card: #ffffff;
  --line: #d5e0d9;
  --radius: 16px;
  --font-display: "Iowan Old Style", "Apple Garamond", "Times New Roman", serif;
  --font-body: "Rubik", "Segoe UI", Tahoma, "Arial Hebrew", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1000px 520px at 100% -8%, #d9efe3 0%, transparent 55%),
    radial-gradient(800px 420px at -8% 108%, #e4ecf4 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  min-height: 100dvh;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, white);
  outline-offset: 3px;
}

.wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 0.75rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--muted);
}

.center {
  flex: 1;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.5rem;
  box-shadow: 0 12px 36px rgba(20, 32, 26, 0.06);
}

.login-card h1,
.admin h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
}

.login-card p,
.lede {
  margin: 0 0 1.1rem;
  color: var(--muted);
  line-height: 1.45;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.note-hint {
  margin: -0.4rem 0 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.note-hint.required {
  color: var(--danger);
}

.punch-shell {
  width: min(720px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.who {
  color: var(--muted);
  font-size: 1rem;
}

.actions {
  width: min(85vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.giant {
  width: 100%;
  min-height: min(42vh, 280px);
  border: 0;
  border-radius: 28px;
  background: linear-gradient(160deg, #24945c, var(--accent));
  color: #fff;
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow:
    0 16px 36px rgba(31, 122, 76, 0.32),
    inset 0 -6px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.giant.client {
  min-height: auto;
  padding: 1.1rem 1rem;
  font-size: clamp(1.05rem, 3.5vw, 1.35rem);
  font-weight: 700;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #3a7aad, var(--client));
  box-shadow: 0 10px 24px rgba(42, 95, 143, 0.28);
}

.giant:active:not(:disabled) {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.giant:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-submit {
  width: 100%;
  min-height: auto;
  padding: 1rem;
  font-size: 1.35rem;
  border-radius: var(--radius);
}

.ghost {
  background: transparent;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.err {
  color: var(--danger);
  min-height: 1.25rem;
  font-size: 0.95rem;
}

.ok {
  color: var(--accent);
  font-size: 0.95rem;
  min-height: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ok.show {
  opacity: 1;
}

.note-box {
  width: min(85vw, 420px);
  text-align: start;
}

.admin {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font: inherit;
}

.tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
}

.filters,
.row-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: end;
}

.filters button,
.panel button.primary,
.row-form button.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font: inherit;
}

.filters button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.4rem;
  text-align: start;
  vertical-align: top;
}

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent-press);
  font-size: 0.8rem;
}

.badge.client {
  background: color-mix(in srgb, var(--client) 14%, white);
  color: var(--client-press);
}

.badge.missing {
  background: color-mix(in srgb, var(--danger) 12%, white);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .giant,
  .ok {
    transition: none;
  }
}

@media (max-width: 390px) {
  .wrap,
  .admin {
    padding: 0.85rem;
  }

  .giant {
    min-height: 38vh;
  }
}
