* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f3f4f6;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: #111827;
  color: #fff;
  padding: 0.9rem 0;
  margin-bottom: 2rem;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header nav a {
  color: #dbeafe;
}

.user-email {
  color: #9ca3af;
  font-size: 0.9rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-header h1,
.auth-card h1,
.form-card h1 {
  margin: 0 0 0.5rem;
}

.auth-card,
.form-card,
.empty-state,
.table-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto;
}

.field {
  margin-bottom: 1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: #4b5563;
}

.btn-secondary:hover {
  background: #374151;
}

.btn-danger {
  background: #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.inline {
  display: inline;
}

.stock-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.5rem;
  margin-bottom: 0.35rem;
}

.stock-form input[type="number"] {
  width: 4.5rem;
  padding: 0.3rem 0.4rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.muted {
  color: #6b7280;
  margin-top: 1rem;
}

.muted a {
  margin-left: 0.35rem;
}

.chairs-table {
  width: 100%;
  border-collapse: collapse;
}

.chairs-table th,
.chairs-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.chairs-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}

.actions-cell {
  white-space: nowrap;
}

.actions-cell .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.empty-state {
  text-align: center;
}

@media (max-width: 800px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

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