/* Agenda Morestoni — Liquid Glass · azul & branco */
:root {
  --blue-950: #0b1f33;
  --blue-900: #12304d;
  --blue-800: #1a4570;
  --blue-700: #2563a8;
  --blue-600: #3b82c4;
  --blue-500: #5ba3d9;
  --blue-400: #8ec5eb;
  --blue-100: #e8f3fb;
  --blue-50: #f4f9fd;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px rgba(18, 48, 77, 0.12);
  --text: #12304d;
  --muted: #5a7390;
  --danger: #c43c55;
  --success: #1f8a5b;
  --warn: #d97706;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fade: 0.45s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15.5px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background: var(--blue-50);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(11, 31, 51, 0.25) 0%,
    rgba(232, 243, 251, 0.55) 45%,
    rgba(255, 255, 255, 0.65) 100%
  );
  pointer-events: none;
  z-index: 0;
}
a { color: var(--blue-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-900); }

/* ── Page fade ── */
.page-fade {
  position: relative;
  z-index: 1;
  animation: fadeInUp var(--fade) both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 196, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(59, 130, 196, 0); }
}
.stagger > * { animation: fadeInUp var(--fade) both; }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.11s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.19s; }
.stagger > *:nth-child(6) { animation-delay: 0.23s; }
.stagger > *:nth-child(7) { animation-delay: 0.27s; }
.stagger > *:nth-child(8) { animation-delay: 0.31s; }
.stagger > *:nth-child(9) { animation-delay: 0.35s; }
.stagger > *:nth-child(n+10) { animation-delay: 0.38s; }

