/* Cortta — design system */
:root {
  --gold: #c9a44c;
  --gold-soft: #f0d78c;
  --gold-deep: #8f7328;
  --gold-glow: rgba(201, 164, 76, 0.28);
  --bg: #050506;
  --surface: #101014;
  --surface-2: #17171d;
  --surface-3: #1f1f27;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #faf8f4;
  --text-secondary: #b9b4ab;
  --muted: #7f7a86;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --info: #60a5fa;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px rgba(0,0,0,0.5);
  --shadow-sm: 0 10px 30px rgba(0,0,0,0.32);
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Syne", system-ui, sans-serif;
  --font-brand: "Outfit", "Manrope", system-ui, sans-serif;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 450;
  letter-spacing: -0.011em;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(201, 164, 76, 0.14), transparent 58%),
    radial-gradient(700px 480px at 0% 30%, rgba(88, 70, 180, 0.07), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(201, 164, 76, 0.04), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(201, 164, 76, 0.4);
  color: #fff;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

p { margin: 0; }

.container {
  width: min(1180px, calc(100% - 2.75rem));
  margin-inline: auto;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-mobile-only { display: none; }

/* ---------- Nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  background: rgba(5, 5, 6, 0.7);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 8px 22px var(--gold-glow);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f3e0a0, var(--gold), var(--gold-deep));
  display: grid;
  place-items: center;
  color: #1b1406;
  font-size: 1.05rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18) inset,
    0 10px 28px var(--gold-glow);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1;
}
.brand-text strong {
  font-family: var(--font-brand);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}
.brand-text small {
  font-family: var(--font-brand);
  font-size: 0.64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}
.nav-links > a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: 0.2s var(--ease);
}
.nav-links > a:not(.btn):hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.45rem;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s var(--ease), box-shadow 0.22s, background 0.22s, border-color 0.22s;
  font-family: var(--font);
  letter-spacing: -0.015em;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #f2df9b 0%, var(--gold) 45%, #b89035 100%);
  color: #1a1408;
  box-shadow: 0 12px 30px var(--gold-glow);
}
.btn-primary:hover {
  color: #1a1408;
  box-shadow: 0 16px 36px rgba(201, 164, 76, 0.42);
}
.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(201, 164, 76, 0.55);
  color: var(--gold-soft);
  background: rgba(201, 164, 76, 0.07);
}
.btn-danger {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.16); }
.btn-sm { padding: 0.48rem 0.95rem; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.75rem, 9vw, 7.5rem) 0 clamp(3.25rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, var(--bg)),
    radial-gradient(ellipse 65% 55% at 72% 0%, rgba(201, 164, 76, 0.2), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 164, 76, 0.35);
  background: rgba(201, 164, 76, 0.1);
  color: var(--gold-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  margin: 0 0 1.1rem;
  max-width: 16ch;
  letter-spacing: -0.03em;
  line-height: 1.12;
  background: linear-gradient(165deg, #ffffff 15%, #f4e5b2 55%, var(--gold) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  color: var(--text-secondary);
  font-size: 1.08rem;
  font-weight: 500;
  max-width: 40ch;
  margin: 0 0 2.1rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-panel {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(165deg, rgba(255,255,255,0.07), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 1.7rem;
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  top: -80px;
  background: radial-gradient(circle, var(--gold-glow), transparent 68%);
  pointer-events: none;
}
.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.hero-stat {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem 0.7rem;
  text-align: center;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gold-soft);
  line-height: 1;
}
.hero-stat span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.hero-preview-line {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}
.hero-preview-line:last-of-type { border-bottom: none; }
.hero-dot {
  width: 11px;
  height: 11px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 16px var(--gold-glow);
  flex-shrink: 0;
}
.hero-preview-line p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.45;
}
.hero-preview-line strong {
  color: var(--text);
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -0.02em;
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { max-width: none; }
}

/* ---------- Sections ---------- */
.section { padding: 3rem 0 4.5rem; }
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.028em;
}
.section-title p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.98rem;
}
.eyebrow {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
}

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 920px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 45%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
  box-shadow: var(--shadow-sm);
}
.card-soft { background: var(--surface-2); }

.feature-card {
  padding: 1.8rem 1.55rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s;
}
.feature-card:hover {
  border-color: rgba(201, 164, 76, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.feature-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gold);
  margin-bottom: 0.55rem;
  line-height: 1;
  opacity: 0.9;
}
.feature-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.6;
}

