@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --wine-950: #35141a;
  --wine-900: #421820;
  --wine-800: #4d1d25;
  --wine-700: #622731;
  --wine-600: #74343e;
  --wine-100: #f3e8ea;
  --wine-50: #faf5f6;
  --gold-700: #9b7434;
  --gold-500: #c8a35f;
  --gold-300: #e5cb95;
  --cream: #f7f4ef;
  --paper: #fffdfa;
  --ink: #292326;
  --muted: #776d71;
  --line: #ebe5e1;
  --success: #2f7758;
  --success-bg: #e6f3ec;
  --warning: #a16418;
  --warning-bg: #fbf0dd;
  --danger: #ae3c46;
  --danger-bg: #fae9eb;
  --info: #526aa0;
  --info-bg: #e9edf7;
  --sidebar-width: 256px;
  --topbar-height: 92px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --shadow-card: 0 7px 26px rgba(67, 32, 38, 0.055);
  --shadow-float: 0 22px 55px rgba(45, 18, 23, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  padding: 30px 20px 20px;
  color: #fff;
  background:
    radial-gradient(circle at -10% 88%, rgba(200, 163, 95, 0.2), transparent 32%),
    linear-gradient(170deg, var(--wine-700), var(--wine-950));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px 30px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: 0.3px;
}

.brand span {
  margin-top: 4px;
  color: var(--gold-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-label {
  margin: 0 12px 8px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 47px;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: 180ms ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 3px 0 var(--gold-500);
}

.nav-count {
  min-width: 24px;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 99px;
  color: var(--wine-950);
  background: var(--gold-300);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(229, 203, 149, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.065);
}

.sidebar-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 10px;
  color: var(--wine-950);
  background: var(--gold-300);
}

.sidebar-card-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-card strong {
  display: block;
  font-size: 13px;
}

.sidebar-card p {
  margin: 6px 0 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.5;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
  padding: 17px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer > div:nth-child(2) {
  min-width: 0;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer strong {
  font-size: 12px;
}

.sidebar-footer span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.47);
  font-size: 10px;
}

.sidebar-footer .icon-button {
  margin-left: auto;
}

.profile-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--wine-900);
  background: linear-gradient(135deg, #f4dbab, var(--gold-500));
  font-size: 11px;
  font-weight: 800;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 54px);
  border-bottom: 1px solid rgba(88, 53, 59, 0.08);
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: blur(16px);
}

.page-heading p,
.eyebrow {
  margin: 0 0 5px;
  color: var(--wine-600);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.55px;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(23px, 2.2vw, 29px);
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  color: var(--wine-700);
  border-color: #d9c8ca;
  background: #fff;
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button-dark {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.55);
  border: 0;
  background: transparent;
}

.icon-button-dark:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.notification-button span {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--cream);
  border-radius: 50%;
  background: var(--danger);
}

.top-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  padding: 4px 7px 4px 4px;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.top-profile:hover {
  background: rgba(255, 255, 255, 0.65);
}

.top-profile-copy {
  display: block;
}

.top-profile-copy strong,
.top-profile-copy small {
  display: block;
}

.top-profile-copy strong {
  font-size: 12px;
}

.top-profile-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.top-profile > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.mobile-menu-button {
  display: none;
}

.content {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 54px) 60px;
}

.view {
  display: none;
  animation: view-in 260ms ease;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-row,
.section-toolbar,
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.welcome-copy h2,
.section-title-row h2 {
  margin: 0 0 7px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 2.5vw, 30px);
}

.welcome-copy p,
.section-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: 170ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--wine-700);
  box-shadow: 0 7px 18px rgba(83, 31, 40, 0.18);
}

.button-primary:hover {
  background: var(--wine-800);
  box-shadow: 0 10px 24px rgba(83, 31, 40, 0.23);
}

.button-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.button-ghost:hover {
  border-color: #d7cac6;
}

.button-light {
  width: 100%;
  color: var(--wine-950);
  background: #f4e3bd;
}

.button-light:hover {
  background: #fff0cf;
}

.button-small {
  min-height: 35px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 10px;
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button-danger:hover {
  background: #95313a;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  position: relative;
  min-height: 146px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(80, 43, 50, 0.07);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: var(--shadow-card);
}

.stat-card.featured {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(140deg, var(--wine-600), var(--wine-900));
}

.stat-card.featured::after {
  position: absolute;
  right: -26px;
  bottom: -55px;
  width: 145px;
  height: 145px;
  border: 1px solid rgba(229, 203, 149, 0.25);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 22px rgba(229, 203, 149, 0.05);
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.featured .stat-label {
  color: rgba(255, 255, 255, 0.65);
}

.stat-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  color: var(--wine-600);
  background: var(--wine-100);
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.featured .stat-icon {
  color: var(--wine-950);
  background: var(--gold-300);
}

.stat-value {
  display: inline-block;
  margin-top: 17px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 29px;
  line-height: 1;
}

.stat-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.featured .stat-foot {
  color: rgba(255, 255, 255, 0.6);
}

.trend-positive {
  color: var(--success);
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  gap: 18px;
  margin-top: 19px;
}

.panel {
  min-width: 0;
  padding: 23px;
  border: 1px solid rgba(80, 43, 50, 0.075);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 250, 0.92);
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  color: var(--wine-600);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.text-button svg {
  width: 13px;
  height: 13px;
}

.danger-text-button {
  color: var(--danger);
}

.danger-text-button:hover {
  border-radius: 8px;
  background: var(--danger-bg);
}

.upcoming-list {
  display: grid;
  gap: 10px;
}

.upcoming-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: 160ms ease;
}

.upcoming-item:hover {
  border-color: #dac8ca;
  background: #fff;
  transform: translateY(-1px);
}

.date-tile {
  display: grid;
  width: 50px;
  height: 55px;
  place-items: center;
  border-radius: 11px;
  color: var(--wine-700);
  background: var(--wine-50);
  line-height: 1;
}

.date-tile small,
.date-tile strong {
  display: block;
  text-align: center;
}

.date-tile small {
  margin-top: 8px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.date-tile strong {
  margin-top: -4px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
}

.upcoming-copy {
  min-width: 0;
}

.upcoming-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.upcoming-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.upcoming-meta svg {
  width: 11px;
  height: 11px;
}

.avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding-left: 7px;
}

.mini-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  margin-left: -7px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: #fff;
  background: var(--wine-600);
  font-size: 8px;
  font-weight: 800;
}

