/* ==========================================================================
   PoliticCRM — Premium UI System
   Inspired by HubSpot / Linear / Salesforce
   ========================================================================== */

:root {
  /* Brand — navy institucional + teal + ouro */
  --pc-primary: #0B3D91;
  --pc-primary-hover: #093278;
  --pc-primary-soft: rgba(11, 61, 145, 0.1);
  --pc-secondary: #1B6CA8;
  --pc-secondary-hover: #155a8c;
  --pc-accent: #C9920F;
  --pc-accent-soft: rgba(201, 146, 15, 0.14);

  /* Surfaces */
  --pc-bg: #EEF2F7;
  --pc-surface: #FFFFFF;
  --pc-surface-raised: #FFFFFF;
  --pc-surface-hover: #F5F7FB;
  --pc-sidebar-bg: #0B274F;
  --pc-sidebar-text: rgba(255, 255, 255, 0.78);
  --pc-sidebar-text-active: #FFFFFF;
  --pc-sidebar-hover: rgba(255, 255, 255, 0.08);
  --pc-sidebar-active: rgba(232, 163, 23, 0.18);

  /* Text */
  --pc-text: #142033;
  --pc-text-secondary: #3A4B63;
  --pc-muted: #6B7C93;
  --pc-muted-light: #94A3B8;

  /* Borders & shadows */
  --pc-border: #DCE3ED;
  --pc-border-strong: #C5D0DE;
  --pc-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --pc-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --pc-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

  /* Layout */
  --pc-sidebar-width: 272px;
  --pc-topbar-height: 64px;
  --pc-radius: 12px;
  --pc-radius-sm: 8px;
  --pc-radius-lg: 16px;

  /* Typography */
  --pc-font: "DM Sans", "Source Sans 3", system-ui, -apple-system, sans-serif;
  --pc-font-mono: ui-monospace, "Cascadia Code", monospace;

  /* Semantic */
  --pc-success: #0F766E;
  --pc-success-soft: rgba(15, 118, 110, 0.12);
  --pc-warning: #B45309;
  --pc-warning-soft: rgba(180, 83, 9, 0.12);
  --pc-danger: #B91C1C;
  --pc-danger-soft: rgba(185, 28, 28, 0.12);
  --pc-info: #0369A1;
  --pc-info-soft: rgba(3, 105, 161, 0.12);

  /* Transitions */
  --pc-transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --pc-transition-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Bootstrap bridge */
  --bs-body-bg: var(--pc-bg);
  --bs-body-color: var(--pc-text);
  --bs-border-color: var(--pc-border);
  --bs-secondary-color: var(--pc-muted);
  --bs-tertiary-bg: var(--pc-surface-hover);
  --bs-primary: var(--pc-primary);
  --bs-link-color: var(--pc-secondary);
  --bs-link-hover-color: var(--pc-primary);
}

[data-theme="dark"] {
  --pc-primary: #5B9FE8;
  --pc-primary-hover: #7AB3F0;
  --pc-primary-soft: rgba(91, 159, 232, 0.16);
  --pc-secondary: #4DA3D4;
  --pc-secondary-hover: #6BB6DF;
  --pc-accent: #E0B03A;
  --pc-accent-soft: rgba(224, 176, 58, 0.16);

  --pc-bg: #0B1220;
  --pc-surface: #151D2E;
  --pc-surface-raised: #1C263A;
  --pc-surface-hover: #222D44;
  --pc-sidebar-bg: #0A1424;
  --pc-sidebar-text: rgba(226, 232, 240, 0.75);
  --pc-sidebar-text-active: #F8FAFC;
  --pc-sidebar-hover: rgba(255, 255, 255, 0.06);
  --pc-sidebar-active: rgba(224, 176, 58, 0.16);

  --pc-text: #E8EEF7;
  --pc-text-secondary: #B6C2D4;
  --pc-muted: #8B9BB0;
  --pc-muted-light: #64748B;

  --pc-border: #2A3548;
  --pc-border-strong: #3B4A63;
  --pc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --pc-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --pc-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);

  --pc-success: #2DD4BF;
  --pc-success-soft: rgba(45, 212, 191, 0.14);
  --pc-warning: #FBBF24;
  --pc-warning-soft: rgba(251, 191, 36, 0.14);
  --pc-danger: #F87171;
  --pc-danger-soft: rgba(248, 113, 113, 0.14);
  --pc-info: #38BDF8;
  --pc-info-soft: rgba(56, 189, 248, 0.14);

  color-scheme: dark;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--pc-font);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--pc-text);
  background: var(--pc-bg);
  min-height: 100vh;
}

a {
  color: var(--pc-secondary);
  text-decoration: none;
  transition: color var(--pc-transition);
}

a:hover {
  color: var(--pc-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pc-text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
  margin: 0 0 1rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes pc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pc-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pc-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.pc-animate-fade {
  animation: pc-fade-in var(--pc-transition-slow) ease-out both;
}

.pc-animate-slide-up {
  animation: pc-slide-up var(--pc-transition-slow) ease-out both;
}

.pc-animate-slide-left {
  animation: pc-slide-in-left var(--pc-transition-slow) ease-out both;
}

.pc-stagger > * {
  animation: pc-slide-up var(--pc-transition-slow) ease-out both;
}

.pc-stagger > *:nth-child(1) { animation-delay: 0ms; }
.pc-stagger > *:nth-child(2) { animation-delay: 50ms; }
.pc-stagger > *:nth-child(3) { animation-delay: 100ms; }
.pc-stagger > *:nth-child(4) { animation-delay: 150ms; }
.pc-stagger > *:nth-child(5) { animation-delay: 200ms; }
.pc-stagger > *:nth-child(6) { animation-delay: 250ms; }

/* ==========================================================================
   App Shell — Sidebar + Topbar + Content
   ========================================================================== */

.pc-app {
  display: flex;
  min-height: 100vh;
}

.pc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--pc-sidebar-width);
  max-width: var(--pc-sidebar-width);
  background: var(--pc-sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow: hidden;
  transition: transform var(--pc-transition-slow);
}

.pc-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: var(--pc-topbar-height);
  overflow: hidden;
  flex-shrink: 0;
}