.shop-card {
  overflow: hidden;
  padding: 0;
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
}
.shop-card:hover {
  border-color: rgba(201, 164, 76, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 28px 50px rgba(0,0,0,0.45);
}
.shop-card a { color: inherit; text-decoration: none; display: block; }
.shop-banner {
  height: 150px;
  background: linear-gradient(135deg, #2c2415, #101014);
  background-size: cover;
  background-position: center;
  position: relative;
}
.shop-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.55));
}
.shop-body { padding: 1.25rem 1.3rem 1.45rem; }
.shop-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}
.shop-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.shop-accent { height: 3px; width: 100%; }

/* ---------- Auth ---------- */
.auth-shell {
  min-height: calc(100vh - var(--nav-h) - 140px);
  display: grid;
  place-items: center;
  padding: 2.25rem 0 3.25rem;
}
.form-card {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 2.15rem;
}
.form-wide { width: min(740px, 100%); }
.form-card h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.7rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}
.form-card > .muted {
  margin: 0 0 1.6rem;
  font-weight: 500;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.35rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.42rem;
  letter-spacing: 0.02em;
}
.field { margin-bottom: 1.1rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="color"],
input[type="file"],
select,
textarea {
  width: 100%;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.82rem 1rem;
  font: inherit;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea { min-height: 110px; resize: vertical; }
input:hover, select:hover, textarea:hover {
  border-color: rgba(255,255,255,0.22);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(201, 164, 76, 0.7);
  box-shadow: 0 0 0 4px rgba(201, 164, 76, 0.14);
  background: rgba(0,0,0,0.5);
}
.help {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Flash ---------- */
.flashes {
  width: min(1180px, calc(100% - 2.75rem));
  margin: 1.1rem auto 0;
}
.flash {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 560;
  backdrop-filter: blur(10px);
}
.flash.success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.32);
  color: #a7f3d0;
}
.flash.error {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
}
.flash.warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.32);
  color: #fde68a;
}

/* ---------- Panels ---------- */
.panel-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1.5rem;
  padding: 1.9rem 0 3.75rem;
}
.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-h) + 14px);
  box-shadow: var(--shadow-sm);
}
.sidebar h3 {
  margin: 0 0 0.9rem;
  padding: 0 0.6rem;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-radius: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.22rem;
  font-size: 0.92rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  transition: 0.2s var(--ease);
}
.sidebar a:hover {
  background: rgba(255,255,255,0.045);
  color: var(--text);
}
.sidebar a.active {
  background: rgba(201, 164, 76, 0.14);
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 76, 0.25);
}
.nav-ico { display: none; }
.panel-nav-extra { margin-top: 0.35rem; }

/* Mobile list cards (owner panel) */
.mobile-list {
  display: grid;
  gap: 0.75rem;
}
.mobile-item {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}
.mobile-item:first-child { padding-top: 0; }
.mobile-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.mobile-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.mobile-item-top strong {
  font-family: var(--font);
  font-size: 1rem;
  letter-spacing: -0.015em;
}
.mobile-item-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
}
.mobile-item-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.mobile-item-actions form { margin: 0; }
.mobile-item-actions .btn {
  width: 100%;
  justify-content: center;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 1rem;
  padding-bottom: 0.15rem;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}