/* ── Glass surfaces ── */
.glass {
  background: var(--glass-strong);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
.glass-soft {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* ── Public header ── */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.35rem;
  background: linear-gradient(135deg, rgba(18, 48, 77, 0.88), rgba(37, 99, 168, 0.75));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  animation: fadeIn 0.5s var(--ease);
}
.site-header .brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.site-header .brand span {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 0.1rem;
}
.site-header .contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.site-header .contacts a.plain { color: #fff; font-size: 0.88rem; opacity: 0.95; }

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  background: linear-gradient(135deg, rgba(11, 31, 51, 0.85), rgba(26, 69, 112, 0.75));
  backdrop-filter: blur(12px);
}
.site-footer a { color: #b6dbf5; }

/* ── Steps indicator ── */
.steps {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.steps .dot {
  flex: 1;
  min-width: 48px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.35);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}
.steps .dot.on {
  background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
  transform: scaleY(1.3);
}
.steps .dot.done {
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
}
.step-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* ── Layout public ── */
.public-main {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.5rem;
}
.page-title h1 {
  font-size: 1.55rem;
  font-weight: 750;
  color: var(--blue-900);
  letter-spacing: -0.02em;
}
.page-title p { color: var(--muted); font-size: 0.92rem; margin-top: 0.25rem; }
.page-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

/* ── Cards / choice grid ── */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
/* Áreas: 2 colunas no mobile, até 5 no desktop (encaixa bem 5–10 itens) */
.choice-grid-areas {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (min-width: 720px) {
  .choice-grid-areas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .choice-grid-areas {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.location-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(37, 99, 168, 0.22);
}
.location-banner-pin {
  font-size: 1.2rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.location-banner strong {
  display: block;
  color: var(--blue-900);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.choice-grid-services {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (min-width: 800px) {
  .choice-grid-services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.choice-grid-lawyers {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.choice-card {
  display: block;
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s, opacity 0.25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  text-align: left;
}
/* botão invisível cobrindo o card (form GET — evita download/422 de links quebrados) */
.choice-card .cover-hit {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  width: 100%;
  height: 100%;
}
.choice-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(18, 48, 77, 0.16);
  border-color: rgba(91, 163, 217, 0.6);
  text-decoration: none;
  color: var(--text);
}
.choice-card:active { transform: translateY(-1px) scale(0.99); }
.choice-card.is-pressing {
  opacity: 0.82;
  transform: scale(0.97);
  filter: brightness(0.96);
}
.choice-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-800));
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 168, 0.3);
  transition: transform 0.3s var(--ease);
}
.choice-card:hover .icon { transform: scale(1.08); }
.choice-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 0.25rem;
}
.choice-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Liquid glass cover cards (área / serviço) — texto sempre legível */
.choice-card.cover-card {
  min-height: 148px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #12304d;
  color: #fff;
  isolation: isolate;
}
.choice-card.cover-card .cover-media {
  position: absolute;
  inset: 0;
  background-image: var(--cover-img, none),
    linear-gradient(145deg, #0b1f33 0%, #2563a8 100%);
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  transform: scale(1.04);
  transition: transform 0.55s var(--ease), opacity 0.35s;
  z-index: 0;
  pointer-events: none;
}
.choice-card.cover-card .cover-scrim {
  position: absolute;
  inset: 0;
  background: var(--cover-grad, linear-gradient(145deg, rgba(11,31,51,.88), rgba(37,99,168,.55)));
  z-index: 1;
  transition: opacity 0.35s;
  pointer-events: none;
}
.choice-card.cover-card .cover-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 148px;
  padding: 1.05rem 1.05rem 1rem;
  color: #fff;
}
.choice-card.cover-card .cover-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.choice-card.cover-card h3 {
  color: #fff;
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.75),
    0 2px 14px rgba(0, 0, 0, 0.45),
    0 0 1px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.25rem;
}
.choice-card.cover-card .meta {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 550;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 2px 10px rgba(0, 0, 0, 0.35);
}
.choice-card.cover-card .cover-media {
  opacity: 0.62;
  filter: saturate(1.05);
}
.choice-card.cover-card:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 44px rgba(11, 31, 51, 0.35);
}
.choice-card.cover-card:hover .cover-media {
  transform: scale(1.1);
  opacity: 0.65;
}
.choice-card.cover-card:hover .cover-icon {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.24);
}
.choice-card.cover-card:active,
.choice-card.cover-card.is-pressing {
  transform: scale(0.975);
}
.choice-card.lawyer .avatar,
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-400), var(--blue-800));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 168, 0.25);
}
.avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.65rem;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(18, 48, 77, 0.18);
  flex-shrink: 0;
}
.avatar-md, .avatar-img.avatar-md {
  width: 56px;
  height: 56px;
  margin-bottom: 0;
  font-size: 1.2rem;
}
.avatar-sm, .avatar-img.avatar-sm {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
  font-size: 0.85rem;
  display: inline-flex;
  vertical-align: middle;
}
.lawyer-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.lawyer-row-info { flex: 1; min-width: 0; }
.lawyer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, filter 0.2s, opacity 0.25s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(18, 48, 77, 0.18); }
.btn:active { transform: scale(0.98); }
.btn.btn-press:active { transform: scale(0.96); opacity: 0.9; }
.btn.is-loading { opacity: 0.75; pointer-events: none; animation: softPulse 1.2s ease infinite; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-800) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 168, 0.35);
}
.btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 10px 28px rgba(37, 99, 168, 0.45); }
.field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.card-enter { animation: fadeInUp var(--fade) both; }
.btn-secondary {
  background: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.9);
  color: var(--blue-900);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { color: var(--blue-700); border-color: var(--blue-400); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
}
.btn-whatsapp:hover { color: #fff; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-block { width: 100%; border-radius: 14px; }
.btn-danger {
  background: linear-gradient(135deg, #e85a70, #c43c55);
  color: #fff;
}

/* ── Forms ── */
.card {
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
}
.card h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.85rem;
  font-weight: 700;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid rgba(18, 48, 77, 0.12);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(91, 163, 217, 0.2);
}
.form-group textarea { min-height: 80px; resize: vertical; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-top: 0.65rem;
}

.alert {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.4s var(--ease);
}
.alert-error { background: rgba(254, 226, 226, 0.9); color: #9b1c2e; border: 1px solid #fecaca; }
.alert-success { background: rgba(220, 252, 231, 0.9); color: #14532d; border: 1px solid #bbf7d0; }
.alert-info { background: rgba(219, 234, 254, 0.9); color: #1e3a5f; border: 1px solid #bfdbfe; }
.alert-warn { background: rgba(254, 243, 199, 0.9); color: #92400e; border: 1px solid #fde68a; }

/* ── Calendar public ── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cal-nav strong {
  font-size: 1.15rem;
  color: var(--blue-900);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-head {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-day {
  aspect-ratio: 1;
  min-height: 52px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.5);
  transition: all 0.25s var(--ease);
  position: relative;
}
.cal-day.empty { background: transparent; border-color: transparent; }
.cal-day .num { font-weight: 700; font-size: 0.95rem; color: var(--blue-900); }
.cal-day.today {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgba(91, 163, 217, 0.35);
}
.cal-day.has-slot {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(232, 243, 251, 0.85));
  cursor: pointer;
}
.cal-day.has-slot:hover {
  transform: scale(1.06);
  background: linear-gradient(145deg, var(--blue-500), var(--blue-800));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(37, 99, 168, 0.3);
}
.cal-day.has-slot:hover .num { color: #fff; }
.cal-day a.day-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 14px;
}
.cal-day.disabled .num { color: #a8b8c8; font-weight: 500; }
.cal-day .dot-avail {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-500);
  margin-top: 3px;
}
.cal-day.has-slot:hover .dot-avail { background: #fff; }

/* Internal calendar days taller */
.cal-day.tall {
  aspect-ratio: auto;
  min-height: 92px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0.35rem;
}
.cal-event {
  font-size: 0.62rem;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ── Slots ── */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.55rem;
}
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.4rem;
  border-radius: 14px;
  font-weight: 750;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.7);
  border: 2px solid transparent;
  background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    linear-gradient(135deg, var(--blue-400), var(--blue-700));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: var(--blue-800);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  user-select: none;
}
.slot:hover {
  transform: translateY(-2px);
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  box-shadow: 0 8px 20px rgba(37, 99, 168, 0.3);
}
.slot.selected {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-800));
  box-shadow: 0 8px 22px rgba(37, 99, 168, 0.35);
  animation: softPulse 1.8s infinite;
}
.slot input { position: absolute; opacity: 0; pointer-events: none; }

/* ── Theme picker ── */
.theme-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.theme-bar span { font-weight: 600; margin-right: 0.25rem; }
.theme-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s;
  display: inline-block;
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.active { outline: 2px solid var(--blue-600); outline-offset: 2px; }

/* ── Breadcrumb chips ── */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.crumb {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  color: var(--blue-800);
  border: 1px solid rgba(255,255,255,0.7);
  font-weight: 600;
}
.crumb a { color: inherit; }

/* ── Internal shell ── */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, rgba(11, 31, 51, 0.92), rgba(26, 69, 112, 0.88));
  backdrop-filter: blur(20px);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.sidebar .logo {
  padding: 1.2rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 700;
}
.sidebar .logo small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 0.2rem;
}
.sidebar nav {
  flex: 1;
  padding: 0.85rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar nav a {
  color: rgba(255,255,255,0.85);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.sidebar .user-box {
  padding: 0.95rem 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}
.sidebar .user-box .role {
  opacity: 0.7;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar .user-box a { color: #9fd0f5; font-size: 0.8rem; }

.main {
  flex: 1;
  margin-left: 240px;
  padding: 1.4rem 1.5rem 2.5rem;
  max-width: 1180px;
  animation: fadeInUp var(--fade) both;
}
.main.main-full {
  max-width: none;
  width: calc(100% - 240px);
  padding: 1rem 1.15rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Dashboard calendário full ── */
.dash-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.dash-month-label {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-900);
  line-height: 1.1;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dash-month-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.dash-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.widget {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
}
.weather-widget .weather-now {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.weather-icon { font-size: 1.85rem; line-height: 1; }
.weather-temp {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1;
}
.weather-place { font-size: 0.8rem; font-weight: 650; color: var(--blue-800); }
.weather-label { font-size: 0.75rem; color: var(--muted); }
.weather-days {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(18,48,77,0.08);
}
.weather-day {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.wd-icon { font-size: 1rem; }
.wd-t { font-weight: 700; color: var(--blue-900); font-size: 0.78rem; }
.wd-rain { font-size: 0.68rem; opacity: 0.85; }

.day-msg-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--blue-600);
}
.day-msg-title {
  font-weight: 750;
  color: var(--blue-900);
  font-size: 0.95rem;
  margin: 0.2rem 0;
}
.day-msg-sub { font-size: 0.78rem; color: var(--muted); }
.day-msg.special {
  border: 1px solid rgba(91, 163, 217, 0.45);
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(232, 243, 251, 0.75));
}
.filter-widget label { display: block; margin-bottom: 0.35rem; }
.filter-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(18,48,77,0.12);
  padding: 0.45rem 0.55rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
}

.full-calendar {
  flex: 1;
  padding: 0.75rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cal-grid-full {
  flex: 1;
  gap: 5px;
  grid-auto-rows: minmax(90px, 1fr);
}
.cal-day.full {
  min-height: 90px;
  height: 100%;
  padding: 0.3rem;
  background: rgba(255,255,255,0.55);
}
.cal-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.cal-day-head .num {
  font-size: 0.95rem;
  font-weight: 800;
}
.cal-add {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--blue-700);
  background: rgba(91, 163, 217, 0.15);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.cal-day.full:hover .cal-add { opacity: 1; }
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}
.cal-event-link {
  display: block;
  font-size: 0.68rem;
  padding: 3px 5px;
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.15s, filter 0.15s;
}
.cal-event-link:hover {
  filter: brightness(1.08);
  transform: translateX(1px);
  text-decoration: none;
}
.cal-event-link .ev-law {
  opacity: 0.85;
  font-size: 0.62rem;
  display: block;
}

@media (max-width: 800px) {
  .main.main-full { width: 100%; }
  .cal-grid-full { grid-auto-rows: minmax(70px, auto); }
  .dash-month-label { font-size: 1.6rem; }
  .absence-panel-grid { grid-template-columns: 1fr; }
}

/* ── Bloqueios / férias ── */
.absence-panel {
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}
.absence-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.absence-panel h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.65rem;
  font-weight: 700;
}
.cal-day.day-blocked {
  background: linear-gradient(160deg, rgba(107, 114, 128, 0.18), rgba(200, 16, 46, 0.08));
  border-color: rgba(107, 114, 128, 0.35);
}
.cal-day.day-blocked .num { color: #6b7280; }
.block-banners {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 3px;
}
.block-banner {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: #fff !important;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.block-banner:hover { filter: brightness(1.08); text-decoration: none; }
.cal-legend { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.leg {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.leg-block {
  background: linear-gradient(135deg, #6b7280, #4b5563);
}
.absence-item .who {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.block-ev { opacity: 0.95; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th {
  text-align: left;
  padding: 0.55rem 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid rgba(18,48,77,0.1);
}
table.data td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(18,48,77,0.07);
  vertical-align: middle;
}
table.data tr:hover td { background: rgba(91, 163, 217, 0.06); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat {
  text-align: center;
  padding: 1rem;
}
.stat .v { font-size: 1.55rem; font-weight: 750; color: var(--blue-900); }
.stat .l { font-size: 0.75rem; color: var(--muted); }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  position: relative;
  z-index: 1;
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 1.85rem 1.6rem;
  animation: fadeInUp 0.55s var(--ease);
}
.login-card h1 {
  color: var(--blue-900);
  font-size: 1.35rem;
  text-align: center;
  margin-bottom: 0.2rem;
}
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.login-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid rgba(18,48,77,0.1);
  padding-top: 0.75rem;
  line-height: 1.55;
}
.login-hint code {
  background: var(--blue-100);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

/* Day timeline (painel) */
.timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.7);
  transition: transform 0.2s;
}
.timeline-item:hover { transform: translateX(3px); }
.timeline-item .time {
  font-weight: 750;
  color: var(--blue-800);
  font-size: 0.9rem;
}
.timeline-item .who { font-weight: 650; }
.timeline-item .sub { font-size: 0.8rem; color: var(--muted); }

.flex-gap { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }

.success-hero {
  text-align: center;
  padding: 2.25rem 1.4rem;
}
.success-hero .check {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #34d399, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.35);
  animation: fadeInUp 0.5s var(--ease);
}

@media (max-width: 800px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .shell { flex-direction: column; }
  .main { margin-left: 0; padding: 1rem; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .cal-day.tall { min-height: 56px; }
  .cal-event { display: none; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .choice-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------
   R1�R4: densidade, views, dark mode, admin
   ---------------------------------------------- */

.view-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}
.view-tabs { display: flex; gap: 0.3rem; }
.view-tab {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  background: rgba(255,255,255,0.35);
  text-decoration: none;
}
.view-tab:hover { color: var(--blue-900); }
.view-tab.active {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff !important;
}
.search-inline {
  display: flex;
  gap: 0.4rem;
  flex: 1;
  max-width: 360px;
}
.search-inline input {
  flex: 1;
  border-radius: 10px;
  border: 1px solid rgba(18,48,77,0.12);
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.55rem;
  align-items: flex-end;
}
.filters-bar label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 650;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.filters-bar select {
  border-radius: 8px;
  border: 1px solid rgba(18,48,77,0.12);
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  min-width: 130px;
}
.lawyer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin-bottom: 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.leg-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Day timeline compact + grid proporcional à duração */
.day-timeline { padding: 0.35rem 0.5rem; }
.day-timeline-proportional { overflow-x: auto; }
.day-grid-wrap {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.35rem;
  position: relative;
  min-width: 280px;
}
.day-grid-hours {
  position: relative;
}
.day-hour-mark {
  box-sizing: border-box;
  border-bottom: 1px solid rgba(18,48,77,0.06);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
  padding-right: 4px;
  padding-top: 2px;
}
.day-grid-canvas {
  position: relative;
  border-left: 1px solid rgba(18,48,77,0.08);
}
.day-grid-line {
  box-sizing: border-box;
  border-bottom: 1px dashed rgba(18,48,77,0.07);
}
.day-block {
  position: absolute;
  /* left/width vêm do style (colunas lado a lado); right NÃO fixo em 4px */
  right: auto;
  max-width: none;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 2;
  /* altura = duração; largura = fatia da sobreposição (não 100% se houver vários) */
  display: flex !important;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;
  min-height: 0;
  border-radius: 10px;
  /* herda liquid glass colorido do .cal-chip — não forçar sombra branca */
}
.day-block.dense {
  display: flex !important;
  flex-wrap: nowrap;
  padding: 4px 6px;
  font-size: 0.7rem;
  line-height: 1.2;
}
.day-block-col .chip-name {
  font-size: 0.68rem;
}
.day-block .chip-name {
  display: block;
  white-space: normal;
  line-height: 1.25;
  font-weight: 600;
  width: 100%;
}
.day-block strong {
  flex-shrink: 0;
}
.day-grid-add {
  position: absolute;
  left: 8px;
  top: 8px;
  opacity: 0.75;
}
.day-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.35rem;
  min-height: 28px;
  border-bottom: 1px solid rgba(18,48,77,0.06);
  padding: 1px 0;
}
.day-row.has-items { min-height: 32px; }
.day-time {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  padding-top: 4px;
  text-align: right;
}
.day-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: flex-start;
  padding: 1px 0;
}
.day-empty-slot { min-height: 22px; }
body.theme-dark .day-hour-mark,
body.theme-dark .day-grid-line {
  border-color: rgba(255,255,255,0.06);
}
body.theme-dark .day-grid-canvas {
  border-left-color: rgba(255,255,255,0.08);
}
.slot-add {
  opacity: 0;
  font-size: 0.75rem;
  color: var(--blue-600);
  padding: 0 4px;
  text-decoration: none;
}
.day-row:hover .slot-add, .wlg-cell:hover .slot-add { opacity: 0.7; }
.slot-add.tiny { font-size: 0.7rem; }

.cal-chip {
  border: none;
  border-radius: 9px;
  color: #fff !important;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
  /* COR sólida do profissional + leve brilho (sem lavar para branco) */
  --chip-c: #5ba3d9;
  background: var(--chip-c) !important;
  background-image: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 42%,
    rgba(0, 0, 0, 0.12) 100%
  ) !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.12s ease;
}
.cal-chip:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 5;
}
.cal-chip:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.cal-chip.dense {
  font-size: 0.68rem;
  padding: 4px 7px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: center;
  max-width: 100%;
}
.cal-chip.mini { font-size: 0.62rem; padding: 3px 5px; width: 100%; }
.chip-law, .chip-mod {
  opacity: 0.92;
  font-size: 0.62rem;
  font-weight: 600;
}
/* Shared Element / View Transition (chip ↔ modal) */
::view-transition-old(appt-card),
::view-transition-new(appt-card) {
  animation-duration: 0.38s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  mix-blend-mode: normal;
  height: 100%;
  overflow: clip;
}
.appt-modal-card.glass {
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 56px rgba(18, 48, 77, 0.2);
}
body.theme-dark .appt-modal-card.glass {
  background: rgba(18, 22, 30, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12);
}
body.theme-dark .cal-chip {
  border-color: color-mix(in srgb, var(--chip-c) 50%, transparent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.chip-name { font-weight: 500; }
/* Cliente chegou na unidade (recepção) — indicador para o advogado, sem WhatsApp */
.cal-chip.chip-arrived {
  box-shadow: inset 0 0 0 2px #34d399, 0 0 0 1px rgba(5, 150, 105, 0.45);
}
.chip-arrived-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(5, 150, 105, 0.95);
  color: #ecfdf5;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.2;
  white-space: nowrap;
}
.chip-wrap { position: relative; }
.chip-expand {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0;
  top: 100%;
  min-width: 220px;
  max-width: 300px;
  margin-top: 2px;
}
.chip-expand.open { display: block; animation: fadeIn 0.15s ease; }
.chip-expand-inner {
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 0.65rem 0.75rem;
  color: var(--text);
}

/* Month dense */
.cal-day.dense { min-height: 72px; padding: 0.2rem; }
.cal-grid-full.dense-grid { gap: 3px; grid-auto-rows: minmax(72px, 1fr); }
.cal-event-link.dense {
  font-size: 0.62rem;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.2;
}
.day-count {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: auto;
  margin-right: 2px;
}
.more-link {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--blue-700);
  padding: 1px 3px;
}
.cal-day-head .num { text-decoration: none; color: inherit; }

/* Week layouts */
.week-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.week-day-col {
  padding: 0.4rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.week-day-col.today-col {
  outline: 2px solid rgba(59, 130, 196, 0.45);
}
.week-day-head {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}
.week-day-head strong { color: var(--blue-900); }
.count-pill {
  background: rgba(59,130,196,0.15);
  color: var(--blue-800);
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0 0.4rem;
  margin-left: auto;
}
.week-day-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  max-height: 55vh;
}
.day-link { margin-top: 0.35rem; font-size: 0.72rem; }
.empty-day { padding: 0.5rem 0; }
.active-layout {
  outline: 2px solid var(--blue-500);
  font-weight: 700;
}

.week-lawyer-grid {
  overflow: auto;
  max-height: calc(100vh - 220px);
  padding: 0.35rem;
}
.wlg-head, .wlg-row {
  display: grid;
  grid-template-columns: 100px repeat(7, minmax(80px, 1fr));
  gap: 3px;
  min-width: 780px;
}
.wlg-head { position: sticky; top: 0; z-index: 5; background: var(--glass-strong); }
.wlg-day-h, .wlg-corner, .wlg-name, .wlg-cell {
  padding: 0.3rem;
  font-size: 0.72rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.35);
}
.wlg-day-h { text-align: center; font-weight: 700; color: var(--blue-900); }
.wlg-day-h.today { outline: 2px solid var(--blue-500); }
.wlg-day-h small { display: block; color: var(--muted); font-weight: 600; }
.wlg-name {
  font-weight: 700;
  color: var(--blue-900);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.wlg-name small { font-weight: 500; color: var(--muted); }
.wlg-cell {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.more-count { font-size: 0.62rem; color: var(--muted); font-weight: 700; }

.timeline.dense-timeline .timeline-item,
.compact-item {
  padding: 0.35rem 0 !important;
  gap: 0.5rem;
}
.compact-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-800);
  font-size: 0.88rem;
}
.theme-toggle-side { padding: 0.5rem 0.85rem; }
.theme-mode-link { margin-left: auto; font-size: 0.78rem; }
.theme-mode-link a { color: var(--muted); }

/* Modalidade p�blico */
.modality-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}
.mod-pick {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(18,48,77,0.12);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mod-pick input { display: none; }
.mod-pick span { font-weight: 700; font-size: 0.88rem; color: var(--blue-900); }
.mod-pick small { font-size: 0.72rem; color: var(--muted); }
.mod-pick.selected {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(91,163,217,0.25);
  background: rgba(232,243,251,0.9);
}

/* Admin dashboard */
.impact-stats .stat.accent .v {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 140px;
  padding-top: 0.5rem;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 2px;
}
.bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-800));
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
}
.bar-n { font-size: 0.68rem; font-weight: 700; color: var(--blue-900); }
.bar-l { font-size: 0.62rem; color: var(--muted); }
.spark-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
}
.spark {
  flex: 1;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-700));
  border-radius: 2px;
  min-height: 2px;
  opacity: 0.85;
}
.occ-row {
  display: grid;
  grid-template-columns: 120px 1fr 36px;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}
