/* ================================================================
   LES NOIR — PAINEL ADMINISTRATIVO PRO
   Visual luxo · Sidebar fixa · Cards modernos · Animações sutis
   ================================================================ */

/* ===== Reset/override do admin antigo ===== */
.admin-panel { display: none; }
.admin-panel.active { display: grid !important; }

.admin-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #07060a;
  z-index: 200; /* acima do topnav (100) e do back-to-top (500→ajustado) */
  grid-template-columns: 260px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
  font-family: var(--font-body);
}

/* ============== SIDEBAR ============== */
.adm-sidebar {
  background: linear-gradient(180deg, #0c0a0e 0%, #07060a 100%);
  border-right: 1px solid rgba(212,175,55,0.15);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: relative;
  z-index: 3;
}

.adm-sidebar::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(201,169,97,0.15), transparent);
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  margin-bottom: 1.25rem;
}

.adm-brand .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.adm-brand-text { line-height: 1.15; }

.adm-brand-title {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.adm-brand-sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 400;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.85rem;
  flex: 1;
  overflow-y: auto;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  position: relative;
}

.adm-nav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
  transition: transform 0.3s;
}

@media (hover: hover) {
  .adm-nav-item:hover {
    color: var(--ink);
    background: rgba(212,175,55,0.04);
  }
}

.adm-nav-item.active {
  color: var(--gold);
  background: linear-gradient(90deg, rgba(212,175,55,0.12), rgba(212,175,55,0.02));
  border-color: rgba(212,175,55,0.2);
}
.adm-nav-item.active::before { transform: translateY(-50%) scaleY(1); }

.adm-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  color: var(--gold);
  opacity: 0.8;
}

.adm-sidebar-footer {
  padding: 1rem 0.85rem 0;
  border-top: 1px solid rgba(212,175,55,0.1);
  margin-top: 0.5rem;
}

/* ============== TOPBAR (mobile) ============== */
.adm-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  padding-top: calc(0.85rem + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, #0c0a0e 0%, #07060a 100%);
  border-bottom: 1px solid rgba(212,175,55,0.15);
  position: sticky;
  top: 0;
  z-index: 300;
  flex-shrink: 0;
}

.adm-menu-btn {
  width: 38px; height: 38px;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  color: var(--gold);
  font-size: 1.4rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s;
}
.adm-menu-btn:hover { background: rgba(212,175,55,0.1); }

.adm-topbar-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.adm-topbar-actions { display: flex; gap: 0.5rem; }

.adm-bell {
  width: 38px; height: 38px;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.adm-bell-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  box-shadow: 0 0 8px #e74c3c;
}

/* ============== MAIN ============== */
.adm-main {
  overflow-y: auto;
  padding: 2rem 2.5rem;
  background:
    radial-gradient(1200px 600px at top right, rgba(212,175,55,0.04), transparent 60%),
    radial-gradient(800px 600px at bottom left, rgba(212,175,55,0.025), transparent 60%);
}

.adm-pane { display: none; animation: paneIn 0.4s ease both; }
.adm-pane.active { display: block; }

@keyframes paneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.adm-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}

.adm-pane-head h2 {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 2rem;
  color: var(--ink);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

.adm-greeting {
  font-style: italic;
  color: var(--ink-dim);
  margin-top: 0.4rem;
}

.adm-pane-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ============== KPIs ============== */
.adm-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.adm-kpi {
  position: relative;
  padding: 1.4rem 1.5rem;
  background: linear-gradient(135deg, rgba(28,22,19,0.7), rgba(10,8,7,0.7));
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.35s;
}

.adm-kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.7;
}

.adm-kpi::after {
  content: "";
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(212,175,55,0.08), transparent 30%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s;
}

.adm-kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.adm-kpi:hover::after { opacity: 1; }

.adm-kpi-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.6rem;
}

.adm-kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--gold-light);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.adm-kpi-trend {
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-style: italic;
}
.adm-kpi-trend.up { color: #6abe6a; }
.adm-kpi-trend.down { color: #e6837a; }

/* ============== GRID 2 COLUNAS ============== */
.adm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ============== CARDS ============== */
.adm-card {
  background: linear-gradient(135deg, rgba(20,16,16,0.85), rgba(12,10,12,0.85));
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s;
}

.adm-card:hover { border-color: rgba(212,175,55,0.25); }

.adm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
}

.adm-card h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.adm-card-tools { display: flex; gap: 0.6rem; }

.adm-pill {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--gold);
  background: rgba(212,175,55,0.12);
  color: var(--gold);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
}

.adm-helper {
  color: var(--ink-dim);
  font-style: italic;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.adm-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.adm-legend i {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ============== CHART AREA (SVG) ============== */
.adm-chart-area {
  height: 260px;
  position: relative;
  padding: 0.5rem 0;
}

.adm-chart-area svg { width: 100%; height: 100%; display: block; }

/* ============== NEXT LIST (próximos atendimentos) ============== */
.adm-next-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.adm-next-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
}

.adm-next-item:hover {
  border-color: rgba(212,175,55,0.35);
  background: rgba(212,175,55,0.05);
  transform: translateX(3px);
}

.adm-next-time {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  line-height: 1.1;
}
.adm-next-time small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

.adm-next-info { line-height: 1.35; }
.adm-next-info strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.adm-next-info span {
  display: block;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.adm-next-barber {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  white-space: nowrap;
}

.adm-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-dim);
  font-style: italic;
  font-size: 0.95rem;
}

/* ============== TOP LIST ============== */
.adm-top-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.adm-top-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0;
}