.chip:hover { color: var(--text); }
.chip.is-active {
  background: rgba(201, 164, 76, 0.16);
  border-color: rgba(201, 164, 76, 0.45);
  color: var(--gold-soft);
}
.design-help {
  margin-top: -0.35rem;
  margin-bottom: 1.15rem;
}
.settings-card {
  max-width: 640px;
  width: 100%;
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 0.3rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  font-size: 0.72rem;
}
.chip.is-active .chip-count {
  background: rgba(201, 164, 76, 0.22);
}
.appt-summary {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

/* Appointments: planilha no desktop, cards no mobile */
.sheet-desktop { display: block; }
.appt-mobile { display: none; }
.desktop-only-inline { display: inline; }

/* Appointments spreadsheet */
.sheet-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.sheet-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  font-size: 0.78rem;
  font-weight: 750;
}
.sheet-live-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: sheet-pulse 1.6s ease-in-out infinite;
}
@keyframes sheet-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
.sheet-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.sheet-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
}
.sheet-wrap {
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sheet-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.sheet-table th,
.sheet-table td {
  padding: 0.55rem 0.55rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}
.sheet-table th:nth-child(1),
.sheet-table td:nth-child(1) { width: 16%; }
.sheet-table th:nth-child(2),
.sheet-table td:nth-child(2) { width: 26%; }
.sheet-table th:nth-child(3),
.sheet-table td:nth-child(3) { width: 26%; }
.sheet-table th:nth-child(4),
.sheet-table td:nth-child(4) { width: 12%; }
.sheet-table th:nth-child(5),
.sheet-table td:nth-child(5) { width: 20%; }
.sheet-table th:last-child,
.sheet-table td:last-child {
  border-right: none;
}
.sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #16161c;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 750;
}
.sheet-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
.sheet-table tbody tr:last-child td {
  border-bottom: none;
}
.sheet-row.status-pending td:first-child {
  box-shadow: inset 3px 0 0 #fbbf24;
}
.sheet-row.status-confirmed td:first-child {
  box-shadow: inset 3px 0 0 #34d399;
}
.sheet-row.status-done td:first-child {
  box-shadow: inset 3px 0 0 #60a5fa;
}
.sheet-row.status-cancelled td:first-child {
  box-shadow: inset 3px 0 0 #f87171;
}
.sheet-row.is-past {
  opacity: 0.72;
}
.sheet-time {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: -0.02em;
}
.sheet-strong {
  font-weight: 700;
  color: var(--text);
}
.sheet-muted {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: normal;
}
.sheet-notes {
  margin-top: 0.35rem;
  white-space: normal;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}
.sheet-mini-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.2rem;
  font-size: 0.72rem;
}
.sheet-mini-actions a {
  color: var(--gold-soft);
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.sheet-actions .btn {
  min-height: 32px;
  padding: 0.3rem 0.6rem;
  font-size: 0.74rem;
}
.sheet-actions form { margin: 0; }

.hours-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.hours-slot-form { margin: 0; }
.hours-chip {
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 52px;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 164, 76, 0.35);
  background: rgba(201, 164, 76, 0.1);
  color: var(--gold-soft);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  transition: 0.15s ease;
}
.hours-chip small {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}
.hours-chip:hover {
  border-color: rgba(201, 164, 76, 0.7);
  transform: translateY(-1px);
}
.hours-chip.is-blocked {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  text-decoration: line-through;
}
.hours-chip.is-blocked small {
  text-decoration: none;
}

/* Appointment cards (compact) */
.appt-day { margin-bottom: 0.95rem; }
.appt-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
}
.appt-day-head h2 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}
.appt-day-head span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}
.appt-list {
  display: grid;
  gap: 0.5rem;
}
.appt-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 50%),
    var(--surface);
}
.appt-card.status-pending { border-left: 3px solid #fbbf24; }
.appt-card.status-confirmed { border-left: 3px solid #34d399; }
.appt-card.status-done { border-left: 3px solid #60a5fa; }
.appt-card.status-cancelled { border-left: 3px solid #f87171; opacity: 0.78; }
.appt-card.is-past { opacity: 0.72; }
.appt-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
  background: rgba(201, 164, 76, 0.1);
  border: 1px solid rgba(201, 164, 76, 0.2);
}
.appt-time strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--gold-soft);
  line-height: 1;
}
.appt-time span {
  margin-top: 0.22rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}
.appt-body { min-width: 0; }
.appt-body-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.appt-client {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}
.appt-client h3 {
  margin: 0 0 0.1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}
.appt-client p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.appt-thumb,
.appt-thumb-empty {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.appt-thumb-empty {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 0.8rem;
}
.appt-notes {
  margin: 0.45rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}
.appt-contacts,
.appt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.appt-contacts .btn,
.appt-actions .btn {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}
.appt-contacts .btn,
.appt-actions .btn,
.appt-contacts form,
.appt-actions form {
  margin: 0;
}
.appt-list-compact .appt-card {
  padding: 0.55rem 0.65rem;
  grid-template-columns: 54px 1fr;
}
.appt-list-compact .appt-time strong { font-size: 0.92rem; }
.appt-list-compact .appt-thumb,
.appt-list-compact .appt-thumb-empty { display: none; }

/* Service multi-image galleries */
.service-gallery {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.service-gallery .service-photo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.service-gallery .service-photo:only-child {
  width: 84px;
  height: 84px;
  border-radius: 16px;
}
.service-thumb-grid,
.service-edit-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}
.service-thumb-grid img {
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.service-edit-shot {
  display: grid;
  gap: 0.3rem;
}
.service-edit-shot img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.service-edit-shot .check-inline {
  margin: 0;
  font-size: 0.78rem;
}
.panel-main h1 {
  margin-top: 0;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  letter-spacing: -0.028em;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.45rem;
}
.stat {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(201, 164, 76, 0.1), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
.stat .num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gold-soft);
  line-height: 1;
}
.stat .lbl {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  font-weight: 620;
  letter-spacing: 0.01em;
}

@media (max-width: 920px) {
  .panel-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .sidebar h3 { width: 100%; }
  .sidebar a { margin: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-weight: 500;
}
th, td {
  text-align: left;
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 750;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.badge-pending {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
  color: #fcd34d;
}
.badge-confirmed {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
  color: #6ee7b7;
}
.badge-cancelled {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}
.badge-done {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
  color: #93c5fd;
}

/* ---------- Design editor ---------- */
.design-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}
@media (max-width: 920px) {
  .design-grid { grid-template-columns: 1fr; }
}
.preview-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 460px;
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  box-shadow: var(--shadow);
}
.preview-hero {
  min-height: 230px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.7rem;
  position: relative;
}
.preview-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 62%);
  pointer-events: none;
}
.preview-hero > * { position: relative; z-index: 1; }
.preview-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 0.9rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
}
.color-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.65rem;
  align-items: center;
}
.color-row input[type="color"] {
  padding: 0;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.thumb {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 0.55rem;
}
.check-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 560;
}