.occ-name { display: flex; align-items: center; gap: 0.3rem; white-space: nowrap; overflow: hidden; }
.occ-bar-bg {
  height: 10px;
  background: rgba(18,48,77,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.occ-bar { height: 100%; border-radius: 999px; min-width: 2px; }
.occ-n { font-weight: 700; text-align: right; color: var(--blue-900); }
.rank-list { list-style: none; }
.rank-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(18,48,77,0.06);
  font-size: 0.85rem;
}
.config-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wrap-form { flex-wrap: wrap; }
.lawyer-admin-card .config-row select { max-width: 200px; }

/* -- Dark mode -- */
body.theme-dark {
  --blue-950: #e8f1fa;
  --blue-900: #e2eef9;
  --blue-800: #c5daf0;
  --blue-700: #8ec5eb;
  --blue-600: #5ba3d9;
  --blue-500: #3b82c4;
  --blue-400: #2563a8;
  --blue-100: #1a2f45;
  --blue-50: #0b1624;
  --white: #0f1c2c;
  --glass: rgba(15, 28, 44, 0.62);
  --glass-strong: rgba(18, 32, 52, 0.82);
  --glass-border: rgba(142, 197, 235, 0.14);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --text: #e8f1fa;
  --muted: #9bb4cc;
  color: var(--text);
  background: #0b1624;
}
body.theme-dark::before {
  background: linear-gradient(
    160deg,
    rgba(5, 12, 22, 0.75) 0%,
    rgba(15, 28, 44, 0.55) 50%,
    rgba(11, 22, 36, 0.7) 100%
  );
}
body.theme-dark.bg-midnight {
  background: radial-gradient(ellipse at 20% 20%, #1a3a5c 0%, #0a1220 55%, #050a12 100%);
  --bg-image: none;
}
body.theme-dark.bg-obsidian {
  background: radial-gradient(ellipse at 70% 10%, #2a1f3d 0%, #0d0f14 50%, #050508 100%);
  --bg-image: none;
}
body.theme-dark.bg-deepblue {
  background: linear-gradient(165deg, #0a1f3d 0%, #0c2847 40%, #061018 100%);
  --bg-image: none;
}
body.theme-dark .sidebar {
  background: rgba(10, 18, 30, 0.88);
  border-color: rgba(142, 197, 235, 0.1);
}
body.theme-dark .view-tab { background: rgba(255,255,255,0.06); color: var(--muted); }
body.theme-dark .view-tab.active { color: #fff !important; }
body.theme-dark .search-inline input,
body.theme-dark .filters-bar select,
body.theme-dark .filter-select,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(8, 16, 28, 0.85);
  border-color: rgba(142, 197, 235, 0.18);
  color: var(--text);
}
body.theme-dark .cal-day.full,
body.theme-dark .wlg-day-h,
body.theme-dark .wlg-corner,
body.theme-dark .wlg-name,
body.theme-dark .wlg-cell {
  background: rgba(255,255,255,0.04);
}
body.theme-dark .day-row { border-color: rgba(255,255,255,0.06); }
body.theme-dark .mod-pick {
  background: rgba(255,255,255,0.05);
  border-color: rgba(142, 197, 235, 0.15);
}
body.theme-dark .mod-pick.selected {
  background: rgba(37, 99, 168, 0.25);
  border-color: var(--blue-600);
}
body.theme-dark .occ-bar-bg { background: rgba(255,255,255,0.08); }
body.theme-dark .rank-list li { border-color: rgba(255,255,255,0.06); }
body.theme-dark .dash-month-label {
  -webkit-text-fill-color: transparent;
}
body.theme-dark .swatch-midnight {
  background: radial-gradient(circle at 30% 30%, #1a3a5c, #050a12) !important;
}
body.theme-dark .swatch-obsidian {
  background: radial-gradient(circle at 30% 30%, #2a1f3d, #050508) !important;
}
body.theme-dark .swatch-deepblue {
  background: linear-gradient(135deg, #0a1f3d, #061018) !important;
}

@media (max-width: 900px) {
  .week-days-grid { grid-template-columns: 1fr 1fr; }
  .wlg-head, .wlg-row { grid-template-columns: 80px repeat(7, minmax(70px, 1fr)); }
}
@media (max-width: 600px) {
  .week-days-grid { grid-template-columns: 1fr; }
  .view-nav { flex-direction: column; align-items: stretch; }
  .search-inline { max-width: none; }
}

/* -- Modal de atendimento (fade) -- */
body.modal-open { overflow: hidden; }
.appt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}
.appt-modal.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.appt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.appt-modal.open .appt-modal-backdrop { opacity: 1; }
.appt-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 1.2rem 1.3rem 1.05rem;
  max-height: min(88vh, 580px);
  overflow: auto;
  border-radius: 16px;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.28s var(--ease);
}
.appt-modal.open .appt-modal-card {
  transform: none;
  opacity: 1;
}
.appt-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(18, 48, 77, 0.08);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.appt-modal-close:hover { background: rgba(18, 48, 77, 0.14); }
.appt-modal-accent {
  height: 3px;
  border-radius: 999px;
  margin: 0 0 0.85rem;
  background: var(--blue-500);
}
.appt-modal-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 0.3rem;
  padding-right: 2rem;
}
.appt-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue-900);
  margin: 0 0 0.9rem;
  padding-right: 2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.appt-modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.1rem;
  margin-bottom: 0.95rem;
  align-items: start;
}
.appt-modal-meta > div {
  min-height: 2.55rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.15rem;
  min-width: 0;
}
.appt-modal-meta .full {
  grid-column: 1 / -1;
  min-height: 0;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(18, 48, 77, 0.06);
  margin-top: 0.1rem;
}
.appt-modal-meta .lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.appt-modal-meta strong,
.appt-modal-meta .val {
  font-size: 0.9rem;
  color: #0f2744;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.3;
  word-break: break-word;
}
.appt-modal-meta .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.appt-modal-meta .notes {
  font-size: 0.82rem;
  color: #5b6b7c;
  white-space: pre-wrap;
  line-height: 1.4;
  font-weight: 550;
}
.appt-modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.3;
  background: rgba(18, 48, 77, 0.08);
  color: #12304d;
}
.appt-modal-badge.is-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}
.appt-modal-badge.is-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}
.appt-modal-badge.is-bad {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}
.appt-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.8rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(18, 48, 77, 0.1);
}
.appt-modal-actions .inline-form {
  display: inline-flex;
  margin: 0;
}
.appt-modal-actions .btn {
  min-height: 2rem;
  font-weight: 700 !important;
  border-radius: 9px !important;
  padding: 0.35rem 0.7rem !important;
  font-size: 0.8rem !important;
}
.appt-modal-actions .btn-secondary {
  background: #fff !important;
  color: #12304d !important;
  border: 1px solid #94a3b8 !important;
  box-shadow: none !important;
}
.appt-modal-actions .btn-close-modal {
  margin-left: auto;
}
.appt-modal-loading {
  text-align: center;
  color: var(--muted);
  padding: 1.5rem;
  animation: softPulse 1.4s ease infinite;
}
.appt-modal-flash {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--success, #1f8a5b);
  margin-bottom: 0.5rem;
  min-height: 0;
}
.appt-modal-flash:empty { display: none; }
body.theme-dark .appt-modal-backdrop { background: rgba(0, 0, 0, 0.55); }
body.theme-dark .appt-modal-close { background: rgba(255, 255, 255, 0.08); }
body.theme-dark .appt-modal-actions { border-color: rgba(255, 255, 255, 0.1); }
body.theme-dark .appt-modal-meta strong,
body.theme-dark .appt-modal-meta .val,
body.theme-dark .appt-modal-title { color: #f1f5f9 !important; }
body.theme-dark .appt-modal-meta .full { border-color: rgba(255, 255, 255, 0.08); }
body.theme-dark .appt-modal-actions .btn-secondary {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

.input-inline {
  width: 100%;
  border: 1px solid rgba(18,48,77,0.12);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  background: rgba(255,255,255,0.85);
  color: var(--text);
}
.input-inline.short { width: 72px; }
.inline-edit-form { display: contents; }
.row-inactive { opacity: 0.55; }
body.theme-dark .input-inline {
  background: rgba(8,16,28,0.85);
  border-color: rgba(142,197,235,0.18);
}

button.cal-event-link {
  appearance: none;
  -webkit-appearance: none;
}
button.block-banner {
  appearance: none;
}

/* -- Sidebar moderna -- */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem 0.75rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: rgba(255,255,255,0.78) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease), background 0.25s, box-shadow 0.25s, color 0.2s;
}
.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(91,163,217,0.0), rgba(91,163,217,0.22), rgba(255,255,255,0.08));
  opacity: 0;
  transition: opacity 0.25s;
}
.nav-item:hover {
  transform: translateX(3px);
  background: rgba(255,255,255,0.1);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.nav-item:hover::before { opacity: 1; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(91,163,217,0.45), rgba(37,99,168,0.55));
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(37,99,168,0.35), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #fff;
}
.nav-ico {
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}
.nav-txt { position: relative; z-index: 1; }
.user-box .user-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}
.user-avatar {
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.user-name { font-weight: 700; font-size: 0.88rem; color: #fff; }
.user-meta .role { font-size: 0.72rem; opacity: 0.8; }
.logout-link { font-size: 0.78rem; color: rgba(255,255,255,0.7) !important; }
.avatar-xs {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* Filtros t�teis */
.tactile-filters {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tf-block { display: flex; flex-direction: column; gap: 0.3rem; }
.tf-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
}
.tf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  background: rgba(255,255,255,0.45);
  color: var(--blue-900);
  border: 1px solid rgba(18,48,77,0.1);
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 32px;
}
.tf-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18,48,77,0.12);
  color: var(--blue-900);
}
.tf-chip.active {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(37,99,168,0.3);
}
.tf-chip.me { border-style: dashed; }
.tf-chip.me.active { border-style: solid; }
.tf-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}
.tf-selects label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 650;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.tf-selects select {
  border-radius: 8px;
  border: 1px solid rgba(18,48,77,0.12);
  padding: 0.35rem 0.5rem;
  font-family: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

.chip-btn {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(59,130,196,0.12);
  color: var(--blue-800) !important;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none !important;
}
.chip-btn.me { background: rgba(13,148,136,0.15); color: #0f766e !important; }
.me-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(13,148,136,0.18);
  color: #0f766e;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.row-mine { background: rgba(13,148,136,0.06); border-radius: 8px; }
.occ-me .occ-name { font-weight: 800; }
.stat-sub { font-size: 0.68rem; color: var(--muted); margin-top: 0.15rem; }

/* Dark mode � menos branco, mais glass escuro */
body.theme-dark {
  --glass: rgba(12, 22, 38, 0.72);
  --glass-strong: rgba(14, 26, 44, 0.88);
  --glass-border: rgba(100, 160, 210, 0.12);
  --text: #d5e4f2;
  --muted: #8aa4bc;
  --blue-900: #d5e4f2;
  --blue-800: #b8d0e8;
}
body.theme-dark .glass,
body.theme-dark .glass-soft {
  background: var(--glass-strong);
  border-color: var(--glass-border);
  box-shadow: 0 10px 36px rgba(0,0,0,0.4);
}
body.theme-dark .glass-soft {
  background: var(--glass);
}
body.theme-dark .cal-day.full,
body.theme-dark .week-day-col,
body.theme-dark .day-timeline,
body.theme-dark .full-calendar {
  background: rgba(8, 16, 28, 0.55) !important;
}
body.theme-dark .cal-day.full {
  border-color: rgba(100,160,210,0.1);
}
body.theme-dark .cal-day.today {
  outline: 2px solid rgba(91,163,217,0.5);
  background: rgba(37,99,168,0.18) !important;
}
body.theme-dark .tf-chip {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(100,160,210,0.15);
}
body.theme-dark .tf-chip.active {
  color: #fff !important;
}
body.theme-dark .view-tab {
  background: rgba(255,255,255,0.06);
}
body.theme-dark .stat .v,
body.theme-dark .weather-temp,
body.theme-dark .dash-month-label,
body.theme-dark .bar-n,
body.theme-dark .occ-n,
body.theme-dark h1, body.theme-dark h2 {
  color: #e8f1fa !important;
  -webkit-text-fill-color: #e8f1fa;
}
body.theme-dark .dash-month-label {
  background: none;
}
body.theme-dark .timeline-item,
body.theme-dark table.data td,
body.theme-dark table.data th {
  border-color: rgba(255,255,255,0.06);
}
body.theme-dark .page-title h1 { color: #e8f1fa; }
body.theme-dark .btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #d5e4f2;
  border-color: rgba(100,160,210,0.2);
}
body.theme-dark .chip-btn {
  background: rgba(91,163,217,0.18);
  color: #b8d0e8 !important;
}
body.theme-dark .me-tag {
  background: rgba(45,212,191,0.15);
  color: #5eead4;
}
body.theme-dark .row-mine {
  background: rgba(45,212,191,0.08);
}
body.theme-dark .day-row { border-color: rgba(255,255,255,0.05); }
body.theme-dark .search-inline input,
body.theme-dark .tf-selects select,
body.theme-dark input, body.theme-dark select, body.theme-dark textarea {
  background: rgba(6, 12, 22, 0.9);
  border-color: rgba(100,160,210,0.18);
  color: #e8f1fa;
}
body.theme-dark .appt-modal-card {
  background: rgba(14, 26, 44, 0.95);
}
body.theme-dark .filters-bar {
  background: var(--glass);
}

/* -- Filtros compactos (selects) -- */
.view-nav.compact-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.5rem;
}
.filter-bar-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem 0.55rem;
  flex: 1;
  min-width: 200px;
}
.f-lab {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.f-lab select {
  min-width: 120px;
  max-width: 180px;
  border-radius: 8px;
  border: 1px solid rgba(18,48,77,0.14);
  padding: 0.28rem 0.45rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: rgba(255,255,255,0.88);
  color: var(--text);
}

/* -- Dashboard semana no topo -- */
.dash-title-compact { margin-bottom: 0.65rem; }
.dash-week-block {
  padding: 0.55rem 0.65rem 0.65rem;
  margin-bottom: 0.75rem;
}
.dash-week-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.dash-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.dash-week-col {
  background: rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 0.3rem;
  min-height: 110px;
  border: 1px solid rgba(18,48,77,0.06);
}
.dash-week-col.today-col {
  outline: 2px solid rgba(59,130,196,0.45);
}
.dw-head {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
  text-decoration: none !important;
  color: var(--blue-900);
}
.dw-head strong { font-size: 0.78rem; }
.dw-head em {
  margin-left: auto;
  font-style: normal;
  font-weight: 800;
  color: var(--muted);
  font-size: 0.68rem;
}
.dw-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.empty-mini { font-size: 0.7rem; opacity: 0.6; }

/* Pr�ximos compactos */
.compact-card { padding: 0.75rem 0.85rem; }
.compact-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.compact-list-head h2 { margin: 0; font-size: 0.95rem; }
.upcoming-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.up-row {
  display: grid;
  grid-template-columns: 88px 1fr 90px 70px;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 0.28rem 0.35rem;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}
.up-row:hover { background: rgba(59,130,196,0.1); }
.up-time {
  font-weight: 750;
  font-size: 0.72rem;
  border-left: 3px solid var(--blue-500);
  padding-left: 0.4rem;
  white-space: nowrap;
}
.up-who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-law {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.up-meta { font-size: 0.68rem; text-align: right; }

/* -- Dark mode: bot�es leg�veis + glass cinza -- */
body.theme-dark .btn-secondary {
  background: rgba(148, 163, 184, 0.18) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  color: #e2e8f0 !important;
  backdrop-filter: blur(12px);
}
body.theme-dark .btn-secondary:hover {
  background: rgba(148, 163, 184, 0.28) !important;
  color: #fff !important;
  border-color: rgba(148, 163, 184, 0.5) !important;
}
body.theme-dark .btn-primary {
  color: #fff !important;
}
body.theme-dark .btn-ghost {
  color: #e2e8f0 !important;
  border-color: rgba(148,163,184,0.35);
}
body.theme-dark .nav-mode.btn-secondary {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #f1f5f9 !important;
}
body.theme-dark .view-tab {
  background: rgba(148,163,184,0.12);
  color: #cbd5e1 !important;
}
body.theme-dark .view-tab.active {
  background: linear-gradient(135deg, #334155, #1e3a5f);
  color: #f8fafc !important;
}
body.theme-dark .f-lab select,
body.theme-dark .filter-bar-compact select,
body.theme-dark .search-inline input {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(148,163,184,0.25) !important;
  color: #e2e8f0 !important;
}
body.theme-dark .dash-week-col {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148,163,184,0.12);
}
body.theme-dark .dw-head { color: #e2e8f0; }
body.theme-dark .up-row:hover { background: rgba(148,163,184,0.12); }
body.theme-dark .up-who { color: #e2e8f0; }
body.theme-dark .chip-btn {
  background: rgba(148,163,184,0.15);
  color: #e2e8f0 !important;
}
/* fundos dark com imagem real (liquid glass overlay) */
body.theme-dark.bg-midnight,
body.theme-dark.bg-obsidian,
body.theme-dark.bg-deepblue {
  background-color: #0b1220;
  background-image: var(--bg-image) !important;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.theme-dark::before {
  background: linear-gradient(
    160deg,
    rgba(2, 6, 14, 0.72) 0%,
    rgba(15, 23, 42, 0.55) 45%,
    rgba(8, 12, 22, 0.7) 100%
  ) !important;
}
body.theme-dark .glass,
body.theme-dark .glass-soft {
  background: rgba(15, 23, 42, 0.62) !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(20px) saturate(1.2);
}
body.theme-dark .theme-swatch.swatch-midnight,
body.theme-dark .theme-swatch.swatch-obsidian,
body.theme-dark .theme-swatch.swatch-deepblue {
  background-size: cover !important;
}

@media (max-width: 900px) {
  .dash-week-grid { grid-template-columns: repeat(4, 1fr); }
  .up-row { grid-template-columns: 80px 1fr 70px; }
  .up-meta { display: none; }
}
@media (max-width: 600px) {
  .dash-week-grid { grid-template-columns: repeat(2, 1fr); }
  .view-nav.compact-nav { flex-direction: column; align-items: stretch; }
}

/* -- Dashboard stats layout -- */
.dash-stats-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
  align-items: stretch;
}
.chart-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 0.85rem 1rem;
}
.chart-card h2 {
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
  color: var(--blue-900);
}
.bar-chart-wide {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 160px;
  height: 160px;
  padding-top: 0.25rem;
}
.bar-chart-wide .bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}
.bar-chart-wide .bar-track {
  width: 100%;
  max-width: 42px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: rgba(59, 130, 196, 0.08);
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
}
.bar-chart-wide .bar {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-700));
}
.bar-chart-wide .bar-n {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--blue-900);
}
.bar-chart-wide .bar-l {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}
.spark-chart-wide {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 140px;
  height: 140px;
  padding: 0.25rem 0;
}
.spark-chart-wide .spark {
  flex: 1;
  min-width: 3px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-800));
  opacity: 0.9;
  min-height: 2px;
}

