/* =========================================================
   PAB 2026 — REVAMP VISUAL BASEADO NO SISTEMA GVA 26
   Identidade tática institucional, responsiva, tema claro GVA + modo escuro
   ========================================================= */

:root {
  color-scheme: light;
  --ink: #14201d;
  --text: #14201d;
  --muted: #66736e;
  --paper: #f3f5f2;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel2: #f7f9f7;
  --panel3: #edf2ee;
  --line: #dbe1dc;
  --command: #163827;
  --command-2: #1b402e;
  --olive: #163827;
  --olive2: #2f7a66;
  --cyan: #4ea387;
  --gold: #b48312;
  --gold-accent: #f59e0b;
  --signal: #b48312;
  --amber: #b48312;
  --danger: #b93434;
  --red: #b93434;
  --danger-soft: #fff0ee;
  --blue: #2f7a66;
  --shadow: 0 12px 34px rgba(18, 61, 51, 0.08);
  --shadow-lg: 0 22px 60px rgba(18, 61, 51, 0.14);
  --radius: 18px;
  --radius-sm: 11px;
  --font: Arial, Helvetica, sans-serif;
  --mono: Arial, Helvetica, sans-serif;
  --display: Arial, Helvetica, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf2ee;
  --text: #ecf2ee;
  --muted: #9baba3;
  --paper: #091810;
  --bg: #091810;
  --surface: #12291d;
  --panel: #12291d;
  --panel2: #193627;
  --panel3: #204533;
  --line: #1b402e;
  --command: #1b402e;
  --command-2: #2a573f;
  --command-text: #4ea387;
  --olive: #2a573f;
  --olive2: #4ea387;
  --cyan: #4ea387;
  --gold: #b48312;
  --gold-accent: #f59e0b;
  --signal: #f59e0b;
  --amber: #f59e0b;
  --danger: #dc5b55;
  --red: #dc5b55;
  --danger-soft: #311c1c;
  --blue: #2f7a66;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.pab-app [hidden], .hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--olive2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =========================================================
   TELA DE LOGIN PAB — ESTILO GVA LOGIN-CLEAN
   ========================================================= */
.login-clean {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(18, 61, 51, 0.08), transparent 55%), #eef1ed;
}

html[data-theme="dark"] .login-clean {
  background: radial-gradient(circle at 50% 0%, rgba(47, 122, 102, 0.16), transparent 55%), var(--bg);
}

.login-clean-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}

.login-clean-box {
  width: min(100%, 415px);
}

.back-to-hub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(18, 61, 51, 0.05);
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.back-to-hub:hover {
  color: var(--olive);
  border-color: var(--olive2);
  transform: translateX(-2px);
}

.login-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  text-align: center;
}

.login-bda-logo {
  width: 156px;
  height: 156px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
  filter: drop-shadow(0 8px 18px rgba(18, 61, 51, 0.14));
}

.login-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--olive2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-title-block h1 {
  margin: 0;
  color: var(--command);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

html[data-theme="dark"] .login-title-block h1 {
  color: var(--text);
}

.login-title-block h1 b {
  color: #9a792d;
  font-size: 0.48em;
  letter-spacing: 0.12em;
  vertical-align: top;
  margin-left: 4px;
}

.login-subtitle {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.login-developer {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.login-clean-form {
  display: grid;
  gap: 15px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(18, 61, 51, 0.09);
}

.login-notice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #eaf2ee;
  border: 1px solid #c5d9cf;
  border-left: 4px solid var(--command);
  font-size: 11px;
  color: #244238;
}

html[data-theme="dark"] .login-notice {
  background: #1f3129;
  border-color: #355446;
  color: #cfe0d7;
}

.login-notice strong {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--command);
}

html[data-theme="dark"] .login-notice strong {
  color: var(--olive2);
}

.control,
.field input,
.field select,
.field textarea,
.filter-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd7d1;
  background: var(--surface);
  border-radius: 11px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] .control,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .filter-input {
  border-color: var(--line);
  background: var(--panel2);
}

