:root {
  --primary: #1d6f56;
  --primary-dark: #0f5041;
  --primary-soft: #e8f3ef;
  --bg: #f6f5f1;
  --card: #ffffff;
  --border: #e0ded6;
  --text: #2c2c2a;
  --text-muted: #6b6a64;
  --danger: #b33;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 15, 0.05), 0 1px 3px rgba(20, 20, 15, 0.06);
  --shadow-md: 0 2px 6px rgba(20, 20, 15, 0.07), 0 4px 12px rgba(20, 20, 15, 0.06);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar .brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}

.navbar-center {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
}

.navbar-right {
  justify-self: end;
}

.navbar nav a {
  margin-left: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.navbar nav a:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }

@media (max-width: 700px) {
  .navbar { grid-template-columns: 1fr; text-align: center; gap: 8px; position: static; }
  .navbar-right { justify-self: center; }
  .navbar nav a { margin: 0 10px; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.15s ease;
}

h1 { font-size: 25px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
p.subtitle { color: var(--text-muted); margin-top: 0; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  margin-top: 12px;
}

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea { min-height: 90px; resize: vertical; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: transparent; color: var(--primary-dark); border: 1px solid var(--border); box-shadow: none; }
.btn.secondary:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn.small { padding: 6px 12px; font-size: 13px; margin-top: 0; }

.error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.success { color: var(--primary-dark); font-size: 13px; margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
tbody tr { transition: background 0.1s ease; }
tbody tr:hover { background: var(--primary-soft); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.pending { background: #fdf0d5; color: #8a5a00; }
.badge.sent { background: #dcf0e8; color: #0f5041; }

.toggle-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.toggle-row input[type=checkbox] { width: 18px; height: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.helper { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-header {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 6px;
}

.calendar-cell {
  min-height: 64px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.calendar-cell:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.calendar-cell-outside { opacity: 0.4; }
.calendar-cell-today { border-color: var(--primary-dark); border-width: 2px; }
.calendar-cell-selected { background: var(--primary-soft); border-color: var(--primary); border-width: 2px; }
.calendar-cell-date { font-weight: 600; font-size: 13px; }
.calendar-cell-count { font-size: 11px; color: var(--primary-dark); font-weight: 600; margin-top: 4px; }

@media (max-width: 700px) {
  .calendar-cell { min-height: 44px; font-size: 12px; }
}

.booking-row { padding: 4px 0; }

.booking-customer-result {
  padding: 8px;
  border: 1px solid var(--border);
  border-top: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s ease;
}
.booking-customer-result:first-child { border-top: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.booking-customer-result:last-child { border-radius: 0 0 6px 6px; }
.booking-customer-result:hover { background: var(--primary-soft); }