.mini-avatar:nth-child(3n + 2) { background: #82704f; }
.mini-avatar:nth-child(3n + 3) { background: #5c6f7d; }

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 11px;
  padding-bottom: 18px;
}

.activity-item:not(:last-child)::after {
  position: absolute;
  top: 33px;
  bottom: 1px;
  left: 16px;
  width: 1px;
  background: var(--line);
  content: "";
}

.activity-icon {
  z-index: 1;
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 10px;
  color: var(--wine-600);
  background: var(--wine-50);
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-copy p {
  margin: 1px 0 5px;
  font-size: 10px;
  line-height: 1.45;
}

.activity-copy strong {
  font-weight: 800;
}

.activity-copy time {
  color: #9c9195;
  font-size: 8px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.quick-action {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.quick-action:hover {
  border-color: #d8c5c8;
  box-shadow: 0 6px 17px rgba(65, 25, 33, 0.07);
  transform: translateY(-2px);
}

.quick-action-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--wine-700);
  background: var(--wine-50);
}

.quick-action:nth-child(2) .quick-action-icon {
  color: var(--gold-700);
  background: #fbf2e2;
}

.quick-action:nth-child(3) .quick-action-icon {
  color: var(--info);
  background: var(--info-bg);
}

.quick-action-icon svg {
  width: 17px;
  height: 17px;
}

.quick-action strong,
.quick-action span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action strong {
  font-size: 10px;
}

.quick-action span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.section-toolbar {
  margin-top: 28px;
  align-items: center;
}

.search-box {
  position: relative;
  width: min(100%, 350px);
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #a09598;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 43px;
  padding: 0 15px 0 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 253, 250, 0.95);
  font-size: 12px;
  transition: 160ms ease;
}

.search-box input:focus {
  border-color: var(--wine-600);
  box-shadow: 0 0 0 3px rgba(98, 39, 49, 0.1);
}

.filters {
  display: flex;
  align-items: center;
  gap: 9px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  height: 43px;
  min-width: 140px;
  padding: 0 35px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  appearance: none;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.schedule-list {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.schedule-card {
  display: grid;
  grid-template-columns: 74px minmax(200px, 1.2fr) minmax(230px, 1.6fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(80, 43, 50, 0.08);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: 170ms ease;
}

.schedule-card:hover {
  border-color: #ddced0;
  transform: translateY(-1px);
}

.schedule-date {
  display: grid;
  height: 70px;
  place-items: center;
  border-radius: 14px;
  color: var(--wine-700);
  background: var(--wine-50);
  line-height: 1;
}

.schedule-date span {
  margin-top: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.schedule-date strong {
  margin-top: -8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 25px;
}

.schedule-date small {
  margin-top: -12px;
  color: var(--muted);
  font-size: 8px;
}

.schedule-main {
  min-width: 0;
}

.schedule-main h3 {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-main p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.schedule-main p svg {
  width: 12px;
  height: 12px;
}

.schedule-team {
  min-width: 0;
}

.schedule-team > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.confirmation-progress {
  flex: 1;
  min-width: 100px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: #eee8e5;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}

.confirmation-progress small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.schedule-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.25px;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-published,
.status-active,
.status-confirmed {
  color: var(--success);
  background: var(--success-bg);
}

.status-draft,
.status-pending {
  color: var(--warning);
  background: var(--warning-bg);
}

.status-inactive,
.status-declined {
  color: var(--danger);
  background: var(--danger-bg);
}

.members-panel {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  padding: 14px 18px;
  color: #958a8e;
  background: #fbf9f6;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: 150ms ease;
}

.data-table tbody tr:hover {
  background: #fff;
}

.member-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.member-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--wine-700);
  background: var(--wine-100);
  font-size: 10px;
  font-weight: 800;
}

.member-avatar.tone-1 { color: #5f6e36; background: #edf1df; }
.member-avatar.tone-2 { color: #526a84; background: #e8eff3; }
.member-avatar.tone-3 { color: #8a6530; background: #f7eddd; }

.member-cell strong,
.member-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-cell strong {
  font-size: 11px;
}

.member-cell span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.contact-cell span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-cell span + span {
  margin-top: 3px;
  font-size: 8px;
}

.tag {
  margin: 2px 3px 2px 0;
  color: var(--wine-600);
  background: var(--wine-50);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.row-actions .icon-button {
  width: 31px;
  height: 31px;
  border-color: transparent;
  background: transparent;
}

.row-actions .icon-button:hover {
  border-color: var(--line);
  background: #fff;
}

.row-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.mobile-member-list {
  display: none;
}

.library-featured {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 30px;
  min-height: 185px;
  margin-top: 27px;
  overflow: hidden;
  padding: 31px;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 80% 30%, rgba(229, 203, 149, 0.18), transparent 31%),
    linear-gradient(135deg, var(--wine-700), var(--wine-950));
  box-shadow: 0 16px 35px rgba(61, 21, 29, 0.15);
}

.library-featured::after {
  position: absolute;
  right: -35px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(229, 203, 149, 0.2);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 30px rgba(229, 203, 149, 0.035), 0 0 0 62px rgba(229, 203, 149, 0.025);
}

.library-featured-copy {
  z-index: 1;
}

.library-featured .eyebrow {
  color: var(--gold-300);
}

.library-featured h2 {
  max-width: 580px;
  margin: 8px 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 3vw, 33px);
}

.library-featured p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 11px;
  line-height: 1.65;
}

.library-featured-stats {
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-self: center;
  gap: 10px;
}

.library-featured-stats div {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.library-featured-stats strong,
.library-featured-stats span {
  display: block;
}

.library-featured-stats strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 24px;
}

.library-featured-stats span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-top: 18px;
}

.resource-card {
  display: flex;
  min-width: 0;
  min-height: 203px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(80, 43, 50, 0.08);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: 170ms ease;
}

.resource-card:hover {
  border-color: #ddced0;
  box-shadow: 0 12px 30px rgba(67, 32, 38, 0.085);
  transform: translateY(-2px);
}

.resource-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resource-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--wine-700);
  background: var(--wine-50);
}

.resource-icon.type-video { color: #a45137; background: #f8e9e4; }
.resource-icon.type-link { color: var(--info); background: var(--info-bg); }

.resource-icon svg {
  width: 18px;
  height: 18px;
}

.book-cover {
  width: 38px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(67, 32, 38, 0.18);
}

.book-photo-preview {
  display: block;
  width: min(150px, 100%);
  max-height: 210px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 5px 15px rgba(67, 32, 38, 0.16);
}

.resource-card h3 {
  margin: 16px 0 5px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
}

.resource-footer small {
  overflow: hidden;
  color: #94898d;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-open {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--wine-600);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.resource-open svg {
  width: 12px;
  height: 12px;
}

.whatsapp-notify {
  position: relative;
  color: #218c5a;
}

.whatsapp-notify:hover {
  color: #146c43;
  background: #eaf6ee;
}

.whatsapp-notify.is-notified::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #218c5a;
  content: "";
}

.empty-state {
  display: grid;
  min-height: 265px;
  place-items: center;
  padding: 35px;
  border: 1px dashed #d9ceca;
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 15px;
  color: var(--wine-600);
  background: var(--wine-50);
}

.empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
}

.empty-state p {
  max-width: 350px;
  margin: 0 auto 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.app-dialog,
.confirm-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: min(88vh, 850px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  outline: 0;
  background: transparent;
  box-shadow: var(--shadow-float);
}

.app-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(35, 16, 20, 0.58);
  backdrop-filter: blur(3px);
}

.dialog-card {
  display: flex;
  max-height: min(88vh, 850px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
}

.dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 19px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
}

.dialog-body {
  overflow-y: auto;
  padding: 22px 25px 25px;
}

.dialog-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 9px;
  padding: 17px 25px;
  border-top: 1px solid var(--line);
  background: #fbf9f6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.field {
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.field-title {
  display: block;
  margin: 0 0 7px;
  color: #5d5256;
  font-size: 10px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #ded6d2;
  border-radius: 10px;
  outline: 0;
  background: #fff;
  font-size: 12px;
  transition: 150ms ease;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--wine-600);
  box-shadow: 0 0 0 3px rgba(98, 39, 49, 0.1);
}

.field-help {
  display: block;
  margin-top: 5px;
  color: #998e92;
  font-size: 8px;
}

.assignment-section {
  grid-column: 1 / -1;
  margin-top: 3px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.assignment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.assignment-heading strong {
  font-size: 11px;
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 120px 33px;
  align-items: end;
  gap: 8px;
  margin-bottom: 9px;
  padding: 10px;
  border-radius: 11px;
  background: #f8f5f1;
}

.assignment-row .field label {
  font-size: 8px;
}

.assignment-row .field select,
.assignment-row .field input {
  min-height: 37px;
  padding: 7px 9px;
  font-size: 10px;
}

.remove-assignment {
  width: 33px;
  height: 37px;
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.remove-assignment:hover {
  border-color: #eed5d7;
  background: var(--danger-bg);
}

.confirm-card {
  padding: 30px;
  border-radius: 22px;
  background: var(--paper);
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 15px;
  color: var(--danger);
  background: var(--danger-bg);
}

.confirm-icon svg {
  width: 21px;
  height: 21px;
}

.confirm-card h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
}

.confirm-card p {
  margin: 9px 0 23px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  width: min(350px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  color: #fff;
  background: var(--wine-950);
  box-shadow: var(--shadow-float);
  font-size: 10px;
  animation: toast-in 240ms ease;
}

.toast svg {
  width: 17px;
  height: 17px;
  color: var(--gold-300);
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition: 180ms ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.install-banner {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  width: min(480px, calc(100vw - 32px));
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1d8d3;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-float);
}

.install-banner[hidden] {
  display: none;
}

.install-banner img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.install-banner div {
  min-width: 0;
  flex: 1;
}

.install-banner strong,
.install-banner span {
  display: block;
}

.install-banner strong {
  font-size: 11px;
}

.install-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.install-banner .button {
  min-height: 36px;
  padding: 0 13px;
  font-size: 10px;
}

.install-banner .icon-button {
  width: 33px;
  height: 33px;
}

.sidebar-scrim,
.mobile-nav {
  display: none;
}

@media (max-width: 1120px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-card {
    grid-template-columns: 68px minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 14px;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 76px;
  }

  .sidebar {
    width: min(290px, 84vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(34, 15, 18, 0.5);
    transition: 200ms ease;
  }

  .sidebar-scrim.open {
    visibility: visible;
    opacity: 1;
  }

  .workspace {
    margin-left: 0;
  }

  .mobile-menu-button {
    display: grid;
  }

  .topbar {
    justify-content: flex-start;
    gap: 13px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .top-profile-copy,
  .top-profile > svg {
    display: none;
  }

  .top-profile {
    margin-left: 0;
    padding: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .schedule-card {
    grid-template-columns: 65px minmax(0, 1fr) auto;
  }

  .schedule-team {
    grid-column: 2 / 4;
  }

  .data-table th:nth-child(4),
  .data-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --topbar-height: 69px;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .topbar {
    height: calc(var(--topbar-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 16px 0;
  }

  .page-heading p {
    display: none;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .topbar-actions > .icon-button:first-child,
  .top-profile {
    display: none;
  }

  .content {
    padding: 23px 16px 30px;
  }

  .welcome-row,
  .section-title-row {
    align-items: flex-start;
  }

  .section-title-row {
    flex-direction: column;
    gap: 12px;
  }

  .section-title-row > .button {
    align-self: stretch;
    justify-content: center;
  }

  .welcome-copy h2,
  .section-title-row h2 {
    font-size: 23px;
  }

  .welcome-copy p,
  .section-title-row p {
    max-width: 230px;
    font-size: 11px;
    line-height: 1.45;
  }

  .welcome-row > .button,
  .section-title-row > .button {
    width: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 0;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 21px;
  }

  .stat-card {
    min-height: 128px;
    padding: 16px;
    border-radius: 15px;
  }

  .stat-label {
    max-width: 75px;
    font-size: 9px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
  }

  .stat-value {
    margin-top: 14px;
    font-size: 25px;
  }

  .stat-foot {
    margin-top: 7px;
    font-size: 8px;
  }

  .dashboard-grid {
    margin-top: 12px;
  }

  .panel {
    padding: 17px;
    border-radius: 15px;
  }

  .upcoming-item {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .date-tile {
    width: 46px;
    height: 50px;
  }

  .upcoming-item .avatar-stack {
    display: none;
  }

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

  .section-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 21px;
  }

  .search-box {
    width: 100%;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .select-wrap select {
    width: 100%;
    min-width: 0;
  }

  .schedule-card {
    position: relative;
    grid-template-columns: 57px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border-radius: 15px;
  }

  .schedule-date {
    height: 63px;
  }

  .schedule-actions {
    position: static;
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: -4px;
  }

  .schedule-actions .status-badge {
    display: none;
  }

  .schedule-main {
    padding-right: 27px;
  }

  .schedule-team {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .members-panel {
    display: none;
  }

  .mobile-member-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
  }

  .mobile-member-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(80, 43, 50, 0.08);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-card);
  }

  .mobile-member-card .member-avatar {
    width: 42px;
    height: 42px;
  }

  .mobile-member-copy {
    min-width: 0;
  }

  .mobile-member-copy strong,
  .mobile-member-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-member-copy strong {
    font-size: 11px;
  }

  .mobile-member-copy span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
  }

  .mobile-member-meta {
    grid-column: 2 / 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .library-featured {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 23px;
  }

  .library-featured-stats {
    max-width: 270px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .resource-card {
    min-height: 184px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr 54px 1fr 1fr;
    align-items: end;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 7px 5px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 250, 0.96);
    box-shadow: 0 -7px 24px rgba(47, 24, 28, 0.06);
    backdrop-filter: blur(15px);
  }

  .mobile-nav > button {
    display: flex;
    height: 48px;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-direction: column;
    color: #a09297;
    background: transparent;
    font-size: 8px;
    font-weight: 700;
  }

  .mobile-nav > button svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav > button.active {
    color: var(--wine-700);
  }

  .mobile-nav .mobile-create {
    width: 48px;
    height: 48px;
    align-self: start;
    margin: -18px auto 0;
    border: 4px solid var(--cream);
    border-radius: 16px;
    color: #fff;
    background: var(--wine-700);
    box-shadow: 0 7px 18px rgba(71, 25, 34, 0.24);
  }

  .mobile-nav .mobile-create svg {
    width: 22px;
    height: 22px;
  }

  .app-dialog {
    width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 23px 23px 0 0;
  }

  .dialog-card {
    max-height: 92vh;
    border-radius: 23px 23px 0 0;
  }

  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-full,
  .assignment-section {
    grid-column: auto;
  }

  .assignment-row {
    grid-template-columns: 1fr 1fr 33px;
  }

  .assignment-row .assignment-member {
    grid-column: 1 / -1;
  }

  .install-banner {
    right: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .install-banner span {
    display: none;
  }

  .toast-region {
    right: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .stat-card {
    padding: 14px;
  }

  .stat-icon {
    width: 28px;
    height: 28px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .assignment-row {
    grid-template-columns: 1fr 33px;
  }

  .assignment-row .assignment-status {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== Conexão do WhatsApp (equipe) ===== */
#whatsappDialog { width: min(420px, calc(100vw - 28px)); }
.whatsapp-icon { color: var(--success); background: var(--success-bg); }
.whatsapp-card p { margin-bottom: 16px; }
.whatsapp-qr {
  display: grid;
  width: 232px;
  min-height: 232px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.whatsapp-qr img { display: block; width: 216px; height: 216px; image-rendering: pixelated; }
.whatsapp-steps {
  margin: 0 0 22px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}
.whatsapp-steps strong { color: var(--ink); }

/* ===== Tela de escala (montar/editar, sem modal) ===== */
.schedule-editor {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}
.schedule-editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 23px 17px;
  border-bottom: 1px solid var(--line);
}
.schedule-editor-header h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
}
.schedule-editor-header .eyebrow { margin: 0 0 2px; }
.schedule-editor .form-grid { padding: 22px 23px 25px; }
.schedule-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 23px;
  border-top: 1px solid var(--line);
  background: #fbf9f6;
}

@media (max-width: 680px) {
  /* 16px evita o zoom automático do iPhone ao tocar num campo */
  .field input,
  .field select,
  .field textarea,
  .assignment-row .field select,
  .assignment-row .field input {
    font-size: 16px;
  }
  .field label,
  .assignment-row .field label { font-size: 12px; }

  .schedule-editor {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .schedule-editor-header { padding: 4px 0 14px; }
  .schedule-editor-header h2 { font-size: 20px; }
  .schedule-editor .form-grid { padding: 16px 0 20px; gap: 14px; }
  .schedule-editor-footer {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 5;
    margin: 0 -16px;
    padding: 12px 16px;
    background: rgba(251, 249, 246, 0.97);
  }
  .schedule-editor-footer .button { flex: 1; justify-content: center; }

  .assignment-heading strong { font-size: 14px; }
  .assignment-heading .text-button { font-size: 13px; padding: 8px 4px; }

  /* cada pessoa: [membro | lixeira] / [função | resposta] */
  .assignment-row,
  .schedule-editor .assignment-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
    grid-template-areas:
      "member member remove"
      "role status status";
    gap: 8px;
    padding: 12px;
  }
  .assignment-row .assignment-member { grid-area: member; }
  .assignment-row .field:not(.assignment-member):not(.assignment-status) { grid-area: role; }
  .assignment-row .assignment-status { grid-area: status; }
  .assignment-row .remove-assignment { grid-area: remove; width: 40px; height: 43px; }
  .assignment-row .field select,
  .assignment-row .field input { min-height: 43px; }
}

/* ===== Campo de senha no cadastro do membro ===== */
.password-field { position: relative; }
.password-field input { padding-right: 76px; }
.password-field .text-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

/* Respeita o recorte da tela em retrato e paisagem, inclusive no menu. */
.sidebar {
  padding-top: calc(30px + env(safe-area-inset-top, 0px));
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.topbar {
  height: calc(var(--topbar-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}
@media (max-width: 1100px) {
  .topbar {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

/* Celular: sem barra inferior, navegação só pelo menu lateral (☰). */
@media (max-width: 680px) {
  .mobile-nav { display: none !important; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .install-banner,
  .toast-region { bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .schedule-editor-footer { bottom: env(safe-area-inset-bottom); }
}

/* Leitor de QR do cadastro de livro */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; width: auto; font-size: 22px; font-weight: 800; letter-spacing: 0.08em; text-align: center; font-variant-numeric: tabular-nums; }
.code-row .code-scan { flex: 0 0 auto; width: auto; min-width: 0; padding: 0 16px; gap: 8px; white-space: nowrap; }
.code-row .code-scan svg { width: 20px; height: 20px; }
@media (max-width: 680px) {
  .app-dialog { max-width: 100%; max-height: 92dvh; }
}
.qr-scan { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: rgba(20, 10, 12, 0.92); color: #fff; }
.qr-scan video { width: min(100%, 420px); aspect-ratio: 1; object-fit: cover; border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.85); background: #000; }
.qr-scan p { margin: 0; font-weight: 700; }
.qr-scan small { opacity: 0.75; }
.qr-frame { position: relative; width: min(100%, 420px); }
.qr-frame video { display: block; width: 100%; }
.qr-target { position: absolute; inset: 15%; border: 3px solid #f3d9a4; border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25); pointer-events: none; }
.qr-frame { overflow: hidden; border-radius: 18px; }
html { touch-action: manipulation; }
@media (max-width: 680px) { .search-box input { font-size: 16px; } }

/* Biblioteca em lista simples (número · nome · ações) */
.book-count { margin: 4px 2px 8px; color: var(--muted, #7a6a6d); font-size: 14px; }
.book-list { border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; background: #fff; overflow: hidden; }
.book-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px; border-top: 1px solid rgba(0, 0, 0, 0.06); min-height: 52px; }
.book-row:first-child { border-top: 0; }
.book-num { flex: 0 0 auto; min-width: 42px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--wine-700, #6b2632); }
.book-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; }
.book-out { display: block; color: #b0412f; font-size: 12px; font-weight: 700; }
.book-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; }
.book-actions .text-button[disabled] { opacity: 0.4; }
.book-actions .icon-button { width: 34px; height: 34px; border: 0; background: transparent; box-shadow: none; }
.book-actions .icon-button svg { width: 18px; height: 18px; }
.book-actions .text-button { font-size: 13px; padding: 0 6px; }
.qr-scan-actions { display: flex; gap: 10px; width: min(100%, 420px); }
.qr-scan-actions > * { flex: 1; justify-content: center; }
.library-bar { display: flex; gap: 10px; align-items: stretch; margin-bottom: 4px; }
.library-bar .search-box { flex: 1 1 auto; min-width: 0; }
.library-bar .button { flex: 0 0 auto; white-space: nowrap; }
.book-dup { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #8a2a1d; font-size: 14px; line-height: 1.4; }
.book-dup .text-button { display: inline; padding: 0; margin-left: 4px; font-size: 14px; text-decoration: underline; }
.code-row input.is-dup { border-color: #c0392b; color: #c0392b; }
.book-author { display: block; color: var(--muted); font-size: 13px; }

/* Biblioteca: abas Acervo | Empréstimos */
.lib-tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 16px; background: var(--wine-50); border: 1px solid var(--line); border-radius: 14px; }
.lib-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.lib-tab svg { width: 18px; height: 18px; }
.lib-tab:hover { color: var(--wine-700); }
.lib-tab.is-active { background: #fff; color: var(--wine-700); box-shadow: 0 2px 8px rgba(67, 32, 38, 0.10); }
.lib-tab-count { white-space: nowrap; min-width: 24px; padding: 2px 8px; border-radius: 20px; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lib-tab.is-active .lib-tab-count { background: var(--wine-100); color: var(--wine-700); }
.lib-tab-count.is-alert, .lib-tab.is-active .lib-tab-count.is-alert { background: var(--gold-500); color: #fff; }

/* Empréstimos em cartões */
.loan-list { display: flex; flex-direction: column; gap: 10px; }
.loan-row { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--info); border-radius: 14px; box-shadow: var(--shadow-card); }
.loan-row.loan-reservado { border-left-color: var(--gold-500); }
.loan-row.loan-devolvendo { border-left-color: var(--success); }
.loan-num { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--wine-50); color: var(--wine-700); font-weight: 800; font-variant-numeric: tabular-nums; }
.loan-num svg { width: 22px; height: 22px; }
.loan-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.loan-main strong { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); }
.loan-who { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.loan-who svg { width: 14px; height: 14px; color: var(--muted); }
.loan-dates { font-size: 13px; color: var(--muted); }
.loan-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.loan-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.loan-actions .button { min-height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.loan-actions .icon-button { width: 38px; height: 38px; }
.loan-actions .icon-button svg { width: 18px; height: 18px; }
.loan-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.loan-empty svg { width: 34px; height: 34px; color: var(--gold-500); margin-bottom: 4px; }
.loan-empty strong { color: var(--ink); font-size: 16px; }
@media (max-width: 680px) {
  .loan-row { flex-wrap: wrap; align-items: flex-start; }
  .loan-main { flex-basis: calc(100% - 62px); }
  .loan-actions { flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--line); }
  .loan-actions .button { flex: 1 1 auto; justify-content: center; }
  .lib-tab { font-size: 14px; gap: 6px; padding: 0 8px; }
}
.service-rule.is-off { opacity: .55; }
@media (max-width: 760px) {
  #servicesView .section-title-row > .button { width: auto; min-width: 0; padding: 0 16px; font-size: 13px; align-self: flex-start; }
  #servicesView .section-title-row p { max-width: none; }
}
.title-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.avail-grid { display: grid; grid-template-columns: 44px repeat(3, 1fr); gap: 4px 8px; align-items: center; background: var(--surface-soft, #faf6f4); border-radius: 12px; padding: 10px 12px; }
.avail-grid b { font-size: 12px; text-align: center; color: #7a5a5c; }
.avail-grid span { font-size: 13px; font-weight: 600; }
.avail-grid label { display: flex; justify-content: center; }
.avail-grid input { width: 20px !important; height: 20px; accent-color: #5e2128; }
.auto-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.auto-role { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #eee3df; border-radius: 12px; padding: 8px 10px; }
.auto-role span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.auto-role small { font-weight: 400; color: #9a8a88; font-size: 12px; }
.auto-role input { width: 64px !important; text-align: center; }
.auto-preview { display: flex; flex-direction: column; gap: 10px; }
.auto-culto { border: 1px solid #eee3df; border-radius: 14px; padding: 12px 14px; }
.auto-culto header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.auto-culto header span { color: #7a5a5c; font-size: 13px; }
.auto-culto ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; }
.auto-culto li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed #f2ebe8; }
.auto-culto li span { color: #8a7a78; }
.auto-miss b { color: #b3261e; }
@media (max-width: 760px) { #schedulesView .title-actions .button { width: auto; min-width: 0; padding: 0 14px; font-size: 13px; } #schedulesView .title-actions { justify-content: flex-start; } }
.auto-preview > .field-help { font-size: 14px; }
.avail-grid input[type="checkbox"] { min-height: 0 !important; height: 20px !important; padding: 0 !important; margin: 4px 0; }
/* Escala: cartão com a equipe por área (v69) */
.schedule-card.sc2 { display: block; padding: 18px 20px; }
.sc2-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.sc2 .schedule-main h3 { font-size: 18px; }
.sc2 .schedule-main p { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; color: #7a6a68; }
.sc2-progress { margin-top: 10px; max-width: 460px; }
.sc2-progress small { display: block; margin-top: 5px; font-size: 12px; color: #8a7a78; }
.sc2-no { color: #b3261e; }
.sc2-empty { color: #9a8a88; font-style: italic; }
.sc2-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0e7e4; }
.sc2-group h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8a5a60; }
.sc2-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sc2-group li { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 12px; }
.sc2-group li.is-me { background: #fbefc9; }
.sc2-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.sc2-who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc2-who small { font-size: 12px; color: #8a7a78; }
.pav { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: #efe2e0; color: #6b2630; font-size: 12px; font-weight: 700; overflow: hidden; }
.has-photo { padding: 0 !important; overflow: hidden; }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.sc2-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #e0b84a; }
.sc2-dot.ok { background: #2e9b55; } .sc2-dot.no { background: #c0392b; }
@media (max-width: 760px) {
  .schedule-card.sc2 { padding: 14px; }
  .sc2-head { grid-template-columns: auto 1fr; }
  .sc2-head .schedule-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .sc2-groups { grid-template-columns: 1fr; }
}
.sc2 .schedule-date { width: 66px; min-width: 66px; }

/* ---- Contador do sininho ---- */
.notification-button .zn-count, .mx-bell .zn-count {
  position: absolute; top: 3px; right: 2px; width: auto; height: auto; min-width: 18px; padding: 1px 5px;
  border: 2px solid var(--cream); border-radius: 10px; background: var(--danger); color: #fff;
  font: 700 .66rem/14px system-ui, sans-serif; text-align: center;
}
.zn-count[hidden] { display: none; }
.mx-bell { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#memberHome .mx-bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mx-bell .zn-count { border-color: #5e2128; top: -4px; right: -4px; }

/* ---- Painel de notificações e seletor de músicas (folha por cima de tudo) ---- */
.zn-ov, .zm-ov { position: fixed; inset: 0; z-index: 200; background: rgba(33, 12, 16, .45); display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 760px) { .zn-ov, .zm-ov { align-items: center; padding: 24px; } }
.zn-sheet, .zm-sheet { width: 100%; max-width: 560px; max-height: min(88vh, 760px); background: var(--paper); color: var(--ink);
  border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow-float);
  padding-bottom: env(safe-area-inset-bottom, 0px); animation: zsheet .18s ease-out; }
@media (min-width: 760px) { .zn-sheet, .zm-sheet { border-radius: 22px; } }
@keyframes zsheet { from { transform: translateY(24px); opacity: .6; } }
.zn-sheet > header, .zm-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.zn-sheet > header strong, .zm-sheet > header strong { font-size: 1.05rem; color: var(--wine-800); }
.zm-sheet > header small { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.zn-sheet > header span { display: flex; align-items: center; gap: 8px; }
.zn-close, .zm-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--wine-50); color: var(--wine-800); font-size: 1rem; cursor: pointer; }
.zn-all { border: 0; background: none; color: var(--wine-700); font-weight: 600; font-size: .82rem; cursor: pointer; }
.zn-body, .zm-body { overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 18px; }
.zn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zn-list li { display: flex; gap: 12px; padding: 12px; border-radius: 14px; cursor: pointer; align-items: flex-start; }
.zn-list li:hover { background: var(--wine-50); }
.zn-list li.zn-new { background: #fbf3e6; }
.zn-list li.zn-new strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-left: 6px; vertical-align: middle; }
.zn-ic { font-size: 1.3rem; line-height: 1.2; flex: none; }
.zn-list strong { display: block; font-size: .93rem; color: var(--ink); }
.zn-list p { margin: 2px 0 3px; font-size: .86rem; color: #4d4447; }
.zn-list small { color: var(--muted); font-size: .75rem; }
.zn-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 16px; color: var(--muted); font-size: 2rem; }
.zn-empty strong { font-size: 1rem; color: var(--ink); } .zn-empty span { font-size: .86rem; }
.zn-push { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 14px; padding: 13px 14px;
  margin-bottom: 10px; background: linear-gradient(135deg, var(--wine-700), var(--wine-900)); color: #fff; font-size: 1.3rem; cursor: pointer; }
.zn-push span { display: flex; flex-direction: column; font-size: .92rem; } .zn-push small { opacity: .8; font-size: .78rem; }
.zn-tip { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: .84rem; }

/* Bloco de músicas no card da escala */
.zm-block { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--wine-50); border: 1px solid #f0e3e5; }
.zm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--wine-800); font-size: .9rem; }
.zm-btn { border: 0; border-radius: 999px; padding: 7px 14px; background: var(--wine-700); color: #fff; font-weight: 600; font-size: .82rem; cursor: pointer; }
.zm-btn.zm-ghost { background: transparent; color: var(--wine-700); border: 1px solid var(--line); }
.zm-list { margin: 8px 0 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.zm-list li { font-size: .88rem; } .zm-list li::marker { color: var(--muted); font-weight: 700; }
.zm-list li > * { vertical-align: middle; }
.zm-list li .zm-tt { display: inline-flex; flex-direction: column; margin-right: 6px; }
.zm-tt strong { font-size: .9rem; color: var(--ink); } .zm-tt small { color: var(--muted); font-size: .76rem; }
.zm-key { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 8px; background: #fff; border: 1px solid var(--gold-300); color: var(--gold-700); font-weight: 700; font-size: .75rem; text-align: center; }
.zm-links { display: inline-flex; gap: 4px; margin-left: 4px; }
.zm-lk { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--wine-700); font-size: .72rem; font-weight: 700; text-decoration: none; }
.zm-lk.zm-sp { color: #1d9a50; }
.zm-none { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.zm-cap { margin: 4px 2px 8px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.zm-chosen { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zm-chosen li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--wine-50); }
.zm-chosen li.zm-empty { color: var(--muted); font-size: .86rem; background: transparent; border: 1px dashed var(--line); justify-content: center; }
.zm-chosen .zm-tt, .zm-res .zm-tt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.zm-chosen .zm-tt strong, .zm-res .zm-tt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zm-n { width: 22px; height: 22px; border-radius: 50%; background: var(--wine-700); color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.zm-tom { border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px; font-size: .78rem; background: #fff; max-width: 62px; }
.zm-ord { display: flex; flex-direction: column; } .zm-ord button { border: 0; background: none; color: var(--wine-700); font-size: .8rem; line-height: 1; padding: 2px 4px; cursor: pointer; }
.zm-ord button:disabled { opacity: .25; cursor: default; }
.zm-x { border: 0; background: none; color: var(--danger); font-size: .95rem; cursor: pointer; padding: 4px; }
.zm-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; background: #fff; margin-bottom: 10px; position: sticky; top: -12px; z-index: 1; box-shadow: 0 4px 10px rgba(255,253,250,.9); }
.zm-search input { flex: 1; border: 0; outline: 0; padding: 12px 0; font-size: 16px; background: transparent; min-width: 0; }
.zm-results { display: flex; flex-direction: column; gap: 2px; }
.zm-res { display: flex; align-items: center; gap: 8px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.zm-res .zm-links { flex: none; }
@media (max-width: 420px) { .zm-res .zm-links { display: none; } }
.zm-add { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 0; background: var(--wine-700); color: #fff; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.zm-add:disabled { opacity: .4; }
.zm-ok { width: 34px; text-align: center; color: var(--success); font-weight: 800; flex: none; }
.zm-new { margin-top: 12px; border: 1px dashed var(--wine-600); background: transparent; color: var(--wine-700); border-radius: 12px; padding: 12px; font-weight: 600; cursor: pointer; }
.zm-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--wine-50); }
.zm-form input, .zm-form select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 16px; background: #fff; min-width: 0; }
.zm-row2 { display: flex; gap: 8px; } .zm-row2 > input { flex: 1; } .zm-row2 > .zm-btn { flex: 1; padding: 11px; }
html.zm-lock, html.zm-lock body { overflow: hidden; }

/* Ícones Lucide (CDN) — notificações e músicas, sem emoji (04/11/2026) */
.zni, .zmi { line-height: 1; flex: none; display: inline-flex; }
.zn-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--wine-50); color: var(--wine-700); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.zn-ic.zn-cancelada, .zn-ic.zn-recusa { background: #fde8e6; color: #b3261e; }
.zn-ic.zn-musica { background: #e9f3ec; color: #1d7a45; }
.zn-empty .zni { font-size: 36px; color: var(--wine-300, #c9b4b6); }
.zn-push .zni { font-size: 22px; }
.zn-close .zni, .zm-close .zni { font-size: 18px; }
.zn-close, .zm-close { display: inline-flex; align-items: center; justify-content: center; }
.zm-lk { gap: 4px; }
.zm-lk .zmi { font-size: 13px; }
.zm-head .zmi { font-size: 15px; vertical-align: -2px; }
.zm-add { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.zm-ok { display: inline-flex; justify-content: center; font-size: 18px; }
.zm-ord button .zmi, .zm-x .zmi { font-size: 15px; }
.zm-search .zmi { font-size: 17px; color: var(--muted); }
.zm-empty .zmi { font-size: 13px; vertical-align: -1px; }
.zm-web { margin-top: 14px; }
.zm-cap-web, .zm-tip { display: flex; align-items: center; gap: 6px; }
.zm-tip { color: var(--muted); font-size: .85rem; margin: 12px 4px; }
.zm-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; background: var(--wine-50); }
.zm-img-v { display: inline-flex; align-items: center; justify-content: center; color: var(--wine-700); font-size: 18px; }
@media (max-width: 420px) { .zm-web .zm-res .zm-links { display: flex; } }

/* Funções da escala: marcar várias + cadastrar nova (v79) */
.fn-picker { background: var(--surface-soft, #faf6f4); border-radius: 12px; padding: 10px 12px; display: grid; gap: 10px; }
.fn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-chip { position: relative; cursor: pointer; }
.fn-chip input { position: absolute; opacity: 0; width: 1px !important; height: 1px; }
.fn-chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid #d9c6c4; background: #fff; font-size: 13px; color: #5e2128; user-select: none; }
.fn-chip input:checked + span { background: #5e2128; border-color: #5e2128; color: #fff; }
.fn-chip input:checked + span::before { content: "✓ "; }
.fn-chip input:focus-visible + span { outline: 2px solid #5e2128; outline-offset: 2px; }
.fn-new { display: flex; gap: 8px; }
.fn-new input { flex: 1; min-width: 0; }

/* Minhas playlists + importar pra escala (v79) */
.zm-pl-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 12px 14px; cursor: pointer; color: inherit; font: inherit; margin-bottom: 12px; }
.zm-pl-card .zm-tt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.zm-pl-card small, .zm-pls small { color: var(--muted); font-size: .8rem; }
.zm-pls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.zm-pls li { display: flex; align-items: center; gap: 6px; border-radius: 14px; background: var(--wine-50); padding: 6px 6px 6px 8px; }
.zm-pl-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; padding: 4px 0; }
.zm-pl-open .zm-tt { display: flex; flex-direction: column; min-width: 0; }
.zm-pl-open .zm-tt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zm-pl-act { display: flex; gap: 2px; flex: none; }
.zm-pl-act button { border: 0; background: none; color: var(--wine-700); font-size: 17px; padding: 8px; cursor: pointer; display: inline-flex; }
.zm-pl-act [data-del] { color: var(--danger); }
.zm-pl-ren { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.zm-pl-ren input { flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 16px; }
.zm-imp-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; }
.zm-imp { margin: 0 0 14px; }
.zm-imp-all { display: flex; gap: 12px; }
.zm-imp-all .zm-lk { border: 0; background: none; color: var(--wine-700); font-weight: 600; cursor: pointer; padding: 0; font-size: .82rem; }
.zm-imp-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.zm-imp-list label { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.zm-imp-list input { width: 20px !important; height: 20px; accent-color: #5e2128; flex: none; }
.zm-imp-list span { display: flex; flex-direction: column; min-width: 0; }
.zm-imp-list small { color: var(--muted); font-size: .78rem; }
.zm-imp-modo { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.zm-imp-modo label { display: flex; align-items: center; gap: 8px; }
.zm-imp-modo input { width: auto !important; accent-color: #5e2128; }
.zm-ov-pl { z-index: 201; }
.zm-ov-pl ~ .zm-ov { z-index: 202; }
.zm-tip.zm-tip-pl { display: block; line-height: 1.4; margin: 4px 2px 14px; }
.fn-new .fn-new-input { flex: 1 1 auto; width: auto !important; min-width: 0; }
.fn-new .fn-new-add { flex: 0 0 auto; width: auto !important; padding: 0 16px; }
/* Escala automática: tirar/adicionar função (v79) */
.auto-role input { margin-left: auto; }
.auto-role-x { border: 0; background: none; color: #b3261e; font-size: 15px; padding: 6px; cursor: pointer; flex: none; line-height: 1; }
.auto-add { display: flex; gap: 8px; margin-top: 10px; }
.auto-add .auto-add-input { flex: 1 1 auto; width: auto !important; min-width: 0; }
.auto-add .auto-add-btn { flex: 0 0 auto; width: auto !important; }
/* Palavra: textos bíblicos por seletor (v79) */
.wr-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wr-list li { display: inline-flex; align-items: center; gap: 4px; background: #5e2128; color: #fff; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600; }
.wr-list li span { display: inline-flex; align-items: center; gap: 6px; }
.wr-list li svg { width: 14px; height: 14px; }
.wr-list li button { border: 0; background: rgba(255,255,255,.18); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 11px; line-height: 1; }
.wr-list li.wr-empty { background: transparent; color: #9a8a88; font-weight: 400; padding: 0; }
.wr-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wr-pick #wrBook { grid-column: 1 / -1; }
.wr-pick #wrAdd { grid-column: 1 / -1; justify-content: center; }
@media (min-width: 640px) { .wr-pick { grid-template-columns: 2fr 1fr 1fr 1fr auto; } .wr-pick #wrBook, .wr-pick #wrAdd { grid-column: auto; } }
.wr-pick input, .wr-pick select { width: 100% !important; min-width: 0; }
.wr-preview { margin: 8px 0 0; font-size: 13px; color: #6d5a5b; line-height: 1.45; max-height: 7.5em; overflow: auto; font-style: italic; }
.wr-preview:empty { display: none; }
.wr-typed { margin-top: 8px; }
.wr-typed summary { cursor: pointer; font-size: 13px; color: #5e2128; font-weight: 600; margin-bottom: 6px; }
/* Escala automática: ver quem tem cada função (v81) */
.auto-role { flex-wrap: wrap; }
.auto-role-name { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; font: inherit; font-weight: 600; font-size: 14px; color: inherit; flex: 1; min-width: 0; }
.auto-role-name small { font-weight: 400; color: #5e2128; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.auto-who { flex-basis: 100%; list-style: none; margin: 6px 0 0; padding: 8px 10px; background: #faf6f4; border-radius: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.auto-who em { color: #9a8a88; font-size: 12px; }
.auto-who[hidden] { display: none !important; }
.auto-who li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auto-who-x { border: 0; background: none; color: #b3261e; cursor: pointer; font-size: 13px; padding: 4px 6px; flex: none; }
.auto-who-add select { width: 100% !important; margin-top: 4px; font-size: 14px; padding: 8px 10px; border: 1px dashed #c9a9a9; border-radius: 10px; background: #fff; color: #5e2128; }

/* ===== Aba Cultos: agenda organizada nas cores da Zadok (07/11/2026) ===== */
@font-face { font-family: "Zadok Num"; src: url("assets/fonts/Montserrat-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("assets/fonts/BebasNeue-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
.cz-agenda { display: flex; flex-direction: column; gap: 10px; }
.cz-head { display: flex; flex-direction: column; padding: 2px 4px 2px; border-left: 4px solid var(--wine-700); padding-left: 10px; }
.cz-head small { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #9a7f82; font-weight: 700; }
.cz-head h3 { margin: 0; font-family: "Bebas Neue", "Arial Narrow", sans-serif; font-weight: 400; font-size: 28px; line-height: 1.05; color: var(--wine-800); letter-spacing: .02em; }
.cz-list { display: flex; flex-direction: column; gap: 8px; }
.cz-card { display: flex; align-items: stretch; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 1px solid #efe4e2; border-radius: 16px; padding: 8px 10px 8px 8px; box-shadow: 0 2px 10px rgba(66, 24, 32, .05);
  transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent; }
.cz-card:active { transform: scale(.985); box-shadow: 0 1px 4px rgba(66, 24, 32, .08); }
.cz-date { flex: none; width: 58px; border-radius: 12px; background: var(--wine-700); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0 5px;
  background-image: linear-gradient(160deg, rgba(255,255,255,.12), transparent 55%); }
.cz-date b { font-family: "Zadok Num", "Arial Black", sans-serif; font-weight: 800; font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.cz-date small { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .85; margin-top: 3px; font-weight: 700; }
.cz-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 2px 0; }
.cz-info strong { font-family: "Bebas Neue", "Arial Narrow", sans-serif; font-weight: 400; font-size: 21px; line-height: 1.02; color: var(--wine-900); letter-spacing: .02em; text-transform: uppercase; }
.cz-info em { font-style: italic; font-size: 12.5px; color: #7d6668; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; }
.cz-time, .cz-loc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--wine-700); background: var(--wine-50); border-radius: 999px; padding: 3px 8px; }
.cz-time svg, .cz-loc svg { width: 13px; height: 13px; }
.cz-hoje { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: #1d7a45; border-radius: 999px; padding: 3px 8px; }
.cz-amanha { background: #b7791f; }
.cz-go { flex: none; display: flex; align-items: center; color: #c9b4b6; }
.cz-go svg { width: 18px; height: 18px; }
.cz-addr { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 0; font-size: 12.5px; color: #8a7375; }
.cz-addr svg { width: 14px; height: 14px; }
/* painel do culto */
.cz-sheet { overflow: hidden; }
.cz-sh-top { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; background: var(--wine-700); color: #fff;
  background-image: linear-gradient(135deg, rgba(255,255,255,.1), transparent 60%); }
.cz-sh-top > div { flex: 1; min-width: 0; }
.cz-sh-top small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; font-weight: 700; }
.cz-sh-top h3 { margin: 2px 0 0; font-family: "Bebas Neue", "Arial Narrow", sans-serif; font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.cz-sh-date { flex: none; width: 60px; height: 64px; border-radius: 14px; background: #fff; color: var(--wine-800); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cz-sh-date b { font-family: "Zadok Num", "Arial Black", sans-serif; font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.cz-sh-date small { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; opacity: 1; }
.cz-sh-x { color: #fff; background: rgba(255,255,255,.14); border: 0; }
.cz-sh-x svg { width: 18px; height: 18px; }
.cz-sh-frase { margin: 4px 0 14px; padding: 12px 14px; border-left: 4px solid var(--wine-700); background: var(--wine-50); border-radius: 0 12px 12px 0; font-style: italic; color: var(--wine-900); line-height: 1.45; }
.cz-sh-rows { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cz-sh-rows li { display: flex; gap: 12px; align-items: flex-start; }
.cz-sh-rows li > svg { width: 20px; height: 20px; flex: none; color: var(--wine-700); margin-top: 2px; }
.cz-sh-rows small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #9a7f82; font-weight: 700; }
.cz-muted { color: #8a7375; font-size: 13px; }
.cz-sh-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cz-sh-acts .mx-btn { justify-content: center; text-decoration: none; }
/* Me lembrar (aviso antes do culto) */
.cz-remind { border: 1px solid #efe4e2; border-radius: 14px; padding: 12px; margin: 0 0 14px; background: #fff; }
.cz-remind-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.cz-remind-head > svg { width: 20px; height: 20px; color: var(--wine-700); flex: none; margin-top: 2px; }
.cz-remind-head span { display: flex; flex-direction: column; }
.cz-remind-head small { color: #8a7375; font-size: 12.5px; }
.cz-remind-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cz-remind-opts button { border: 1px solid #e3d3d2; background: var(--wine-50); color: var(--wine-800); border-radius: 10px; padding: 9px 4px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cz-remind-opts button.on { background: var(--wine-700); border-color: var(--wine-700); color: #fff; }
.cz-remind-ok { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: #1d7a45; font-weight: 600; }
.cz-remind-ok[hidden] { display: none; }
.cz-remind-ok svg { width: 16px; height: 16px; }
.cz-remind-ok span { flex: 1; }
.cz-remind-ok button { border: 0; background: none; color: #b3261e; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.cz-rem-on { display: inline-flex; align-items: center; color: var(--wine-700); }
.cz-rem-on svg { width: 14px; height: 14px; }
/* Foto de perfil (membro e cadastro da equipe) */
.mx-photo-card { display: flex; align-items: center; gap: 14px; }
.mx-photo-big { width: 84px; height: 84px; border-radius: 50%; flex: none; overflow: hidden; background: var(--wine-100); color: var(--wine-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--wine-100); }
.mx-photo-big img { width: 100%; height: 100%; object-fit: cover; }
.mx-photo-acts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mx-photo-acts small { color: #8a7375; font-size: 12.5px; }
.mx-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mx-photo-btns .mx-btn { padding: 9px 14px; font-size: .86rem; cursor: pointer; }
.mx-photo-btns .mx-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.member-photo-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.member-photo-prev { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--wine-100); color: var(--wine-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex: none; }
.member-photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.member-photo-field .button { cursor: pointer; }
.member-photo-rm { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #b3261e; cursor: pointer; }

/* ===== Pedidos de oração (07/11/2026) ===== */
.mx-cta.mx-cta-pray { background: linear-gradient(135deg, #8a3a44, #5e2128); margin-bottom: 0; }
.mx-cta-pray .zmi { font-size: 22px; }
.po-wrap, .po-admin { display: flex; flex-direction: column; gap: 12px; }
.po-hero { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #7a2d36, #4d1d25); }
.po-hero > span { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.po-hero div { display: flex; flex-direction: column; }
.po-hero strong { font-size: 1.05rem; }
.po-hero small { opacity: .8; font-style: italic; font-size: .82rem; }
.po-new { background: #fff; border: 1px solid #efe4e2; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.po-lbl { font-weight: 700; font-size: .85rem; color: var(--wine-800); }
.po-new textarea, .po-resp textarea { width: 100%; border: 1px solid #e6d8d6; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; background: #fffdfc; box-sizing: border-box; }
.po-vis { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.po-vis legend { font-weight: 700; font-size: .85rem; color: var(--wine-800); margin-bottom: 6px; padding: 0; }
.po-vis label { cursor: pointer; }
.po-vis input { position: absolute; opacity: 0; pointer-events: none; }
.po-vis label > span { display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box; border: 1.5px solid #e6d8d6; border-radius: 12px; padding: 10px; background: #fff; }
.po-vis label > span .zmi { font-size: 18px; color: var(--wine-700); }
.po-vis b { font-size: .88rem; color: var(--wine-900); }
.po-vis small { font-size: .74rem; color: #8a7375; }
.po-vis input:checked + span { border-color: var(--wine-700); background: var(--wine-50); box-shadow: 0 0 0 2px rgba(98,39,49,.12); }
.po-anon { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: #5b4a4c; }
.po-anon[hidden] { display: none; }
.po-anon input { width: 18px; height: 18px; accent-color: #5e2128; }
.po-send { width: 100%; padding: 13px; font-size: .95rem; }
.po-tabs { display: flex; gap: 6px; background: var(--wine-50); padding: 4px; border-radius: 14px; overflow-x: auto; }
.po-tabs button { flex: 1; border: 0; background: none; padding: 9px 10px; border-radius: 10px; font: inherit; font-size: .86rem; font-weight: 600; color: #7d6668; cursor: pointer; white-space: nowrap; }
.po-tabs button.on { background: #fff; color: var(--wine-800); box-shadow: 0 1px 4px rgba(66,24,32,.1); }
.po-tabs b { background: var(--wine-700); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; margin-left: 2px; }
.po-list { display: flex; flex-direction: column; gap: 10px; }
.po-card { background: #fff; border: 1px solid #efe4e2; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.po-card.po-ok { border-color: #cfe6d7; background: linear-gradient(180deg, #f6fbf7, #fff); }
.po-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.po-card header > span:not(.po-av):not(.po-vis-tag) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.po-card header small { color: #9a8a88; font-size: .76rem; }
.po-card p { margin: 0; white-space: pre-wrap; line-height: 1.45; color: #2b1d1f; }
.po-card blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid #1d7a45; background: #eef7f1; border-radius: 0 10px 10px 0; font-style: italic; color: #24563a; }
.po-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--wine-100); color: var(--wine-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex: none; }
.po-av img { width: 100%; height: 100%; object-fit: cover; }
.po-pray { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--wine-700); background: #fff; color: var(--wine-700); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.po-pray.on { background: var(--wine-700); color: #fff; }
.po-pray b { background: rgba(98,39,49,.12); border-radius: 999px; padding: 0 7px; font-size: .78rem; }
.po-pray.on b { background: rgba(255,255,255,.2); }
.po-badge { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--wine-50); color: var(--wine-700); display: inline-flex; align-items: center; gap: 4px; }
.po-b-orando { background: #fff4e0; color: #9a5b00; }
.po-b-respondido, .po-b-ok { background: #e6f4ea; color: #1d7a45; }
.po-b-arquivado { background: #eee; color: #777; }
.po-vis-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 700; color: var(--wine-700); }
.po-count { display: inline-flex; align-items: center; gap: 6px; color: var(--wine-700); font-size: .8rem; font-weight: 600; }
.po-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.po-acts select { margin-left: auto; border: 1px solid #e6d8d6; border-radius: 10px; padding: 6px 8px; font: inherit; font-size: .84rem; background: #fff; }
.po-link { border: 0; background: none; color: var(--wine-700); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.po-del { color: #b3261e; }
.po-resp { display: flex; flex-direction: column; gap: 8px; }
.po-row { display: flex; gap: 8px; } .po-row .mx-btn { flex: 1; }
.po-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #8a7375; padding: 24px 12px; margin: 0; font-size: .9rem; }
.po-empty .zmi { font-size: 30px; color: #c9b4b6; }
.po-admin .po-card { max-width: 760px; }

/* "Salvando…" global (bloqueia clique duplo enquanto grava) */
html.is-busy body { pointer-events: none; }
html.is-busy, html.is-busy * { cursor: progress !important; }
.busy-overlay { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; display: none; align-items: center; justify-content: center; pointer-events: auto; }
.busy-overlay[open] { display: flex; }
.busy-overlay::backdrop { background: rgba(33, 12, 16, .38); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.busy-box { display: flex; flex-direction: column; align-items: center; gap: 12px; background: #fff; color: #4d1d25; border-radius: 20px; padding: 22px 30px; box-shadow: 0 18px 50px rgba(33, 12, 16, .3); min-width: 150px; animation: busyIn .18s ease-out; }
.busy-box strong { font-size: .95rem; font-weight: 700; }
.busy-spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #f3e8ea; border-top-color: #622731; animation: busySpin .8s linear infinite; }
@keyframes busySpin { to { transform: rotate(360deg); } }
@keyframes busyIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.role-membro { color: #8a7375; }
.member-photo-field .button { width: auto !important; flex: 0 0 auto; display: inline-flex; flex-direction: row; align-items: center; gap: 8px; padding: 0 16px; min-height: 40px; }
.member-photo-field .button svg { width: 16px; height: 16px; }

/* ---- Acessos no app (equipe) ---- */
.ac-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.ac-resumo button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.ac-resumo button b { font-size: 1.6rem; line-height: 1.1; color: var(--wine-700); }
.ac-resumo button span { color: var(--muted); font-size: .9rem; }
.ac-resumo button.on { border-color: var(--wine-700); background: var(--wine-50); box-shadow: inset 0 0 0 1px var(--wine-700); }
.ac-lista { padding: 4px 0; }
.ac-item { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ac-item:last-child { border-bottom: 0; }
.ac-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ac-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-info span { color: var(--ink); font-size: .9rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ac-info small { color: var(--muted); font-size: .8rem; }
.ac-when { flex-shrink: 0; color: var(--wine-700); font-weight: 600; font-size: .88rem; text-align: right; max-width: 120px; }
.ac-plat { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.ac-ios { background: var(--info-bg); color: var(--info); }
.ac-android { background: var(--success-bg); color: var(--success); }
@media (max-width: 640px) {
  .ac-item { padding: 12px 14px; gap: 10px; }
  .ac-when { max-width: 84px; font-size: .8rem; }
  .ac-resumo { gap: 8px; }
  .ac-resumo button { padding: 10px 12px; }
}
#acessosView .section-title-row > .button { width: auto; min-width: 0; padding: 0 16px; font-size: 13px; align-self: flex-start; }
#acessosView .section-title-row { margin-bottom: 14px; }

/* Escala automática: "Até o dia" + atalhos (v94) */
.auto-ate{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.auto-ate .chip-btn{border:1px solid var(--line,#ddd);background:transparent;border-radius:999px;padding:5px 12px;font:inherit;font-size:.85rem;cursor:pointer;color:inherit}
.auto-ate .chip-btn.on{background:#5c2928;border-color:#5c2928;color:#fff}
.auto-culto-ok{opacity:.65}
.auto-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 6px}
.auto-tabs .chip-btn{border:1px solid var(--line,#ddd);background:transparent;border-radius:999px;padding:6px 14px;font:inherit;font-size:.9rem;cursor:pointer;color:inherit}
.auto-tabs .chip-btn.on{background:#5c2928;border-color:#5c2928;color:#fff}
.auto-tab-help{margin:0 0 8px}
.auto-roles:not([data-tab="0"]) .auto-role-x{visibility:hidden}
.auto-role.auto-dif input[name="qty"]{border-color:#5c2928;box-shadow:0 0 0 2px rgba(92,41,40,.18);font-weight:700}
.auto-role.auto-zero .auto-role-name{opacity:.45;text-decoration:line-through}
.auto-conta{margin-top:10px;padding:10px 12px;border-radius:10px;background:rgba(92,41,40,.07);line-height:1.4}
.auto-conta:empty{display:none}
/* Prévia editável da escala automática (v97) */
.auto-culto .auto-row{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.6fr) auto;align-items:center;gap:8px;padding:4px 0}
.auto-culto ul:has(.auto-row){grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.auto-row .auto-row-role{color:#8a7a78;font-size:13px;min-width:0}
.auto-row input.auto-row-role{padding:6px 8px;font-size:13px;color:inherit}
.auto-row .auto-row-who{width:100%;min-width:0;padding:6px 8px;font-size:13px;border-radius:8px;border:1px solid #e6dcd8;background:#fff;color:#2b1a1a;font-weight:600}
.auto-row.auto-miss .auto-row-who{border-color:#b3261e;color:#b3261e;font-weight:400}
.auto-row.auto-dup .auto-row-who{border-color:#c98a1b;background:#fff6e5}
.auto-row-x{border:0;background:transparent;color:#a08f8c;cursor:pointer;font-size:14px;padding:4px 6px}
.auto-row-add{margin-top:6px;font-size:13px}
@media (max-width:520px){.auto-culto ul:has(.auto-row){grid-template-columns:1fr}}
.sc2-wa{color:#1f8a4c;white-space:nowrap}
.sc2-wa{color:#1f8a4c;white-space:nowrap}
/* Recusas: aviso ao entrar + faixa nas Escalas/Início com "Trocar" (10/11/2026) */
.rc-banner { margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: #fdf0ee; border: 1px solid #f1c9c4; }
.rc-banner > header { display: flex; gap: 10px; align-items: flex-start; color: #b3261e; }
.rc-banner > header svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.rc-banner > header strong { display: block; font-size: 15px; }
.rc-banner > header small { display: block; color: #7a5a58; font-size: 13px; }
.rc-banner ul, .rc-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: #fff; border-radius: 12px; border: 1px solid #f0e2df; }
.rc-who { flex: 1 1 200px; min-width: 0; }
.rc-who strong { display: block; font-size: 14px; color: #3a2224; }
.rc-who small { display: block; font-size: 12px; color: #8a7a78; }
.rc-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-btn { min-height: 36px !important; padding: 0 12px !important; font-size: 13px !important; width: auto !important; }
@media (max-width: 560px) { .rc-acts { width: 100%; } .rc-acts .rc-btn { flex: 1; justify-content: center; } }
.rc-info { font-size: 14px !important; line-height: 1.5; color: #5a4a48; margin: 0 0 12px; }
/* ---- ENSAIO (10/11/2026): tela cheia com vídeo, tom, BPM/metrônomo, cifra/letra e observações ---- */
.zm-head-acts { display: inline-flex; gap: 6px; align-items: center; }
.zm-btn-ens { display: inline-flex; align-items: center; gap: 5px; }
.zm-note { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0; padding: 6px 9px; border-radius: 10px; background: #fff8e6; color: #6b5420; font-size: .8rem; white-space: pre-line; }
.zm-ov.zm-ens-ov { z-index: 205; padding: 0; align-items: stretch; background: rgba(33, 12, 16, .55); }
.zm-ens { width: 100%; max-width: 1180px; margin: 0 auto; background: var(--paper); color: var(--ink); display: flex; flex-direction: column;
  height: 100%; overflow: hidden; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
@media (min-width: 760px) { .zm-ov.zm-ens-ov { padding: 20px; } .zm-ens { border-radius: 22px; height: auto; max-height: calc(100vh - 40px); box-shadow: var(--shadow-float); } }
.zm-ens-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--wine-800, #5c2928); color: #fff; }
.zm-ens-head small { display: flex; align-items: center; gap: 5px; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.zm-ens-head strong { display: block; font-size: 1.1rem; }
.zm-ens-head span { display: block; font-size: .8rem; opacity: .85; text-transform: capitalize; }
.zm-ens-head .zm-close { background: rgba(255,255,255,.15); color: #fff; flex: none; }
.zm-ens-main { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: 1fr; gap: 16px; padding: 14px 14px 24px; }
@media (min-width: 900px) { .zm-ens-main { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; padding: 18px; } .zm-ens-side { position: sticky; top: 0; } }
.zm-ens-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #1d0f11; border-radius: 16px; overflow: hidden; }
.zm-ens-video iframe, .zm-ens-video #zmEnsPlayer { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.zm-ens-novideo { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #f3e7e8; text-align: center; padding: 16px; }
.zm-ens-novideo[hidden] { display: none; }
.zm-ens-novideo .zmi { font-size: 34px; opacity: .7; }
.zm-ens-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.zm-ens-nav .zm-btn { display: inline-flex; align-items: center; gap: 5px; padding: 9px 14px; }
.zm-ens-nav .zm-btn:disabled { opacity: .35; cursor: default; }
.zm-ens-auto { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--wine-800); font-weight: 600; cursor: pointer; }
.zm-ens-auto input { width: 18px; height: 18px; accent-color: var(--wine-700); }
@media (max-width: 520px) { .zm-ens-auto { order: 3; width: 100%; justify-content: center; } }
.zm-ens-title { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.zm-ens-pos { flex: none; min-width: 46px; height: 46px; border-radius: 14px; background: var(--wine-700); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.zm-ens-title h3 { margin: 0; font-size: 1.3rem; color: var(--wine-900, #3a1518); line-height: 1.2; }
.zm-ens-title p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.zm-ens-facts { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.zm-ens-fact { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.zm-ens-fact > span { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.zm-ens-fact > strong { font-size: 1.7rem; color: var(--gold-700, #8a6a1c); line-height: 1.1; }
.zm-ens-fact > small { color: var(--muted); font-size: .76rem; }
.zm-ens-met { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.zm-ens-met > span { width: 100%; }
.zm-ens-bpm { display: inline-flex; align-items: center; gap: 6px; }
.zm-ens-bpm strong { font-size: 1.5rem; min-width: 46px; text-align: center; color: var(--wine-800); }
.zm-ens-bpm button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--wine-50); color: var(--wine-800); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.zm-ens-met .zm-btn { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.zm-ens-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.zm-ens-links .zm-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 9px 14px; flex: 1 1 120px; justify-content: center; }
.zm-ens-notes { border-radius: 14px; background: #fff8e6; border: 1px solid #f0dfb0; padding: 10px 12px; }
.zm-ens-notes .zm-cap { display: flex; align-items: center; gap: 5px; color: #7a6020; margin-top: 0; }
.zm-ens-notes textarea { width: 100%; box-sizing: border-box; border: 1px solid #e6d29c; border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; background: #fff; resize: vertical; }
.zm-ens-notes .zm-row2 { align-items: center; margin-top: 8px; } .zm-ens-notes .zm-row2 small { flex: 1; color: var(--success); font-weight: 600; }
.zm-ens-notes .zm-row2 .zm-btn { flex: none; padding: 9px 14px; }
.zm-ens-fixar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--wine-50); color: var(--wine-800); font-size: .84rem; }
.zm-ens-fixar[hidden] { display: none; }
.zm-ens-fixar span { display: inline-flex; align-items: center; gap: 6px; }
.zm-ens-fixar .zm-lk, .zm-ens-lyr .zm-lk { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--wine-700); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; text-decoration: none; }
.zm-ens-lyr { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.zm-ens-lyr-tg { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 12px 14px; font: inherit; font-weight: 700; color: var(--wine-800); cursor: pointer; }
.zm-ens-lyr-tg span { flex: 1; text-align: left; }
.zm-ens-lyr-body { padding: 0 14px 12px; }
.zm-ens-lyr-body[hidden] { display: none; }
.zm-ens-lyr-txt { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 1.05rem; line-height: 1.6; color: var(--ink); max-height: 60vh; overflow: auto; }
.zm-ens-lyr-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.zm-ens-lyr-src { color: var(--muted); font-size: .76rem; } .zm-ens-lyr-src a { color: inherit; }
.zm-ens-lyr textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; resize: vertical; }
.zm-ens-lyr .zm-row2 { margin-top: 8px; } .zm-ens-lyr .zm-row2 .zm-btn { padding: 9px 14px; }
.zm-ens-obs { margin: 0; white-space: pre-line; color: #4a3a12; font-size: .95rem; }
.zm-ens-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zm-ens-list button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 10px; cursor: pointer; color: var(--ink); }
.zm-ens-list button.is-on { border-color: var(--wine-700); background: var(--wine-50); box-shadow: inset 3px 0 0 var(--wine-700); }
.zm-ens-list .zm-tt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.zm-ens-list .zm-tt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zm-ens-list .zmi { color: var(--wine-700); }
.zm-ens-vform { display: flex; gap: 6px; width: min(100%, 420px); margin-top: 6px; }
.zm-ens-vform input { flex: 1; min-width: 0; border: 1px solid #5a3a3e; border-radius: 10px; padding: 9px 10px; font-size: 16px; background: #2a1518; color: #fff; }
.zm-ens-novideo > small { font-size: .74rem; opacity: .7; }