/* ---------- Public shop ---------- */
.shop-page { min-height: 100vh; }
.shop-hero {
  min-height: min(72vh, 560px);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.shop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,0.88) 4%, rgba(0,0,0,0.35) 52%, rgba(0,0,0,0.22)),
    linear-gradient(95deg, rgba(0,0,0,0.4), transparent 58%);
}
.shop-hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2.75rem));
  margin: 0 auto 3rem;
}
.shop-hero-content h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.shop-hero-content p {
  margin: 0;
  opacity: 0.92;
  max-width: 46ch;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.65;
}
.shop-logo-lg {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: 2px solid rgba(255,255,255,0.28);
  box-shadow: 0 16px 36px rgba(0,0,0,0.4);
}
.service-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.service-item:last-child { border-bottom: none; }
.service-item-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 0;
}
.service-photo {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.service-photo-empty {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
  font-size: 1.25rem;
}
.price {
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.price-tag {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  text-align: right;
}
.price-tag.has-promo {
  gap: 0.15rem;
}
.price-old {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 600;
  text-decoration: line-through;
  opacity: 0.85;
}
.price-promo {
  color: #f87171;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.promo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.themed .price-old {
  color: color-mix(in srgb, var(--text) 55%, transparent);
}
.themed .price-promo {
  color: var(--primary);
}
.themed .promo-badge {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--primary);
}

/* Owner service manager */
.service-manage-list { display: grid; gap: 1.1rem; }
.service-manage-item {
  display: grid;
  grid-template-columns: 128px 1fr 128px;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.service-manage-item:last-child { border-bottom: none; padding-bottom: 0; }
.service-manage-item:first-child { padding-top: 0; }
.service-manage-media img,
.service-manage-placeholder {
  width: 128px;
  height: 128px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.service-manage-placeholder {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 620;
}
.service-manage-form .field { margin-bottom: 0.8rem; }
.service-manage-side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
@media (max-width: 900px) {
  .service-manage-item { grid-template-columns: 1fr; }
  .service-manage-side { flex-direction: row; }
  .service-manage-side .btn-block { width: auto; }
}

.muted { color: var(--muted); font-weight: 500; }
.empty {
  text-align: center;
  padding: 2.75rem 1.25rem;
  color: var(--muted);
  font-weight: 560;
}
.footer {
  border-top: 1px solid var(--border);
  padding: 2.1rem 0;
  margin-top: 2.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 560;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-secondary);
}
.footer-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  text-align: right;
}
.footer-credit strong {
  color: var(--text-secondary);
  font-weight: 700;
}
.footer-year {
  opacity: 0.75;
}

/* Barbers / team */
.barber-manage-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.barber-manage-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.barber-manage-item.is-inactive {
  opacity: 0.72;
}
.barber-manage-photo img,
.barber-photo-empty {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
.barber-photo-empty,
.barber-pick-empty,
.team-photo-empty {
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 1.5rem;
}
.barber-manage-side {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
  min-width: 110px;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}
.barber-pick {
  display: grid;
  gap: 0.7rem;
}
.barber-pick-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.barber-pick-option:has(input:checked),
.barber-pick-option.is-selected {
  border-color: color-mix(in srgb, var(--gold) 70%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, var(--surface-2));
}
.barber-pick-option input { display: none; }
.barber-pick-photo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.barber-pick-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.barber-pick-meta strong {
  font-size: 0.98rem;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent, #f5f5f5) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary, #c9a227) 25%, transparent);
}
.team-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.team-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.team-meta strong { font-size: 1rem; }
.team-meta span {
  opacity: 0.72;
  font-size: 0.88rem;
  line-height: 1.35;
}
.sheet-barber {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.sheet-barber img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}
.barber-hours-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.barber-hours-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.barber-hours-link:hover {
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  text-decoration: none;
  transform: translateY(-1px);
}
.barber-hours-link.is-inactive { opacity: 0.65; }
.barber-hours-link img,
.barber-hours-link .barber-photo-empty {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.barber-hours-link span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.barber-hours-link small {
  color: var(--muted);
  font-size: 0.82rem;
}
.barber-hours-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Plans */
.plan-banner {
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.plan-banner strong { display: block; margin-bottom: 0.25rem; }
.plan-banner p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }
.plan-banner a { color: var(--gold-soft); font-weight: 650; }
.plan-banner.is-trial {
  border-color: color-mix(in srgb, var(--info) 45%, transparent);
  background: color-mix(in srgb, var(--info) 12%, var(--surface-2));
}
.plan-banner.is-active {
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface-2));
}
.plan-banner.is-blocked {
  border-color: color-mix(in srgb, var(--warn) 50%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface-2));
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1.25rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.plan-card.is-current {
  border-color: color-mix(in srgb, var(--gold) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent), var(--shadow-sm);
}
.plan-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.plan-price strong {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--gold-soft);
}
.plan-price span {
  color: var(--muted);
  font-size: 0.9rem;
}
.plan-features {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: grid;
  gap: 0.35rem;
}
@media (max-width: 960px) {
  .plan-grid { grid-template-columns: 1fr; }
}

