/*
 * Plataforma do Cuidador - Estilos Públicos
 * Design moderno SaaS profissional
 */

/* =====================================================
   VARIÁVEIS E RESET
===================================================== */
:root {
  --pc-primary: #0F62FE;
  --pc-primary-hover: #0043CE;
  --pc-primary-light: #EBF2FF;
  --pc-secondary: #42BE65;
  --pc-secondary-light: #DEFBE6;
  --pc-accent: #FF7EB6;
  --pc-warning: #F1C21B;
  --pc-danger: #DA1E28;
  --pc-danger-light: #FFF1F1;

  --pc-text-primary: #161616;
  --pc-text-secondary: #525252;
  --pc-text-muted: #8D8D8D;
  --pc-text-inverse: #FFFFFF;

  --pc-bg: #F4F6FB;
  --pc-surface: #FFFFFF;
  --pc-surface-2: #F4F6FB;
  --pc-border: #E0E0E0;
  --pc-border-focus: #0F62FE;

  --pc-radius-sm: 8px;
  --pc-radius: 14px;
  --pc-radius-lg: 20px;
  --pc-radius-xl: 28px;

  --pc-shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --pc-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --pc-shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --pc-shadow-primary: 0 4px 20px rgba(15,98,254,0.25);

  --pc-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --pc-font-display: 'DM Serif Display', Georgia, serif;

  --pc-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --pc-sidebar-width: 260px;
}

.pc-wrap *,
.pc-wrap *::before,
.pc-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.pc-wrap {
  font-family: var(--pc-font);
  color: var(--pc-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* =====================================================
   LEAFLET MAP Z-INDEX FIX
   Garante que o mapa não sobreponha sidebar/overlay.
   Leaflet usa z-index 200-650 internamente.
   Ao abrir a sidebar (mobile), o mapa fica abaixo.
===================================================== */

/* O container do mapa cria um stacking context isolado */
#pc-map {
  isolation: isolate;
}

/* Quando a sidebar está aberta no mobile, o mapa fica atrás */
@media (max-width: 768px) {
  .pc-sidebar.open ~ .pc-main #pc-map,
  .pc-sidebar-overlay.open ~ .pc-main #pc-map {
    z-index: 0 !important;
  }

  /* Rebaixa TODAS as camadas internas do Leaflet abaixo da sidebar */
  .pc-sidebar.open ~ * .leaflet-pane,
  .pc-sidebar.open ~ * .leaflet-top,
  .pc-sidebar.open ~ * .leaflet-bottom,
  .pc-sidebar.open ~ * .leaflet-control,
  .leaflet-pane,
  .leaflet-tile-pane,
  .leaflet-overlay-pane,
  .leaflet-shadow-pane,
  .leaflet-marker-pane,
  .leaflet-tooltip-pane,
  .leaflet-popup-pane {
    z-index: auto !important;
  }

  /* Garante que as camadas top/bottom de controle do Leaflet fiquem abaixo da sidebar */
  .leaflet-top,
  .leaflet-bottom {
    z-index: 10 !important;
  }
}


/* =====================================================
   AVATAR GLOBAL OVERRIDE
   Garante círculo perfeito em qualquer tema WordPress
===================================================== */
.pc-wrap img[class*="avatar"],
.pc-wrap .pc-caregiver-avatar,
.pc-wrap .pc-user-mini-avatar,
.pc-wrap .pc-profile-avatar,
.pc-wrap .pc-map-popup img,
.pc-wrap .pc-map-popup-header img {
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* Garante que imagens dentro do card header sejam sempre circulares */
.pc-caregiver-card-header img {
  border-radius: 50% !important;
  object-fit: cover !important;
  width: 84px !important;
  height: 84px !important;
  display: block !important;
  margin: 0 auto !important;
}

/* =====================================================
   NOTICE
===================================================== */
.pc-notice {
  background: var(--pc-primary-light);
  color: var(--pc-primary);
  border-left: 4px solid var(--pc-primary);
  padding: 16px 20px;
  border-radius: var(--pc-radius-sm);
  font-weight: 500;
}

/* =====================================================
   FORMULÁRIO DE CADASTRO (SHORTCODE 1)
===================================================== */
.pc-register-wrap {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px;
}

.pc-register-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius-xl);
  box-shadow: var(--pc-shadow-lg);
  overflow: hidden;
}

.pc-register-header {
  background: linear-gradient(135deg, #0F62FE 0%, #0043CE 100%);
  padding: 40px 48px;
  text-align: center;
}

.pc-register-header h1 {
  font-family: var(--pc-font-display);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}

.pc-register-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.pc-register-body {
  padding: 40px 48px;
}

@media (max-width: 600px) {
  .pc-register-header { padding: 28px 24px; }
  .pc-register-body { padding: 28px 20px; }
}

.pc-form-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.pc-form-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 600px) {
  .pc-form-row.cols-2 { grid-template-columns: 1fr; }
}

