/* ============================================================
   GestorClínica — Custom CSS (Bootstrap 5 overrides + componentes)
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --gc-sidebar-w:      260px;
  --gc-sidebar-bg:     #0d1117;
  --gc-sidebar-accent: #4361ee;
  --gc-topbar-h:       60px;
  --gc-body-bg:        #f4f6fc;
  --gc-font:           'Inter', system-ui, -apple-system, sans-serif;
  --gc-radius:         .6rem;
  --gc-radius-lg:      1rem;
  --gc-shadow:         0 2px 12px rgba(0,0,0,.07);
  --gc-shadow-lg:      0 6px 30px rgba(0,0,0,.12);
  --gc-primary:        #4361ee;
  --gc-primary-dark:   #2c45c7;
  --gc-success:        #0ca678;
  --gc-warning:        #e67700;
  --gc-danger:         #e03131;
  --bs-primary:        #4361ee;
  --bs-primary-rgb:    67, 97, 238;
  --bs-body-font-family: var(--gc-font);
}

/* ── Reset base ─────────────────────────────────────────── */
html, body { height: 100%; }
body {
  font-family: var(--gc-font);
  background: var(--gc-body-bg);
  color: #1a1d2e;
  overflow-x: hidden;
}
a { text-decoration: none; }

/* ============================================================
   LAYOUT: Sidebar + Main wrapper
   ============================================================ */
.gc-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--gc-sidebar-w);
  background: var(--gc-sidebar-bg);
  z-index: 1040;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

.gc-main {
  margin-left: var(--gc-sidebar-w);
  min-height: 100vh;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
  background: var(--gc-body-bg);
}

/* Mobile: sidebar escondida por padrão */
@media (max-width: 991.98px) {
  .gc-sidebar {
    transform: translateX(-100%);
    width: min(var(--gc-sidebar-w), 85vw);
  }
  .gc-sidebar.show {
    transform: translateX(0);
    box-shadow: var(--gc-shadow-lg);
  }
  .gc-main { margin-left: 0; }
}

/* ── Overlay mobile ─────────────────────────────────────── */
.gc-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1039;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.gc-overlay.show { opacity: 1; visibility: visible; }