.pc-sidebar__brand img,
.pc-sidebar__brand-mark {
  height: 34px;
  width: 34px;
  flex-shrink: 0;
  border-radius: 9px;
}

.pc-sidebar__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1B6CA8, #0B3D91);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pc-user-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.pc-guest__logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1B6CA8, #0B3D91);
  color: #fff;
  font-size: 1.45rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.pc-sidebar__brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.pc-sidebar__brand-text strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.pc-sidebar__brand-text small {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-sidebar__nav {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.75rem 0.625rem;
}

.pc-sidebar__section {
  padding: 0.65rem 0.75rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
}

.pc-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 2px;
  border-radius: var(--pc-radius-sm);
  color: var(--pc-sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--pc-transition), color var(--pc-transition);
  overflow: hidden;
}

.pc-sidebar__link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-sidebar__link:hover {
  background: var(--pc-sidebar-hover);
  color: var(--pc-sidebar-text-active);
}

.pc-sidebar__link.active {
  background: var(--pc-sidebar-active);
  color: var(--pc-sidebar-text-active);
  box-shadow: inset 3px 0 0 var(--pc-accent);
}

.pc-sidebar__link svg,
.pc-sidebar__link i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.pc-sidebar__link.active svg,
.pc-sidebar__link.active i {
  opacity: 1;
  color: var(--pc-accent);
}

.pc-sidebar__footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.pc-sidebar__footer .text-muted {
  color: rgba(255, 255, 255, 0.45) !important;
}

.pc-main {
  flex: 1;
  width: calc(100% - var(--pc-sidebar-width));
  margin-left: var(--pc-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  position: relative;
  /* sem z-index: evita modal Bootstrap preso atrás do backdrop */
  transition: margin-left var(--pc-transition-slow), width var(--pc-transition-slow);
}

.pc-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--pc-topbar-height);
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--pc-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pc-border);
}

.pc-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pc-topbar__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--pc-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pc-content {
  flex: 1;
  padding: 1.5rem;
  animation: pc-fade-in var(--pc-transition-slow) ease-out;
}

.pc-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  background: var(--pc-surface);
  color: var(--pc-text);
  cursor: pointer;
  transition: background var(--pc-transition);
}

.pc-sidebar-toggle:hover {
  background: var(--pc-surface-hover);
}

.pc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1035;
  opacity: 0;
  transition: opacity var(--pc-transition-slow);
}

.pc-sidebar-overlay:not(.is-visible) {
  opacity: 0 !important;
  pointer-events: none !important;
}

.modal-backdrop + .modal-backdrop {
  display: none;
}

/* Mobile sidebar collapse */
@media (max-width: 991.98px) {
  .pc-sidebar {
    transform: translateX(-100%);
  }

  .pc-sidebar.is-open {
    transform: translateX(0);
  }

  .pc-main {
    margin-left: 0;
    width: 100%;
  }

  .pc-sidebar-toggle {
    display: inline-flex;
  }

  .pc-sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .pc-sidebar-overlay.is-visible {
    pointer-events: auto;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: var(--pc-font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--pc-radius-sm);
  cursor: pointer;
  transition: background var(--pc-transition), border-color var(--pc-transition), color var(--pc-transition), box-shadow var(--pc-transition);
  white-space: nowrap;
}

.pc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pc-btn-primary {
  background: var(--pc-primary);
  color: #fff;
}

.pc-btn-primary:hover:not(:disabled) {
  background: var(--pc-primary-hover);
}

.pc-btn-secondary {
  background: var(--pc-surface);
  color: var(--pc-text);
  border-color: var(--pc-border);
}

.pc-btn-secondary:hover:not(:disabled) {
  background: var(--pc-surface-hover);
  border-color: var(--pc-border-strong);
}

.pc-btn-accent {
  background: var(--pc-accent);
  color: #1A2332;
}

.pc-btn-accent:hover:not(:disabled) {
  filter: brightness(1.05);
}

.pc-btn-ghost {
  background: transparent;
  color: var(--pc-text-secondary);
}

.pc-btn-ghost:hover:not(:disabled) {
  background: var(--pc-surface-hover);
  color: var(--pc-text);
}

.pc-btn-danger {
  background: var(--pc-danger);
  color: #fff;
}

.pc-btn-danger:hover:not(:disabled) {
  filter: brightness(1.08);
}

.pc-btn-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.8125rem;
}

.pc-btn-lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.pc-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.pc-card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm);
  transition: box-shadow var(--pc-transition), border-color var(--pc-transition);
}

.pc-card:hover {
  box-shadow: var(--pc-shadow);
}

.pc-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--pc-border);
}

.pc-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.pc-card__subtitle {
  font-size: 0.8125rem;
  color: var(--pc-muted);
  margin: 0.125rem 0 0;
}

.pc-card__body {
  padding: 1.25rem;
}

.pc-card__footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--pc-border);
  background: var(--pc-surface-hover);
  border-radius: 0 0 var(--pc-radius) var(--pc-radius);
}

/* KPI Cards */
.pc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.pc-kpi {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm);
  transition: box-shadow var(--pc-transition), transform var(--pc-transition);
}

.pc-kpi:hover {
  box-shadow: var(--pc-shadow);
  transform: translateY(-1px);
}

.pc-kpi__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--pc-radius-sm);
  flex-shrink: 0;
}

.pc-kpi__icon--primary {
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
}

.pc-kpi__icon--secondary {
  background: rgba(27, 108, 168, 0.1);
  color: var(--pc-secondary);
}

.pc-kpi__icon--accent {
  background: var(--pc-accent-soft);
  color: var(--pc-accent);
}

.pc-kpi__icon--success {
  background: var(--pc-success-soft);
  color: var(--pc-success);
}

.pc-kpi__icon--warning {
  background: var(--pc-warning-soft);
  color: var(--pc-warning);
}

.pc-kpi__content {
  flex: 1;
  min-width: 0;
}

.pc-kpi__label {
  font-size: 0.8125rem;
  color: var(--pc-muted);
  margin: 0 0 0.25rem;
}

.pc-kpi__value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pc-text);
  margin: 0;
  letter-spacing: -0.02em;
}