.pc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pc-text-secondary);
  letter-spacing: 0.01em;
}

.pc-field label .pc-required {
  color: var(--pc-danger);
  margin-left: 2px;
}

.pc-input,
.pc-select,
.pc-textarea {
  font-family: var(--pc-font);
  font-size: 0.9375rem;
  color: var(--pc-text-primary);
  background: var(--pc-surface);
  border: 1.5px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  padding: 11px 14px;
  transition: var(--pc-transition);
  outline: none;
  width: 100%;
}

.pc-input:focus,
.pc-select:focus,
.pc-textarea:focus {
  border-color: var(--pc-border-focus);
  box-shadow: 0 0 0 3px rgba(15,98,254,0.12);
}

.pc-textarea {
  min-height: 110px;
  resize: vertical;
}

/* Avatar upload */
.pc-avatar-upload {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--pc-surface-2);
  border-radius: var(--pc-radius);
  border: 2px dashed var(--pc-border);
  cursor: pointer;
  transition: var(--pc-transition);
}

.pc-avatar-upload:hover {
  border-color: var(--pc-primary);
  background: var(--pc-primary-light);
}

.pc-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pc-border);
  flex-shrink: 0;
}

.pc-avatar-upload-info strong {
  display: block;
  font-weight: 600;
  color: var(--pc-primary);
}

.pc-avatar-upload-info span {
  font-size: 0.8125rem;
  color: var(--pc-text-muted);
}

/* Skills checkboxes */
.pc-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.pc-skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--pc-surface-2);
  border-radius: var(--pc-radius-sm);
  border: 1.5px solid var(--pc-border);
  cursor: pointer;
  transition: var(--pc-transition);
  user-select: none;
}

.pc-skill-item:hover {
  border-color: var(--pc-primary);
  background: var(--pc-primary-light);
}

.pc-skill-item input[type="checkbox"] {
  accent-color: var(--pc-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pc-skill-item input:checked + span {
  color: var(--pc-primary);
  font-weight: 600;
}

.pc-skill-item span {
  font-size: 0.875rem;
  color: var(--pc-text-secondary);
}

/* Gallery upload */
.pc-gallery-upload {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .pc-gallery-upload { grid-template-columns: repeat(3, 1fr); }
}

.pc-gallery-slot {
  aspect-ratio: 1;
  border-radius: var(--pc-radius-sm);
  border: 2px dashed var(--pc-border);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--pc-transition);
  background: var(--pc-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-gallery-slot:hover {
  border-color: var(--pc-primary);
}

.pc-gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.pc-gallery-slot .pc-gallery-placeholder {
  font-size: 1.5rem;
  color: var(--pc-text-muted);
}

.pc-gallery-slot input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Privacy checkbox */
.pc-privacy-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: var(--pc-surface-2);
  border-radius: var(--pc-radius-sm);
  border: 1.5px solid var(--pc-border);
}

.pc-privacy-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--pc-primary);
  flex-shrink: 0;
}

.pc-privacy-row label {
  font-size: 0.875rem;
  color: var(--pc-text-secondary);
  cursor: pointer;
}

.pc-privacy-row a {
  color: var(--pc-primary);
  text-decoration: underline;
  font-weight: 600;
}

/* Buttons */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--pc-font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--pc-radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  transition: var(--pc-transition);
  border: none;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.pc-btn-primary {
  background: var(--pc-primary);
  color: #fff;
  box-shadow: var(--pc-shadow-primary);
}

.pc-btn-primary:hover {
  background: var(--pc-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(15,98,254,0.32);
  color: #fff;
  text-decoration: none;
}

.pc-btn-primary:active {
  transform: translateY(0);
}

.pc-btn-outline {
  background: transparent;
  color: var(--pc-primary);
  border: 1.5px solid var(--pc-primary);
}

.pc-btn-outline:hover {
  background: var(--pc-primary-light);
}

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

.pc-btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.pc-btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: 12px;
}

.pc-btn-block {
  width: 100%;
}

.pc-btn:disabled,
.pc-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Form section titles */
.pc-form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pc-text-primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pc-border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-form-section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--pc-primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.pc-form-section {
  margin-bottom: 32px;
}

/* Form feedback */
.pc-form-alert {
  padding: 14px 18px;
  border-radius: var(--pc-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  margin-top: 16px;
}

.pc-form-alert.success {
  background: var(--pc-secondary-light);
  color: #166534;
  border-left: 4px solid var(--pc-secondary);
  display: flex;
}

.pc-form-alert.error {
  background: var(--pc-danger-light);
  color: var(--pc-danger);
  border-left: 4px solid var(--pc-danger);
  display: flex;
}

/* =====================================================
   PAINEL DO PACIENTE (SHORTCODE 2)
===================================================== */
.pc-panel-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--pc-bg);
  font-family: var(--pc-font);
}