/* PWA install banner */
.pwa-install {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.75rem max(0.85rem, env(safe-area-inset-right))
    calc(0.85rem + env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-left));
  transform: translateY(110%);
  transition: transform 0.28s var(--ease);
  pointer-events: none;
}
.pwa-install.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.pwa-install-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, #000);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
}
.pwa-install-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: min(100%, 220px);
  flex: 1 1 220px;
}
.pwa-install-copy strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}
.pwa-install-copy span {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
}
.pwa-install-copy b { color: var(--gold-soft); font-weight: 700; }
.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.pwa-ios-share {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin: 0 0.15em;
  color: var(--info);
}
@media (min-width: 861px) {
  .pwa-install {
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    width: min(420px, calc(100vw - 2rem));
    padding: 0;
  }
}
.footer-brand .mini-mark,
.footer-brand .mini-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
}
.footer-brand .mini-mark {
  background: linear-gradient(145deg, #f3e0a0, var(--gold-deep));
  display: grid;
  place-items: center;
  color: #1a1408;
  font-size: 0.82rem;
}
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.page-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1.45rem;
}
.page-title-row h1 { margin: 0; }
.hr-soft {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.35rem 0;
}
.top-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.05rem 0;
  gap: 1rem;
}
.shop-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}
.shop-section-title {
  margin: 0 0 1.1rem;
  font-size: 1.45rem;
  letter-spacing: -0.028em;
}
.info-row { margin: 0 0 1.05rem; }
.info-row:last-child { margin-bottom: 0; }
.info-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
  margin-bottom: 0.25rem;
  font-weight: 750;
}

/* =========================================================
   Mobile-first refinements (app is used mostly on phones)
   ========================================================= */