.adm-top-rank {
  width: 28px; height: 28px;
  background: var(--gold);
  color: #1a1208;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.adm-top-bar-wrap {
  position: relative;
  height: 28px;
  background: rgba(212,175,55,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.adm-top-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: #1a1208;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  min-width: fit-content;
  transition: width 0.6s ease;
}

.adm-top-value {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

/* ============== BARBERS PERFORMANCE ============== */
.adm-barbers-perf {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.adm-bp-card {
  padding: 1rem 1.2rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 4px;
}

.adm-bp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.adm-bp-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--ink);
}

.adm-bp-stats {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.adm-bp-stats span { color: var(--ink-dim); font-style: italic; }
.adm-bp-stats strong { color: var(--gold); margin-left: 0.3rem; font-weight: 600; }

.adm-bp-bar {
  height: 6px;
  background: rgba(212,175,55,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.adm-bp-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.8s ease;
}

/* ============== ALERTS ============== */
.adm-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.adm-alert {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.15);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-size: 0.93rem;
}

.adm-alert.warn { border-left-color: #e6c870; }
.adm-alert.danger { border-left-color: #e6837a; }
.adm-alert.info { border-left-color: #7ab3e6; }

.adm-alert-icon {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.adm-alert.warn .adm-alert-icon { color: #e6c870; }
.adm-alert.danger .adm-alert-icon { color: #e6837a; }
.adm-alert.info .adm-alert-icon { color: #7ab3e6; }

.adm-alert-text { color: var(--ink); flex: 1; }
.adm-alert-text strong { color: var(--gold-light); font-weight: 600; }

/* ============== AGENDA ============== */
.adm-agenda-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(20,16,16,0.6);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 6px;
}

.adm-date-nav { display: flex; align-items: center; gap: 0.6rem; }

.adm-circle-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold);
  font-size: 1.2rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s;
}
.adm-circle-btn:hover { background: rgba(212,175,55,0.1); border-color: var(--gold); }

.adm-today-btn {
  padding: 0.55rem 1rem;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
}
.adm-today-btn:hover { background: rgba(212,175,55,0.1); }

.adm-date-label {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-left: 0.5rem;
  text-transform: capitalize;
}

.adm-view-switch,
.adm-period-switch {
  display: flex;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 4px;
  overflow: hidden;
}

.adm-view-btn,
.adm-period-btn {
  padding: 0.55rem 1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  cursor: pointer;
  border: 0;
  border-right: 1px solid rgba(212,175,55,0.15);
  transition: all 0.25s;
}
.adm-view-btn:last-child,
.adm-period-btn:last-child { border-right: 0; }

.adm-view-btn:hover,
.adm-period-btn:hover { color: var(--ink); background: rgba(212,175,55,0.05); }

.adm-view-btn.active,
.adm-period-btn.active {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a1208;
  font-weight: 700;
}

.adm-barber-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.adm-chip {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}
.adm-chip:hover { color: var(--ink); border-color: rgba(212,175,55,0.4); }
.adm-chip.active {
  background: var(--gold);
  color: #1a1208;
  border-color: var(--gold);
  font-weight: 600;
}

/* === Agenda visual === */
.adm-agenda-wrap {
  background: rgba(20,16,16,0.6);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 6px;
  overflow: hidden;
}

.ag-day-grid {
  display: grid;
  grid-template-columns: 64px 1fr;
}

.ag-time-col, .ag-content-col { position: relative; }

.ag-time-slot {
  height: 60px;
  border-bottom: 1px solid rgba(212,175,55,0.08);
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--ink-dim);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0.3rem 0.6rem 0 0;
  letter-spacing: 1px;
}

.ag-content-col { position: relative; padding-left: 1rem; }

.ag-grid-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(212,175,55,0.08);
}

.ag-grid-line-half {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(212,175,55,0.04);
  border-top: 1px dashed rgba(212,175,55,0.05);
}

.ag-event {
  position: absolute;
  left: 1rem; right: 1rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.08));
  border: 1px solid rgba(212,175,55,0.5);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s;
  overflow: hidden;
  min-height: 30px;
}

.ag-event:hover {
  background: linear-gradient(135deg, rgba(212,175,55,0.28), rgba(212,175,55,0.14));
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.ag-event-time {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 600;
}

.ag-event-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
  margin: 2px 0;
  letter-spacing: 0.3px;
}

.ag-event-sub {
  font-style: italic;
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.ag-now-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #e74c3c, transparent);
  z-index: 5;
  pointer-events: none;
}

.ag-now-line::before {
  content: "";
  position: absolute;
  left: -6px; top: -4px;
  width: 10px; height: 10px;
  background: #e74c3c;
  border-radius: 50%;
  box-shadow: 0 0 12px #e74c3c;
}

/* === Semana === */
.ag-week-grid {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
}

.ag-week-header {
  display: contents;
}

.ag-week-day-header {
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(212,175,55,0.15);
  border-left: 1px solid rgba(212,175,55,0.05);
}

.ag-week-day-name {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.ag-week-day-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  font-weight: 700;
  margin-top: 4px;
}

.ag-week-day-num.today {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a1208;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
}

.ag-week-col {
  position: relative;
  border-left: 1px solid rgba(212,175,55,0.05);
  min-height: 100%;
}

.ag-week-col .ag-event {
  left: 4px; right: 4px;
  padding: 0.4rem 0.5rem;
}

.ag-week-col .ag-event-title { font-size: 0.74rem; }
.ag-week-col .ag-event-sub { font-size: 0.68rem; }

/* ============== STATS ROW (clientes/estoque) ============== */
.adm-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.adm-mini-stat {
  padding: 1rem 1.25rem;
  background: rgba(20,16,16,0.7);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.adm-mini-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.adm-mini-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold-light);
  font-weight: 700;
}

.adm-mini-value.adm-warn { color: #e6c870; }

/* ============== SEARCH ============== */
.adm-search { position: relative; }

.adm-search input {
  width: 280px;
  max-width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.adm-search input:focus {
  outline: none;
  border-color: var(--gold);
}

.adm-search::before {
  content: "⌕";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.1rem;
}

/* ============== CLIENTS LIST ============== */
.adm-clients-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.adm-client-card {
  padding: 1.1rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.adm-client-card:hover {
  border-color: rgba(212,175,55,0.4);
  background: rgba(212,175,55,0.04);
  transform: translateY(-2px);
}

.adm-client-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1208;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.adm-client-info { flex: 1; min-width: 0; line-height: 1.3; }

.adm-client-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-client-info span {
  display: block;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.adm-client-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.adm-tag-vip { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #1a1208; }
.adm-tag-new { background: rgba(122,179,230,0.15); color: #8fc4f0; border: 1px solid rgba(122,179,230,0.3); }
.adm-tag-lost { background: rgba(230,131,122,0.12); color: #e6837a; border: 1px solid rgba(230,131,122,0.3); }
.adm-tag-active { background: rgba(106,190,106,0.12); color: #7dca7d; border: 1px solid rgba(106,190,106,0.3); }

/* ============== MODAL CLIENTE ============== */
.modal-wide { max-width: 600px !important; text-align: left !important; }

.adm-client-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}

.adm-client-header .adm-client-avatar {
  width: 64px; height: 64px;
  font-size: 1.5rem;
}

.adm-client-header h3 {
  font-family: var(--font-brand) !important;
  font-style: italic !important;
  font-size: 1.5rem !important;
  color: var(--ink) !important;
  text-align: left !important;
  margin-bottom: 0.2rem !important;
  font-weight: 400 !important;
}

.adm-client-phone {
  font-style: italic;
  color: var(--ink-dim);
  margin: 0 !important;
  font-size: 0.95rem !important;
}

.adm-client-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.adm-client-stats > div {
  padding: 0.85rem 0.6rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 4px;
  text-align: center;
}

.adm-client-stats span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.3rem;
}

.adm-client-stats strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
}

.adm-client-history-title {
  font-family: var(--font-display) !important;
  font-size: 0.78rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin-bottom: 0.85rem;
}

.adm-client-history {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.adm-history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
  font-size: 0.88rem;
  align-items: center;
}

.adm-history-row .h-date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.adm-history-row .h-svc {
  color: var(--ink);
  font-style: italic;
}

.adm-history-row .h-val {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-weight: 600;
}

/* ============== FINANCEIRO ============== */
.adm-fin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.adm-fin-card {
  padding: 1.4rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(212,175,55,0.15);
  position: relative;
  overflow: hidden;
}

.adm-fin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

.adm-fin-revenue {
  background: linear-gradient(135deg, rgba(106,190,106,0.12), rgba(20,16,16,0.85));
  border-color: rgba(106,190,106,0.3);
}
.adm-fin-expense {
  background: linear-gradient(135deg, rgba(230,131,122,0.12), rgba(20,16,16,0.85));
  border-color: rgba(230,131,122,0.3);
}
.adm-fin-profit {
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(20,16,16,0.85));
  border-color: rgba(212,175,55,0.4);
}

.adm-fin-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.adm-fin-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.adm-fin-revenue .adm-fin-value { color: #8fd68f; }
.adm-fin-expense .adm-fin-value { color: #f0a59c; }
.adm-fin-profit .adm-fin-value { color: var(--gold-light); }

.adm-fin-detail {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

/* ============== FORMS ============== */
.adm-form { display: flex; flex-direction: column; gap: 1rem; }

.adm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.adm-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adm-form span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.adm-form input,
.adm-form select {
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.25s;
}

.adm-form input:focus,
.adm-form select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.adm-form select option {
  background: var(--bg-2);
  color: var(--ink);
}

/* ============== LIST DESPESAS ============== */
.adm-exp-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.adm-exp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.95rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(230,131,122,0.15);
  border-left: 3px solid #e6837a;
  border-radius: 3px;
  font-size: 0.92rem;
}

.adm-exp-row .e-info { line-height: 1.3; }
.adm-exp-row .e-info strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 500;
}
.adm-exp-row .e-info small {
  display: block;
  font-style: italic;
  font-size: 0.77rem;
  color: var(--ink-dim);
}
.adm-exp-row .e-val {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #f0a59c;
  font-weight: 600;
}

/* ============== COMISSÕES ============== */
.adm-comm-config,
.adm-comm-summary {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.adm-comm-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 4px;
}

.adm-comm-row strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.adm-comm-percent {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.adm-comm-percent input {
  width: 70px;
  padding: 0.45rem 0.6rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.adm-comm-percent span {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 700;
}

.adm-comm-summary-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(212,175,55,0.05), transparent);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 4px;
}

.adm-comm-summary-row .cs-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
}
.adm-comm-summary-row .cs-meta {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.adm-comm-summary-row .cs-rev {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.95rem;
  white-space: nowrap;
}
.adm-comm-summary-row .cs-comm {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ============== ESTOQUE / PRODUTOS ============== */
.adm-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.adm-product-card {
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.adm-product-card:hover {
  border-color: rgba(212,175,55,0.4);
  transform: translateY(-3px);
}

.adm-product-card.low-stock {
  border-color: rgba(230,200,112,0.5);
}

.adm-product-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  color: var(--gold);
  border-bottom: 1px solid rgba(212,175,55,0.12);
  overflow: hidden;
}

.adm-product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.adm-product-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.adm-product-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  color: var(--ink);
  font-weight: 500;
}

.adm-product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.adm-product-meta .p-price {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 700;
}

.adm-product-meta .p-stock {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--ink-dim);
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 12px;
}

.adm-product-meta .p-stock.low {
  color: #e6c870;
  border-color: rgba(230,200,112,0.4);
  background: rgba(230,200,112,0.08);
}

.adm-product-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.adm-stock-btn {
  width: 28px; height: 28px;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 3px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.2s;
}
.adm-stock-btn:hover { background: rgba(212,175,55,0.1); border-color: var(--gold); }

.adm-product-actions .p-del {
  margin-left: auto;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(230,131,122,0.3);
  border-radius: 3px;
  background: transparent;
  color: #e6837a;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
.adm-product-actions .p-del:hover {
  background: rgba(230,131,122,0.12);
}

/* ============== RANKINGS / RELATÓRIOS ============== */
.adm-rank {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.adm-rank-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
}

.adm-rank-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  width: 26px;
  text-align: center;
}

.adm-rank-info { line-height: 1.3; }
.adm-rank-info strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}
.adm-rank-info small {
  display: block;
  font-style: italic;
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.adm-rank-val {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.adm-weekdays {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  height: 200px;
  padding-bottom: 30px;
  position: relative;
}

.adm-wd-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border-radius: 3px 3px 0 0;
  position: relative;
  min-height: 2px;
  transition: opacity 0.3s;
}

.adm-wd-bar:hover { opacity: 0.8; }

.adm-wd-bar .wd-label {
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

.adm-wd-bar .wd-val {
  position: absolute;
  top: -20px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
}

.adm-hours {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  align-items: end;
  height: 200px;
  padding-bottom: 30px;
  position: relative;
}

.adm-hr-bar {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border-radius: 2px 2px 0 0;
  position: relative;
  min-height: 1px;
  transition: opacity 0.3s;
}

.adm-hr-bar .hr-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* ============== TABELA RELATÓRIO ============== */
.adm-table-wrap { overflow-x: auto; }

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.adm-table th {
  text-align: left;
  padding: 0.85rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(212,175,55,0.2);
  white-space: nowrap;
  background: rgba(10,8,7,0.4);
  position: sticky; top: 0;
}

.adm-table td {
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid rgba(212,175,55,0.06);
  color: var(--ink);
  white-space: nowrap;
}

.adm-table tr:hover td { background: rgba(212,175,55,0.04); }

.adm-table .td-total {
  color: var(--gold);
  font-weight: 600;
  font-family: var(--font-display);
}

.btn-delete {
  padding: 0.4rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #e6837a;
  border: 1px solid rgba(230,131,122,0.3);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-delete:hover { background: rgba(230,131,122,0.15); }

.btn-danger {
  color: #e6837a !important;
  border-color: rgba(230,131,122,0.4) !important;
}
.btn-danger:hover { background: rgba(230,131,122,0.12) !important; }

/* ============== TEAM LIST (configurações) ============== */
.adm-team-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.adm-team-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 3px;
}

.adm-team-row strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.9rem;
}
.adm-team-row em {
  font-family: var(--font-brand);
  font-style: italic;
  color: var(--gold);
  font-size: 0.9rem;
  margin-left: 0.4rem;
}

.adm-actions-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ============== MODAL APPT DETAIL ============== */
.adm-appt-detail {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 0;
  text-align: left;
}

.adm-appt-detail .ad-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(212,175,55,0.1);
  font-size: 0.95rem;
}
.adm-appt-detail .ad-row:last-child { border-bottom: 0; }
.adm-appt-detail .ad-row span:first-child {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.adm-appt-detail .ad-row span:last-child {
  color: var(--ink);
  text-align: right;
  font-style: italic;
}
.adm-appt-detail .ad-total span:last-child {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 700;
  font-style: normal;
}

/* ============== TOAST ============== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 0.95rem 1.4rem;
  background: linear-gradient(135deg, rgba(28,22,19,0.97), rgba(12,10,12,0.97));
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  z-index: 1000;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  max-width: 360px;
}

.toast.show { transform: translateX(0); }

.toast.error {
  border-color: #e6837a;
  border-left-color: #e6837a;
}

/* ============== SCROLL ============== */
.adm-main::-webkit-scrollbar,
.adm-next-list::-webkit-scrollbar,
.adm-exp-list::-webkit-scrollbar,
.adm-client-history::-webkit-scrollbar {
  width: 8px;
}
.adm-main::-webkit-scrollbar-track,
.adm-next-list::-webkit-scrollbar-track,
.adm-exp-list::-webkit-scrollbar-track,
.adm-client-history::-webkit-scrollbar-track {
  background: transparent;
}
.adm-main::-webkit-scrollbar-thumb,
.adm-next-list::-webkit-scrollbar-thumb,
.adm-exp-list::-webkit-scrollbar-thumb,
.adm-client-history::-webkit-scrollbar-thumb {
  background: rgba(212,175,55,0.2);
  border-radius: 10px;
}
.adm-main::-webkit-scrollbar-thumb:hover,
.adm-next-list::-webkit-scrollbar-thumb:hover {
  background: rgba(212,175,55,0.4);
}

/* ============== RESPONSIVO ============== */
@media (max-width: 1100px) {
  .adm-kpis { grid-template-columns: 1fr 1fr; }
  .adm-grid-2 { grid-template-columns: 1fr; }
  .adm-fin-summary { grid-template-columns: 1fr; }
  .adm-client-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .admin-panel.active {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr;
  }
  .adm-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    height: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    z-index: 200;
    box-shadow: 12px 0 40px rgba(0,0,0,0.6);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .adm-sidebar.open { transform: translateX(0); }

  /* Itens de menu — área de toque generosa pro mobile */
  .adm-nav-item {
    padding: 1rem 1rem;
    font-size: 0.82rem;
    min-height: 48px;
    -webkit-tap-highlight-color: rgba(212,175,55,0.2);
    touch-action: manipulation;
  }

  .adm-topbar { display: flex; }
  .adm-main { padding: 1.25rem; }

  .adm-pane-head h2 { font-size: 1.8rem; }
  .adm-kpis { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .adm-kpi { padding: 1rem 1.1rem; }
  .adm-kpi-value { font-size: 1.4rem; }
  .adm-fin-value { font-size: 1.4rem; }

  .adm-form-row { grid-template-columns: 1fr; }
  .adm-search input { width: 100%; }
  .adm-search { width: 100%; }
  .adm-pane-head { flex-direction: column; align-items: stretch; }

  .adm-agenda-toolbar { flex-direction: column; align-items: stretch; }
  .adm-agenda-toolbar > div { justify-content: center; }

  .adm-clients-list { grid-template-columns: 1fr; }
  .adm-client-stats { grid-template-columns: 1fr 1fr; }

  .ag-day-grid { grid-template-columns: 50px 1fr; }
  .ag-week-grid { grid-template-columns: 40px repeat(7, 1fr); font-size: 0.7rem; }

  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }

  .adm-products-list { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .adm-product-card { font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .adm-kpis { grid-template-columns: 1fr; }
  .adm-stats-row { grid-template-columns: 1fr 1fr; }
  .adm-products-list { grid-template-columns: 1fr; }
}

/* Backdrop pra sidebar mobile */
.adm-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  animation: fadeIn 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.adm-backdrop.show { display: block; }

/* ============================================================
   NOVOS MÓDULOS — InBarber+
   ============================================================ */

/* === LISTA DE ESPERA === */
.adm-waitlist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.adm-wait-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.12);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  transition: all 0.25s;
}

.adm-wait-row:hover {
  border-color: rgba(212,175,55,0.35);
}

.adm-wait-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1208;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.adm-wait-info { line-height: 1.35; min-width: 0; }
.adm-wait-info strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  display: block;
}
.adm-wait-info span {
  display: block;
  font-style: italic;
  font-size: 0.83rem;
  color: var(--ink-dim);
}
.adm-wait-info small {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
}

.adm-wait-actions {
  display: flex;
  gap: 0.4rem;
}

.adm-wait-whats {
  padding: 0.45rem 0.85rem;
  background: rgba(106,190,106,0.1);
  border: 1px solid rgba(106,190,106,0.3);
  border-radius: 3px;
  color: #8fd68f;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.adm-wait-whats:hover {
  background: rgba(106,190,106,0.2);
}

/* === CAIXA === */
.adm-cash-date input {
  padding: 0.55rem 0.85rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.adm-cash-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.adm-cash-card {
  padding: 1.4rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(212,175,55,0.15);
  position: relative;
  overflow: hidden;
}

.adm-cash-in {
  background: linear-gradient(135deg, rgba(106,190,106,0.12), rgba(20,16,16,0.85));
  border-color: rgba(106,190,106,0.3);
}
.adm-cash-out {
  background: linear-gradient(135deg, rgba(230,131,122,0.12), rgba(20,16,16,0.85));
  border-color: rgba(230,131,122,0.3);
}
.adm-cash-balance {
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(20,16,16,0.85));
  border-color: rgba(212,175,55,0.4);
}

.adm-cash-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.adm-cash-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.adm-cash-in .adm-cash-value { color: #8fd68f; }
.adm-cash-out .adm-cash-value { color: #f0a59c; }
.adm-cash-balance .adm-cash-value { color: var(--gold-light); }

.adm-cash-detail {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.adm-payment-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.adm-pb-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
}

.adm-pb-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: var(--gold);
}

.adm-pb-info { line-height: 1.3; }
.adm-pb-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.adm-pb-bar {
  height: 5px;
  background: rgba(212,175,55,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.adm-pb-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.6s;
}

.adm-pb-value {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.adm-cash-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
}

.adm-cash-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.95rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.adm-cash-row:hover { border-color: rgba(212,175,55,0.25); }

.adm-cash-row.no-show {
  border-left: 3px solid #e6837a;
  opacity: 0.7;
}

.adm-cash-time {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
}

.adm-cash-payment {
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* === FIDELIDADE === */
.adm-loyalty-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.adm-loyalty-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1.2rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
}

.adm-loyalty-info { line-height: 1.3; min-width: 0; }
.adm-loyalty-info strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.5px;
}
.adm-loyalty-info span {
  display: block;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.adm-loyalty-points {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.15rem;
  font-weight: 700;
}

.adm-loyalty-points::before {
  content: "★";
  color: var(--gold);
}

/* === MARKETING === */
.adm-reminder-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.adm-reminder-list,
.adm-return-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.adm-reminder-row,
.adm-return-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.7rem 0.95rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 3px;
  font-size: 0.88rem;
}

.adm-reminder-row strong,
.adm-return-row strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink);
  display: block;
  letter-spacing: 0.5px;
}

.adm-reminder-row span,
.adm-return-row span {
  display: block;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-dim);
}

.adm-mass-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.adm-mass-info {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.adm-form textarea {
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

.adm-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.adm-mass-result {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
}

.adm-mass-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(106,190,106,0.05);
  border: 1px solid rgba(106,190,106,0.2);
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s;
}
.adm-mass-link:hover {
  background: rgba(106,190,106,0.15);
}
.adm-mass-link::after {
  content: "→";
  color: #8fd68f;
}

/* === COMANDA (modal) === */
.adm-comanda-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212,175,55,0.15);
}

.adm-comanda-head h3 {
  margin: 0 !important;
  text-align: left !important;
}

.adm-comanda-id {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.adm-comanda-client {
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-style: italic;
  color: var(--ink);
}

.adm-comanda-client strong {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.adm-comanda-section {
  font-family: var(--font-display) !important;
  font-size: 0.78rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  color: var(--gold) !important;
  margin: 0 0 0.85rem !important;
  font-weight: 500 !important;
}

.adm-comanda-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.adm-comanda-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
  font-size: 0.9rem;
}

.adm-comanda-item .ci-tag {
  padding: 0.18rem 0.5rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.adm-comanda-item .ci-tag.svc { background: rgba(212,175,55,0.18); color: var(--gold); }
.adm-comanda-item .ci-tag.prod { background: rgba(122,179,230,0.15); color: #8fc4f0; }

.adm-comanda-item .ci-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink);
  letter-spacing: 0.3px;
}

.adm-comanda-item .ci-price {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-weight: 600;
  white-space: nowrap;
}

.adm-comanda-item .ci-rm {
  width: 24px; height: 24px;
  border: 1px solid rgba(230,131,122,0.3);
  background: transparent;
  color: #e6837a;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95rem;
}
.adm-comanda-item .ci-rm:hover {
  background: rgba(230,131,122,0.15);
}

.adm-comanda-add {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.adm-comanda-add select {
  padding: 0.6rem 0.75rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.adm-comanda-totals {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.2rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.adm-comanda-totals > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.adm-comanda-totals span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.adm-comanda-totals strong {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
}

.adm-comanda-discount-row input {
  width: 110px;
  padding: 0.4rem 0.6rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: right;
}

.adm-comanda-total-final {
  padding-top: 0.7rem;
  margin-top: 0.4rem;
  border-top: 1px dashed rgba(212,175,55,0.25);
}

.adm-comanda-total-final span {
  color: var(--gold) !important;
  font-size: 0.85rem !important;
  font-weight: 700;
}

.adm-comanda-total-final strong {
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  color: var(--gold-light) !important;
  font-weight: 700 !important;
}

.adm-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.adm-loyalty-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.6rem !important;
  padding: 0.7rem 0.85rem;
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 4px;
  cursor: pointer;
}

.adm-loyalty-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.adm-loyalty-toggle span {
  font-style: italic !important;
  text-transform: none !important;
  letter-spacing: 0.5px !important;
  color: var(--ink) !important;
  font-size: 0.88rem !important;
  font-family: var(--font-body) !important;
}

/* Botões avariantes */
.btn-warn {
  color: #e6c870 !important;
  border-color: rgba(230,200,112,0.4) !important;
}
.btn-warn:hover { background: rgba(230,200,112,0.12) !important; }

.adm-appt-actions {
  flex-wrap: wrap;
  gap: 0.5rem;
}
.adm-appt-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
}

/* No-show indicator no agendamento (agenda) */
.ag-event.no-show {
  background: linear-gradient(135deg, rgba(230,131,122,0.18), rgba(230,131,122,0.06));
  border-color: rgba(230,131,122,0.5);
  border-left-color: #e6837a;
  opacity: 0.75;
}
.ag-event.no-show .ag-event-time::after {
  content: " · faltou";
  color: #e6837a;
  font-size: 0.65rem;
}

.ag-event.paid {
  border-left-color: #6abe6a;
}
.ag-event.paid .ag-event-time::after {
  content: " ✓";
  color: #8fd68f;
  margin-left: 4px;
}

/* === Bloqueio na agenda === */
.ag-block {
  position: absolute;
  left: 1rem; right: 1rem;
  background: repeating-linear-gradient(
    45deg,
    rgba(230,131,122,0.12),
    rgba(230,131,122,0.12) 8px,
    rgba(230,131,122,0.18) 8px,
    rgba(230,131,122,0.18) 16px
  );
  border: 1px dashed rgba(230,131,122,0.4);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(240,165,156,0.85);
}

/* Responsividade dos novos módulos */
@media (max-width: 1100px) {
  .adm-cash-summary { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .adm-comanda-add { grid-template-columns: 1fr; }
  .adm-payment-grid { grid-template-columns: 1fr; }
  .adm-appt-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
  }
}

/* ============================================================
   FIX iOS — desabilitar todos os :hover em dispositivos touch
   evita o problema do "duplo toque" no iPhone
   ============================================================ */
@media (hover: none) {
  .adm-nav-item:hover,
  .adm-kpi:hover,
  .adm-card:hover,
  .adm-next-item:hover,
  .adm-circle-btn:hover,
  .adm-today-btn:hover,
  .adm-view-btn:hover,
  .adm-period-btn:hover,
  .adm-chip:hover,
  .ag-event:hover,
  .adm-mini-stat:hover,
  .adm-client-card:hover,
  .adm-product-card:hover,
  .adm-stock-btn:hover,
  .adm-bell:hover,
  .adm-menu-btn:hover,
  .adm-cash-row:hover,
  .adm-mass-link:hover,
  .adm-wait-row:hover,
  .adm-wait-whats:hover,
  .btn-delete:hover,
  .btn-danger:hover,
  .btn-warn:hover,
  .ci-rm:hover,
  .p-del:hover,
  .adm-wd-bar:hover,
  .adm-hr-bar:hover {
    /* Mantém o estado original — sem hover persistente */
    background: inherit;
    border-color: inherit;
    transform: none;
    color: inherit;
    opacity: inherit;
  }
}

/* ============================================================
   PLANO MENSAL — badges e indicadores
   ============================================================ */
.plan-badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  background: var(--gold);
  color: #1a1208;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.ag-event.is-plan {
  border-left-color: var(--gold-light);
  border-left-width: 4px;
}

.ag-event.is-plan::before {
  content: "★";
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--gold-light);
  font-size: 0.8rem;
}

.ag-event-plan {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.35rem;
  background: rgba(212,175,55,0.3);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-light);
}