/* Sidebar */
.pc-sidebar {
  width: var(--pc-sidebar-width);
  background: var(--pc-surface);
  border-right: 1px solid var(--pc-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1100;
  transition: transform 0.3s ease;
}

.pc-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-sidebar-logo-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0F62FE, #0043CE);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  flex-shrink: 0;
}

.pc-sidebar-logo-text strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pc-text-primary);
  line-height: 1.2;
}

.pc-sidebar-logo-text span {
  font-size: 0.75rem;
  color: var(--pc-text-muted);
}

.pc-sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.pc-nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pc-text-muted);
  padding: 8px 8px 6px;
  margin-top: 8px;
}

.pc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--pc-radius-sm);
  cursor: pointer;
  transition: var(--pc-transition);
  color: var(--pc-text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.pc-nav-item:hover {
  background: var(--pc-surface-2);
  color: var(--pc-text-primary);
  text-decoration: none;
}

.pc-nav-item.active {
  background: var(--pc-primary-light);
  color: var(--pc-primary);
  font-weight: 600;
}

.pc-nav-item .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.pc-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--pc-border);
}

.pc-user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--pc-radius-sm);
  background: var(--pc-surface-2);
  margin-bottom: 8px;
}

.pc-user-mini-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
  border: 2px solid var(--pc-border) !important;
}

.pc-user-mini-info strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.pc-user-mini-info span {
  font-size: 0.75rem;
  color: var(--pc-text-muted);
}

/* Main content */
.pc-main {
  margin-left: var(--pc-sidebar-width);
  flex: 1;
  min-width: 0;
}

.pc-topbar {
  background: var(--pc-surface);
  border-bottom: 1px solid var(--pc-border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 60;
}

.pc-topbar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pc-text-primary);
}

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

.pc-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--pc-text-primary);
  font-size: 1.25rem;
}

.pc-content {
  padding: 32px;
}

@media (max-width: 768px) {
  .pc-sidebar {
    transform: translateX(-100%);
  }

  .pc-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .pc-main {
    margin-left: 0;
    overflow-x: hidden;
  }

  /* Quando sidebar está aberta, empurra o conteúdo visualmente */
  .pc-panel-wrap:has(.pc-sidebar.open) .pc-main {
    pointer-events: none;
  }

  .pc-topbar {
    padding: 0 20px;
  }

  .pc-content {
    padding: 20px;
  }

  .pc-hamburger {
    display: block;
  }
}

/* Panel sections */
.pc-section {
  display: none;
}

.pc-section.active {
  display: block;
}

/* Page title */
.pc-page-title {
  font-family: var(--pc-font-display);
  font-size: 1.75rem;
  color: var(--pc-text-primary);
  margin-bottom: 6px;
}

.pc-page-subtitle {
  color: var(--pc-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 28px;
}

/* Stat cards */
.pc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.pc-stat-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius);
  padding: 24px;
  box-shadow: var(--pc-shadow-sm);
  border: 1px solid var(--pc-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pc-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.pc-stat-icon.blue { background: var(--pc-primary-light); color: var(--pc-primary); }
.pc-stat-icon.green { background: var(--pc-secondary-light); color: #166534; }
.pc-stat-icon.pink { background: #FFF0F7; color: #9D174D; }

.pc-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--pc-text-primary);
  line-height: 1;
}

.pc-stat-label {
  font-size: 0.875rem;
  color: var(--pc-text-muted);
  font-weight: 500;
}

/* Cards */
.pc-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm);
  border: 1px solid var(--pc-border);
  overflow: hidden;
}

.pc-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--pc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pc-text-primary);
}

.pc-card-body {
  padding: 24px;
}

/* Filters bar */
.pc-filters {
  background: var(--pc-surface);
  border-radius: var(--pc-radius);
  padding: 20px 24px;
  box-shadow: var(--pc-shadow-sm);
  border: 1px solid var(--pc-border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.pc-filters .pc-field {
  flex: 1;
  min-width: 160px;
}

/* Map */
#pc-map {
  width: 100%;
  height: 450px;
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  border: 1px solid var(--pc-border);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

/* Caregiver list cards */
.pc-caregivers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.pc-caregiver-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm);
  border: 1px solid var(--pc-border);
  overflow: hidden;
  transition: var(--pc-transition);
}

.pc-caregiver-card:hover {
  box-shadow: var(--pc-shadow);
  transform: translateY(-2px);
}

.pc-caregiver-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 16px;
  background: linear-gradient(135deg, #F4F6FB 0%, #EBF2FF 100%);
  text-align: center;
}