.control:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-input:focus {
  border-color: var(--command-2);
  box-shadow: 0 0 0 3px rgba(29, 87, 72, 0.15);
}

.btn,
.primary-btn,
.secondary-btn,
.pab-continue {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary,
.primary-btn,
.pab-continue {
  background: var(--command);
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(18, 61, 51, 0.2);
}

.btn-primary:hover,
.primary-btn:hover,
.pab-continue:hover {
  background: var(--command-2);
  transform: translateY(-1px);
}

.btn-primary:disabled,
.primary-btn:disabled,
.pab-continue:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary,
.secondary-btn {
  background: #e3e9e5;
  color: var(--command);
  border: 1px solid #ced8d2;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .secondary-btn {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--line);
}

.btn-secondary:hover,
.secondary-btn:hover {
  background: #d6e0da;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .secondary-btn:hover {
  background: var(--panel3);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.pab-access-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.pab-access-note.is-error {
  color: var(--danger);
  font-weight: 700;
}

/* =========================================================
   ESTRUTURA DO SISTEMA PAB — BARRA SUPERIOR E SIDEBAR GVA
   ========================================================= */
.app-topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 4px 18px rgba(18, 61, 51, 0.05);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.app-brand strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text);
}

.app-brand small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-chip,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c4d6cd;
  background: #eaf2ee;
  color: var(--command);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[data-theme="dark"] .live-chip,
html[data-theme="dark"] .chip {
  background: #21352c;
  border-color: #365849;
  color: #bfe0d1;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a06b;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.2);
}

.user-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.ghost-btn,
.icon-btn {
  min-height: 40px;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ghost-btn:hover,
.icon-btn:hover {
  border-color: var(--olive2);
  color: var(--olive);
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  background: #123d33;
  color: #ffffff;
  border-right: 1px solid #1d5748;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow-y: hidden;
}

.pab-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.pab-sidebar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.pab-sidebar-brand strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.pab-sidebar-brand small,
.pab-sidebar-user small {
  display: block;
  color: #adc1b9;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  margin-top: 2px;
  text-transform: uppercase;
}

.side-label {
  color: #9cb6ac;
  padding: 6px 10px 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #c4d6cf;
  text-align: left;
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-btn .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: #9dc0b3;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.nav-btn.active {
  background: #235044;
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 4px 0 0 var(--signal);
}

.nav-btn.active .nav-icon {
  color: #e6c66d;
}

.side-note {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
}

.sidebar-footer .developer-credit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.sidebar-footer .developer-credit small {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #e6c66d;
}

/* =========================================================
   ÁREA PRINCIPAL, CARDS E COMPONENTES GVA
   ========================================================= */
.main-content {
  min-width: 0;
  padding: 32px clamp(18px, 3vw, 42px) 60px;
  max-width: 1580px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
  color: var(--text);
  text-transform: uppercase;
}

.page-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.head-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card,
.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 20px 22px;
  min-height: 128px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card:first-child {
  background: var(--command);
  color: #ffffff;
  border-color: var(--command);
}

.metric-card:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--signal);
}

.metric-card:first-child .metric-label,
.metric-card:first-child .metric-foot {
  color: #c2d6ce;
}

.metric-card:first-child .metric-value {
  color: #ffffff;
}

.metric-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.metric-value {
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 800;
  line-height: 1;
  margin: 12px 0 8px;
  color: var(--text);
}

.metric-foot {
  font-size: 12px;
  color: var(--muted);
}

.panel {
  padding: 22px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.panel-head span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.32fr);
  gap: 18px;
  align-items: start;
}

.form-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.row-title {
  font-size: 15px;
  font-weight: 700;
}

.row-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}

.state-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 99px;
  background: #e5f1ec;
  border: 1px solid #bdd8cc;
  color: var(--command);
  white-space: nowrap;
}

html[data-theme="dark"] .state-pill,
html[data-theme="dark"] .tag {
  background: #21382f;
  border-color: #365c4d;
  color: #bbe0d1;
}

.state-pill.warn,
.tag.warn {
  background: #fef5e3;
  border-color: #ebd096;
  color: #825b12;
}