@media (max-width: 860px) {
  :root { --nav-h: 64px; }

  .container,
  .flashes {
    width: min(1180px, calc(100% - 1.35rem));
  }

  body {
    font-size: 15.5px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .topnav {
    padding-top: env(safe-area-inset-top);
  }
  .topnav-inner {
    min-height: 64px;
    position: relative;
    gap: 0.65rem;
  }
  .brand-mark,
  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .brand-text strong { font-size: 1.05rem; }
  .brand-text small { display: none; }

  .nav-toggle { display: inline-flex; }
  .nav-mobile-only { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.55rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem;
    border-radius: 18px;
    border: 1px solid var(--border-strong);
    background: rgba(10, 10, 14, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    z-index: 80;
  }
  .nav-links.is-open { display: flex; }
  .nav-links > a:not(.btn),
  .nav-links > .btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 46px;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
  .nav-links > .btn {
    justify-content: center;
  }
  body.nav-open { overflow: hidden; }

  .btn {
    min-height: 46px;
    padding: 0.85rem 1.2rem;
  }
  .btn-sm {
    min-height: 42px;
    padding: 0.55rem 0.95rem;
  }
  .btn-block { width: 100%; }

  .hero {
    padding: 2.2rem 0 2rem;
  }
  .hero-grid { gap: 1.35rem; }
  .hero h1 {
    font-size: 1.85rem;
    max-width: none;
  }
  .hero-lead {
    font-size: 0.98rem;
    margin-bottom: 1.4rem;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .hero-actions .btn { width: 100%; }
  .hero-panel { padding: 1.2rem; border-radius: 20px; }
  .hero-stat-row { gap: 0.55rem; }
  .hero-stat { padding: 0.75rem 0.45rem; }
  .hero-stat strong { font-size: 1.15rem; }
  .hero-stat span { font-size: 0.62rem; letter-spacing: 0.06em; }

  .section { padding: 2rem 0 2.75rem; }
  .section-title { margin-bottom: 1.15rem; }
  .section-title h2 { font-size: 1.4rem; }
  .section-title p { font-size: 0.9rem; }

  .card { padding: 1.15rem; border-radius: 16px; }
  .feature-card { padding: 1.25rem; }
  .shop-banner { height: 128px; }

  .auth-shell {
    min-height: auto;
    padding: 1.25rem 0 2.25rem;
    place-items: start center;
  }
  .form-card {
    width: 100%;
    padding: 1.25rem;
  }
  .form-card h1 { font-size: 1.65rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="file"],
  select,
  textarea {
    font-size: 16px; /* evita zoom automático no iOS */
    min-height: 48px;
    padding: 0.85rem 0.95rem;
  }
  textarea { min-height: 110px; }

  .panel-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 0.85rem 0 6.5rem;
  }

  /* Owner panel = bottom tab bar */
  .panel-layout > .panel-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.15rem;
    margin: 0;
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--border-strong);
    border-bottom: none;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -12px 40px rgba(0,0,0,0.45);
    padding: 0.45rem 0.4rem calc(0.45rem + env(safe-area-inset-bottom));
    height: auto;
    overflow: visible;
  }
  .panel-layout > .panel-nav .panel-nav-title,
  .panel-layout > .panel-nav .panel-nav-extra,
  .panel-layout > .panel-nav .hr-soft {
    display: none !important;
  }
  .panel-layout > .panel-nav a {
    margin: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.18rem;
    min-height: 56px;
    padding: 0.4rem 0.2rem;
    border-radius: 12px;
    text-align: center;
    white-space: normal;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    background: transparent;
  }
  .panel-layout > .panel-nav a .nav-ico {
    display: block;
    font-size: 1rem;
    line-height: 1;
  }
  .panel-layout > .panel-nav a .nav-label {
    display: block;
    line-height: 1.1;
  }
  .panel-layout > .panel-nav a.active {
    background: rgba(201, 164, 76, 0.16);
    color: var(--gold-soft);
  }

  /* Generic admin sidebar still chips */
  .panel-layout > .sidebar:not(.panel-nav) {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.7rem;
    scrollbar-width: none;
  }
  .panel-layout > .sidebar:not(.panel-nav)::-webkit-scrollbar { display: none; }
  .panel-layout > .sidebar:not(.panel-nav) h3 { display: none; }
  .panel-layout > .sidebar:not(.panel-nav) a {
    margin: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    background: rgba(255,255,255,0.03);
  }

  .panel-main {
    width: 100%;
    min-width: 0;
  }
  .panel-main h1 {
    font-size: 1.55rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
  .stat { padding: 0.95rem 0.85rem; }
  .stat .num { font-size: 1.4rem; }
  .stat .lbl { font-size: 0.74rem; }

  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn-mobile-full,
  .page-title-row .btn,
  .page-title-row .actions {
    width: 100%;
  }
  .page-title-row .actions .btn {
    flex: 1 1 auto;
  }

  .panel-quick {
    grid-template-columns: 1fr !important;
  }
  .panel-quick .btn { width: 100%; }

  .mobile-item-actions {
    grid-template-columns: 1fr;
  }

  .sheet-desktop { display: none !important; }
  .appt-mobile { display: block !important; }
  .desktop-only-inline { display: none; }

  .appt-card {
    grid-template-columns: 52px 1fr;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
  }
  .appt-time strong { font-size: 0.9rem; }
  .appt-thumb,
  .appt-thumb-empty { display: none; }
  .appt-contacts,
  .appt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
  }
  .appt-contacts .btn,
  .appt-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 36px;
  }
  .appt-actions form:last-child {
    grid-column: 1 / -1;
  }

  .table-wrap {
    margin: 0 -0.25rem;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 640px; font-size: 0.86rem; }
  th, td { padding: 0.8rem 0.55rem; }

  .design-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .preview-frame {
    position: static;
    min-height: 280px;
    order: -1;
  }
  .design-help { font-size: 0.88rem; }

  .service-manage-item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .service-manage-placeholder {
    width: 100%;
    height: 120px;
  }
  .service-thumb-grid img {
    height: 72px;
  }
  .service-edit-shot img {
    height: 88px;
  }
  .service-manage-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .service-manage-side .btn-block { width: 100%; }
  .service-manage-form .form-row {
    grid-template-columns: 1fr;
  }

  .settings-card {
    max-width: none;
  }

  .actions {
    width: 100%;
  }
  .actions .btn {
    flex: 1 1 calc(50% - 0.3rem);
    justify-content: center;
  }

  .footer {
    margin-top: 1.5rem;
    padding: 1.4rem 0 calc(1.4rem + env(safe-area-inset-bottom));
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    text-align: left;
  }

  .barber-manage-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .barber-manage-photo img,
  .barber-photo-empty {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }
  .barber-manage-side {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  /* Public shop */
  .shop-hero {
    min-height: 58vh;
  }
  .shop-hero-content {
    width: min(1180px, calc(100% - 1.35rem));
    margin-bottom: 1.6rem;
  }
  .shop-hero-content h1 { font-size: 1.85rem; }
  .shop-hero-content p { font-size: 0.95rem; }
  .shop-logo-lg {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }
  .shop-cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1.25rem;
  }
  .shop-cta-row .btn-shop,
  .themed .btn-shop {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  .service-item {
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
  }
  .service-item-main {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }
  .service-gallery {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0.55rem;
    padding-bottom: 0.15rem;
  }
  .service-gallery .service-photo,
  .service-gallery .service-photo:only-child {
    width: min(78vw, 280px);
    height: 180px;
    border-radius: 16px;
    scroll-snap-align: start;
  }
  .service-photo-empty {
    width: 100%;
    height: 140px;
    border-radius: 16px;
  }
  .price-tag {
    width: 100%;
    justify-items: start;
    text-align: left;
  }
  .price {
    align-self: flex-end;
    font-size: 1.05rem;
  }
  .shop-section-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .stats { gap: 0.55rem; }
  .stat .lbl { font-size: 0.72rem; }
  .shop-hero { min-height: 52vh; }
}

/* Booking picker on small screens — fotos dos cortes em faixa grande */
@media (max-width: 640px) {
  .service-pick-option {
    grid-template-columns: auto 1fr !important;
    grid-template-areas:
      "radio meta"
      "gallery gallery"
      "price price" !important;
    gap: 0.65rem !important;
    padding: 0.85rem !important;
    align-items: start !important;
  }
  .service-pick-option input { grid-area: radio; margin-top: 0.15rem; }
  .service-pick-gallery,
  .service-pick-empty { grid-area: gallery; }
  .service-pick-gallery {
    display: flex !important;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 0.5rem;
  }
  .service-pick-gallery img,
  .service-pick-gallery img:only-child {
    width: min(72vw, 240px) !important;
    height: 150px !important;
    border-radius: 14px !important;
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
  .service-pick-empty {
    width: 100% !important;
    height: 120px !important;
    border-radius: 14px !important;
  }
  .service-pick-meta { grid-area: meta; }
  .service-pick-price {
    grid-area: price;
    justify-self: start;
    text-align: left;
  }
}

/* Reduce hover lift on touch devices */
@media (hover: none) {
  .btn:hover { transform: none; }
  .shop-card:hover,
  .feature-card:hover {
    transform: none;
  }
}