.ad-plan-row {
  background: linear-gradient(90deg, rgba(212,175,55,0.06), transparent);
  padding: 0.85rem 0.85rem !important;
  border-radius: 4px;
  border-left: 3px solid var(--gold) !important;
  border-bottom: 1px dashed rgba(212,175,55,0.1) !important;
}

/* ============================================================
   EDIÇÃO DE SERVIÇOS — settings
   ============================================================ */
.adm-services-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.adm-service-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.adm-service-row:hover {
  border-color: rgba(212,175,55,0.25);
}

.svc-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.svc-name strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink);
  letter-spacing: 0.4px;
  font-weight: 500;
}

.svc-tag {
  padding: 0.16rem 0.5rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.svc-tag-new {
  background: rgba(106,190,106,0.12);
  color: #8fd68f;
  border: 1px solid rgba(106,190,106,0.3);
}

.svc-tag-edit {
  background: rgba(212,175,55,0.15);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.3);
}

.svc-fields {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}

.svc-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.svc-fields label span {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.svc-money,
.svc-duration {
  display: flex;
  align-items: center;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 3px;
  padding: 0 0.5rem;
  transition: border-color 0.2s;
}

.svc-money:focus-within,
.svc-duration:focus-within {
  border-color: var(--gold);
}

.svc-money i,
.svc-duration i {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.svc-money input,
.svc-duration input {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.4rem;
  width: 75px;
  text-align: right;
}

.svc-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.svc-reset {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  font-size: 1rem;
  padding: 0;
  display: grid;
  place-items: center;
}

@media (max-width: 720px) {
  .adm-service-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .svc-fields {
    justify-content: space-between;
  }
  .svc-actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   FEATURES (Leva 1-3)
   ============================================================ */

/* Horários por barbeiro */
/* ============================================================
   HORÁRIOS — layout responsivo (mobile-first)
   ============================================================ */
.bsched-block {
  background: rgba(10,8,7,0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.bsched-block-title {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.bsched-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Uma linha por dia */
.bsched-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  flex-wrap: wrap;        /* permite quebrar em telas muito pequenas */
}
.bsched-row:last-child { border-bottom: 0; }
.bsched-row-off { opacity: 0.5; }

/* Nome do dia */
.bsched-day-name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 500;
  min-width: 68px;
  flex-shrink: 0;
}

/* Controles (folga + horários) */
.bsched-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  flex-wrap: wrap;
}

/* Toggle folga */
.bsched-off-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.bsched-off-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.bsched-off-track {
  width: 34px; height: 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  position: relative;
  transition: all 0.25s;
  flex-shrink: 0;
}
.bsched-off-track::before {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink-muted);
  top: 2px; left: 2px;
  transition: transform 0.25s, background 0.25s;
}
.bsched-off-label input:checked + .bsched-off-track {
  border-color: var(--gold);
  background: rgba(201,169,97,0.15);
}
.bsched-off-label input:checked + .bsched-off-track::before {
  background: var(--gold);
  transform: translateX(16px);
}

.bsched-off-text {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* Horários */
.bsched-times {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  transition: opacity 0.25s;
}
.bsched-times-hidden {
  opacity: 0;
  pointer-events: none;
}

.bsched-time-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bsched-time-label {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-family: var(--font-body);
  white-space: nowrap;
}

.bsched-time-input {
  width: 90px;
  padding: 0.4rem 0.5rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: center;
  transition: border-color 0.2s;
  /* Cor do ícone do relógio no input time */
  color-scheme: dark;
}
.bsched-time-input:focus {
  outline: none;
  border-color: var(--gold);
}
.bsched-time-input:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Botões de ação */
.bsched-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.bsched-actions .btn {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 2px;
  padding: 0.7rem 1rem;
}

/* Mobile: empilhar tudo verticalmente em telas muito pequenas */
@media (max-width: 360px) {
  .bsched-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .bsched-controls { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .bsched-times { flex-wrap: wrap; }
}

/* Desktop: botões lado a lado */
@media (min-width: 580px) {
  .bsched-actions { flex-direction: row; }
  .bsched-actions .btn { width: auto; flex: 1; }
}

/* Compatibilidade com classes antigas (não quebrar) */
.adm-bsched-block  { display: none; }
.adm-bsched-row    { display: none; }


/* Bloqueios */
.adm-blocks-list { display: flex; flex-direction: column; gap: 0.5rem; }
.adm-block-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(230,131,122,0.05);
  border: 1px solid rgba(230,131,122,0.2);
  border-left: 3px solid #e6837a;
  border-radius: 4px;
}
.adm-block-row strong {
  font-family: var(--font-display);
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
}
.adm-block-row span {
  display: block;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.adm-block-row small {
  display: block;
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 0.2rem;
}

/* Combos */
.adm-combos-list, .adm-packages-list, .adm-coupons-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.adm-combo-row, .adm-package-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 4px;
}
.adm-combo-row strong, .adm-package-row strong {
  font-family: var(--font-display);
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
}
.adm-combo-row span, .adm-package-row span {
  display: block;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.adm-combo-row small, .adm-package-row small {
  display: block;
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: 0.2rem;
}

.adm-checklist {
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.85rem;
  background: rgba(10,8,7,0.5);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 4px;
}
.adm-check-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}
.adm-check-item:hover { border-color: rgba(212,175,55,0.25); }
.adm-check-item input { margin-top: 3px; accent-color: var(--gold); }
.adm-check-item span { line-height: 1.3; color: var(--ink); }
.adm-check-item em { display: block; font-size: 0.75rem; color: var(--ink-dim); font-style: italic; }

.adm-combo-info {
  padding: 0.6rem 0.85rem;
  background: rgba(212,175,55,0.05);
  border-left: 2px solid var(--gold);
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  font-style: italic;
}

/* Cupons */
.adm-coupon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 4px;
}
.adm-coupon-code {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(212,175,55,0.1);
  padding: 0.45rem 0.85rem;
  border: 1px dashed var(--gold);
  border-radius: 3px;
}
.adm-coupon-info strong {
  display: block;
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1rem;
}
.adm-coupon-info span {
  display: block;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ink-dim);
}

/* Categorias */
.adm-categories-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}
.adm-cat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.08);
  border-radius: 3px;
}
.adm-cat-row span {
  font-size: 0.85rem;
  color: var(--ink);
}
.adm-cat-row select {
  padding: 0.4rem 0.6rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* Switch de tema */
.adm-theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.adm-theme-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 6px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s;
}
.adm-theme-opt:hover {
  border-color: rgba(212,175,55,0.3);
}
.adm-theme-opt.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
  border-color: var(--gold);
  color: var(--gold-light);
}
.adm-theme-icon {
  font-size: 2rem;
  color: var(--gold);
}
.adm-theme-opt span:last-child {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Estrelas de avaliação */
.adm-rating-stars {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 1.5rem 0;
  font-size: 2.5rem;
}
.adm-rating-stars span {
  cursor: pointer;
  color: rgba(212,175,55,0.25);
  transition: all 0.2s;
}
.adm-rating-stars span:hover,
.adm-rating-stars span.on {
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(212,175,55,0.4);
  transform: scale(1.05);
}
.adm-rating-comment-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.adm-rating-comment-label span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}
.adm-rating-comment-label textarea {
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.adm-rating-comment-label textarea:focus {
  outline: none;
  border-color: var(--gold);
}

/* Tema claro */
:root[data-theme="light"] {
  --bg-1: #f4ecd9 !important;
  --bg-2: #ebe1c8 !important;
  --bg-3: #ddd0ad !important;
  --ink: #2a2018 !important;
  --ink-dim: #6e5d44 !important;
  --gold: #8c6a1f !important;
  --gold-light: #b08a35 !important;
  --gold-deep: #6e521a !important;
}

[data-theme="light"] body {
  background: linear-gradient(180deg, #faf3e3 0%, #f0e6cd 100%) !important;
  color: var(--ink) !important;
}

[data-theme="light"] .adm-sidebar,
[data-theme="light"] .adm-main,
[data-theme="light"] .adm-topbar,
[data-theme="light"] .adm-card,
[data-theme="light"] .adm-kpi,
[data-theme="light"] .adm-nav-item,
[data-theme="light"] .modal-card,
[data-theme="light"] .summary-card,
[data-theme="light"] .step,
[data-theme="light"] .service-card,
[data-theme="light"] .barber-card,
[data-theme="light"] .header,
[data-theme="light"] .footer {
  background: rgba(255,250,237,0.85) !important;
  color: var(--ink) !important;
}

[data-theme="light"] .hero { background: linear-gradient(180deg, #f4e9d1, #e8d9b1) !important; }
[data-theme="light"] .modal { background: rgba(50,40,25,0.6) !important; }


/* ============================================================
   GALERIA — painel admin
   ============================================================ */
.adm-gallery-upload {
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.adm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.adm-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.15);
  background: rgba(10,8,7,0.5);
  transition: border-color 0.2s;
}
.adm-gallery-item:hover { border-color: rgba(212,175,55,0.4); }

.adm-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adm-gallery-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(230,131,122,0.9);
  color: #1a0c0c;
  border: 0;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  opacity: 0;
  transition: all 0.2s;
}
.adm-gallery-item:hover .adm-gallery-remove,
.adm-gallery-remove:focus {
  opacity: 1;
}
.adm-gallery-remove:hover { background: rgba(230,131,122,1); transform: scale(1.1); }

@media (hover: none) {
  /* Em mobile/touch sempre mostra o botão */
  .adm-gallery-remove { opacity: 0.85; }
}

/* Badge "padrão" no canto da foto da galeria admin */
.adm-gallery-item .adm-gallery-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 0.18rem 0.5rem;
  background: rgba(212,175,55,0.92);
  color: #1a1208;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

/* Itens ocultos (em modo desbotado) */
.adm-gallery-item.adm-gallery-hidden {
  opacity: 0.4;
  filter: grayscale(0.5);
  border-style: dashed;
}
.adm-gallery-item.adm-gallery-hidden:hover {
  opacity: 0.85;
  filter: none;
}

.adm-gallery-restore {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(143,214,143,0.92);
  color: #0a2a0a;
  border: 0;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  opacity: 0.9;
  transition: transform 0.2s;
}
.adm-gallery-restore:hover { transform: scale(1.1); }

/* Título de separação "Ocultas" */
.adm-gallery-hidden-title {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 1rem 0 0.4rem;
  border-top: 1px dashed rgba(212,175,55,0.15);
  margin-top: 0.5rem;
}

/* ============================================================
   SUB-TABS DE CLIENTES
   ============================================================ */
.adm-subtabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0 1rem;
  border-bottom: 1px dashed rgba(212,175,55,0.15);
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.adm-subtabs::-webkit-scrollbar { display: none; }

.adm-subtab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 999px;
  color: var(--ink-dim);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.25s;
  font-weight: 500;
}

.adm-subtab:hover {
  border-color: rgba(212,175,55,0.3);
  color: var(--ink);
}

.adm-subtab.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.05));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 18px rgba(212,175,55,0.12);
}

