/* ============================================================
   Mimimei Agenda — Design System
   Crafted for beauty professionals
   ============================================================ */

@import url('/fonts/inter.css');

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
  /* Color palette — warm lilac */
  --primary: #9b59b6;
  --primary-hover: #8344a5;
  --primary-dark: #6b2d8b;
  --primary-light: #c39bd3;
  --primary-50: #f5eef8;
  --primary-100: #e8d5f0;
  --primary-glow: rgba(155,89,182,.18);

  /* Accent — warm pink */
  --accent: #e74c8b;
  --accent-light: #fce4ef;

  /* Neutral palette */
  --dark: #1a0e2e;
  --dark-2: #2d1b4e;
  --dark-3: #3d2a5c;
  --text: #2d2440;
  --text-muted: #7c6d8e;
  --text-light: #a89bb5;
  --border: #ede5f3;
  --border-light: #f5f0f9;
  --surface: #ffffff;
  --surface-warm: #fdfafe;
  --bg: #f8f4fc;
  --bg-warm: #faf6fe;

  /* Semantic */
  --success: #22c55e;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #6366f1;
  --info-bg: #eef2ff;

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h: 56px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(26,14,46,.06);
  --shadow: 0 4px 16px rgba(26,14,46,.08);
  --shadow-lg: 0 8px 32px rgba(26,14,46,.12);
  --shadow-glow: 0 0 24px rgba(155,89,182,.15);
  --transition: .2s cubic-bezier(.4,0,.2,1);
  --transition-bounce: .3s cubic-bezier(.34,1.56,.64,1);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::selection { background: var(--primary-100); color: var(--dark); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Links */
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

/* Headings */
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--dark); line-height: 1.3; letter-spacing: -.01em; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 10px;
  padding: .55rem 1.15rem;
  font-size: .875rem;
  transition: all var(--transition);
  letter-spacing: -.005em;
  /* Só a espessura: a cor da borda continua vindo de cada variante do Bootstrap (outline-success etc.) */
  border-width: 1.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(155,89,182,.25);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 16px rgba(155,89,182,.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary-light);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-outline-secondary:hover {
  background: var(--bg);
  border-color: var(--text-light);
  color: var(--text);
}

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); }

/* ─── Forms ───────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .6rem .9rem;
  font-size: .875rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}
.form-control::placeholder { color: var(--text-light); }
.form-label { font-weight: 600; font-size: .8rem; color: var(--text-muted); margin-bottom: .35rem; }
.form-text { font-size: .75rem; color: var(--text-light); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--primary-glow); }

.input-group-text {
  background: var(--bg-warm);
  border: 1.5px solid var(--border);
  border-right: none;
  color: var(--text-light);
  border-radius: 10px 0 0 10px;
}
.input-group .form-control { border-radius: 0 10px 10px 0; }

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  border: none;
  font-size: .85rem;
  font-weight: 500;
}

/* ─── Badges ──────────────────────────────────────────────── */
.badge { font-weight: 600; font-size: .72rem; padding: .3em .65em; border-radius: 6px; letter-spacing: .01em; }

