/* ═══════════════════════════════════════════════════════════════════════════
   ENTRE TONS — Música para Casamentos
   Identidade: verde floresta + dourado champagne + off-white
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --primary: #344E41;
  --primary-dark: #263A31;
  --primary-deep: #1E2E27;
  --gold: #C6A15B;
  --gold-soft: #E8D7B0;
  --gold-pale: #F4EBD8;
  --bg: #F7F4EE;
  --card: #FFFDF9;
  --text: #282725;
  --text-2: #74716B;
  --border: #DED9D0;
  --border-soft: #EAE5DB;
  --success: #4D7C5B;
  --success-soft: #E4EEE7;
  --warning: #D99A3E;
  --warning-soft: #F7ECD9;
  --danger: #A64D4D;
  --danger-soft: #F3E2E2;
  --info: #5B7A99;
  --info-soft: #E4EBF1;
  --muted-soft: #ECE9E2;
  --shadow: 0 1px 2px rgba(40,39,37,.04), 0 6px 18px rgba(40,39,37,.06);
  --shadow-lg: 0 8px 40px rgba(30,46,39,.18);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 264px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
button { font-family: inherit; }
img, svg { vertical-align: middle; }
::selection { background: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Splash ─────────────────────────────────────────────────────────────── */
.boot-splash {
  min-height: 100vh; display: flex; flex-direction: column; gap: 22px;
  align-items: center; justify-content: center; background: var(--primary-dark);
}
.boot-logo { display: flex; align-items: center; gap: 12px; }
.boot-logo span { font-family: var(--font-display); font-size: 34px; color: var(--gold); letter-spacing: 1px; }
.boot-spinner {
  width: 26px; height: 26px; border: 2.5px solid rgba(198,161,91,.25);
  border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.main {
  flex: 1; min-width: 0; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.content { padding: 26px 34px 60px; max-width: 1440px; width: 100%; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  background: linear-gradient(178deg, var(--primary-dark) 0%, var(--primary-deep) 100%);
  color: #E9E5DA; display: flex; flex-direction: column;
  padding: 26px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
}
.sidebar::after {
  content: ''; position: absolute; left: -30px; bottom: -40px; width: 240px; height: 300px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 260' fill='none' stroke='%23C6A15B' stroke-width='1'%3E%3Cpath d='M30 250 C 45 200 60 160 55 100 M55 100 C 40 120 30 140 32 165 M55 100 C 70 115 78 138 74 160 M50 145 C 35 155 28 172 30 190 M58 140 C 72 150 80 168 78 188 M45 190 C 32 198 26 212 28 228 M62 185 C 76 194 82 210 80 226'/%3E%3Cpath d='M120 255 C 128 215 140 180 165 150 M165 150 C 150 158 140 172 138 190 M165 150 C 172 162 174 180 168 195 M148 185 C 136 192 130 205 132 220 M162 182 C 173 190 178 205 175 220'/%3E%3C/svg%3E");
  background-repeat: no-repeat; opacity: .35; pointer-events: none;
}
.brand { text-align: center; padding: 6px 0 22px; position: relative; z-index: 1; }
.brand-lyre { margin-bottom: 6px; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 32px;
  color: var(--gold); letter-spacing: 1.5px; line-height: 1.1;
}
.brand-flourish { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.brand-flourish::before, .brand-flourish::after {
  content: ''; height: 1px; width: 52px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.brand-flourish::after { background: linear-gradient(90deg, var(--gold), transparent); }
.brand-flourish svg { opacity: .9; }

.nav { display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; margin-top: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 13px; padding: 11px 14px;
  border-radius: 10px; color: #D8D3C6; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, color .15s;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .4px; font-size: 17px;
  min-height: 44px;
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: rgba(198,161,91,.14); color: var(--gold-soft);
  border-color: rgba(198,161,91,.35);
}
.nav-item.active svg { opacity: 1; stroke: var(--gold); }

.sidebar-quote {
  margin-top: auto; padding: 26px 10px 8px; position: relative; z-index: 1;
  text-align: center; font-family: var(--font-display); font-style: italic;
  font-size: 16.5px; color: var(--gold-soft); line-height: 1.5;
}
.sidebar-quote .note { display: block; margin-top: 10px; color: var(--gold); font-size: 18px; }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(30,46,39,.5); z-index: 55;
  opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(2px);
}
body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 34px 0; padding-top: calc(16px + env(safe-area-inset-top));
  max-width: 1440px; width: 100%;
}
.hamburger {
  display: none; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; width: 42px; height: 42px; cursor: pointer; flex: none;
  align-items: center; justify-content: center;
}
.searchbox { position: relative; margin-left: auto; width: 340px; max-width: 45%; }
.searchbox input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--card); font-size: 14px;
  font-family: var(--font-body); color: var(--text); outline: none;
}
.searchbox input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,161,91,.15); }
.searchbox > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: 380px; overflow-y: auto; z-index: 50; display: none;
}
.search-results.open { display: block; }
.sr-group { padding: 8px 0; }
.sr-group + .sr-group { border-top: 1px solid var(--border-soft); }
.sr-label { padding: 4px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); }
.sr-item { display: block; padding: 9px 16px; cursor: pointer; color: var(--text); }
.sr-item:hover { background: var(--gold-pale); }
.sr-item small { color: var(--text-2); display: block; }