.adm-subtab-icon {
  font-size: 0.95rem;
  color: var(--gold);
}

.adm-subtab-badge {
  background: rgba(212,175,55,0.18);
  color: var(--gold-light);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
}

.adm-subtab.active .adm-subtab-badge {
  background: var(--gold);
  color: #1a1208;
}

.adm-subpane { display: none; }
.adm-subpane.active { display: block; }

/* ============================================================
   TOOLBAR + CHIPS (filtros pills)
   ============================================================ */
.adm-subpane-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.adm-filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.adm-chip {
  padding: 0.45rem 0.9rem;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 999px;
  color: var(--ink-dim);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s;
}
.adm-chip:hover {
  border-color: rgba(212,175,55,0.4);
  color: var(--ink);
}
.adm-chip.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.08));
  border-color: var(--gold);
  color: var(--gold-light);
}

.adm-toolbar-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem;
}

.adm-toolbar-label > span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

.adm-toolbar-label select {
  padding: 0.5rem 0.85rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
}

/* ============================================================
   TOP CLIENTES — lista premium
   ============================================================ */
.adm-top-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.adm-top-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
  transition: all 0.2s;
}
.adm-top-row:hover {
  border-color: rgba(212,175,55,0.3);
  transform: translateX(2px);
}

.adm-top-row:nth-child(1) {
  border-left: 3px solid #d4af37;
  background: linear-gradient(90deg, rgba(212,175,55,0.08), rgba(10,8,7,0.4));
}
.adm-top-row:nth-child(2) {
  border-left: 3px solid #c0c0c0;
}
.adm-top-row:nth-child(3) {
  border-left: 3px solid #cd7f32;
}