/* Status (texto com contraste AA sobre o fundo claro; agendado na cor da marca) */
.badge-agendado { background: var(--primary-50); color: var(--primary-dark); }
.badge-confirmado { background: var(--success-bg); color: #15803d; }
.badge-concluido { background: #f1f5f9; color: #475569; }
.badge-cancelado { background: var(--danger-bg); color: #b91c1c; }
.badge-nao-compareceu { background: var(--warning-bg); color: #b45309; }

/* Botões de escolha (radio .btn-check) na cor da marca, não no azul padrão do Bootstrap */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.btn-check:focus-visible + .btn-outline-primary { box-shadow: 0 0 0 3px var(--primary-glow); }
/* Amarelo legível sobre branco (o padrão do Bootstrap fica em 1,6:1) */
.btn-outline-warning { --bs-btn-color: #b45309; --bs-btn-border-color: #f59e0b; --bs-btn-hover-bg: #f59e0b; --bs-btn-hover-border-color: #f59e0b; --bs-btn-hover-color: #fff; }
.btn-outline-whatsapp { color: #15803d; border-color: #bbf7d0; background: transparent; }
.btn-outline-whatsapp:hover { color: #fff; background: #16a34a; border-color: #16a34a; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 50%, var(--dark-3) 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(155,89,182,.12);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.brand-icon-sm {
  color: var(--primary-light);
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(155,89,182,.4));
}
.brand-text {
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.sidebar-nav {
  list-style: none;
  padding: .75rem 0;
  margin: 0;
  flex: 1;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.25rem;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  margin: 1px 0;
  position: relative;
}
.sidebar-nav li a i {
  font-size: 1.05rem;
  min-width: 20px;
  text-align: center;
  transition: color var(--transition);
}
.sidebar-nav li a:hover {
  color: rgba(255,255,255,.9);
  background: rgba(155,89,182,.08);
}
.sidebar-nav li a:hover i { color: var(--primary-light); }
.sidebar-nav li.active a {
  color: #fff;
  font-weight: 600;
  border-left-color: var(--primary-light);
  background: rgba(155,89,182,.12);
}
.sidebar-nav li.active a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
  border-radius: 0 2px 2px 0;
}
.sidebar-nav li.active a i { color: var(--primary-light); }

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,89,182,.15), transparent);
  margin: .5rem 1.25rem;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(155,89,182,.1);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-user { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(155,89,182,.3);
}
.user-name { color: #fff; font-weight: 600; font-size: .82rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--text-light); font-size: .7rem; display: block; }
.logout-btn { color: rgba(255,255,255,.4); font-size: 1.1rem; text-decoration: none; transition: color var(--transition); }
.logout-btn:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg);
}
.content-wrapper {
  padding: 2rem 2rem 3rem;
  max-width: 1200px;
}

/* ─── Topbar (mobile) ─────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(26,14,46,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — METRIC CARDS
   ═══════════════════════════════════════════════════════════ */
.metric-card {
  border: none !important;
  border-radius: var(--radius) !important;
  overflow: hidden;
  transition: transform var(--transition-bounce), box-shadow var(--transition);
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg) !important;
}
.metric-card .card-body {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.25rem;
  position: relative;
}
.metric-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.bg-primary-soft { background: var(--primary-50); color: var(--primary); }
.bg-success-soft { background: var(--success-bg); color: var(--success); }
.bg-warning-soft { background: var(--warning-bg); color: var(--warning); }
.bg-info-soft { background: var(--info-bg); color: var(--info); }

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  letter-spacing: -.02em;
}
.metric-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   PROFESSIONAL CARDS
   ═══════════════════════════════════════════════════════════ */
.professional-card {
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius) !important;
  transition: transform var(--transition-bounce), box-shadow var(--transition) !important;
}
.professional-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.professional-photo {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2.5px solid var(--primary-50);
  transition: border-color var(--transition);
}
.professional-card:hover .professional-photo { border-color: var(--primary-light); }

.professional-avatar {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(155,89,182,.25);
}

.avatar-sm {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .7rem;
  flex-shrink: 0;
}