/* Ocupa��o limpa */
.occ-card .occ-list { display: flex; flex-direction: column; gap: 0.45rem; }
.occ-row.clean {
  display: grid;
  grid-template-columns: 100px 1fr 32px;
  gap: 0.45rem;
  align-items: center;
  background: transparent !important;
  padding: 0.15rem 0;
}
.occ-row.clean .occ-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.occ-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ-bar-bg.light {
  height: 8px;
  background: rgba(18, 48, 77, 0.08) !important;
  border-radius: 999px;
  overflow: hidden;
}
body.theme-dark .occ-bar-bg.light {
  background: rgba(148, 163, 184, 0.15) !important;
}
body.theme-dark .bar-chart-wide .bar-track {
  background: rgba(148, 163, 184, 0.12);
}

/* Avatares compactos */
.avatar-tiny {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  display: inline-block;
  vertical-align: middle;
}
.avatar-tiny.avatar-fallback,
.avatar-fallback {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
}
.avatar-xs {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.avatar-sm {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.user-box .user-avatar,
.user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.user-edit-card { margin-bottom: 0.75rem; }
.user-edit-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

/* chips/calendar smaller photos */
.wlg-name .avatar-xs,
.chip-law + img,
.up-law .avatar-xs {
  width: 16px !important;
  height: 16px !important;
}

@media (max-width: 1100px) {
  .dash-stats-grid { grid-template-columns: 1fr 1fr; }
  .occ-card { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .dash-stats-grid { grid-template-columns: 1fr; }
}

/* -- Bloco inferior dashboard: clima + gr�ficos -- */
.dash-lower {
  margin-top: 1.15rem;
  padding-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dash-stats-row {
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
.chart-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 0.9rem 1rem 1rem;
}
.chart-card h2 {
  font-size: 0.9rem;
  margin: 0 0 0.15rem;
  color: var(--blue-900);
}
.chart-sub {
  font-size: 0.72rem;
  margin-bottom: 0.55rem;
}

/* Barras 7 dias � altura fixa real */
.bar-chart-wide {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 168px;
  min-height: 168px;
  width: 100%;
}
.bar-chart-wide .bar-col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.bar-chart-wide .bar-track {
  width: 100%;
  max-width: 48px;
  height: 128px !important;
  min-height: 128px !important;
  flex: 0 0 128px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(59, 130, 196, 0.1);
  border-radius: 10px 10px 4px 4px;
  overflow: hidden;
  position: relative;
}
.bar-chart-wide .bar {
  width: 100%;
  max-width: 48px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #6eb3e8 0%, #2563a8 100%);
  transition: height 0.35s ease;
  min-height: 0;
}
.bar-chart-wide .bar.has-val {
  min-height: 10px;
}
.bar-chart-wide .bar-n {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1;
}
.bar-chart-wide .bar-l {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.spark-chart-wide {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 140px;
  min-height: 140px;
  width: 100%;
  padding: 0.2rem 0;
  background: linear-gradient(180deg, rgba(59,130,196,0.06), transparent);
  border-radius: 10px;
}
.spark-chart-wide .spark {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #8ec5eb, #1a4570);
  align-self: flex-end;
}
.spark-chart-wide .spark.has-val {
  min-height: 6px;
}

/* Clima painel */
.weather-panel {
  padding: 0.9rem 1.1rem 0.75rem;
  margin: 0;
}
.weather-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  align-items: center;
}
.weather-now-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.weather-icon-lg { font-size: 2.4rem; line-height: 1; }
.weather-temp-lg {
  font-size: 2rem;
  font-weight: 850;
  color: var(--blue-900);
  line-height: 1;
}
.weather-today-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
}
.wtm {
  display: flex;
  flex-direction: column;
  min-width: 3.2rem;
}
.wtm-l {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}
.wtm strong {
  font-size: 0.95rem;
  color: var(--blue-900);
}
.weather-alerts {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.weather-alert {
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: #92400e;
}
body.theme-dark .weather-alert {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.weather-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(18,48,77,0.08);
}
.weather-week-day {
  text-align: center;
  padding: 0.35rem 0.2rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.35);
  font-size: 0.72rem;
}
.weather-week-day.is-today {
  outline: 2px solid rgba(59, 130, 196, 0.45);
  background: rgba(91, 163, 217, 0.12);
}
.wwd-wd { font-weight: 800; color: var(--blue-900); font-size: 0.72rem; }
.wwd-num { color: var(--muted); font-size: 0.65rem; margin-bottom: 0.15rem; }
.wwd-icon { font-size: 1.15rem; line-height: 1.2; }
.wwd-t { display: flex; justify-content: center; gap: 0.25rem; font-weight: 750; }
.wwd-t .tmax { color: var(--blue-900); }
.wwd-t .tmin { color: var(--muted); font-weight: 600; }
.wwd-rain { font-size: 0.62rem; color: var(--blue-600); margin-top: 0.1rem; }
.weather-updated { font-size: 0.68rem; margin-top: 0.45rem; text-align: right; }

/* -- Dark mode: bot�es pretos leg�veis -- */
body.theme-dark .btn-secondary,
body.theme-dark a.btn-secondary,
body.theme-dark button.btn-secondary {
  background: #0a0a0a !important;
  border: 1px solid #3f3f46 !important;
  color: #f4f4f5 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
body.theme-dark .btn-secondary:hover {
  background: #18181b !important;
  border-color: #52525b !important;
  color: #ffffff !important;
}
body.theme-dark .btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #0f172a) !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}
body.theme-dark .btn-primary:hover {
  filter: brightness(1.15);
  color: #fff !important;
}
body.theme-dark .nav-mode {
  background: #000 !important;
  color: #fafafa !important;
  border-color: #3f3f46 !important;
}
body.theme-dark .view-tab {
  background: #0c0c0e !important;
  color: #d4d4d8 !important;
  border: 1px solid #27272a;
}
body.theme-dark .view-tab.active {
  background: linear-gradient(135deg, #1c1c1f, #27272a) !important;
  color: #fafafa !important;
  border-color: #52525b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
body.theme-dark .f-lab select,
body.theme-dark .search-inline input,
body.theme-dark select,
body.theme-dark input,
body.theme-dark textarea {
  background: #09090b !important;
  border-color: #3f3f46 !important;
  color: #f4f4f5 !important;
}
body.theme-dark .bar-chart-wide .bar-track {
  background: rgba(255,255,255,0.06) !important;
}
body.theme-dark .spark-chart-wide {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}
body.theme-dark .weather-week-day {
  background: rgba(0,0,0,0.35);
}
body.theme-dark .wwd-wd,
body.theme-dark .wtm strong,
body.theme-dark .weather-temp-lg {
  color: #f4f4f5 !important;
}
body.theme-dark .weather-week {
  border-color: rgba(255,255,255,0.08);
}

@media (max-width: 1100px) {
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
  .occ-card { grid-column: 1 / -1; }
  .weather-week { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .dash-stats-row { grid-template-columns: 1fr; }
  .weather-week { grid-template-columns: repeat(3, 1fr); }
}

/* --------------------------------------
   Dashboard compacto + clima animado + typewriter
   -------------------------------------- */
.dash-page .main-full { gap: 0; }
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.9rem;
  margin: 0.45rem 0 0.55rem;
}
.dash-date { font-size: 0.75rem; font-weight: 650; margin-bottom: 0.2rem; }
.dash-hello {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue-900);
  min-height: 1.5em;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}
.dash-motto {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.35em;
  max-width: 40rem;
  line-height: 1.4;
  margin: 0;
}
.tw-cursor::after {
  content: "?";
  margin-left: 2px;
  opacity: 0.7;
  animation: twBlink 0.75s step-end infinite;
  color: var(--blue-600);
  font-size: 0.85em;
}
@keyframes twBlink {
  50% { opacity: 0; }
}

/* Faixa de clima compacta */
.wx-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.35rem;
}
.wx-today {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 200px;
}
.wx-today-text { line-height: 1.2; }
.wx-temp {
  font-size: 1.55rem;
  font-weight: 850;
  color: var(--blue-900);
  line-height: 1;
}
.wx-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  color: var(--muted);
}
.wx-meta strong { color: var(--blue-900); font-size: 0.8rem; }
.wx-minmax {
  display: flex;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 0.15rem;
}
.wx-week {
  display: flex;
  flex: 1;
  gap: 0.25rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.wx-day {
  flex: 1 1 0;
  min-width: 52px;
  text-align: center;
  padding: 0.25rem 0.15rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.4);
}
.wx-day.is-today {
  outline: 2px solid rgba(59,130,196,0.45);
  background: rgba(91,163,217,0.12);
}
.wx-day-wd { font-size: 0.65rem; font-weight: 800; color: var(--blue-900); }
.wx-day-t { font-size: 0.68rem; display: flex; justify-content: center; gap: 0.2rem; }
.wx-day-t b { color: var(--blue-900); }
.wx-day-t i { font-style: normal; color: var(--muted); }
.wx-alerts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  width: 100%;
}
.wx-alert-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(217,119,6,0.14);
  color: #92400e;
  border: 1px solid rgba(217,119,6,0.25);
}
body.theme-dark .wx-alert-pill {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.3);
}
body.theme-dark .wx-day { background: rgba(0,0,0,0.28); }
body.theme-dark .wx-temp,
body.theme-dark .wx-meta strong,
body.theme-dark .dash-hello { color: #f4f4f5 !important; }

/* �cones clim�ticos animados (CSS, sem fundo) */
.wx-icon {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  vertical-align: middle;
}
.wx-day .wx-icon { width: 28px; height: 28px; margin: 0.1rem auto; display: block; }
.wx-sun-core {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe566, #f59e0b 70%, #d97706);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
  animation: wxPulse 2.2s ease-in-out infinite;
}
.wx-sun-rays {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 12deg, #fbbf24 12deg 20deg, transparent 20deg 45deg,
      #fbbf24 45deg 53deg, transparent 53deg 90deg, #fbbf24 90deg 98deg, transparent 98deg 135deg,
      #fbbf24 135deg 143deg, transparent 143deg 180deg, #fbbf24 180deg 188deg, transparent 188deg 225deg,
      #fbbf24 225deg 233deg, transparent 233deg 270deg, #fbbf24 270deg 278deg, transparent 278deg 315deg,
      #fbbf24 315deg 323deg, transparent 323deg 360deg);
  opacity: 0.85;
  animation: wxSpin 8s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 40%);
  mask: radial-gradient(circle, transparent 38%, #000 40%);
}
.wx-cloud {
  position: absolute;
  background: #e8eef5;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(15,23,42,0.12);
}
.wx-cloud.c1 {
  width: 70%;
  height: 38%;
  left: 12%;
  top: 38%;
  animation: wxFloat 3.2s ease-in-out infinite;
}
.wx-cloud.c1::before,
.wx-cloud.c1::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.wx-cloud.c1::before { width: 55%; height: 120%; left: 10%; top: -55%; }
.wx-cloud.c1::after { width: 45%; height: 100%; right: 12%; top: -40%; }
.wx-cloud.c2 {
  width: 45%;
  height: 28%;
  right: 4%;
  top: 28%;
  opacity: 0.85;
  animation: wxFloat 3.8s ease-in-out infinite reverse;
}
.wx-cloud.dark { background: #94a3b8; }
.wx-drop {
  position: absolute;
  width: 3px;
  height: 8px;
  background: linear-gradient(#38bdf8, #0284c7);
  border-radius: 50% 50% 40% 40%;
  animation: wxRain 0.9s linear infinite;
  opacity: 0.9;
}
.wx-drop.d1 { left: 28%; top: 62%; animation-delay: 0s; }
.wx-drop.d2 { left: 48%; top: 58%; animation-delay: 0.25s; }
.wx-drop.d3 { left: 66%; top: 64%; animation-delay: 0.5s; }
.wx-bolt {
  position: absolute;
  left: 42%;
  top: 48%;
  width: 10px;
  height: 16px;
  background: #facc15;
  clip-path: polygon(40% 0, 100% 0, 55% 45%, 85% 45%, 0 100%, 30% 50%, 5% 50%);
  animation: wxFlash 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(250,204,21,0.7));
}
.wx-fog {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148,163,184,0.75);
  animation: wxFog 2.8s ease-in-out infinite;
}
.wx-fog.f1 { top: 30%; }
.wx-fog.f2 { top: 48%; animation-delay: 0.4s; opacity: 0.7; }
.wx-fog.f3 { top: 66%; animation-delay: 0.8s; opacity: 0.55; }

@keyframes wxSpin { to { transform: rotate(360deg); } }
@keyframes wxPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes wxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes wxRain {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}
@keyframes wxFlash {
  0%, 80%, 100% { opacity: 1; }
  85% { opacity: 0.2; }
  90% { opacity: 1; }
}
@keyframes wxFog {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(4px); opacity: 0.9; }
}