/* ── Sidebar Brand ──────────────────────────────────────── */
.gc-sidebar-brand {
  padding: 1.2rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.gc-brand-icon {
  width: 40px; height: 40px;
  border-radius: .55rem;
  background: var(--gc-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(67,97,238,.45);
}
.gc-brand-name {
  font-size: .95rem; font-weight: 700;
  color: #fff; letter-spacing: -.02em;
  line-height: 1.1;
}
.gc-brand-sub {
  font-size: .68rem; color: #64748b;
  font-weight: 500; letter-spacing: .03em;
}

/* ── Org badge ──────────────────────────────────────────── */
.gc-sidebar-org {
  display: flex; align-items: center;
  padding: .65rem 1.25rem;
  font-size: .78rem; color: #64748b; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* ── Navigation ─────────────────────────────────────────── */
.gc-nav { padding: .5rem 0; }
.gc-nav-section {
  padding: .85rem 1.25rem .3rem;
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #334155;
}
.gc-nav-link {
  display: flex; align-items: center; gap: .8rem;
  padding: .62rem 1.25rem;
  color: #94a3b8; font-size: .875rem; font-weight: 500;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.gc-nav-link i { font-size: 1rem; flex-shrink: 0; }
.gc-nav-link:hover {
  background: rgba(255,255,255,.05);
  color: #e2e8f0;
  text-decoration: none;
}
.gc-nav-link.active {
  background: rgba(67,97,238,.15);
  color: #818cf8;
  border-left-color: var(--gc-primary);
  font-weight: 600;
}

/* ── Sidebar Footer ─────────────────────────────────────── */
.gc-sidebar-footer {
  padding: .9rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.gc-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gc-primary), #7c3aed);
  color: #fff; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gc-user-name { font-size: .83rem; color: #e2e8f0; font-weight: 600; }
.gc-user-role  { font-size: .7rem;  color: #475569; font-weight: 500; }
.gc-logout-btn {
  color: #475569; font-size: 1.1rem;
  transition: color .15s;
}
.gc-logout-btn:hover { color: #ef4444; }

/* ── Topbar ─────────────────────────────────────────────── */
.gc-topbar {
  height: var(--gc-topbar-h);
  background: #fff;
  border-bottom: 1px solid #e8ecf0;
  padding: 0 1.25rem;
  box-shadow: 0 1px 0 #e8ecf0;
  z-index: 100;
}
.gc-topbar-title {
  font-size: 1rem; color: #1a1d2e; letter-spacing: -.01em;
}
.gc-menu-toggle {
  color: #475569; padding: .3rem .5rem;
  border-color: #e8ecf0; line-height: 1;
}
.gc-menu-toggle:hover { background: #f4f6fc; border-color: #d1d9e0; }

/* ── Page Content ───────────────────────────────────────── */
.gc-content { }
.gc-footer  { border-top: 1px solid #e8ecf0; background: #fff; }

/* ============================================================
   CARDS — override Bootstrap + elevação
   ============================================================ */
.card {
  border: 1px solid #e8ecf0;
  border-radius: var(--gc-radius) !important;
  box-shadow: var(--gc-shadow);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #eef0f5;
  font-weight: 600;
  padding: .9rem 1.25rem;
}
.card-title { font-weight: 700; font-size: .9rem; color: #1a1d2e; margin: 0; }

/* ── Metric Cards ───────────────────────────────────────── */
.gc-metric {
  border-radius: var(--gc-radius-lg) !important;
  border: none !important;
  box-shadow: var(--gc-shadow) !important;
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.gc-metric:hover {
  transform: translateY(-3px);
  box-shadow: var(--gc-shadow-lg) !important;
}
.gc-metric .gc-metric-icon {
  width: 52px; height: 52px; border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.gc-metric-value { font-size: 2.1rem; font-weight: 800; line-height: 1; color: #1a1d2e; }
.gc-metric-label { font-size: .8rem; color: #6b7280; font-weight: 500; margin-top: .25rem; }
.gc-metric-footer { font-size: .78rem; color: #9ca3af; }
.gc-metric-bg {
  position: absolute; right: -18px; bottom: -18px;
  font-size: 5.5rem; opacity: .06; pointer-events: none;
}

/* ── Metric color variants ──────────────────────────────── */
.gc-metric-primary   { background: linear-gradient(135deg,#eef2ff,#fff); }
.gc-metric-success   { background: linear-gradient(135deg,#ecfdf5,#fff); }
.gc-metric-warning   { background: linear-gradient(135deg,#fffbeb,#fff); }
.gc-metric-danger    { background: linear-gradient(135deg,#fef2f2,#fff); }
.gc-metric-info      { background: linear-gradient(135deg,#ecfeff,#fff); }

.gc-metric-primary .gc-metric-icon   { background: #eef2ff; color: var(--gc-primary); }
.gc-metric-success .gc-metric-icon   { background: #ecfdf5; color: var(--gc-success); }
.gc-metric-warning .gc-metric-icon   { background: #fffbeb; color: var(--gc-warning); }
.gc-metric-danger  .gc-metric-icon   { background: #fef2f2; color: var(--gc-danger);  }
.gc-metric-info    .gc-metric-icon   { background: #ecfeff; color: #0891b2; }

/* ============================================================
   BUTTONS — override primário
   ============================================================ */
.btn-primary {
  background: var(--gc-primary);
  border-color: var(--gc-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--gc-primary-dark);
  border-color: var(--gc-primary-dark);
}
.btn-outline-primary { color: var(--gc-primary); border-color: var(--gc-primary); }
.btn-outline-primary:hover { background: var(--gc-primary); border-color: var(--gc-primary); }

/* ── Botões de ação rápida (header de página) ───────────── */
.gc-page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.gc-page-title { font-size: 1.35rem; font-weight: 800; color: #1a1d2e; margin: 0; }
.gc-page-sub   { font-size: .82rem; color: #9ca3af; margin-top: .15rem; }

/* ============================================================
   TABLES
   ============================================================ */
.table > :not(caption) > * > * { padding: .75rem 1rem; vertical-align: middle; }
.table thead th {
  background: #f9fafb; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .07em;
  color: #6b7280; font-weight: 700;
  border-bottom: 2px solid #eef0f5;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f9fbff; }
.table-hover > tbody > tr:hover > * { --bs-table-accent-bg: #f9fbff; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-weight: 600; font-size: .72rem;
  letter-spacing: .02em; border-radius: .35rem;
  padding: .3em .65em;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
  border-color: #e0e4ed;
  border-radius: var(--gc-radius);
  padding: .55rem .9rem;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}
.form-label {
  font-size: .83rem; font-weight: 600;
  color: #374151; margin-bottom: .35rem;
}
.form-text { font-size: .78rem; color: #9ca3af; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.gc-auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1117 0%, #1e2a45 55%, #0d1117 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.gc-auth-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: var(--gc-radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 2.5rem 2rem;
}
.gc-auth-logo { text-align: center; margin-bottom: 2rem; }
.gc-auth-logo-icon {
  width: 60px; height: 60px; border-radius: 1rem;
  background: linear-gradient(135deg, var(--gc-primary), #7c3aed);
  color: #fff; font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; box-shadow: 0 8px 24px rgba(67,97,238,.4);
}
.gc-auth-title { font-size: 1.5rem; font-weight: 800; color: #1a1d2e; }
.gc-auth-sub   { font-size: .85rem; color: #9ca3af; margin-top: .25rem; }

/* ============================================================
   OPERATIONAL SCREENS (Consultório / Cirurgias)
   ============================================================ */

/* Lista de atendimentos */
.gc-appt-card {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: var(--gc-radius);
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1.1rem;
  color: #1a1d2e;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: var(--gc-shadow);
}
.gc-appt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gc-shadow-lg);
  border-color: var(--gc-primary);
}
.gc-appt-main {
  display: contents;
}
.gc-appt-main > * { cursor: pointer; }
.d-contents { display: contents; text-decoration: none; color: inherit; }
.gc-appt-actions { flex-shrink: 0; }
.gc-appt-card.gc-status-inprogress { border-left: 4px solid var(--gc-warning); }
.gc-appt-card.gc-status-completed  { border-left: 4px solid var(--gc-success); }
.gc-appt-card.gc-status-cancelled  { border-left: 4px solid #adb5bd; opacity: .75; }
.gc-appt-card.gc-status-overtime   { border-left: 4px solid var(--gc-danger); }

.gc-appt-time {
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px; gap: .15rem;
}
.gc-appt-hour { font-size: 1.1rem; font-weight: 800; color: var(--gc-primary); }
.gc-appt-room { font-size: .72rem; color: #9ca3af; }

.gc-appt-info { flex: 1; overflow: hidden; min-width: 0; }
.gc-appt-patient { font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-appt-doctor  { font-size: .82rem; color: #6b7280; }
.gc-appt-unit    { font-size: .76rem; color: #9ca3af; }

.gc-appt-status { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; min-width: 110px; }
.gc-appt-arrow  { color: #d1d5db; font-size: 1.15rem; flex-shrink: 0; }

/* Barra de progresso slim */
.gc-progress {
  height: 5px; border-radius: 9999px;
  background: #e8ecf0; overflow: hidden; width: 90px;
}
.gc-progress-bar {
  height: 100%; border-radius: 9999px;
  background: var(--gc-primary);
  transition: width .35s;
}
.gc-progress-bar-success { background: var(--gc-success); }
.gc-progress-bar-danger  { background: var(--gc-danger); }

/* ── Control Page: Step Buttons ─────────────────────────── */
.gc-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.gc-step-grid-surgery {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.gc-step-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .45rem; padding: 1.35rem .75rem;
  border-radius: var(--gc-radius);
  text-align: center; border: 2px solid #e8ecf0;
  background: #fff; cursor: pointer;
  min-height: 130px;
  font-family: var(--gc-font);
  transition: all .18s; box-shadow: var(--gc-shadow);
}
.gc-step-btn:hover:not(:disabled):not(.gc-step-done) {
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 4px rgba(67,97,238,.1), var(--gc-shadow-lg);
  transform: translateY(-2px);
}
.gc-step-btn.gc-step-surgery { min-height: 160px; padding: 1.6rem 1rem; }
.gc-step-btn.gc-step-done {
  background: #ecfdf5; border-color: var(--gc-success);
  cursor: not-allowed;
}
.gc-step-btn.gc-step-loading { opacity: .6; pointer-events: none; }

.gc-step-check {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f1f5f9; border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: #94a3b8;
  transition: all .18s;
}
.gc-step-done .gc-step-check {
  background: var(--gc-success); border-color: var(--gc-success);
  color: #fff;
}
.gc-step-name   { font-size: .875rem; font-weight: 700; line-height: 1.3; color: #1a1d2e; }
.gc-step-hint   { font-size: .72rem; color: #9ca3af; }
.gc-step-time   { font-size: .82rem; font-weight: 700; color: var(--gc-success); }
.gc-step-by     { font-size: .7rem; color: #9ca3af; }

/* ── Control: patient header ────────────────────────────── */
.gc-ctrl-header {
  background: #fff; border-radius: var(--gc-radius-lg);
  border: 1px solid #e8ecf0; padding: 1.25rem;
  box-shadow: var(--gc-shadow);
  margin-bottom: 1.25rem;
}
.gc-patient-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gc-primary), #7c3aed);
  color: #fff; font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gc-surgery-avatar {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  font-size: 1.3rem;
}
.gc-patient-name { font-size: 1.1rem; font-weight: 800; color: #1a1d2e; }
.gc-patient-meta { font-size: .82rem; color: #6b7280; }

/* ── Info chips (agendado, sala, tipo...) ───────────────── */
.gc-info-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.gc-chip {
  display: flex; flex-direction: column; gap: .1rem;
  background: #fff; border: 1px solid #e8ecf0;
  border-radius: var(--gc-radius); padding: .55rem .9rem;
  box-shadow: var(--gc-shadow);
}
.gc-chip-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #9ca3af; }
.gc-chip-value { font-size: .9rem; font-weight: 700; color: #1a1d2e; }
.gc-chip-delay  { border-color: #fca5a5; background: #fef2f2; }
.gc-chip-delay .gc-chip-label  { color: var(--gc-danger); }
.gc-chip-delay .gc-chip-value  { color: var(--gc-danger); }
.gc-chip-ok   { border-color: #6ee7b7; background: #ecfdf5; }
.gc-chip-ok .gc-chip-value { color: var(--gc-success); }

/* ── Live Timer ─────────────────────────────────────────── */
.gc-live-timer {
  border-radius: var(--gc-radius);
  padding: 1rem 1.25rem; text-align: center; margin-bottom: 1.25rem;
}
.gc-timer-normal { background: #ecfeff; border: 1px solid #a5f3fc; }
.gc-timer-danger { background: #fef2f2; border: 1px solid #fca5a5; }
.gc-timer-value  { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gc-timer-normal .gc-timer-value { color: #0891b2; }
.gc-timer-danger .gc-timer-value { color: var(--gc-danger); }
.gc-timer-label  { font-size: .78rem; color: #6b7280; }

/* ── Timeline ───────────────────────────────────────────── */
.gc-timeline { position: relative; padding-left: 1.5rem; }
.gc-timeline::before {
  content: ''; position: absolute; left: .45rem; top: .5rem; bottom: .5rem;
  width: 2px; background: #e8ecf0; border-radius: 1px;
}
.gc-timeline-item {
  position: relative; padding-bottom: 1.1rem; display: flex; gap: .9rem;
}
.gc-timeline-dot {
  position: absolute; left: -1.1rem; top: .3rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gc-primary); border: 2px solid #f4f6fc;
  box-shadow: 0 0 0 3px rgba(67,97,238,.2);
  flex-shrink: 0;
}
.gc-timeline-dot-green { background: var(--gc-success); box-shadow: 0 0 0 3px rgba(12,166,120,.2); }
.gc-timeline-dot-edited { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.gc-timeline-step { font-size: .875rem; font-weight: 700; }
.gc-timeline-time { font-size: .8rem; color: var(--gc-primary); font-weight: 600; }
.gc-timeline-diff { font-size: .75rem; color: #9ca3af; }

/* ============================================================
   TOAST (feedback de ação)
   ============================================================ */
.gc-toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: .75rem 1.5rem; border-radius: var(--gc-radius);
  font-weight: 600; font-size: .88rem;
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  max-width: 90vw; text-align: center;
  box-shadow: var(--gc-shadow-lg);
  display: flex; align-items: center; gap: .6rem;
}
.gc-toast.show  { transform: translateX(-50%) translateY(0); opacity: 1; }
.gc-toast-success { background: var(--gc-success); color: #fff; }
.gc-toast-error   { background: var(--gc-danger);  color: #fff; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.gc-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 4rem 2rem; color: #9ca3af; text-align: center;
}
.gc-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: .5; }
.gc-empty h5   { font-weight: 700; color: #4b5563; }
.gc-empty p    { font-size: .875rem; margin: .5rem 0 1.5rem; }

/* ============================================================
   DASHBOARD specific
   ============================================================ */
.gc-ranking-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem; border-radius: var(--gc-radius);
  background: #f9fafb; transition: background .12s;
}
.gc-ranking-item:hover { background: #eef2ff; }
.gc-rank-pos {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; flex-shrink: 0;
  background: #e8ecf0; color: #6b7280;
}
.gc-rank-gold   { background: #fef3c7; color: #92400e; }
.gc-rank-silver { background: #f1f5f9; color: #475569; }
.gc-rank-bronze { background: #fef9c3; color: #78350f; }
.gc-rank-name   { font-size: .86rem; font-weight: 600; }
.gc-rank-sub    { font-size: .74rem; color: #9ca3af; }
.gc-rank-metric { font-size: .9rem; font-weight: 700; margin-left: auto; }

/* ============================================================
   FLUXOS / STEPS LIST
   ============================================================ */
.gc-step-index-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .75rem; border-radius: var(--gc-radius-sm, .35rem);
  background: #f9fafb; font-size: .875rem;
}
.gc-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gc-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0;
}

/* ── Seleção de empresa (select-org) ───────────────────── */
.gc-org-option { display: block; cursor: pointer; }
.gc-org-card {
  display: flex; align-items: center; gap: .9rem;
  padding: .85rem 1rem; border-radius: var(--gc-radius);
  border: 2px solid #e8ecf0; background: #fff;
  transition: border-color .15s, background .15s;
}
.gc-org-card:hover { border-color: var(--gc-primary); background: #f0f3ff; }
.gc-org-card.selected { border-color: var(--gc-primary); background: #eef1ff; }
.gc-org-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gc-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.gc-org-name    { font-weight: 700; font-size: .95rem; color: #1e293b; }
.gc-org-address { font-size: .78rem; color: #64748b; margin-top: .1rem; }
.gc-org-check   { color: var(--gc-primary); font-size: 1.2rem; display: none; }
.gc-org-card.selected .gc-org-check { display: block; }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 575.98px) {
  .gc-step-grid         { grid-template-columns: 1fr 1fr; }
  .gc-step-grid-surgery { grid-template-columns: 1fr 1fr; }
  .gc-step-btn { min-height: 110px; padding: 1rem .6rem; }
  .gc-step-btn.gc-step-surgery { min-height: 120px; }
  .gc-metric-value { font-size: 1.6rem; }
  .gc-patient-avatar { width: 42px; height: 42px; font-size: 1.05rem; }
  .gc-appt-status { min-width: auto; width: 100%; }
  .gc-appt-card { flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .gc-step-grid, .gc-step-grid-surgery { grid-template-columns: 1fr; }
}

/* ============================================================
   LOADING OVERLAY (filtros de data/unidade)
   ============================================================ */
#gcLoadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(244, 246, 252, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}
#gcLoadingOverlay.gc-loading-active {
  display: flex;
}
.gc-loading-card {
  background: #fff;
  border-radius: var(--gc-radius-lg);
  box-shadow: var(--gc-shadow-lg);
  padding: 2rem 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  border: 1px solid #e8ecf0;
  animation: gcLoadingPop .22s cubic-bezier(.34,1.56,.64,1);
}
.gc-loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid #e8ecf0;
  border-top-color: var(--gc-primary);
  border-radius: 50%;
  animation: gcSpin .75s linear infinite;
}
.gc-loading-text {
  font-size: .9rem; font-weight: 600; color: #374151;
}
.gc-loading-sub {
  font-size: .78rem; color: #9ca3af; margin-top: -.5rem;
}
@keyframes gcSpin {
  to { transform: rotate(360deg); }
}
@keyframes gcLoadingPop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