/* ─── Service Checks ──────────────────────────────────────── */
.service-check {
  cursor: pointer;
  transition: all var(--transition);
  border-radius: 10px !important;
  border: 1.5px solid var(--border) !important;
}
.service-check:hover { border-color: var(--primary-light) !important; background: var(--primary-50); }
.service-check:has(input:checked) {
  background: var(--primary-50) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.day-check {
  display: flex; align-items: center; gap: .4rem;
  cursor: pointer;
  padding: .35rem .6rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.day-check:has(input:checked) {
  background: var(--primary-50);
  border-color: var(--primary-light);
}

/* ─── Info Rows ───────────────────────────────────────────── */
.info-row {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .8rem;
  background: var(--bg-warm);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.info-row i { margin-top: 2px; font-size: 1.05rem; color: var(--primary); }

/* ─── Plan Cards ──────────────────────────────────────────── */
.plan-card {
  transition: transform var(--transition-bounce);
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg) !important;
}
.plan-card:hover { transform: translateY(-4px); }
.plan-featured { border: 2px solid var(--primary) !important; box-shadow: var(--shadow-glow) !important; }

.plan-badge-top {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: .25rem .85rem;
  border-bottom-left-radius: 10px;
}

.plan-price { margin: .5rem 0; }
.price-currency { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); vertical-align: top; margin-top: .5rem; display: inline-block; }
.price-value { font-size: 3rem; font-weight: 900; color: var(--dark); line-height: 1; letter-spacing: -.03em; }
.price-period { font-size: .85rem; color: var(--text-muted); }

.plan-icon-lg {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--primary-50);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   BOOKING — PUBLIC PAGES
   ═══════════════════════════════════════════════════════════ */

/* Steps */
.progress-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 1.5rem;
}
.step { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 70px; }
.step-num {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg); color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.step.active .step-num {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(155,89,182,.3);
}
.step.done .step-num { background: var(--success); color: #fff; border-color: var(--success); }
.step-label { font-size: .72rem; color: var(--text-light); font-weight: 500; }
.step.active .step-label { color: var(--primary); font-weight: 700; }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 30px; max-width: 80px; margin-top: -18px; }
.step-line.done { background: var(--success); }

/* Booking cards */
.booking-card {
  transition: all var(--transition);
  border: 2px solid transparent !important;
  cursor: pointer;
  border-radius: var(--radius) !important;
}
.booking-card:hover {
  border-color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow) !important;
}

.service-icon { font-size: 2.5rem; color: var(--primary); }
.service-price { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.service-duration { font-size: .85rem; }

.professional-photo-lg {
  width: 64px; height: 64px;
  border-radius: var(--radius-full); object-fit: cover;
  border: 3px solid var(--primary-50); flex-shrink: 0;
}
.professional-avatar-lg {
  width: 64px; height: 64px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.6rem; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(155,89,182,.25);
}

.selected-summary {
  background: var(--primary-50);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  border: 1px solid var(--primary-100);
}

/* Date buttons */
.dates-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.date-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: .5rem .75rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  min-width: 60px; transition: all var(--transition);
}
.date-btn:hover { border-color: var(--primary-light); background: var(--primary-50); }
.date-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 3px 12px rgba(155,89,182,.25);
}
.date-weekday { font-size: .62rem; text-transform: uppercase; opacity: .7; font-weight: 600; }
.date-day { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.date-month { font-size: .62rem; opacity: .7; font-weight: 500; }

/* Time slots */
.slots-grid { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot-btn {
  padding: .5rem 1rem;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--surface); cursor: pointer;
  font-weight: 700; font-size: .88rem;
  transition: all var(--transition); min-width: 70px;
  color: var(--text);
}
.slot-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-50); }
.slot-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 2px 8px rgba(155,89,182,.25);
}