/* Trio de gr�ficos � sempre 3 colunas em desktop */
.dash-stats-trio {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.65rem;
  margin-top: 0.85rem;
  width: 100%;
}
.dash-stats-trio .chart-card {
  min-height: 200px;
  margin: 0;
}
.dash-stats-trio .bar-chart-wide {
  height: 140px;
  min-height: 140px;
}
.dash-stats-trio .bar-chart-wide .bar-track {
  height: 100px !important;
  min-height: 100px !important;
  flex-basis: 100px;
}
.dash-stats-trio .spark-chart-wide {
  height: 110px;
  min-height: 110px;
}

/* Compactar um pouco a semana no dash */
.dash-page .week-days-grid {
  gap: 0.3rem;
}
.dash-page .week-day-col {
  min-height: 200px;
  padding: 0.35rem;
}
.dash-page .week-day-body {
  max-height: 38vh;
}
.dash-page .dash-top {
  margin-bottom: 0.35rem;
}
.dash-page .view-nav.compact-nav {
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.55rem;
}

@media (max-width: 1000px) {
  .dash-stats-trio {
    grid-template-columns: 1fr 1fr !important;
  }
  .dash-stats-trio .occ-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .dash-stats-trio {
    grid-template-columns: 1fr !important;
  }
  .wx-week { width: 100%; }
}
