:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f4ec;
  color: #222;
}

body {
  margin: 0;
  padding: 1.5rem;
}

h1, h2 {
  margin: 0 0 0.75rem;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.top-bar label {
  font-size: 0.9rem;
}

.name-input {
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  min-width: 140px;
}

.pill {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #fff;
  border: 1px solid #ddd;
}

main {
  max-width: 1100px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

thead {
  background: #f0e7d8;
}

th, td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:last-child td {
  border-bottom: none;
}

.dish-cell {
  font-weight: 600;
}

.dish-cell a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed #999;
}

.dish-cell a:hover {
  color: #4e6fa8;
  border-bottom-color: #4e6fa8;
}

.step-cell {
  font-size: 0.9rem;
}

.duration-input {
  width: 3.5rem;
  padding: 0.2rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  text-align: right;
  font-size: 0.85rem;
}

.timer-display {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  min-width: 4.5rem;
  display: inline-block;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

button {
  border-radius: 999px;
  border: 1px solid #ccc;
  background: linear-gradient(180deg, #fbf7ef 0%, #f4ebda 100%);
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}

button:hover {
  background: #f2e5cd;
}

button:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-start {
  border-color: #5b8a4b;
  background: #ecf7e8;
}

.btn-start:hover {
  background: #d9f0d4;
}

.btn-pause {
  border-color: #b88a2b;
  background: #fff6dd;
}

.btn-reset {
  border-color: #b0b0b0;
  background: #f7f7f7;
}

.ghost-btn {
  border-color: #c7bfae;
  background: #f7f3eb;
}

.ghost-btn:hover {
  background: #efe7d8;
}

.btn-claim {
  border-color: #4e6fa8;
  background: #e5efff;
}

.assigned {
  font-size: 0.75rem;
  color: #555;
}

.assigned span {
  font-weight: 600;
}

.row-running {
  background: #fdf7e3;
}

.row-finished {
  background: #e7fbe7;
  animation: pulse 0.6s ease-out 3;
}

.row-due-soon {
  box-shadow: inset 3px 0 0 #c77b30;
}

.is-hidden {
  display: none !important;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(88, 180, 88, 0.7); }
  100% { box-shadow: 0 0 0 12px rgba(88, 180, 88, 0); }
}

.small-note {
  font-size: 0.8rem;
  color: #555;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.5rem 0 1rem;
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  background: #fffaf0;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e5d9c4;
}

.filter-select {
  border-radius: 999px;
  padding: 0.2rem 0.4rem;
  border: 1px solid #d5c9b4;
  background: #fff;
  font-size: 0.85rem;
}

.danger-btn {
  border-color: #b54444;
  background: #ffeaea;
}

@media (max-width: 900px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  .controls-row {
    gap: 0.35rem;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
  }

  tbody tr {
    margin-bottom: 0.75rem;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #665c4d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
    margin-right: 0.5rem;
  }

  .btn-group {
    width: 100%;
    justify-content: flex-start;
  }

  .timer-display {
    font-size: 1rem;
  }

  .small-note br {
    display: none;
  }
}

.status-pill {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  display: inline-block;
  margin-left: 0.25rem;
}

/* User controls section styling */
.user-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.user-controls label {
  font-size: 0.9rem;
}