.pc-kpi__change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.375rem;
}

.pc-kpi__change--up {
  color: var(--pc-success);
}

.pc-kpi__change--down {
  color: var(--pc-danger);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.pc-form-group {
  margin-bottom: 1rem;
}

.pc-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pc-text-secondary);
  margin-bottom: 0.375rem;
}

.pc-input,
.pc-select,
.pc-textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--pc-font);
  font-size: 0.875rem;
  color: var(--pc-text);
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  transition: border-color var(--pc-transition), box-shadow var(--pc-transition);
}

.pc-input:focus,
.pc-select:focus,
.pc-textarea:focus {
  outline: none;
  border-color: var(--pc-secondary);
  box-shadow: 0 0 0 3px var(--pc-primary-soft);
}

.pc-input::placeholder {
  color: var(--pc-muted-light);
}

.pc-textarea {
  min-height: 100px;
  resize: vertical;
}

.pc-input-group {
  display: flex;
  align-items: stretch;
}

.pc-input-group .pc-input {
  border-radius: var(--pc-radius-sm) 0 0 var(--pc-radius-sm);
}

.pc-input-group .pc-btn {
  border-radius: 0 var(--pc-radius-sm) var(--pc-radius-sm) 0;
}

.pc-search {
  position: relative;
}

.pc-search__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-muted);
  pointer-events: none;
}

.pc-search .pc-input {
  padding-left: 2.25rem;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.pc-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
}

.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.pc-table thead {
  background: var(--pc-surface-hover);
}

.pc-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pc-muted);
  border-bottom: 1px solid var(--pc-border);
  white-space: nowrap;
}

.pc-table td {
  padding: 0.8125rem 1rem;
  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 {
  transition: background var(--pc-transition);
}

.pc-table tbody tr:hover {
  background: var(--pc-surface-hover);
}

.pc-table .pc-table__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
}

.pc-table-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--pc-muted);
}

/* ==========================================================================
   Badges & Status
   ========================================================================== */

.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  line-height: 1.4;
}

.pc-badge--primary {
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
}

.pc-badge--success {
  background: var(--pc-success-soft);
  color: var(--pc-success);
}

.pc-badge--warning {
  background: var(--pc-warning-soft);
  color: var(--pc-warning);
}

.pc-badge--danger {
  background: var(--pc-danger-soft);
  color: var(--pc-danger);
}

.pc-badge--muted {
  background: var(--pc-surface-hover);
  color: var(--pc-muted);
}

.pc-badge--accent {
  background: var(--pc-accent-soft);
  color: #92610A;
}

[data-theme="dark"] .pc-badge--accent {
  color: var(--pc-accent);
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.pc-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: var(--pc-radius-sm);
  border: 1px solid transparent;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  animation: pc-slide-up var(--pc-transition-slow) ease-out;
}

.pc-alert.is-dismissed {
  animation: pc-fade-in var(--pc-transition) reverse forwards;
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.pc-alert--success {
  background: var(--pc-success-soft);
  border-color: rgba(5, 150, 105, 0.2);
  color: var(--pc-success);
}

.pc-alert--warning {
  background: var(--pc-warning-soft);
  border-color: rgba(217, 119, 6, 0.2);
  color: var(--pc-warning);
}

.pc-alert--danger {
  background: var(--pc-danger-soft);
  border-color: rgba(220, 38, 38, 0.2);
  color: var(--pc-danger);
}

.pc-alert--info {
  background: var(--pc-info-soft);
  border-color: rgba(2, 132, 199, 0.2);
  color: var(--pc-info);
}

.pc-alert__close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
}

.pc-alert__close:hover {
  opacity: 1;
}

/* ==========================================================================
   Kanban
   ========================================================================== */

.pc-kanban {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  min-height: 400px;
}

.pc-kanban__column {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  background: var(--pc-surface-hover);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  max-height: calc(100vh - 200px);
}

.pc-kanban__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--pc-border);
}

.pc-kanban__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pc-text-secondary);
  margin: 0;
}

.pc-kanban__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pc-muted);
  background: var(--pc-surface);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--pc-border);
}

.pc-kanban__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pc-kanban__card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  padding: 0.875rem;
  cursor: grab;
  transition: box-shadow var(--pc-transition), transform var(--pc-transition);
}

.pc-kanban__card:hover {
  box-shadow: var(--pc-shadow);
  transform: translateY(-1px);
}

.pc-kanban__card-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.375rem;
  color: var(--pc-text);
}

.pc-kanban__card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-kanban__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem;
  margin: 0.375rem 0.625rem 0.625rem;
  border: 1px dashed var(--pc-border);
  border-radius: var(--pc-radius-sm);
  background: transparent;
  color: var(--pc-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color var(--pc-transition), color var(--pc-transition);
}

.pc-kanban__add:hover {
  border-color: var(--pc-secondary);
  color: var(--pc-secondary);
}

/* ==========================================================================
   Timeline (Eleitor)
   ========================================================================== */

.pc-timeline {
  position: relative;
  padding-left: 1.75rem;
}

.pc-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--pc-border);
}

.pc-timeline__item {
  position: relative;
  padding-bottom: 1.5rem;
  animation: pc-slide-up var(--pc-transition-slow) ease-out both;
}

.pc-timeline__item:last-child {
  padding-bottom: 0;
}

.pc-timeline__dot {
  position: absolute;
  left: -1.75rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pc-surface);
  border: 2px solid var(--pc-secondary);
  z-index: 1;
}

.pc-timeline__dot--primary {
  border-color: var(--pc-primary);
  background: var(--pc-primary-soft);
}

.pc-timeline__dot--accent {
  border-color: var(--pc-accent);
  background: var(--pc-accent-soft);
}

.pc-timeline__dot--success {
  border-color: var(--pc-success);
  background: var(--pc-success-soft);
}

.pc-timeline__time {
  font-size: 0.75rem;
  color: var(--pc-muted);
  margin-bottom: 0.25rem;
}

.pc-timeline__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pc-text);
  margin: 0 0 0.25rem;
}

.pc-timeline__desc {
  font-size: 0.8125rem;
  color: var(--pc-text-secondary);
  margin: 0;
}