.pc-caregiver-avatar {
  width: 84px !important;
  height: 84px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center top !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14) !important;
  flex-shrink: 0;
  display: block !important;
  margin: 0 auto !important;
  min-width: 84px;
  min-height: 84px;
  max-width: 84px;
  max-height: 84px;
}

.pc-caregiver-info {
  text-align: center;
  width: 100%;
}

.pc-caregiver-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pc-text-primary);
  margin-bottom: 4px;
}

.pc-caregiver-info .pc-location {
  font-size: 0.8125rem;
  color: var(--pc-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pc-caregiver-card-body {
  padding: 16px 20px;
}

.pc-caregiver-desc {
  font-size: 0.875rem;
  color: var(--pc-text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.pc-skill-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--pc-primary-light);
  color: var(--pc-primary);
  white-space: nowrap;
}

.pc-availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--pc-secondary-light);
  color: #166534;
}

.pc-caregiver-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--pc-border);
  background: var(--pc-surface-2);
}

/* Blurred contact info */
.pc-contact-blurred {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  font-size: 0.875rem;
  color: var(--pc-text-secondary);
  margin-bottom: 10px;
  line-height: 1.8;
}

/* Carousel */
.pc-carousel-wrap {
  border-radius: var(--pc-radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.pc-carousel-wrap .swiper {
  border-radius: var(--pc-radius-sm);
}

.pc-carousel-wrap .swiper-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Table */
.pc-table-wrap {
  overflow-x: auto;
  border-radius: var(--pc-radius);
  border: 1px solid var(--pc-border);
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.pc-table th {
  background: var(--pc-surface-2);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-text-muted);
  border-bottom: 1px solid var(--pc-border);
  white-space: nowrap;
}

.pc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pc-border);
  color: var(--pc-text-secondary);
  vertical-align: middle;
}

.pc-table tbody tr:last-child td {
  border-bottom: none;
}

.pc-table tbody tr:hover td {
  background: var(--pc-surface-2);
}

/* Popup / Modal */
.pc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pc-modal-overlay.open {
  display: flex;
}

.pc-modal {
  background: var(--pc-surface);
  border-radius: var(--pc-radius-xl);
  box-shadow: var(--pc-shadow-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: pc-modal-in 0.25s ease;
}

@keyframes pc-modal-in {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.pc-modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--pc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-modal-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.pc-modal-close {
  background: var(--pc-surface-2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-text-muted);
  transition: var(--pc-transition);
}

.pc-modal-close:hover {
  background: var(--pc-border);
  color: var(--pc-text-primary);
}

.pc-modal-body {
  padding: 24px 28px;
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: var(--pc-radius) !important;
  box-shadow: var(--pc-shadow-lg) !important;
  border: none !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 280px !important;
}

.pc-map-popup {
  padding: 16px;
}

.pc-map-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.pc-map-popup img {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid var(--pc-border) !important;
  flex-shrink: 0;
}

.pc-map-popup h4 {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--pc-text-primary);
  margin-bottom: 2px;
}

.pc-map-popup p {
  font-size: 0.8125rem;
  color: var(--pc-text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Profile section */
.pc-profile-card {
  background: var(--pc-surface);
  border-radius: var(--pc-radius-lg);
  box-shadow: var(--pc-shadow);
  overflow: hidden;
  max-width: 600px;
}

.pc-profile-header-bg {
  height: 100px;
  background: linear-gradient(135deg, #0F62FE, #42BE65);
}

.pc-profile-content {
  padding: 0 28px 28px;
}

.pc-profile-avatar-wrap {
  margin-top: -40px;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.pc-profile-avatar {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 4px solid #fff !important;
  box-shadow: var(--pc-shadow);
  display: block;
}

/* Spinner */
.pc-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.pc-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--pc-text-muted);
}

.pc-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.pc-empty h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pc-text-secondary);
  margin-bottom: 6px;
}

.pc-empty p {
  font-size: 0.875rem;
}

/* Badges */
.pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.pc-badge-success { background: var(--pc-secondary-light); color: #166534; }
.pc-badge-warning { background: #FEF9C3; color: #854D0E; }
.pc-badge-danger { background: var(--pc-danger-light); color: var(--pc-danger); }
.pc-badge-info { background: var(--pc-primary-light); color: var(--pc-primary); }

/* Sidebar overlay mobile */
.pc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1099;
}

.pc-sidebar-overlay.open {
  display: block;
}

/* Logout button in sidebar */
.pc-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--pc-radius-sm);
  background: var(--pc-danger-light);
  color: var(--pc-danger);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: var(--pc-transition);
  text-decoration: none;
}

.pc-sidebar-logout:hover {
  background: #FEE2E2;
  color: var(--pc-danger);
  text-decoration: none;
}
