:root {
  --bg: #f6f2ea;
  --surface: #fffaf2;
  --surface-2: #eee5d8;
  --text: #15110d;
  --muted: #6e6255;
  --border: #ddd0bf;
  --primary: #111111;
  --primary-contrast: #ffffff;
  --danger: #9b1c1c;
  --success: #176b3a;
  --warning: #8a5b0a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(35, 24, 13, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -0.04em; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--text); color: var(--surface); font-weight: 900; }
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button { text-decoration: none; border: 0; background: transparent; padding: 9px 11px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.nav a.active, .nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--text); }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 54px; }
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: stretch; padding: 42px 0 20px; }
.hero-copy { padding: 34px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700; }
h1, h2, h3 { margin: 0; line-height: 1.04; letter-spacing: -0.055em; }
h1 { margin-top: 18px; font-size: clamp(42px, 7vw, 78px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 22px; }
p { color: var(--muted); margin: 12px 0 0; }
.lead { font-size: 19px; max-width: 720px; }
.actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 11px 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 11px; min-height: 36px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.preview-card { border-radius: 28px; overflow: hidden; background: #15110d; color: #fff; box-shadow: var(--shadow); min-height: 420px; display: flex; flex-direction: column; }
.preview-cover { min-height: 180px; background: linear-gradient(135deg, #111, #5d3b1f); padding: 24px; display: flex; align-items: flex-end; }
.preview-cover h3 { color: #fff; font-size: 36px; max-width: 420px; }
.preview-body { padding: 22px; display: grid; gap: 12px; }
.preview-service { display: flex; justify-content: space-between; gap: 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 13px; }
.preview-service span { color: rgba(255,255,255,.7); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 28px rgba(35, 24, 13, 0.06); }
.card.compact { padding: 14px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.kpi { display: grid; gap: 4px; }
.kpi strong { font-size: 30px; letter-spacing: -0.05em; }
.kpi span { color: var(--muted); font-size: 14px; }

.form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; }
label { font-weight: 800; font-size: 14px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fffdf9;
  border-radius: 14px;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17,17,17,.1); }
.help { font-size: 13px; color: var(--muted); }
.alert { border-radius: 16px; padding: 12px 14px; border: 1px solid var(--border); background: var(--surface-2); }
.alert.error { color: var(--danger); border-color: rgba(155,28,28,.25); background: rgba(155,28,28,.07); }
.alert.success { color: var(--success); border-color: rgba(23,107,58,.24); background: rgba(23,107,58,.07); }
.alert.warning { color: var(--warning); border-color: rgba(138,91,10,.24); background: rgba(138,91,10,.08); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 900; background: var(--surface-2); color: var(--muted); }
.badge.new { background: #fff2c2; color: #725100; }
.badge.confirmed { background: #dff7e9; color: #176b3a; }
.badge.done { background: #e2ebff; color: #254083; }
.badge.cancelled { background: #ffe1e1; color: #9b1c1c; }

.public-page { background: #fffaf2; min-height: 100vh; }
.public-hero { min-height: 360px; background: #111; color: #fff; display: flex; align-items: flex-end; position: relative; overflow: hidden; }
.public-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.68)); z-index: 1; }
.public-hero-image { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .82; }
.public-hero-content { position: relative; z-index: 2; width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0; }
.public-hero h1 { color: #fff; font-size: clamp(40px, 7vw, 76px); }
.public-hero p { color: rgba(255,255,255,.82); max-width: 720px; }
.public-main { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 80px; display: grid; grid-template-columns: 1fr 370px; gap: 22px; align-items: start; }
.public-sticky { position: sticky; top: 84px; }
.service-list, .professional-list { display: grid; gap: 12px; }
.service-item, .professional-item { display: flex; gap: 14px; justify-content: space-between; border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: #fffdf9; }
.service-meta { white-space: nowrap; text-align: right; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); object-fit: cover; flex: 0 0 auto; }
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); }
.footer-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.empty { text-align: center; padding: 32px; color: var(--muted); }
.inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-dot { width: 20px; height: 20px; border-radius: 999px; border: 1px solid var(--border); display: inline-block; vertical-align: middle; }

@media (max-width: 850px) {
  .hero, .grid.cols-2, .grid.cols-3, .public-main, .form-grid { grid-template-columns: 1fr; }
  .topbar-inner { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .hero-copy { padding: 24px; }
  .public-sticky { position: static; }
  .section-head { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 44px; }
}