.pc-timeline__card {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--pc-surface-hover);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  font-size: 0.8125rem;
  color: var(--pc-text-secondary);
}

/* ==========================================================================
   Login Page
   ========================================================================== */

/* ==========================================================================
   Auth / Login — split premium layout
   ========================================================================== */

.pc-auth {
  min-height: 100vh;
  margin: 0;
  background: var(--pc-bg);
  color: var(--pc-text);
  overflow-x: hidden;
}

.pc-auth__theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: var(--pc-surface);
  color: var(--pc-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--pc-shadow);
  cursor: pointer;
}

.pc-auth__shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.pc-auth__showcase {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 2.5rem;
  display: flex;
  align-items: stretch;
}

.pc-auth__showcase-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 480px at 15% 10%, rgba(232, 163, 23, 0.18), transparent 55%),
    radial-gradient(700px 420px at 90% 80%, rgba(27, 108, 168, 0.45), transparent 50%),
    linear-gradient(155deg, #061530 0%, #0B3D91 48%, #134E86 100%);
}

.pc-auth__showcase-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 30% 30%, #000 20%, transparent 75%);
}

.pc-auth__showcase-bg::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 163, 23, 0.22), transparent 68%);
  animation: pc-fade-in 1.2s ease both;
}

.pc-auth__showcase-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: pc-slide-in-left 0.55s ease both;
}

.pc-auth__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pc-auth__mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1B6CA8, #0B3D91);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.pc-auth__brand strong,
.pc-auth__mobile-brand strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pc-auth__brand small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.pc-auth__hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
  max-width: 14ch;
}

.pc-auth__hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 36ch;
}

.pc-auth__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.pc-auth__features li {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.pc-auth__feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(232, 163, 23, 0.16);
  color: #E8A317;
  flex-shrink: 0;
  line-height: 1;
  font-size: 0.8rem;
}

.pc-auth__feature-icon i {
  display: block;
  line-height: 1;
  font-size: 1.05rem;
  width: 1em;
  height: 1em;
  text-align: center;
}

.pc-auth__features strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.pc-auth__features li > div > span {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.4;
}

.pc-auth__showcase-footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.pc-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background:
    radial-gradient(700px 280px at 100% 0%, var(--pc-primary-soft), transparent 60%),
    var(--pc-bg);
}

.pc-auth__panel-inner {
  width: 100%;
  max-width: 420px;
  animation: pc-slide-up 0.5s ease both;
}

.pc-auth__mobile-brand {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--pc-text);
}

.pc-auth__card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: 20px;
  padding: 1.75rem 1.6rem;
  box-shadow: var(--pc-shadow-md);
}

.pc-auth__card-head {
  margin-bottom: 1.5rem;
}

.pc-auth__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-secondary);
}

.pc-auth__card-head h2 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pc-auth__subtitle {
  margin: 0;
  color: var(--pc-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pc-auth__form {
  display: grid;
  gap: 1rem;
}

.pc-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--pc-text-secondary);
}

.pc-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.pc-field__label-row label {
  margin: 0;
}

.pc-field__label-row a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pc-secondary);
  text-decoration: none;
}

.pc-field__label-row a:hover {
  color: var(--pc-primary);
}

.pc-field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.pc-field__control > i {
  position: absolute;
  left: 0.9rem;
  color: var(--pc-muted);
  pointer-events: none;
}

.pc-field__control input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: var(--pc-surface);
  color: var(--pc-text);
  padding: 0 2.75rem 0 2.55rem;
  font: inherit;
  transition: border-color var(--pc-transition), box-shadow var(--pc-transition), background var(--pc-transition);
}

.pc-field__control input:focus {
  outline: none;
  border-color: var(--pc-secondary);
  box-shadow: 0 0 0 4px var(--pc-primary-soft);
}

.pc-field__toggle {
  position: absolute;
  right: 0.35rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pc-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pc-field__toggle:hover {
  background: var(--pc-surface-hover);
  color: var(--pc-text);
}

.pc-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--pc-text-secondary);
  cursor: pointer;
  user-select: none;
}

.pc-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--pc-primary);
}

.pc-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 50px;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0B3D91, #1B6CA8);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(11, 61, 145, 0.28);
  cursor: pointer;
  transition: transform var(--pc-transition), box-shadow var(--pc-transition), filter var(--pc-transition);
}

.pc-auth__submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(11, 61, 145, 0.34);
}

.pc-auth__hint {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--pc-primary-soft);
  color: var(--pc-text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.pc-auth__hint i {
  color: var(--pc-primary);
  margin-top: 0.1rem;
}

.pc-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pc-secondary);
  text-decoration: none;
}

.pc-auth__back:hover {
  color: var(--pc-primary);
}

.pc-auth--no-showcase .pc-auth__shell {
  grid-template-columns: 1fr;
  justify-content: center;
}

.pc-auth--no-showcase .pc-auth__panel {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.pc-auth--hide-texts .pc-auth__showcase-content {
  justify-content: space-between;
}

.pc-auth__legal {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--pc-muted);
}

.pc-auth__flash {
  margin-bottom: 1rem;
}