.adm-top-rank {
  font-size: 1.8rem;
  text-align: center;
  line-height: 1;
}

.adm-top-rank .rank-num {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink-dim);
  letter-spacing: 1px;
}

.adm-top-info strong {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}
.adm-top-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
}

.adm-top-stats {
  text-align: right;
}
.adm-top-stats strong {
  display: block;
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.05rem;
  font-weight: 600;
}
.adm-top-stats span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-dim);
  font-style: italic;
  margin-top: 0.1rem;
}

/* ============================================================
   INATIVOS
   ============================================================ */
.adm-inactive-list,
.adm-cancel-list,
.adm-bdays-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.adm-inactive-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-left: 3px solid rgba(230,131,122,0.4);
  border-radius: 4px;
  transition: all 0.2s;
}
.adm-inactive-row:hover {
  border-left-color: #e6837a;
}

.adm-inactive-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
}
.adm-inactive-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
}
.adm-inactive-info small {
  display: block;
  font-size: 0.72rem;
  color: #e6837a;
  margin-top: 0.2rem;
  font-style: italic;
}
.adm-inactive-info small strong {
  display: inline;
  color: #e6837a;
  font-size: inherit;
}

/* ============================================================
   ANIVERSARIANTES
   ============================================================ */
.adm-bday-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
}

.adm-bday-row.is-today {
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.04));
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212,175,55,0.08);
}

.adm-bday-cake {
  font-size: 1.6rem;
  text-align: center;
  color: var(--gold);
}

.adm-bday-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
}
.adm-bday-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
}
.adm-bday-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 0.2rem;
  font-style: italic;
  letter-spacing: 0.5px;
}

/* ============================================================
   CANCELADOS
   ============================================================ */
.adm-cancel-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 4px;
}

.adm-cancel-badge {
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.adm-cancel-badge.no-show {
  background: rgba(230,131,122,0.18);
  color: #e6837a;
  border: 1px solid rgba(230,131,122,0.4);
}
.adm-cancel-badge.cancelado {
  background: rgba(220,180,80,0.12);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.3);
}

.adm-cancel-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
}
.adm-cancel-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
}
.adm-cancel-info small {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
  font-style: italic;
}

/* ============================================================
   TEMPLATES DE MENSAGEM
   ============================================================ */
.adm-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.adm-template-card {
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.12);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1rem 1.1rem;
}

.adm-template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.adm-template-head h5 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
  margin: 0;
}

.btn-link {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  transition: opacity 0.2s;
}
.btn-link:hover { opacity: 0.7; }

.adm-template-hint {
  font-size: 0.78rem;
  color: var(--ink-dim);
  font-style: italic;
  margin: 0 0 0.85rem 0;
  line-height: 1.4;
}

.adm-template-card textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.6);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 140px;
}
.adm-template-card textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.adm-template-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.85rem;
}

.adm-template-status {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: transparent;
  transition: color 0.3s;
}
.adm-template-status.saved {
  color: #8fd68f;
}

.adm-helper code {
  background: rgba(212,175,55,0.12);
  color: var(--gold-light);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.85em;
  border: 1px solid rgba(212,175,55,0.15);
}

@media (max-width: 720px) {
  .adm-subpane-toolbar { flex-direction: column; align-items: stretch; }
  .adm-toolbar-label { flex-direction: column !important; align-items: stretch !important; }
  .adm-templates-grid { grid-template-columns: 1fr; }
  .adm-top-row { grid-template-columns: 40px 1fr; gap: 0.5rem; }
  .adm-top-stats { grid-column: 2; text-align: left; margin-top: 0.3rem; }
  .adm-inactive-row, .adm-cancel-row, .adm-bday-row { grid-template-columns: 1fr; }
}

/* ============================================================
   LOGIN — switch dono/barbeiro
   ============================================================ */
.login-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.login-mode-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 0.85rem;
  background: rgba(10,8,7,0.4);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 6px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s;
}

.login-mode-opt:hover {
  border-color: rgba(212,175,55,0.35);
}

.login-mode-opt.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.06));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 18px rgba(212,175,55,0.12);
}

.lmode-icon {
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}

.lmode-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

.login-form {
  margin-bottom: 0.5rem;
}

.login-form select.admin-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

.login-hint {
  font-size: 0.82rem;
  font-style: italic;
  margin: 0.5rem 0;
  min-height: 1.2em;
  text-align: center;
  color: var(--ink-dim);
}

.login-hint.error {
  color: #e6837a;
}

/* ============================================================
   TOPBAR — novos botões (quick block + logout)
   ============================================================ */
.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.adm-quick-block,
.adm-logout {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.25);
  color: var(--gold);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  line-height: 1;
}

.adm-quick-block:hover,
.adm-logout:hover {
  background: rgba(212,175,55,0.18);
  border-color: var(--gold);
  transform: scale(1.05);
}

.adm-quick-block {
  background: rgba(230,131,122,0.08);
  border-color: rgba(230,131,122,0.3);
  color: #e6837a;
}
.adm-quick-block:hover {
  background: rgba(230,131,122,0.18);
  border-color: #e6837a;
}

/* ============================================================
   MODAL: FECHAR HORÁRIO RÁPIDO
   ============================================================ */
.qb-preview {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(230,131,122,0.08), rgba(230,131,122,0.02));
  border: 1px solid rgba(230,131,122,0.25);
  border-left: 3px solid #e6837a;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--ink);
  font-style: italic;
}

@media (max-width: 580px) {
  .adm-topbar-actions { gap: 0.3rem; }
  .adm-quick-block, .adm-logout, .adm-bell {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
}

/* ============================================================
   MODAL DETALHE DO CLIENTE
   ============================================================ */
.client-detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.client-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 400;
  flex-shrink: 0;
  background: rgba(201,169,97,0.04);
}

.client-detail-info h3 {
  font-family: var(--font-brand) !important;
  font-size: 1.4rem !important;
  color: var(--ink) !important;
  font-weight: 400 !important;
  font-style: italic !important;
  margin-bottom: 0.2rem !important;
}
.client-detail-info p {
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.client-status-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 999px;
}
.badge-active { background: rgba(39,174,96,0.15); color: #27ae60; border: 1px solid rgba(39,174,96,0.3); }
.badge-lost   { background: rgba(230,131,122,0.12); color: #e6837a; border: 1px solid rgba(230,131,122,0.25); }
.badge-new    { background: rgba(201,169,97,0.1); color: var(--gold); border: 1px solid var(--line); }

.client-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cd-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  border: 1px solid var(--line);
}
.cd-stat span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}
.cd-stat strong {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 400;
}

.cd-section {
  margin-bottom: 1.5rem;
}
.cd-section-title {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.cd-info-rows { display: flex; flex-direction: column; gap: 0.4rem; }
.cd-info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(201,169,97,0.06);
}
.cd-info-row span { color: var(--ink-muted); font-size: 0.78rem; }
.cd-info-row strong { color: var(--ink); font-weight: 400; }

