:root {
  --bg: #f7f3eb;
  --card: #ffffff;
  --text: #17352b;
  --muted: #6b7a72;
  --primary: #1f5a47;
  --accent: #ed6b34;
  --border: #eadfce;
  --danger: #bb2d3b;
  --success: #198754;
  --shadow: 0 18px 45px rgba(23, 53, 43, 0.09);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: inherit; text-decoration: none; }
.admin-body { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px; background: #12382d; color: #fff; display: flex; flex-direction: column; gap: 24px; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.admin-brand span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); font-weight: 800; }
.admin-sidebar nav { display: grid; gap: 6px; }
.admin-sidebar nav a, .admin-sidebar-foot a { padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.78); }
.admin-sidebar nav a:hover, .admin-sidebar nav a.is-active { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar-foot { margin-top: auto; display: grid; gap: 6px; font-size: 14px; }
.admin-main { padding: 28px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-topbar p { margin: 0 0 4px; color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.admin-topbar h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); }
.admin-user { padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 18px; background: #fbf8f2; border: 1px solid var(--border); border-radius: 18px; }
.stat small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 8px; font-size: 32px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 800; cursor: pointer; }
.btn.secondary { background: #efe7d8; color: var(--text); }
.btn.accent { background: var(--accent); }
.btn.danger { background: var(--danger); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label span { color: var(--muted); font-weight: 800; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: #fff; color: var(--text); font: inherit; }
textarea { min-height: 110px; resize: vertical; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid; }
.alert.success { background: #eaf7ef; color: #146c43; border-color: #c6ead4; }
.alert.error { background: #fff0f1; color: #9d1c2a; border-color: #ffcbd1; }
.status { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; }
.status.active { background: #e8f7ef; color: var(--success); }
.status.inactive { background: #f4e6e8; color: var(--danger); }
.thumb { width: 78px; height: 58px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: #f5f5f5; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #12382d, #1f5a47); }
.login-card { width: min(100%, 430px); background: #fff; padding: 28px; border-radius: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.login-card h1 { margin-top: 0; }
.inline-check { display: flex; align-items: center; gap: 10px; }
.inline-check input { width: auto; }
pre.message { white-space: pre-wrap; margin: 0; font-family: inherit; max-width: 520px; }
@media (max-width: 900px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-2, .grid.cols-3, .form-grid { grid-template-columns: 1fr; }
}
.admin-brand img {
  width: auto;
  height: 44px;
  max-width: 165px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  padding: 4px 6px;
}
.login-logo-wrap { display: flex; justify-content: center; margin-bottom: 14px; }
.login-logo-wrap img { width: auto; height: 64px; max-width: 260px; object-fit: contain; }
.image-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.preview-box { min-height: 138px; border: 1px dashed var(--border); border-radius: 16px; background: #fbf8f2; padding: 12px; display: grid; gap: 8px; align-content: start; }
.preview-box strong { color: var(--text); font-size: 13px; }
.preview-box img { width: 100%; max-width: 260px; height: 92px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.preview-box small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.preview-empty { min-height: 92px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--muted); font-size: 13px; border: 1px solid var(--border); }
@media (max-width: 640px) {
  .image-compare { grid-template-columns: 1fr; }
  .admin-brand img { max-width: 210px; }
}

.brand-preview-admin {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #12382d;
  color: #fff;
}
.brand-preview-admin img {
  width: auto;
  height: 46px;
  max-width: 180px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  padding: 4px 6px;
}
.brand-preview-admin strong {
  max-width: 360px;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-toolbar { justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.brand-preview-admin {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #12382d;
  color: #fff;
}
.brand-preview-admin img {
  width: auto;
  height: 46px;
  max-width: 180px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  padding: 4px 6px;
}
.brand-preview-admin strong {
  max-width: 360px;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-toolbar h2 { margin-bottom: 4px; }
.booking-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.booking-filters a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: #fbf8f2; border: 1px solid var(--border); color: var(--muted); font-weight: 800; font-size: 13px; }
.booking-filters a.is-active, .booking-filters a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.booking-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; white-space: nowrap; background: #efe7d8; color: var(--text); }
.booking-status.status-new { background: #fff4df; color: #a46100; }
.booking-status.status-contacted { background: #eaf1ff; color: #2657a6; }
.booking-status.status-confirmed { background: #e8f7ef; color: var(--success); }
.booking-status.status-completed, .booking-status.status-done { background: #e9f7f6; color: #087d75; }
.booking-status.status-cancelled { background: #fff0f1; color: var(--danger); }
.booking-table td { min-width: 120px; }
.booking-table td:nth-child(8) { min-width: 180px; }
details summary { cursor: pointer; color: var(--primary); font-weight: 800; }

/* Demo mode */
.demo-version-badge {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 9999;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
  text-align: center;
  white-space: nowrap;
}

.admin-demo-badge { pointer-events: none; }
.demo-readonly-alert {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.demo-login-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.demo-login-shortcuts strong {
  color: var(--text);
  font-size: 14px;
}
.demo-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbf8f2;
  color: var(--text);
  text-decoration: none;
}
.demo-login-row b,
.demo-login-row small {
  display: block;
}
.demo-login-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.demo-login-row em {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}
.demo-blocked-action,
.demo-admin-body .admin-main form button[type="submit"] {
  cursor: not-allowed !important;
  filter: grayscale(.1);
  opacity: .58;
}
.demo-admin-body .admin-main input[readonly],
.demo-admin-body .admin-main textarea[readonly] {
  background: #f8f3e9;
  cursor: default;
}
.demo-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  max-width: 320px;
  padding: 13px 16px;
  border-radius: 16px;
  background: #12382d;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  font-size: 14px;
  font-weight: 800;
}