[data-theme="dark"] .pc-auth__showcase-bg {
  background:
    radial-gradient(900px 480px at 15% 10%, rgba(224, 176, 58, 0.12), transparent 55%),
    radial-gradient(700px 420px at 90% 80%, rgba(91, 159, 232, 0.18), transparent 50%),
    linear-gradient(155deg, #050a14 0%, #0B1220 50%, #142033 100%);
}

[data-theme="dark"] .pc-auth__submit {
  background: linear-gradient(135deg, #1B6CA8, #5B9FE8);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 991.98px) {
  .pc-auth__shell {
    grid-template-columns: 1fr;
  }

  .pc-auth__showcase {
    display: none;
  }

  .pc-auth__mobile-brand {
    display: flex;
  }

  .pc-auth__panel {
    min-height: 100vh;
    padding-top: 4rem;
  }

  .pc-auth__card {
    padding: 1.4rem 1.2rem;
  }
}

.pc-login {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(145deg, #0B3D91 0%, #1B6CA8 45%, #0E4A7A 100%);
  position: relative;
  overflow: hidden;
}

.pc-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(232, 163, 23, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.pc-login::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.pc-login__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.pc-login__brand {
  margin-bottom: 2rem;
  text-align: center;
}

.pc-login__brand img {
  height: 48px;
  margin: 0 auto 1rem;
  filter: brightness(0) invert(1);
}

.pc-login__brand h1 {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.pc-login__brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  margin: 0;
}

.pc-login__card {
  width: 100%;
  max-width: 420px;
  background: var(--pc-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--pc-radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: pc-slide-up 400ms ease-out;
}

.pc-login__card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.375rem;
}

.pc-login__card .pc-login__subtitle {
  color: var(--pc-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.pc-login__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.pc-login__aside {
  display: none;
  flex: 1;
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .pc-login__aside {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
  }

  .pc-login__aside-content {
    max-width: 400px;
    color: rgba(255, 255, 255, 0.85);
  }

  .pc-login__aside-content h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .pc-login__aside-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
  }

  .pc-login__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .pc-login__feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--pc-radius-sm);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--pc-accent);
  }
}

/* ==========================================================================
   Avatar
   ========================================================================== */

.pc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pc-border);
}

.pc-avatar--sm {
  width: 28px;
  height: 28px;
}

.pc-avatar--lg {
  width: 48px;
  height: 48px;
}

.pc-avatar-group {
  display: flex;
  align-items: center;
}

.pc-avatar-group .pc-avatar {
  margin-left: -8px;
  border-color: var(--pc-surface);
}

.pc-avatar-group .pc-avatar:first-child {
  margin-left: 0;
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */

.pc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-sm);
  background: var(--pc-surface);
  color: var(--pc-text-secondary);
  cursor: pointer;
  transition: background var(--pc-transition), color var(--pc-transition);
}

.pc-theme-toggle:hover {
  background: var(--pc-surface-hover);
  color: var(--pc-text);
}

.pc-theme-toggle .icon-sun,
.pc-theme-toggle .icon-moon {
  width: 18px;
  height: 18px;
}

[data-theme="light"] .pc-theme-toggle .icon-moon,
:root:not([data-theme]) .pc-theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .pc-theme-toggle .icon-sun {
  display: none;
}

/* ==========================================================================
   Dropdown & User Menu
   ========================================================================== */

.pc-user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border-radius: var(--pc-radius-sm);
  cursor: pointer;
  transition: background var(--pc-transition);
}

.pc-user-menu:hover {
  background: var(--pc-surface-hover);
}

.pc-user-menu__name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pc-text);
}

.pc-user-menu__role {
  font-size: 0.6875rem;
  color: var(--pc-muted);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.pc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pc-page-header__info h1 {
  margin-bottom: 0.25rem;
}

.pc-page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--pc-muted);
  margin-bottom: 0.5rem;
}

.pc-page-header__breadcrumb a {
  color: var(--pc-muted);
}

.pc-page-header__breadcrumb a:hover {
  color: var(--pc-secondary);
}

.pc-page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Grid & Layout Utilities
   ========================================================================== */

.pc-grid {
  display: grid;
  gap: 1rem;
}

.pc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pc-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 991.98px) {
  .pc-grid-3,
  .pc-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .pc-grid-2,
  .pc-grid-3,
  .pc-grid-4 {
    grid-template-columns: 1fr;
  }
}

.pc-flex { display: flex; }
.pc-flex-col { flex-direction: column; }
.pc-items-center { align-items: center; }
.pc-justify-between { justify-content: space-between; }
.pc-gap-1 { gap: 0.25rem; }
.pc-gap-2 { gap: 0.5rem; }
.pc-gap-3 { gap: 0.75rem; }
.pc-gap-4 { gap: 1rem; }

.pc-mt-1 { margin-top: 0.25rem; }
.pc-mt-2 { margin-top: 0.5rem; }
.pc-mt-3 { margin-top: 0.75rem; }
.pc-mt-4 { margin-top: 1rem; }
.pc-mb-0 { margin-bottom: 0; }
.pc-mb-2 { margin-bottom: 0.5rem; }
.pc-mb-3 { margin-bottom: 0.75rem; }
.pc-mb-4 { margin-bottom: 1rem; }

.pc-text-muted { color: var(--pc-muted); }
.pc-text-sm { font-size: 0.8125rem; }
.pc-text-center { text-align: center; }
.pc-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-divider {
  height: 1px;
  background: var(--pc-border);
  margin: 1rem 0;
  border: none;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.pc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.pc-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--pc-radius);
  background: var(--pc-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pc-muted);
  margin-bottom: 1rem;
}

.pc-empty__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.pc-empty__desc {
  font-size: 0.875rem;
  color: var(--pc-muted);
  max-width: 320px;
}

/* ==========================================================================
   Modal overrides (Bootstrap compat)
   ========================================================================== */

.modal-content {
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
  box-shadow: var(--pc-shadow-md);
}

.modal-header {
  border-bottom-color: var(--pc-border);
  padding: 1rem 1.25rem;
}

.modal-footer {
  border-top-color: var(--pc-border);
  padding: 0.875rem 1.25rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

.pc-sidebar__nav::-webkit-scrollbar,
.pc-kanban__body::-webkit-scrollbar {
  width: 4px;
}

.pc-sidebar__nav::-webkit-scrollbar-thumb,
.pc-kanban__body::-webkit-scrollbar-thumb {
  background: var(--pc-border-strong);
  border-radius: 4px;
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .pc-sidebar,
  .pc-topbar,
  .pc-sidebar-toggle,
  .pc-theme-toggle {
    display: none !important;
  }

  .pc-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .pc-content {
    padding: 0;
  }
}

/* ==========================================================================
   Bootstrap theme bridge (light + dark)
   ========================================================================== */

.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.offcanvas {
  background-color: var(--pc-surface) !important;
  color: var(--pc-text) !important;
  border-color: var(--pc-border) !important;
}

.card-header,
.card-footer,
.modal-header,
.modal-footer,
.list-group-item {
  background-color: var(--pc-surface) !important;
  border-color: var(--pc-border) !important;
  color: var(--pc-text) !important;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--pc-text);
  --bs-table-border-color: var(--pc-border);
  --bs-table-striped-bg: var(--pc-surface-hover);
  --bs-table-hover-bg: var(--pc-surface-hover);
  color: var(--pc-text);
}