.cd-history { max-height: 280px; overflow-y: auto; }
.cd-history-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  font-size: 0.82rem;
}
.cd-history-date {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
}
.cd-history-info strong { display: block; color: var(--ink); font-size: 0.85rem; font-weight: 500; }
.cd-history-info span { color: var(--ink-dim); font-size: 0.75rem; }
.cd-status {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-weight: 500;
  white-space: nowrap;
}
.cd-status.ok       { background: rgba(39,174,96,0.12);   color: #27ae60; }
.cd-status.no-show  { background: rgba(230,131,122,0.12); color: #e6837a; }
.cd-status.cancelado{ background: rgba(201,169,97,0.1);   color: var(--gold); }

/* Meta info nos cards */
.adm-client-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
  font-style: italic;
}
.adm-client-tags {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
  flex-shrink: 0;
}

@media (max-width: 580px) {
  .client-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-history-row { grid-template-columns: auto 1fr; }
  .cd-status { grid-column: 1 / -1; }
  .cd-info-row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ============================================================
   AGENDA 2.0 — Layout mobile-first premium
   ============================================================ */

/* Pane da agenda precisa ser full-height sem padding genérico */
.adm-pane[data-pane="agenda"] {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* ===== HEADER ===== */
.ag2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 0.75rem;
  flex-shrink: 0;
}

.ag2-greeting h2 {
  font-family: var(--font-brand) !important;
  font-style: italic !important;
  font-size: 1.75rem !important;
  color: var(--ink) !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  margin-bottom: 0.2rem;
}

.ag2-greeting p {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 400;
}

.ag2-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(201,169,97,0.06);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ag2-icon-btn:hover { border-color: var(--gold); background: rgba(201,169,97,0.12); }

/* ===== SELETOR DE SEMANA ===== */
.ag2-week-header {
  padding: 0.75rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}

.ag2-week-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.ag2-nav-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ag2-nav-arrow:hover { border-color: var(--gold); color: var(--gold); }

.ag2-week-range {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.3px;
  flex: 1;
  text-align: center;
}

/* ===== CHIPS DOS DIAS ===== */
.ag2-days-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.ag2-day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.3rem 0.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink-dim);
  position: relative;
}

.ag2-day-chip:hover {
  background: rgba(201,169,97,0.06);
  border-color: var(--line);
}

.ag2-day-chip.is-today {
  color: var(--gold);
  border-color: var(--line);
}

.ag2-day-chip.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1208;
}

.ag2-day-name {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
}

.ag2-day-num {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
}

.ag2-day-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Verde — tem agendamentos */
.ag2-dot-green {
  background: #4caf78;
  box-shadow: 0 0 5px rgba(76, 175, 120, 0.6);
}

/* Vermelho — sem agendamentos */
.ag2-dot-red {
  background: rgba(230, 131, 122, 0.6);
  box-shadow: none;
}

/* Cadeado — dia bloqueado */
.ag2-dot-blocked {
  background: rgba(255, 200, 100, 0.5);
  box-shadow: none;
}

/* Quando o chip está selecionado — manter as cores mas adaptar pro fundo dourado */
.ag2-day-chip.selected .ag2-dot-green {
  background: #1a1208;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}
.ag2-day-chip.selected .ag2-dot-red {
  background: rgba(26,18,8,0.5);
  box-shadow: none;
}
.ag2-day-chip.selected .ag2-dot-blocked {
  background: rgba(26,18,8,0.4);
  box-shadow: none;
}

.ag2-day-dot-empty {
  width: 6px;
  height: 6px;
}

/* ===== CARDS RESUMO ===== */
.ag2-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.ag2-summary-card {
  border-radius: 16px;
  padding: 1.1rem 1.1rem 1rem;
  position: relative;
  overflow: hidden;
}

.ag2-card-today {
  background: linear-gradient(135deg, #c9a961 0%, #a88842 100%);
  color: #1a1208;
}

.ag2-card-week {
  background: rgba(201,169,97,0.08);
  border: 1px solid var(--line);
  color: var(--ink);
}

.ag2-card-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.ag2-card-today .ag2-card-label { color: #1a1208; }
.ag2-card-week  .ag2-card-label { color: var(--ink-muted); }

.ag2-card-revenue {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.ag2-card-today .ag2-card-revenue { color: #1a1208; }
.ag2-card-week  .ag2-card-revenue { color: var(--gold); }

.ag2-card-count {
  font-family: var(--font-brand);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
  font-style: italic;
}

.ag2-card-today .ag2-card-count { color: #1a1208; }
.ag2-card-week  .ag2-card-count { color: var(--ink); }

.ag2-card-icon {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
}

/* ===== TIMELINE WRAP (scrollável) ===== */
.ag2-timeline-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px; /* espaço pro FAB */
}

.ag2-timeline-wrap::-webkit-scrollbar { width: 3px; }
.ag2-timeline-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* ===== LINHA DO TEMPO ===== */
.ag2-timeline {
  padding: 0 1.5rem;
}

.ag2-tl-inner {
  position: relative;
}

.ag2-tl-row {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.ag2-tl-time {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--ink-muted);
  width: 44px;
  flex-shrink: 0;
  padding-top: 2px;
  font-weight: 400;
}

.ag2-tl-line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-top: 8px;
}

/* Linha do agora */
.ag2-now-line {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

.ag2-now-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
  margin-right: 2px;
}

.ag2-now-ruler {
  flex: 1;
  height: 1.5px;
  background: var(--gold);
}

/* ===== EVENTOS ===== */
.ag2-event {
  position: absolute;
  left: 52px;  /* após o time label */
  right: 4px;
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  min-height: 36px;
  box-sizing: border-box;
}

.ag2-event:hover {
  filter: brightness(1.1);
  transform: translateX(2px);
}

/* Desktop: mais espaço pro label */
@media (min-width: 768px) {
  .ag2-event { left: 62px; right: 6px; border-radius: 10px; }
}

/* Barra lateral colorida */
.ag2-ev-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px 0 0 4px;
}

.ag2-ev-body {
  flex: 1;
  padding: 0.5rem 0.65rem;
  min-width: 0;
}

.ag2-ev-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.ag2-ev-time {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 1px;
  opacity: 0.75;
  font-weight: 400;
  white-space: nowrap;
}

.ag2-ev-status-pill {
  font-family: var(--font-body);
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.ag2-ev-client {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag2-ev-service {
  font-size: 0.75rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.ag2-ev-price {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 0.82rem;
  margin-top: 0.15rem;
  opacity: 0.85;
}

.ag2-ev-plan-badge {
  display: inline-block;
  background: rgba(201,169,97,0.25);
  color: var(--gold);
  padding: 0 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-style: normal;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 0.2rem;
}

/* Cores por status */
.ag2-ev-confirmed {
  background: rgba(10,8,7,0.7);
  border: 1px solid rgba(201,169,97,0.2);
  color: var(--ink);
}
.ag2-ev-confirmed .ag2-ev-bar { background: var(--gold); }
.ag2-ev-confirmed .ag2-ev-status-pill {
  background: rgba(201,169,97,0.12);
  color: var(--gold);
}

.ag2-ev-paid {
  background: rgba(39,174,96,0.08);
  border: 1px solid rgba(39,174,96,0.2);
  color: var(--ink);
}
.ag2-ev-paid .ag2-ev-bar { background: #27ae60; }
.ag2-ev-paid .ag2-ev-status-pill {
  background: rgba(39,174,96,0.15);
  color: #27ae60;
}

.ag2-ev-noshow {
  background: rgba(230,131,122,0.08);
  border: 1px solid rgba(230,131,122,0.2);
  color: var(--ink);
  opacity: 0.7;
}
.ag2-ev-noshow .ag2-ev-bar { background: #e6837a; }
.ag2-ev-noshow .ag2-ev-status-pill {
  background: rgba(230,131,122,0.15);
  color: #e6837a;
}

.ag2-ev-cancelled {
  background: rgba(10,8,7,0.3);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  opacity: 0.5;
}
.ag2-ev-cancelled .ag2-ev-bar { background: var(--ink-muted); }
.ag2-ev-cancelled .ag2-ev-status-pill {
  background: rgba(255,255,255,0.05);
  color: var(--ink-muted);
}

/* Sem agendamentos */
.ag2-closed-msg {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--ink-muted);
}
.ag2-closed-msg span {
  display: block;
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.3;
  margin-bottom: 0.75rem;
}
.ag2-closed-msg p {
  font-style: italic;
  font-size: 0.9rem;
}

/* ===== FAB BOTÃO ===== */
.ag2-fab-wrap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(to top, rgba(7,6,10,0.98) 60%, transparent);
  z-index: 10;
}

.ag2-fab {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  background: var(--gold);
  color: #1a1208;
  border: 0;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(201,169,97,0.3);
}

.ag2-fab:hover {
  background: var(--gold-light);
  box-shadow: 0 10px 30px rgba(201,169,97,0.4);
}

.ag2-fab:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(201,169,97,0.3);
}

/* ===== RESPONSIVO ===== */
@media (min-width: 768px) {
  .ag2-header    { padding: 1.75rem 2rem 0.85rem; }
  .ag2-week-header { padding: 0.85rem 2rem; }
  .ag2-summary-row { padding: 1rem 2rem; }
  .ag2-timeline  { padding: 0 2rem; }
  .ag2-fab-wrap  { padding: 0.85rem 2rem; }
  .ag2-fab       { max-width: 480px; margin: 0 auto; }
  .ag2-greeting h2 { font-size: 2rem !important; }
  .ag2-tl-time   { width: 52px; font-size: 0.68rem; }
  .ag2-event     { left: 58px; }
}

@media (min-width: 1200px) {
  /* Em telas grandes: dar mais espaço pra timeline */
  .ag2-summary-row {
    grid-template-columns: 240px 240px;
  }
}

/* ============================================================
   AUTOCOMPLETE DE CLIENTES — Walk-in
   ============================================================ */

.wi-client-wrap {
  position: relative;
}

.wi-search-row {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.wi-search-row input {
  flex: 1;
  padding-right: 2.5rem !important;
}

.wi-clear-btn {
  position: absolute;
  right: 0.75rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(201,169,97,0.15);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
  z-index: 1;
}
.wi-clear-btn:hover { background: rgba(201,169,97,0.3); }

/* Dropdown */
.wi-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #1a1612;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  z-index: 999;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  animation: wiAcIn 0.15s ease;
}

@keyframes wiAcIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.wi-ac-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  outline: none;
}
.wi-ac-item:last-child { border-bottom: 0; }
.wi-ac-item:hover,
.wi-ac-item.highlighted {
  background: rgba(201,169,97,0.08);
}

.wi-ac-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(201,169,97,0.05);
  display: grid;
  place-items: center;
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--gold);
  flex-shrink: 0;
}

.wi-ac-info strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}
.wi-ac-info span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-top: 0.1rem;
}
.wi-ac-info mark {
  background: rgba(201,169,97,0.25);
  color: var(--gold-light);
  border-radius: 2px;
  padding: 0 1px;
}