html[data-theme="dark"] .state-pill.warn,
html[data-theme="dark"] .tag.warn {
  background: #382d18;
  border-color: #6b5326;
  color: #efd08d;
}

.state-pill.danger,
.tag.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.empty-state {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Switch Estilo GVA */
.switch {
  position: relative;
  width: 47px;
  height: 27px;
  flex: none;
  display: inline-block;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #cbd3cd;
  transition: 0.2s;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background: var(--danger);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* Tabelas */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  min-width: 560px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
  white-space: nowrap;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: top;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: var(--panel2);
}

td small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
  line-height: 1.45;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--olive2);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
}

.text-btn:hover {
  background: var(--panel3);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.filter-input {
  width: auto;
  min-width: 160px;
  min-height: 44px;
  font-size: 13.5px;
}

.view-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.view-btn {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
}

.view-btn.active {
  background: var(--command);
  border-color: var(--command);
  color: #ffffff;
}

/* Theme switch */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.theme-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.theme-switch i {
  width: 38px;
  height: 21px;
  position: relative;
  border-radius: 99px;
  background: #cbd5ce;
  transition: 0.2s;
}

.theme-switch i::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: 0.2s;
}

.theme-switch input:checked + i {
  background: var(--olive);
}

.theme-switch input:checked + i::after {
  transform: translateX(17px);
}

/* Modais e Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 20, 0.62);
  backdrop-filter: blur(3px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1), visibility 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  width: min(100%, 660px);
  max-height: 92vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform, opacity;
}

.modal-backdrop.open .modal {
  transform: scale(1);
  opacity: 1;
}

.modal.modal-wide {
  width: min(100%, 1120px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #142b23;
  border: 1px solid #2b5c4b;
  color: #ffffff;
  padding: 13px 18px;
  border-radius: 12px;
  z-index: 10010;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.28);
  display: none;
  max-width: min(90vw, 420px);
}

.toast.show {
  display: block;
}

/* Sumários & Detalhes */
.pab-summary-placeholder {
  min-height: 300px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.pab-summary-mark {
  font-size: 38px;
  color: var(--olive);
}

.pab-summary-placeholder h2 {
  margin: 0;
  font-size: 25px;
}

.pab-summary-placeholder p {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pab-user-edit {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  transition: border-color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

details.pab-user-edit summary {
  cursor: pointer;
  color: var(--olive2);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: color 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

details.pab-user-edit summary::-webkit-details-marker {
  display: none;
}

details.pab-user-edit summary::after {
  content: '▾';
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
  flex-shrink: 0;
}

details.pab-user-edit[open] summary::after {
  transform: rotate(-180deg);
}

details.pab-user-edit[open] > *:not(summary) {
  animation: pabDetailsEnter 200ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes pabDetailsEnter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal,
  details.pab-user-edit[open] > *:not(summary),
  details.pab-user-edit summary::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    transform: none !important;
  }
}

.pab-user-edit .form-grid {
  margin-top: 12px;
}

/* Mobile Nav Estilo GVA */
.mobile-nav {
  display: none;
}

@media (max-width: 1080px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 62px;
    height: auto;
    z-index: 22;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 6px;
  }
  .pab-sidebar-brand,
  .side-note,
  .sidebar-footer,
  .pab-sidebar-user,
  .sidebar .side-label {
    display: none;
  }
  .sidebar .nav-btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 12px;
  }
  .main-content {
    padding: 22px 16px 90px;
  }
  .mobile-nav {
    position: fixed;
    z-index: 25;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav-btn {
    flex: 1;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
  }
  .mobile-nav-btn span {
    font-size: 16px;
  }
  .mobile-nav-btn.active {
    color: var(--command);
  }
  html[data-theme="dark"] .mobile-nav-btn.active {
    color: var(--olive2);
  }
}

@media (max-width: 680px) {
  .app-topbar {
    height: 62px;
    padding: 0 14px;
  }
  .user-label,
  .live-chip {
    display: none;
  }
  .page-head {
    flex-direction: column;
    gap: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-card:first-child {
    grid-column: 1 / -1;
  }
}