.form-control,
.form-select,
.input-group-text {
  background-color: var(--pc-surface) !important;
  color: var(--pc-text) !important;
  border-color: var(--pc-border) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--pc-secondary) !important;
  box-shadow: 0 0 0 0.2rem var(--pc-primary-soft) !important;
}

.form-control::placeholder {
  color: var(--pc-muted) !important;
}

.text-muted {
  color: var(--pc-muted) !important;
}

.btn-primary {
  --bs-btn-bg: var(--pc-primary);
  --bs-btn-border-color: var(--pc-primary);
  --bs-btn-hover-bg: var(--pc-primary-hover);
  --bs-btn-hover-border-color: var(--pc-primary-hover);
  --bs-btn-active-bg: var(--pc-primary-hover);
  --bs-btn-active-border-color: var(--pc-primary-hover);
}

.btn-outline-secondary {
  --bs-btn-color: var(--pc-text-secondary);
  --bs-btn-border-color: var(--pc-border);
  --bs-btn-hover-bg: var(--pc-surface-hover);
  --bs-btn-hover-border-color: var(--pc-border-strong);
  --bs-btn-hover-color: var(--pc-text);
}

.btn-light {
  --bs-btn-bg: var(--pc-surface-hover);
  --bs-btn-border-color: var(--pc-border);
  --bs-btn-color: var(--pc-text);
  --bs-btn-hover-bg: var(--pc-surface-raised);
  --bs-btn-hover-border-color: var(--pc-border-strong);
  --bs-btn-hover-color: var(--pc-text);
}

.dropdown-item {
  color: var(--pc-text) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--pc-surface-hover) !important;
  color: var(--pc-text) !important;
}

.dropdown-divider {
  border-color: var(--pc-border) !important;
}

.alert {
  border: 1px solid transparent;
}

.bg-primary-subtle { background: var(--pc-primary-soft) !important; }
.bg-info-subtle { background: var(--pc-info-soft) !important; }
.bg-warning-subtle { background: var(--pc-warning-soft) !important; }
.bg-success-subtle { background: var(--pc-success-soft) !important; }
.bg-danger-subtle { background: var(--pc-danger-soft) !important; }
.text-primary { color: var(--pc-primary) !important; }
.text-info { color: var(--pc-info) !important; }
.text-warning { color: var(--pc-warning) !important; }
.text-success { color: var(--pc-success) !important; }
.text-danger { color: var(--pc-danger) !important; }

/* Dashboard */
.pc-dash-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  border-radius: var(--pc-radius-lg);
  background:
    radial-gradient(1200px 180px at 0% 0%, rgba(27, 108, 168, 0.18), transparent 55%),
    linear-gradient(135deg, var(--pc-surface) 0%, color-mix(in srgb, var(--pc-primary-soft) 65%, var(--pc-surface)) 100%);
  border: 1px solid var(--pc-border);
}

.pc-dash-hero h2 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pc-dash-hero p {
  margin: 0;
  color: var(--pc-muted);
}

.pc-stat-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  height: 100%;
}

.pc-stat-chip__label {
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-stat-chip__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pc-text);
  line-height: 1.2;
}

.pc-dash-panel {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow-sm);
  height: 100%;
  overflow: hidden;
}

.pc-dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.35rem;
}

.pc-dash-panel__head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.pc-dash-panel__body {
  padding: 0.75rem 1.15rem 1.15rem;
}

.pc-dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--pc-border);
}

.pc-dash-list li:last-child {
  border-bottom: 0;
}

.pc-alert-soft {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--pc-radius-sm);
  margin-bottom: 0.55rem;
  font-size: 0.875rem;
}

.pc-alert-soft--warn {
  background: var(--pc-warning-soft);
  color: var(--pc-warning);
}

.pc-alert-soft--info {
  background: var(--pc-info-soft);
  color: var(--pc-info);
}

.pc-alert-soft--ok {
  background: var(--pc-success-soft);
  color: var(--pc-success);
}

.pc-class-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--pc-surface-hover);
  border: 1px solid var(--pc-border);
  font-size: 0.75rem;
  color: var(--pc-text-secondary);
}

[data-theme="dark"] .shadow-sm,
[data-theme="dark"] .card.shadow-sm {
  box-shadow: var(--pc-shadow-sm) !important;
}

[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-info {
  border-width: 1px;
}

[data-theme="dark"] .alert-success {
  background-color: rgba(45, 212, 191, 0.12) !important;
  color: #99F6E4 !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}

[data-theme="dark"] .alert-danger {
  background-color: rgba(248, 113, 113, 0.12) !important;
  color: #FECACA !important;
  border-color: rgba(248, 113, 113, 0.35) !important;
}

[data-theme="dark"] .alert-warning {
  background-color: rgba(251, 191, 36, 0.12) !important;
  color: #FDE68A !important;
  border-color: rgba(251, 191, 36, 0.35) !important;
}

[data-theme="dark"] .alert-info {
  background-color: rgba(56, 189, 248, 0.12) !important;
  color: #BAE6FD !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
}

/* Mais contraste nos cards do dark */
[data-theme="dark"] .pc-kpi,
[data-theme="dark"] .pc-stat-chip,
[data-theme="dark"] .pc-dash-panel,
[data-theme="dark"] .pc-dash-hero {
  background: #1A2438;
  border-color: #31405A;
}

[data-theme="dark"] {
  --pc-surface: #1A2438;
  --pc-surface-raised: #223049;
  --pc-surface-hover: #2A3A55;
  --pc-bg: #0A101C;
}

/* ==========================================================================
   Super Admin — Platform console
   ========================================================================== */

.sa-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pc-font);
  color: var(--pc-text);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(27, 108, 168, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(201, 146, 15, 0.08), transparent 50%),
    linear-gradient(180deg, #E8EEF6 0%, #F3F6FA 40%, #EEF2F7 100%);
}

.sa-shell {
  display: flex;
  min-height: 100vh;
}

.sa-side {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(520px 280px at 10% -10%, rgba(27, 108, 168, 0.35), transparent 60%),
    linear-gradient(175deg, #071833 0%, #0B274F 48%, #0A1F3D 100%);
  padding: 1.35rem 1rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  animation: saSideIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes saSideIn {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.sa-side__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.55rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.sa-side__mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(201, 146, 15, 0.95), rgba(232, 163, 23, 0.7));
  color: #0B1A33;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.sa-side__brand strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sa-side__brand small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.sa-side__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow: auto;
}

.sa-side__label {
  margin: 0.85rem 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.sa-side__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--pc-transition), color var(--pc-transition), transform var(--pc-transition);
}

.sa-side__link i:first-child {
  width: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.sa-side__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sa-side__link.is-active {
  background: rgba(232, 163, 23, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0.28);
}

.sa-side__ext {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.45;
}

.sa-side__foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.85rem 0.55rem 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sa-side__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.sa-side__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sa-side__user strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa-side__user small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
}

.sa-side__logout {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background var(--pc-transition);
}

.sa-side__logout:hover {
  background: rgba(185, 28, 28, 0.45);
}

.sa-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sa-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem 0.85rem;
  animation: saFadeUp 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sa-top__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sa-top__menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-surface);
  color: var(--pc-text);
  cursor: pointer;
}