.wi-ac-empty {
  padding: 1rem;
  text-align: center;
}
.wi-ac-empty > span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.wi-ac-new {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}
.wi-ac-new:hover { background: rgba(201,169,97,0.08); }

/* Card do cliente selecionado */
.wi-client-card {
  margin-top: 0.75rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  overflow: hidden;
  animation: wiAcIn 0.2s ease;
}

.wi-client-found {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(201,169,97,0.04);
}

.wi-client-found-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  display: grid;
  place-items: center;
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}

.wi-client-found-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
}
.wi-client-found-info span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-top: 0.1rem;
}

.wi-vip-badge      { color: var(--gold) !important;  }
.wi-recurrent-badge{ color: #27ae60 !important; }
.wi-new-badge      { color: var(--ink-muted) !important; }

.wi-client-history {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 1rem 0.75rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
}
.wi-client-history span {
  font-size: 0.76rem;
  color: var(--ink-dim);
}
.wi-client-history strong {
  color: var(--ink);
  font-weight: 500;
}

/* ============================================================
   CADEADO — botão de bloqueio (topbar)
   ============================================================ */
.adm-quick-block {
  background: rgba(201,169,97,0.06) !important;
  border-color: rgba(201,169,97,0.25) !important;
  color: var(--gold) !important;
  transition: all 0.25s !important;
  position: relative;
}

.adm-quick-block svg {
  display: block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.adm-quick-block:hover svg {
  transform: scale(1.15);
}

.adm-quick-block::after {
  content: "Bloquear horário";
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(10,8,7,0.95);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.adm-quick-block:hover::after { opacity: 1; }

/* ============================================================
   BLOQUEIOS NA TIMELINE
   ============================================================ */
.ag2-block-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  margin: 0 0 0.5rem;
  background: repeating-linear-gradient(
    -45deg,
    rgba(230,131,122,0.04) 0px,
    rgba(230,131,122,0.04) 4px,
    transparent 4px,
    transparent 12px
  );
  border: 1px dashed rgba(230,131,122,0.3);
  border-left: 3px solid #e6837a;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #e6837a;
  font-style: italic;
  position: sticky;
  top: 0;
  z-index: 4;
}
.ag2-block-banner svg { flex-shrink: 0; opacity: 0.8; }

.ag2-block-slot {
  position: absolute;
  left: 50px;
  right: 0;
  border-radius: 6px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(230,131,122,0.04) 0px,
    rgba(230,131,122,0.04) 4px,
    transparent 4px,
    transparent 12px
  );
  border: 1px dashed rgba(230,131,122,0.3);
  border-left: 3px solid #e6837a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  color: rgba(230,131,122,0.8);
  font-style: italic;
  z-index: 1;
  cursor: default;
}
.ag2-block-slot svg { flex-shrink: 0; }

/* ============================================================
   NOTIF TOAST CARD (aparece ao receber agendamento)
   ============================================================ */
.notif-toast-card {
  position: fixed;
  top: 1rem; right: -400px;
  width: min(380px, calc(100vw - 2rem));
  background: #1c1613;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  z-index: 9998;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  transition: right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.notif-toast-card.ntc-show  { right: 1rem; }
.notif-toast-card.ntc-hide  { right: -400px; opacity: 0; }

.ntc-header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.ntc-icon { color: var(--gold); font-size: 0.9rem; }
.ntc-header strong { flex: 1; font-size: 0.85rem; color: var(--ink); font-weight: 600; }
.ntc-close {
  background: none; border: 0; color: var(--ink-muted);
  font-size: 1.2rem; cursor: pointer; line-height: 1; padding: 0;
}
.ntc-body { padding: 0.75rem 1rem; }
.ntc-row {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.3rem 0; font-size: 0.82rem;
  border-bottom: 1px solid rgba(201,169,97,0.06);
}
.ntc-row:last-child { border-bottom: 0; }
.ntc-row span { color: var(--ink-muted); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; }
.ntc-row strong { color: var(--ink); font-weight: 500; text-align: right; }
.ntc-actions { padding: 0.5rem 1rem 0.85rem; }
.ntc-wa-btn {
  display: block; padding: 0.55rem 1rem; text-align: center;
  background: #25D366; color: #fff; border-radius: 8px;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  transition: all 0.2s;
}
.ntc-wa-btn:hover { background: #1da851; }

/* ============================================================
   BELL DROPDOWN
   ============================================================ */
.bell-dropdown {
  position: fixed;
  width: 300px;
  background: #1c1613;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  z-index: 9997;
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  overflow: hidden;
}
.bell-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.bell-item:last-child { border-bottom: 0; }
.bell-item-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(201,169,97,0.1); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-style: italic; color: var(--gold);
  font-family: var(--font-brand); font-size: 0.95rem;
  flex-shrink: 0;
}
.bell-item-info strong { display: block; font-size: 0.84rem; color: var(--ink); font-weight: 500; }
.bell-item-info span   { display: block; font-size: 0.72rem; color: var(--ink-dim); margin-top: 0.1rem; }
.bell-empty { padding: 1.25rem; text-align: center; font-size: 0.82rem; color: var(--ink-muted); font-style: italic; }

/* Badge counter na Bell */
.adm-bell[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: -4px; right: -4px;
  background: #e6837a; color: #fff;
  font-size: 0.55rem; font-family: var(--font-body);
  font-weight: 700; letter-spacing: 0;
  min-width: 17px; height: 17px;
  border-radius: 999px; display: grid; place-items: center;
  border: 1.5px solid var(--bg);
}

/* ============================================================
   PAINEL NOTIFICAÇÕES
   ============================================================ */
.adm-section-label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1rem 0 0.6rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.75rem;
}
.adm-section-hint {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-muted);
  margin-top: 0.2rem;
  opacity: 0.7;
}

.notif-list-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.notif-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  background: rgba(201,169,97,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all 0.2s;
}
.notif-item.notif-unseen { border-color: rgba(201,169,97,0.3); background: rgba(201,169,97,0.05); }
.notif-item-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(201,169,97,0.08);
  display: grid; place-items: center;
  font-family: var(--font-brand); font-style: italic;
  font-size: 1.1rem; color: var(--gold); font-weight: 400;
}
.notif-item-info strong { display: block; font-size: 0.88rem; color: var(--ink); font-weight: 500; }
.notif-item-info span   { display: block; font-size: 0.75rem; color: var(--ink-dim); margin-top: 0.1rem; }
.notif-item-info small  { display: block; font-size: 0.68rem; color: var(--ink-muted); margin-top: 0.1rem; }
.notif-wa-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(37,211,102,0.12); color: #25D366;
  display: grid; place-items: center; transition: all 0.2s; flex-shrink: 0;
}
.notif-wa-btn:hover { background: rgba(37,211,102,0.25); }

/* Lembrete log */
.reminder-log-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.reminder-log-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink-dim);
}
.rli-badge {
  padding: 0.2rem 0.55rem;
  background: rgba(201,169,97,0.1);
  color: var(--gold);
  border-radius: 4px;
  font-size: 0.62rem; letter-spacing: 1.5px; text-transform: uppercase;
  flex-shrink: 0; font-family: var(--font-body); font-weight: 500;
}
.rli-send-btn {
  margin-left: auto; flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  background: rgba(37,211,102,0.1);
  color: #25D366;
  border-radius: 6px;
  font-size: 0.7rem; font-family: var(--font-body); font-weight: 600;
  text-decoration: none; letter-spacing: 0.5px;
  transition: all 0.2s;
}
.rli-send-btn:hover { background: rgba(37,211,102,0.2); }

/* Configurações de notificação — toggles */
.notif-cfg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.ncr-label strong { display: block; font-size: 0.85rem; color: var(--ink); font-weight: 500; }
.ncr-label span   { display: block; font-size: 0.72rem; color: var(--ink-dim); margin-top: 0.1rem; }

.notif-cfg-sub {
  padding: 0.5rem 0 0.5rem 1rem;
  transition: opacity 0.3s;
}
.ncr-sub-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0; font-size: 0.82rem; color: var(--ink-dim);
}

/* Toggle switch */
.adm-toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0; cursor: pointer;
}
.adm-toggle input { opacity: 0; width: 0; height: 0; }
.adm-toggle-track {
  position: absolute; inset: 0;
  background: var(--bg-3); border-radius: 999px; border: 1px solid var(--line);
  transition: all 0.25s;
}
.adm-toggle-track::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-muted); top: 2px; left: 2px;
  transition: transform 0.25s, background 0.25s;
}
.adm-toggle input:checked + .adm-toggle-track { background: rgba(201,169,97,0.2); border-color: var(--gold); }
.adm-toggle input:checked + .adm-toggle-track::before { background: var(--gold); transform: translateX(20px); }

.adm-toggle-small {
  position: relative; display: inline-block;
  width: 34px; height: 18px; flex-shrink: 0; cursor: pointer;
}
.adm-toggle-small input { opacity: 0; width: 0; height: 0; }
.adm-toggle-track-sm {
  position: absolute; inset: 0;
  background: var(--bg-3); border-radius: 999px; border: 1px solid var(--line);
  transition: all 0.25s;
}
.adm-toggle-track-sm::before {
  content: ''; position: absolute;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink-muted); top: 2px; left: 2px;
  transition: transform 0.25s, background 0.25s;
}
.adm-toggle-small input:checked + .adm-toggle-track-sm { background: rgba(201,169,97,0.15); border-color: var(--gold); }
.adm-toggle-small input:checked + .adm-toggle-track-sm::before { background: var(--gold); transform: translateX(16px); }

.adm-inline-input {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); padding: 0.45rem 0.75rem; font-family: var(--font-body);
  font-size: 0.82rem; width: 140px;
}
.notif-cfg-save { padding: 1rem 0; }

/* ============================================================
   CADEADO NA TIMELINE — botão inline nas linhas de hora
   ============================================================ */
.ag2-tl-lock-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: all 0.2s;
  z-index: 5;
}

/* Mostrar ao hover na linha OU em touch (always visible no mobile) */
.ag2-tl-row:hover .ag2-tl-lock-btn {
  opacity: 1;
  color: var(--gold);
  border-color: var(--line);
  background: rgba(201,169,97,0.08);
}

