:root {
  --bg: #f4efe7;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffdf8;
  --line: rgba(76, 54, 34, 0.14);
  --text: #26190f;
  --muted: #6f6257;
  --brand: #bf5b2c;
  --brand-strong: #9f4318;
  --accent: #1f6a5a;
  --accent-strong: #174f44;
  --danger: #b33a3a;
  --danger-soft: rgba(179, 58, 58, 0.12);
  --shadow: 0 20px 60px rgba(88, 53, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(191, 91, 44, 0.18), transparent 28%),
    radial-gradient(circle at right, rgba(31, 106, 90, 0.16), transparent 32%),
    linear-gradient(180deg, #fbf6ee 0%, #f2eadf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.45;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 18px 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-copy,
.panel,
.stat-card,
.metric-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy,
.panel {
  border-radius: 28px;
}

.hero-copy {
  padding: 28px;
  min-width: 0;
}

.eyebrow,
.section-kicker,
label span,
thead th,
.empty-state,
.hint-box,
.metric-card span,
.muted-line {
  letter-spacing: 0.04em;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.02;
  max-width: 14ch;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.45rem;
}

.hero-text,
.muted-line {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.hero-text {
  margin-top: 18px;
  max-width: 56ch;
  font-size: 1.03rem;
}

.hero-stats,
.stats-grid {
  display: grid;
  gap: 16px;
}

.hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 166px;
  min-width: 0;
  overflow: hidden;
}

.stat-card.accent {
  background: linear-gradient(180deg, rgba(191, 91, 44, 0.92), rgba(147, 54, 21, 0.94));
  color: #fff8f4;
}

.stat-label,
.stat-foot,
label span,
thead th,
.empty-state,
.hint-box,
.metric-card span {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.stat-card strong,
.metric-card strong {
  font-size: 1.9rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.auth-card {
  max-width: 560px;
  margin: 0 auto 24px;
}

.app-shell[hidden],
.panel[hidden],
.empty-state[hidden] {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
}

.stack {
  display: grid;
  gap: 24px;
}

.panel {
  padding: 24px;
  min-width: 0;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head.split,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar {
  margin-bottom: 24px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.idle {
  background: rgba(38, 25, 15, 0.08);
  color: var(--muted);
}

.status-badge.running {
  background: rgba(31, 106, 90, 0.14);
  color: var(--accent);
}

.form-grid,
.filter-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.compact {
  grid-template-columns: 1fr;
}

.filter-grid,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid {
  margin-bottom: 16px;
}

.metric-card {
  border-radius: 20px;
  padding: 18px;
  min-width: 0;
}

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

.clock-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-self: end;
}

.clock-actions button {
  width: 100%;
}

.inline-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.compact-btn {
  min-height: 50px;
  white-space: nowrap;
}

.field-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.top-gap {
  margin-top: 18px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(76, 54, 34, 0.12);
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--text);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(191, 91, 44, 0.5);
  box-shadow: 0 0 0 4px rgba(191, 91, 44, 0.12);
}

button {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.delete-btn {
  min-height: 50px;
  padding: 12px 16px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.secondary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f1fbf8;
}

.ghost-btn {
  background: rgba(38, 25, 15, 0.06);
  color: var(--text);
}

.delete-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
}

.result-box,
.hint-box {
  background: linear-gradient(135deg, rgba(191, 91, 44, 0.1), rgba(31, 106, 90, 0.08));
  border: 1px solid rgba(76, 54, 34, 0.09);
  border-radius: 20px;
  padding: 16px 18px;
}

.hint-box {
  margin-top: 16px;
}

.panel-divider {
  height: 1px;
  margin: 22px 0;
  background: rgba(76, 54, 34, 0.12);
}

.result-box span,
.result-box small {
  display: block;
}

.result-box span,
.result-box small,
.muted {
  color: var(--muted);
}

.result-box strong {
  font-size: 2rem;
}

.card-list {
  display: grid;
  gap: 12px;
}

.employee-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(76, 54, 34, 0.11);
  min-width: 0;
}

.employee-name {
  font-weight: 700;
}

.employee-sub {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.employee-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.employee-reset {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}

.employee-reset input {
  min-height: 42px;
}

.warning-note {
  color: var(--brand-strong);
  font-weight: 700;
}

.empty-state {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(76, 54, 34, 0.2);
  color: var(--muted);
  background: rgba(255, 253, 248, 0.55);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

thead th {
  text-align: left;
  color: var(--muted);
  padding: 0 0 12px;
}

tbody td {
  border-top: 1px solid rgba(76, 54, 34, 0.09);
  padding: 14px 0;
  vertical-align: top;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.strong {
  font-weight: 700;
}

.positive {
  color: var(--accent);
  font-weight: 700;
}

.negative {
  color: var(--danger);
  font-weight: 700;
}

.neutral {
  color: var(--text);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: rgba(31, 106, 90, 0.96);
  box-shadow: var(--shadow);
}

.toast.error {
  background: rgba(179, 58, 58, 0.96);
}

@media (max-width: 1080px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 18px 14px 40px;
  }

  .hero-stats,
  .form-grid,
  .filter-grid,
  .stats-grid,
  .clock-grid,
  .clock-actions,
  .inline-actions,
  .employee-reset {
    grid-template-columns: 1fr;
  }

  .panel-head.split,
  .toolbar,
  .employee-card {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    max-width: none;
  }
}