.sa-top__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-muted);
}

.sa-top__title {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pc-text);
}

.sa-top__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 61, 145, 0.08);
  color: var(--pc-primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.sa-content {
  padding: 0.5rem 1.5rem 2rem;
}

.sa-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(90deg, #FFF7E0, #FEF3C7);
  border-bottom: 1px solid #F0D27A;
  color: #7A4E05;
  position: relative;
  z-index: 50;
}

.sa-assist__text {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.sa-assist__text i {
  font-size: 1.15rem;
  margin-top: 0.1rem;
}

.sa-assist__text strong {
  display: block;
  font-size: 0.88rem;
}

.sa-assist__text span {
  font-size: 0.82rem;
  opacity: 0.9;
}

.sa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 28, 0.45);
  z-index: 35;
}

.sa-reveal {
  animation: saFadeUp 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--sa-delay, 0s);
}

@keyframes saFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sa-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--pc-radius-lg);
  background:
    linear-gradient(135deg, rgba(11, 61, 145, 0.94), rgba(27, 108, 168, 0.88)),
    radial-gradient(500px 220px at 90% 10%, rgba(232, 163, 23, 0.28), transparent 60%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(11, 61, 145, 0.22);
}

.sa-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.sa-hero__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.sa-hero__text {
  margin: 0.4rem 0 0;
  max-width: 42rem;
  font-size: 0.92rem;
  opacity: 0.88;
  line-height: 1.45;
}

.sa-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.sa-kpi {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--pc-radius);
  background: var(--pc-surface);
  border: 1px solid rgba(220, 227, 237, 0.9);
  box-shadow: var(--pc-shadow-sm);
  transition: transform var(--pc-transition), box-shadow var(--pc-transition);
}

.sa-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--pc-shadow-md);
}

.sa-kpi__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sa-kpi__icon--success { background: var(--pc-success-soft); color: var(--pc-success); }
.sa-kpi__icon--info { background: var(--pc-info-soft); color: var(--pc-info); }
.sa-kpi__icon--accent { background: var(--pc-accent-soft); color: var(--pc-accent); }

.sa-kpi__label {
  display: block;
  font-size: 0.75rem;
  color: var(--pc-muted);
  font-weight: 600;
}

.sa-kpi__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 0.1rem;
}

.sa-panel {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-lg);
  box-shadow: var(--pc-shadow-sm);
  overflow: hidden;
}

.sa-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--pc-border);
  background: linear-gradient(180deg, #FAFBFD, #F7F9FC);
}

.sa-panel__count {
  font-size: 0.8rem;
  color: var(--pc-muted);
  font-weight: 600;
}

.sa-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.sa-search {
  position: relative;
  min-width: min(260px, 100%);
}

.sa-search i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-muted);
  font-size: 0.9rem;
}

.sa-search input,
.sa-field input,
.sa-field textarea,
.sa-field select,
.sa-select,
.sa-file {
  width: 100%;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: #fff;
  color: var(--pc-text);
  font: inherit;
  padding: 0.58rem 0.8rem;
  transition: border-color var(--pc-transition), box-shadow var(--pc-transition);
}

.sa-search input {
  padding-left: 2.15rem;
}

.sa-search input:focus,
.sa-field input:focus,
.sa-field textarea:focus,
.sa-field select:focus,
.sa-select:focus,
.sa-file:focus {
  outline: none;
  border-color: rgba(11, 61, 145, 0.45);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.sa-select {
  width: auto;
  min-width: 150px;
}

.sa-table-wrap {
  overflow-x: auto;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sa-table th {
  text-align: left;
  padding: 0.75rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pc-muted);
  background: #F8FAFC;
  border-bottom: 1px solid var(--pc-border);
  white-space: nowrap;
}

.sa-table td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid #EEF2F7;
  vertical-align: middle;
}

.sa-table tbody tr {
  transition: background var(--pc-transition);
}

.sa-table tbody tr:hover {
  background: #F7FAFD;
}

.sa-table tbody tr:last-child td {
  border-bottom: 0;
}

.sa-camp {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.sa-camp__avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--sa-color, #0B3D91) 16%, white);
  color: var(--sa-color, #0B3D91);
  font-weight: 750;
  flex-shrink: 0;
}

.sa-camp strong {
  display: block;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.sa-camp span {
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.sa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--pc-secondary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.86rem;
}

.sa-link:hover { color: var(--pc-primary); }

.sa-muted {
  color: var(--pc-muted);
  font-size: 0.82rem;
}

.sa-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-right: 0.25rem;
}

.sa-badge--success { background: var(--pc-success-soft); color: var(--pc-success); }
.sa-badge--info { background: var(--pc-info-soft); color: var(--pc-info); }
.sa-badge--warning { background: var(--pc-warning-soft); color: var(--pc-warning); }
.sa-badge--muted { background: #EEF2F7; color: #64748B; }
.sa-badge--soft { background: var(--pc-primary-soft); color: var(--pc-primary); }

.sa-usage {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--pc-text-secondary);
  font-weight: 600;
}

.sa-usage i { color: var(--pc-muted); margin-right: 0.25rem; }

.sa-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--pc-transition), background var(--pc-transition), box-shadow var(--pc-transition), color var(--pc-transition);
  white-space: nowrap;
}