/* Mobile: sempre visível pois não tem hover */
@media (hover: none) {
  .ag2-tl-lock-btn {
    opacity: 0.45;
  }
}

/* Bloqueios na timeline — botão de editar */
.ag2-block-edit-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(230,131,122,0.3);
  background: rgba(230,131,122,0.1);
  color: #e6837a;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  line-height: 1;
  transition: all 0.2s;
}
.ag2-block-edit-btn:hover {
  background: rgba(230,131,122,0.25);
  border-color: rgba(230,131,122,0.5);
}

/* Banner de dia inteiro com flex para acomodar botão */
.ag2-block-banner {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}
.ag2-block-banner span,
.ag2-block-slot span { flex: 1; min-width: 0; }

/* Slot com botão */
.ag2-block-slot {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem 0.4rem 0.75rem;
}

/* Cursor pointer nos bloqueios editáveis */
.ag2-block-editable { cursor: pointer; }

/* ============================================================
   BOTÃO DANGER (remover bloqueio)
   ============================================================ */
.btn-danger {
  background: rgba(230,131,122,0.12);
  color: #e6837a;
  border: 1px solid rgba(230,131,122,0.35);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: rgba(230,131,122,0.22);
  border-color: rgba(230,131,122,0.55);
}

/* Modal de bloqueio — aviso de conflito */
#blockConflictWarn {
  padding: 0.65rem 0.85rem;
  background: rgba(230,131,122,0.08);
  border: 1px solid rgba(230,131,122,0.25);
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

/* Modal actions quando tem 3 botões */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.modal-actions .btn { flex: 1; min-width: 100px; text-align: center; }

@media (max-width: 400px) {
  .modal-actions .btn { flex: 1 1 100%; }
}

/* ============================================================
   MODAL DE AGENDAMENTO — redesign estilo app
   ============================================================ */

/* Override do modal-card para este modal específico */
#apptModal .modal-card.appt-card {
  padding: 0;
  max-width: 480px;
  width: calc(100vw - 2rem);
  overflow: hidden;
  border-radius: 16px;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid var(--line);
}

/* ── Topbar ── */
.appt-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
  position: sticky;
  top: 0;
  z-index: 2;
}

.appt-back-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.appt-back-btn:hover { border-color: var(--gold); color: var(--gold); }

.appt-top-actions {
  display: flex;
  gap: 0.4rem;
}

.appt-top-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
  color: var(--ink-dim);
}
.appt-top-btn:hover { border-color: var(--gold); color: var(--gold); }
.appt-top-btn--warn:hover { border-color: #e6837a; color: #e6837a; }
.appt-top-btn--share { padding: 0.4rem 0.6rem; }
.appt-top-btn--share span { display: none; }

/* ── Data / horário ── */
.appt-datetime-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.appt-datetime { display: flex; flex-direction: column; gap: 0.2rem; }

#apptDateFull {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

#apptTimeRange {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-dim);
}

/* ── Edit btn (lápis) ── */
.appt-edit-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(201,169,97,0.06);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.appt-edit-btn:hover { background: rgba(201,169,97,0.15); }

/* ── Section label ── */
.appt-section-label {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0.85rem 1.25rem 0.35rem;
}

/* ── Cliente ── */
.appt-client-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.25rem 1rem;
}

.appt-client-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(201,169,97,0.08);
  display: grid;
  place-items: center;
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  flex-shrink: 0;
}

.appt-client-info {
  flex: 1;
  min-width: 0;
}
.appt-client-info strong {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appt-client-info span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin-top: 0.15rem;
  font-family: var(--font-body);
}

.appt-client-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.appt-icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--ink-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  text-decoration: none;
}
.appt-icon-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Serviços ── */
.appt-services-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 1.25rem 1rem;
}

.appt-service-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.appt-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(201,169,97,0.1);
  border: 1px solid rgba(201,169,97,0.3);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.appt-chip--product {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--ink-dim);
}

.appt-barber-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-dim);
  padding: 0 0.1rem;
}

/* ── Total ── */
.appt-total-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.25rem 1rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.appt-total-value {
  font-family: var(--font-brand);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 0.25rem;
}

/* ── Status badge ── */
.appt-status-row {
  padding: 0 1.25rem 1rem;
}

.appt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}
.appt-badge--confirmed { background: rgba(39,174,96,0.12); color: #27ae60; border: 1px solid rgba(39,174,96,0.25); }
.appt-badge--paid      { background: rgba(201,169,97,0.12); color: var(--gold); border: 1px solid rgba(201,169,97,0.25); }
.appt-badge--noshow    { background: rgba(230,131,122,0.1); color: #e6837a; border: 1px solid rgba(230,131,122,0.25); }
.appt-badge--cancelled { background: rgba(255,255,255,0.04); color: var(--ink-muted); border: 1px solid var(--line); }

/* ── Plano ── */
.appt-plan-list {
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.appt-plan-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-family: var(--font-body);
}
.appt-plan-item--current {
  background: rgba(201,169,97,0.08);
  border-color: rgba(201,169,97,0.25);
  color: var(--ink);
}
.appt-plan-num {
  background: rgba(201,169,97,0.15);
  color: var(--gold);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.appt-plan-here {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.7;
}

/* ── Divider ── */
.appt-divider {
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--line) 0, var(--line) 6px,
    transparent 6px, transparent 12px
  );
  margin: 0.5rem 0;
}

/* ── Cancelar ── */
.appt-cancel-btn {
  width: 100%;
  padding: 0.95rem;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  color: #e6837a;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.appt-cancel-btn:hover { background: rgba(230,131,122,0.06); }

.appt-comanda-full-btn {
  width: calc(100% - 2.5rem);
  margin: 0.75rem 1.25rem 1rem;
  padding: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 2px;
}

/* Mobile: pequenos ajustes */
@media (max-width: 420px) {
  .appt-top-btn span { display: none; }
  .appt-top-btn { padding: 0.4rem 0.6rem; }
  #apptDateFull { font-size: 0.92rem; }
}

/* ============================================================
   RESPONSIVIDADE — MODAL NOVO ATENDIMENTO (walk-in)
   Corrige overflow horizontal em todos os iPhones e Androids
   ============================================================ */

/* 1. Modal container — nunca vaza da tela */
.modal {
  padding: env(safe-area-inset-top, 1rem) 1rem env(safe-area-inset-bottom, 1rem) 1rem;
  box-sizing: border-box;
  overflow-y: auto;
  align-items: flex-start;
}

/* 2. Card do modal — contenção total */
.modal-card,
.modal-card.modal-wide {
  width: 100% !important;
  max-width: 520px !important;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  padding: 1.5rem 1rem !important;
  margin: auto;
}

/* 3. Formulário — contenção */
.adm-form {
  width: 100%;
  overflow-x: hidden;
}

/* 4. adm-form-row — grid com contenção.
   min-width:0 nos filhos evita que o grid expanda além do container */
.adm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.adm-form-row > * {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

/* 5. Todos os inputs e selects — contenção absoluta */
.adm-form input,
.adm-form select,
.adm-form textarea,
#wiClientSearch,
#wiService,
#wiBarber,
#wiDate,
#wiTime,
#wiPayment {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  font-size: 16px !important; /* evita zoom automático no iOS */
  overflow: hidden;
}

/* 6. Selects — texto longo cortado elegantemente */
.adm-form select,
#wiService,
#wiBarber,
#wiPayment {
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: auto;
  -webkit-appearance: auto;
}

/* 7. wi-client-wrap — contenção */
.wi-client-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.wi-search-row {
  width: 100%;
  box-sizing: border-box;
}

.wi-search-row input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* 8. modal-total — não quebrar */
.modal-total {
  width: 100%;
  box-sizing: border-box;
}

/* 9. Botões — flex igualitário, nunca somem */
.modal-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: nowrap;
  margin-top: 1rem;
}

.modal-actions .btn {
  flex: 1 1 0;
  min-width: 0 !important;
  text-align: center;
  box-sizing: border-box;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 10. Mobile — colapsar grid para coluna única em telas pequenas */
@media (max-width: 480px) {
  .modal-card,
  .modal-card.modal-wide {
    padding: 1.25rem 0.9rem !important;
    border-radius: 8px;
  }

  /* Serviço e Barbeiro em coluna no mobile pequeno */
  .adm-form-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* Data e Horário podem ficar lado a lado mesmo no mobile */
  .adm-form-row:has(input[type="date"]) {
    grid-template-columns: 1fr 1fr;
  }

  .modal-actions .btn {
    font-size: 0.68rem;
    letter-spacing: 1.5px;
  }
}

/* 11. Telas muito pequenas (iPhone SE 320px) */
@media (max-width: 360px) {
  .modal-card,
  .modal-card.modal-wide {
    padding: 1rem 0.75rem !important;
  }

  .adm-form-row {
    grid-template-columns: 1fr !important;
  }

  .modal-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-actions .btn {
    width: 100%;
    flex: none;
  }
}

/* ============================================================
   CORREÇÃO GLOBAL DE SCROLL — MOBILE
   O admin-panel usa position:fixed + grid, o que trava a rolagem
   em mobile quando o dedo cai fora do adm-main.
   Solução: liberar touch-action e overflow em toda a hierarquia.
   ============================================================ */

/* 1. html e body — permitir rolagem vertical, bloquear horizontal */
html {
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

body {
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* 2. admin-panel — trocar overflow:hidden por auto no eixo Y */
.admin-panel {
  overflow: hidden; /* mantém no eixo X para não quebrar layout */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* 3. adm-main — scroll fluido e toque em qualquer área */
.adm-main {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

/* 4. adm-pane — altura automática, não tracar o conteúdo */
.adm-pane.active {
  min-height: 0;
  overflow: visible;
  touch-action: pan-y;
}

/* 5. Todos os containers internos do admin — liberar toque */
.adm-main *,
.adm-pane * {
  touch-action: pan-y pinch-zoom;
}

/* 6. Exceções — elementos que precisam de touch customizado */
.adm-main button,
.adm-main input,
.adm-main select,
.adm-main textarea,
.adm-main a,
.adm-main [role="button"] {
  touch-action: manipulation;
}

/* 7. Mobile específico */
@media (max-width: 860px) {
  /* No mobile o layout vira coluna, adm-main precisa de scroll livre */
  .admin-panel.active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .adm-main {
    overflow-y: visible; /* no mobile o scroll é do admin-panel, não do adm-main */
    min-height: 0;
    height: auto;
  }

  /* Garante que o container do conteúdo cresce com o conteúdo */
  .admin-panel.active {
    display: flex !important;
    flex-direction: column;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }
}