.bell-wrap { position: relative; }
.icon-btn {
  background: none; border: none; cursor: pointer; color: var(--text);
  width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--muted-soft); }
.bell-dot {
  position: absolute; top: 7px; right: 8px; width: 9px; height: 9px;
  background: var(--gold); border-radius: 50%; border: 2px solid var(--bg);
}
.bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); z-index: 50; display: none; max-height: 480px; overflow-y: auto;
}
.bell-panel.open { display: block; }
.bell-panel h4 {
  font-family: var(--font-display); font-size: 19px; padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.alert-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.alert-item:hover { background: var(--gold-pale); }
.alert-item:last-child { border-bottom: 0; }
.alert-ico { width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.alert-item b { font-weight: 600; font-size: 13.5px; display: block; }
.alert-item small { color: var(--text-2); font-size: 12.5px; }
.alert-empty { padding: 24px 18px; text-align: center; color: var(--text-2); }

.user-chip {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 6px 8px; border-radius: 11px; position: relative;
}
.user-chip:hover { background: var(--muted-soft); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary-dark);
  color: var(--gold-soft); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .5px; flex: none;
}
.user-chip .uname { font-weight: 600; font-size: 14px; white-space: nowrap; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  min-width: 200px; z-index: 50; display: none; overflow: hidden;
}
.user-menu.open { display: block; }
.user-menu button {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  padding: 12px 16px; background: none; border: none; cursor: pointer; font-size: 14px; color: var(--text);
}
.user-menu button:hover { background: var(--gold-pale); }

/* ── Cabeçalho de página ────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title {
  font-family: var(--font-display); font-weight: 600; font-size: 42px; line-height: 1.05;
  letter-spacing: .5px; display: flex; align-items: center; gap: 14px;
}
.page-title .orn { color: var(--gold); flex: none; }
.page-sub { color: var(--text-2); font-size: 15px; margin-top: 6px; }
.page-head .spacer { flex: 1; }

/* ── Botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 11px 20px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: filter .15s, background .15s;
  min-height: 44px; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 2px 8px rgba(198,161,91,.35); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-green { background: var(--primary); color: #fff; }
.btn-green:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold-pale); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--muted-soft); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 13px; min-height: 34px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ── Cards e grids ──────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft); flex-wrap: wrap;
}
.card-head h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  display: flex; align-items: center; gap: 10px; letter-spacing: .3px;
}
.card-head h3 svg { color: var(--text); opacity: .8; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border-soft); }
.link-arrow { font-size: 14px; font-weight: 600; color: var(--gold); cursor: pointer; background: none; border: none; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { text-decoration: underline; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.kpi-top { display: flex; align-items: center; gap: 16px; }
.kpi-ico {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, #EFEAD9, #E7EDE4);
  border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; color: var(--gold);
}
.kpi-label { color: var(--text-2); font-size: 13.5px; }
.kpi-value { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1.05; letter-spacing: .5px; }
.kpi-trend { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 10px; color: var(--text-2); }
.kpi-trend .up { color: var(--success); font-weight: 600; }
.kpi-trend .down { color: var(--warning); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ── Tabelas ────────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-2); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border-soft);
  background: #FBF9F4;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--gold-pale); }
.tbl .t-strong { font-weight: 600; }
.tbl .t-sub { color: var(--text-2); font-size: 12.5px; display: block; }
.row-ico {
  width: 34px; height: 34px; border-radius: 50%; background: var(--gold-pale);
  color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-right: 4px;
}

/* ── Pills de status ────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 100px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: #A9700F; }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--muted-soft); color: var(--text-2); }
.pill-gold { background: var(--gold-pale); color: #9A7B3C; }

/* ── Progresso / financeiro ─────────────────────────────────────────────── */
.progress { height: 9px; border-radius: 100px; background: var(--muted-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--primary), var(--success)); }
.fin-big { font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1.1; }
.fin-legend { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.fin-legend .row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.fin-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fin-legend .row .spacer { flex: 1; }
.fin-legend b { font-variant-numeric: tabular-nums; }

/* ── Checklist ──────────────────────────────────────────────────────────── */
.check-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.check-row:last-child { border-bottom: 0; }
.check-circle {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border);
  flex: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--card); transition: all .15s; color: transparent;
}
.check-circle.done { background: var(--success); border-color: var(--success); color: #fff; }
.check-row .ct { flex: 1; min-width: 0; }
.check-row.done-row .ct { color: var(--text-2); text-decoration: line-through; }
.check-row small { color: var(--text-2); white-space: nowrap; }

/* ── Timeline ───────────────────────────────────────────────────────────── */
.tl-row { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.tl-row:last-child { border-bottom: 0; }
.tl-ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.tl-ico.i-money { background: var(--gold); }
.tl-ico.i-doc { background: var(--primary); }
.tl-ico.i-check, .tl-ico.i-users { background: var(--success); }
.tl-ico.i-music { background: var(--info); }
.tl-ico.i-flag { background: var(--warning); }
.tl-ico.i-plus, .tl-ico.i-file, .tl-ico.i-minus { background: var(--text-2); }
.tl-row b { font-weight: 600; font-size: 13.5px; display: block; }
.tl-row small { color: var(--text-2); font-size: 12.5px; }
.tl-row .tl-when { margin-left: auto; text-align: right; color: var(--text-2); font-size: 12px; white-space: nowrap; }

/* ── Formulários ────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; letter-spacing: .3px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; font-family: var(--font-body); font-size: 16px; color: var(--text); outline: none;
  min-height: 44px;
}
@media (min-width: 768px) { .field input, .field select, .field textarea { font-size: 14.5px; } }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,161,91,.14);
}
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* ── Modais (nunca fecham clicando fora do card) ────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(30,46,39,.45); backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  display: flex; flex-direction: column; animation: modalIn .18s ease;
  border: 1px solid var(--border-soft);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal.modal-lg { max-width: 860px; }
.modal.modal-sm { max-width: 440px; }
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-family: var(--font-display); font-size: 25px; font-weight: 600; flex: 1; }
.modal-x {
  background: none; border: none; cursor: pointer; color: var(--text-2);
  width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.modal-x:hover { background: var(--muted-soft); color: var(--text); }
.modal-body { padding: 20px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px;
  border-top: 1px solid var(--border-soft); flex-wrap: wrap;
}

/* ── Toasts ─────────────────────────────────────────────────────────────── */
#toasts {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px;
  width: min(440px, calc(100vw - 32px));
}
.toast {
  background: var(--primary-dark); color: #F3EFE5; padding: 13px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; font-size: 14px;
  animation: toastIn .2s ease; border-left: 3px solid var(--gold);
}
.toast.t-error { border-left-color: var(--danger); }
.toast.t-success { border-left-color: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ── Login ──────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(198,161,91,.12), transparent 60%),
    linear-gradient(165deg, var(--primary-dark), var(--primary-deep));
  padding: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.login-card {
  background: var(--card); border-radius: 22px; padding: 42px 40px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.login-card .brand-name { color: var(--primary-dark); font-size: 38px; }
.login-card .login-sub {
  color: var(--gold); letter-spacing: 3px; text-transform: uppercase; font-size: 11px;
  margin: 4px 0 30px; font-weight: 600;
}
.login-card form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.login-note { margin-top: 22px; font-size: 12.5px; color: var(--text-2); }

/* ── Agenda / calendário ────────────────────────────────────────────────── */
.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; min-width: 220px; text-transform: capitalize; }
.seg { display: inline-flex; background: var(--muted-soft); border-radius: 10px; padding: 3px; }
.seg button {
  border: none; background: none; padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); min-height: 36px;
}
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); padding: 6px 0; font-weight: 600; }
.cal-cell {
  background: var(--card); border: 1px solid var(--border-soft); border-radius: 10px;
  min-height: 96px; padding: 7px 8px; font-size: 12px; position: relative;
}
.cal-cell.dim { opacity: .45; }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(198,161,91,.18); }
.cal-day { font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.cal-ev {
  display: block; margin-bottom: 4px; padding: 3px 7px; border-radius: 6px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-ev.s-confirmado, .cal-ev.s-realizado { background: var(--success-soft); color: var(--success); }
.cal-ev.s-cancelado { background: var(--danger-soft); color: var(--danger); }
.cal-ev.s-orcamento, .cal-ev.s-negociacao { background: var(--muted-soft); color: var(--text-2); }
.cal-ev.s-default { background: var(--warning-soft); color: #A9700F; }

/* ── Detalhe do casamento ───────────────────────────────────────────────── */
.wd-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.wd-title h2 { font-family: var(--font-display); font-size: 38px; font-weight: 600; line-height: 1.1; }
.wd-meta { color: var(--text-2); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14.5px; }
.wd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border-soft); margin-bottom: 22px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 18px; font-size: 14.5px; font-weight: 600; color: var(--text-2);
  cursor: pointer; border: none; background: none; white-space: nowrap;
  border-bottom: 2.5px solid transparent; margin-bottom: -2px; min-height: 44px;
}
.tab.on { color: var(--primary-dark); border-bottom-color: var(--gold); }
.tab .cnt { background: var(--muted-soft); color: var(--text-2); border-radius: 100px; padding: 1px 8px; font-size: 11.5px; margin-left: 6px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-cell { background: #FBF9F4; border: 1px solid var(--border-soft); border-radius: 11px; padding: 13px 15px; }
.info-cell label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); display: block; margin-bottom: 3px; font-weight: 600; }
.info-cell div { font-weight: 600; font-size: 14.5px; word-break: break-word; }

.moment-block { margin-bottom: 20px; }
.moment-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--primary-dark);
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.moment-title::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }
.song-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-soft); background: #FDFCF8; margin-bottom: 8px;
}
.song-row .s-main { flex: 1; min-width: 0; }
.song-row b { font-size: 14.5px; }
.song-row small { color: var(--text-2); display: block; font-size: 12.5px; }
.song-row .s-tone { background: var(--gold-pale); color: #9A7B3C; font-weight: 700; border-radius: 8px; padding: 4px 9px; font-size: 12px; flex: none; }
.song-row .s-order {
  flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: 50%; font-size: 12.5px; font-weight: 700;
}

/* ── Área do músico ─────────────────────────────────────────────────────── */
.mus-event-card {
  display: flex; gap: 14px; align-items: center; padding: 18px 20px; cursor: pointer;
  border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.mus-event-card:last-child { border-bottom: 0; }
.mus-date {
  flex: none; width: 60px; min-height: 66px; text-align: center; background: var(--primary-dark); color: var(--gold-soft);
  border-radius: 12px; padding: 8px 4px; font-family: var(--font-display);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1;
}
.mus-date b { font-size: 20px; font-weight: 700; }
.mus-date span { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.mus-date small { font-size: 10px; opacity: .75; }
.mus-info { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 3px; }
.mus-info > b { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.25; }
.mus-info small { color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.mus-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }

.mus-hero {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary));
  border-radius: 20px; color: #F0ECE1; padding: 26px 24px; margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}
.mus-hero h2 { font-family: var(--font-display); font-size: 30px; color: var(--gold-soft); }
.mus-hero .mh-couple {
  font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--gold-soft);
  text-align: center; padding-bottom: 14px; border-bottom: 1px solid rgba(198,161,91,.3);
}
.mus-hero .mh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mus-hero .mh-item {
  background: rgba(255,255,255,.07); border: 1px solid rgba(198,161,91,.3); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.mus-hero .mh-item.hl { background: rgba(198,161,91,.2); border-color: var(--gold); }
.mus-hero .mh-item label {
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-soft);
  display: flex; align-items: center; gap: 5px; font-weight: 600; opacity: .9;
}
.mus-hero .mh-item b { font-weight: 700; font-size: 17px; line-height: 1.3; word-break: break-word; }
.mus-hero .mh-item small { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.mus-hero .mh-item.wide { grid-column: 1 / -1; }
.mus-hero .mh-addr {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13px;
  opacity: .85; line-height: 1.5;
}
.mus-hero .mh-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.mus-hero .mh-actions .btn { flex: 1; min-width: 160px; justify-content: center; }
.mus-hero .btn-confirm {
  background: #F0ECE1; color: var(--primary-dark); font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.mus-hero .btn-confirm:hover { background: var(--gold-soft); }

/* ── Relatórios: gráfico de barras ──────────────────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-col .bar { width: 100%; max-width: 46px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); position: relative; min-height: 4px; }
.bar-col .bv { font-size: 11px; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.bar-col .bl { font-size: 11px; color: var(--text-2); text-transform: capitalize; }

.stat-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line b { font-variant-numeric: tabular-nums; }

.empty {
  padding: 34px 20px; text-align: center; color: var(--text-2);
}
.empty svg { color: var(--gold); opacity: .7; margin-bottom: 10px; }
.empty p { font-size: 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.muted { color: var(--text-2); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flex .spacer { flex: 1; }

.tpl-editor textarea { font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; min-height: 340px; }
.tpl-help { background: var(--gold-pale); border: 1px solid var(--gold-soft); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; margin-bottom: 12px; line-height: 1.7; }
.tpl-help code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }

/* ═══════════════════════ RESPONSIVIDADE ═══════════════════════ */
@media (max-width: 1240px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .hamburger { display: flex; }
  .content, .topbar { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .page-title { font-size: 32px; }
  .searchbox { width: 100%; max-width: none; order: 10; margin-left: 0; }
  .topbar { flex-wrap: wrap; row-gap: 12px; }
  .user-chip .uname { display: none; }
  .cal-cell { min-height: 72px; }
}

@media (max-width: 720px) {
  /* Tabelas viram cards empilhados */
  .tbl-stack table, .tbl-stack thead, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack thead { display: none; }
  .tbl-stack tr { border: 1px solid var(--border-soft); border-radius: 12px; margin-bottom: 12px; background: #FDFCF8; padding: 6px 2px; }
  .tbl-stack td { border: none; padding: 7px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .tbl-stack td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); font-weight: 600; text-align: left; }
  .tbl-stack td.no-label { justify-content: flex-end; }
  .tbl-stack td.no-label::before { display: none; }
  .wd-actions { margin-left: 0; width: 100%; }
  .wd-actions .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 54px; padding: 4px 5px; border-radius: 7px; }
  .cal-ev { font-size: 0; padding: 0; height: 7px; width: 7px; border-radius: 50%; display: inline-block; margin-right: 3px; }
  .kpi-value { font-size: 31px; }
  .modal { border-radius: 16px; }
  .modal-foot .btn { flex: 1; }
  .mus-hero .mh-grid { grid-template-columns: 1fr; }
  .bars { height: 150px; gap: 6px; }
}

@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 70px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .page-title { font-size: 28px; }
  .card-head, .card-body, .card-foot { padding-left: 16px; padding-right: 16px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100dvh - 20px); }
}

@media print {
  .sidebar, .topbar, .wd-actions, .btn, .tabs { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
}