/* Success */
.success-circle {
  width: 90px; height: 90px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--success), #34d399);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin: 0 auto;
  box-shadow: 0 4px 20px rgba(34,197,94,.3);
  animation: successPop .5s var(--transition-bounce);
}
@keyframes successPop {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.appointment-detail {
  display: flex; align-items: center;
  padding: .65rem 0; border-bottom: 1px solid var(--border-light);
}
.appointment-detail:last-child { border-bottom: none; }
.detail-label { min-width: 130px; color: var(--text-muted); font-size: .85rem; }
.detail-value { font-size: .9rem; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   AGENDA (/appointments) — cabeçalho, períodos e cartões do celular
   ═══════════════════════════════════════════════════════════ */
.agenda-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.agenda-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.agenda-periods {
  display: flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full);
  width: fit-content; max-width: 100%;
}
.agenda-period {
  flex: 1; text-align: center; white-space: nowrap;
  padding: .5rem 1.1rem; border-radius: var(--radius-full);
  font-weight: 600; font-size: .9rem; color: var(--text-muted);
}
.agenda-period:hover { color: var(--primary-dark); background: var(--primary-50); }
.agenda-period.active { background: var(--primary); color: #fff; }

.appt-day { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 1.25rem 0 .5rem; }
.appt-day:first-child { margin-top: 0; }
.appt-card {
  display: flex; flex-wrap: wrap; gap: .85rem; padding: .95rem; margin-bottom: .6rem;
  background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.appt-card.is-closed { background: var(--surface-warm); }
.appt-card.is-closed .appt-card-time strong { color: var(--text-muted); }
.appt-card-time { flex: 0 0 3.4rem; display: flex; flex-direction: column; line-height: 1.2; }
.appt-card-time strong { font-size: 1.15rem; color: var(--dark); font-variant-numeric: tabular-nums; }
.appt-card-time span { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.appt-card-main { flex: 1; min-width: 0; }
.appt-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.appt-card-client {
  background: none; border: 0; padding: 0; text-align: left;
  font-weight: 700; font-size: 1rem; color: var(--primary-dark); line-height: 1.3;
}
.appt-card-svc { font-size: .9rem; color: var(--text); margin-top: .2rem; }
.appt-card-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .8rem; color: var(--text-muted); margin-top: .35rem; }
.appt-tag { white-space: nowrap; display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; color: #92400e; background: #fef3c7; border-radius: var(--radius-full); padding: .05rem .5rem; }
.appt-tag.is-ok { color: #15803d; background: var(--success-bg); }
.appt-tag.is-warn { color: #b45309; background: var(--warning-bg); }
.appt-card-actions { flex: 0 0 100%; display: flex; gap: .4rem; margin-top: -.15rem; }
.appt-card-actions > form { flex: 1 1 0; min-width: 0; }
.appt-card-actions .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .35rem .5rem; white-space: nowrap; }
.appt-card-actions > form .btn { width: 100%; }
.appt-card-actions .appt-icon-btn { flex: 0 0 44px; width: 44px; min-height: 40px; justify-content: center; padding: 0; font-size: 1.05rem; }
.appt-card-actions .appt-more { margin-left: auto; }

@media (max-width: 767.98px) {
  .agenda-head { align-items: stretch; }
  .agenda-title { width: 100%; }
  .agenda-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .agenda-actions > .btn, .agenda-actions > form .btn { width: 100%; }
  .agenda-periods { width: 100%; }
  .agenda-period { padding: .55rem .5rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .content-wrapper { padding: 1.25rem 1rem 2rem; }
}

@media (max-width: 575.98px) {
  .metric-value { font-size: 1.2rem; }
  .dates-grid { gap: .3rem; }
  .date-btn { min-width: 52px; padding: .4rem .6rem; }
  .content-wrapper { padding: 1rem .75rem 2rem; }
}

/* ─── Print ───────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn, form { display: none !important; }
  .main-content { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */
.text-primary { color: var(--primary) !important; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}
.border-primary { border-color: var(--primary) !important; }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .4s ease both; }
.fade-in-delay-1 { animation-delay: .08s; }
.fade-in-delay-2 { animation-delay: .16s; }
.fade-in-delay-3 { animation-delay: .24s; }

/* Glow pulse for active elements */
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 12px rgba(155,89,182,.2); }
  50% { box-shadow: 0 0 24px rgba(155,89,182,.35); }
}

/* Celular: espaço no fim da página para o seletor nativo (relógio/data) não cobrir o último botão,
   e fonte de 16px nos campos para o iPhone não dar zoom. O espaço fica no conteúdo, nunca em cada
   <form>: formulários de um botão só (Concluir todos, Remover acesso…) ficavam com 120px a mais e
   esticavam os botões vizinhos em linhas flex. */
@media (max-width: 768px) {
  .content-wrapper {
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }
  .form-control, .form-select, input[type="time"], input[type="date"], select {
    font-size: 16px !important;
  }
}