.sa-btn:hover { transform: translateY(-1px); }

.sa-btn--sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}

.sa-btn--primary {
  background: linear-gradient(135deg, #0B3D91, #1B6CA8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 61, 145, 0.25);
}

.sa-btn--primary:hover { color: #fff; box-shadow: 0 10px 22px rgba(11, 61, 145, 0.32); }

.sa-btn--assist {
  background: linear-gradient(135deg, #C9920F, #E0AD3A);
  color: #1A1200;
  box-shadow: 0 6px 14px rgba(201, 146, 15, 0.28);
}

.sa-btn--assist:hover { color: #1A1200; }

.sa-btn--ghost {
  background: #fff;
  color: var(--pc-text-secondary);
  border: 1px solid var(--pc-border);
}

.sa-btn--ghost:hover { background: var(--pc-surface-hover); color: var(--pc-text); }

.sa-btn--dark {
  background: #1A1200;
  color: #fff;
}

.sa-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--pc-border);
  background: #fff;
  color: var(--pc-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--pc-transition), color var(--pc-transition), border-color var(--pc-transition);
}

.sa-icon-btn:hover {
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
  border-color: rgba(11, 61, 145, 0.25);
}

.sa-icon-btn--danger:hover {
  background: var(--pc-danger-soft);
  color: var(--pc-danger);
  border-color: rgba(185, 28, 28, 0.25);
}

.sa-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.sa-empty__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
  font-size: 1.4rem;
}

.sa-empty h3 {
  margin: 0;
  font-size: 1.1rem;
}

.sa-empty p {
  margin: 0.4rem 0 1.1rem;
  color: var(--pc-muted);
}

.sa-pagehead {
  margin-bottom: 1.15rem;
}

.sa-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  color: var(--pc-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.sa-back:hover { color: var(--pc-primary); }

.sa-pagehead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
}

.sa-pagehead__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.sa-pagehead__text {
  margin: 0.3rem 0 0;
  color: var(--pc-muted);
  font-size: 0.92rem;
}

.sa-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sa-section {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius-lg);
  overflow: hidden;
  box-shadow: var(--pc-shadow-sm);
}

.sa-section__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--pc-border);
  background: linear-gradient(180deg, #FAFBFD, #F6F8FB);
}

.sa-section__num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pc-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
  flex-shrink: 0;
}

.sa-section__head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.sa-section__head p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.sa-section__body {
  padding: 1.15rem 1.2rem 1.25rem;
}

.sa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

.sa-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sa-field--wide { grid-column: 1 / -1; }

.sa-field label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--pc-text-secondary);
}

.sa-field textarea { resize: vertical; min-height: 90px; }

.sa-input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.sa-input-prefix span {
  display: grid;
  place-items: center;
  padding: 0 0.75rem;
  background: #F5F7FB;
  color: var(--pc-muted);
  font-size: 0.85rem;
  font-weight: 650;
  border-right: 1px solid var(--pc-border);
}

.sa-input-prefix input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.sa-color {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sa-color input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 0.2rem;
  cursor: pointer;
}

.sa-color span {
  font-size: 0.8rem;
  color: var(--pc-muted);
}

.sa-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #F8FAFC;
}

.sa-switch input { position: absolute; opacity: 0; pointer-events: none; }

.sa-switch__ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: background var(--pc-transition);
}

.sa-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--pc-transition);
}

.sa-switch input:checked + .sa-switch__ui {
  background: var(--pc-primary);
}

.sa-switch input:checked + .sa-switch__ui::after {
  transform: translateX(18px);
}

.sa-switch__text strong {
  display: block;
  font-size: 0.9rem;
}

.sa-switch__text small {
  color: var(--pc-muted);
  font-size: 0.78rem;
}

.sa-form__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 0.25rem 0 0.5rem;
}

.sa-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
}

.sa-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sa-option {
  cursor: pointer;
}

.sa-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sa-option__box {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #F8FAFC;
  transition: border-color var(--pc-transition), background var(--pc-transition), box-shadow var(--pc-transition);
}

.sa-option__box i {
  grid-row: 1 / span 2;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pc-primary-soft);
  color: var(--pc-primary);
}

.sa-option__box strong {
  font-size: 0.88rem;
}

.sa-option__box small {
  color: var(--pc-muted);
  font-size: 0.78rem;
}

.sa-option input:checked + .sa-option__box {
  border-color: rgba(11, 61, 145, 0.35);
  background: rgba(11, 61, 145, 0.05);
  box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.08);
}

.sa-preview-bg {
  position: relative;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  margin-top: 0.75rem;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 650;
}

.sa-preview-bg__overlay {
  position: absolute;
  inset: 0;
  background: #081C44;
  pointer-events: none;
}

.sa-preview-bg span {
  position: relative;
  z-index: 1;
}

.sa-help {
  margin: 0.25rem 0 0;
  font-size: 0.76rem;
  color: var(--pc-muted);
}

.sa-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--pc-text-secondary);
  cursor: pointer;
}

.sa-range {
  width: 100%;
  accent-color: var(--pc-primary);
}

.sa-alert {
  border-radius: 12px;
  border: 0;
}

.sa-flash { margin-bottom: 0.85rem; }

@media (max-width: 1100px) {
  .sa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sa-side {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    animation: none;
  }
  .sa-side.is-open { transform: translateX(0); }
  .sa-top__menu { display: inline-grid; place-items: center; }
  .sa-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sa-kpis { grid-template-columns: 1fr; }
  .sa-content { padding: 0.35rem 1rem 1.5rem; }
  .sa-top { padding: 1rem 1rem 0.5rem; }
  .sa-hero { padding: 1.1rem; }
  .sa-actions { flex-wrap: wrap; justify-content: flex-start; }
}
