:root {
  /* Fundo claro: branco levemente azulado (evita “cinza velho” do bege acinzentado). */
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --input-bg: #f8fafc;
  /* Cores da marca (logo PagueDb) */
  --brand-blue: #0033ad;
  --brand-green: #00c875;
  --primary: var(--brand-blue);
  --primary-hover: #002892;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --card-inner: rgba(30, 90, 168, 0.045);
}

[data-theme="dark"] {
  --bg: #0c1018;
  --surface: #111827;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --line: #1e293b;
  --input-bg: #0f1623;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --card-inner: rgba(59, 130, 246, 0.08);
}

[data-theme="dark"] .nav-user-card {
  background: var(--input-bg);
  border-color: var(--line);
}

[data-theme="dark"] .nav-user-avatar {
  background: #111827;
  border-color: var(--line);
}

[data-theme="dark"] dialog.dlg::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
}

html {
  background-color: var(--bg);
}

body {
  background-color: transparent;
  background-image:
    radial-gradient(ellipse 120% 70% at 85% -15%, rgba(30, 90, 168, 0.09), transparent 52%),
    radial-gradient(ellipse 100% 55% at 0% 105%, rgba(30, 90, 168, 0.055), transparent 50%);
  background-attachment: fixed;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-brand img {
  height: 36px;
  width: auto;
  display: block;
}

.app-brand-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.app-brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: var(--text);
}

.icon-btn:hover {
  background: var(--input-bg);
}

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 3rem;
  min-height: calc(100vh - 56px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2rem 1.75rem;
}

.login-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.login-card-logo img {
  height: 48px;
}

.login-kicker {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.login-title {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.login-desc {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  font-size: 0.95rem;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid rgba(30, 90, 168, 0.25);
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

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

.login-error {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #b42318;
  min-height: 1.2em;
}

.shell {
  display: flex;
  /* Altura fixa à viewport: só o painel principal rola; sidebar + rodapé ficam visíveis. */
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.shell-nav {
  --shell-nav-width: 268px;
  --shell-nav-width-collapsed: 72px;
  width: var(--shell-nav-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  max-height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 0;
  transition: width 0.22s ease;
}

.shell-nav.is-collapsed {
  width: var(--shell-nav-width-collapsed);
}

.shell-nav-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.shell-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.shell-nav-logo {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.shell-nav-brand-text {
  min-width: 0;
  overflow: hidden;
}

.shell-nav-brand-text strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-nav-brand-text small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-collapse-toggle {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.nav-collapse-toggle:hover {
  background: var(--input-bg);
}

.nav-collapse-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  font-weight: 600;
}

.nav-collapse-icon::before {
  content: "«";
}

.shell-nav.is-collapsed .nav-collapse-icon::before {
  content: "»";
}

.shell-nav.is-collapsed .shell-nav-head {
  flex-direction: column;
  padding: 0.65rem 0.4rem;
  gap: 0.55rem;
}

.shell-nav.is-collapsed .shell-nav-brand {
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.shell-nav.is-collapsed .shell-nav-brand-text {
  display: none;
}

.shell-nav.is-collapsed .shell-nav-logo {
  margin: 0 auto;
}

.shell-nav-links {
  flex: 1 1 auto;
  padding: 0.75rem 0;
  min-height: 0;
}

.shell-nav-links button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}

.shell-nav.is-collapsed .shell-nav-links button {
  justify-content: center;
  padding: 0.65rem 0.35rem;
}

.nav-item-icon {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.82;
}

.nav-item-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.shell-nav-links button.active .nav-item-icon {
  opacity: 1;
  color: var(--primary);
}

.nav-item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-nav.is-collapsed .nav-item-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell-nav-links button:hover .nav-item-icon {
  opacity: 1;
}

.shell-nav-links button:hover,
.shell-nav-links button.active {
  background: var(--input-bg);
  font-weight: 600;
}

.shell-nav-only {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 1.1rem;
  box-sizing: border-box;
  background: var(--input-bg);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  cursor: default;
  user-select: none;
}

.shell-nav.is-collapsed .shell-nav-only {
  justify-content: center;
  padding: 0.65rem 0.35rem;
}

.shell-nav-only .nav-item-icon {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 1;
}

.shell-nav-footer {
  flex-shrink: 0;
  padding: 0.65rem 0.75rem 1rem;
  border-top: 1px solid var(--line);
}

.shell-nav.is-collapsed .shell-nav-footer {
  padding: 0.55rem 0.4rem 0.75rem;
}

.shell-nav.is-collapsed .nav-user-card {
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.35rem;
}

.shell-nav.is-collapsed .nav-user-text {
  display: none;
}

.shell-nav.is-collapsed .nav-user-divider {
  display: none;
}

.shell-nav.is-collapsed .nav-user-actions {
  width: 100%;
  justify-content: center;
  gap: 0.25rem;
}

.shell-nav.is-collapsed .nav-user-avatar {
  width: 36px;
  height: 36px;
}

.nav-user-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.nav-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--input-bg);
}

.nav-user-text {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-user-line {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

.nav-user-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.nav-user-menu-wrap {
  position: relative;
}

.nav-menu-btn {
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: -0.05em;
  padding: 0.35rem 0.45rem;
}

.icon-btn-ghost {
  border-color: transparent;
  background: transparent;
}

.icon-btn-ghost:hover {
  background: var(--input-bg);
  border-color: var(--line);
}

.nav-user-divider {
  display: inline-block;
  width: 1px;
  height: 1.35rem;
  background: var(--line);
  margin: 0 0.1rem;
}

.nav-user-dropdown {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 9rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 50;
}

.nav-user-dropdown[hidden] {
  display: none;
}

.nav-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
}

.nav-dropdown-item:hover {
  background: var(--input-bg);
}

.shell-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  position: relative;
  background-color: transparent;
  background-image: none;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 120% 70% at 85% -15%, rgba(59, 130, 246, 0.12), transparent 52%),
    radial-gradient(ellipse 100% 55% at 0% 105%, rgba(59, 130, 246, 0.06), transparent 50%);
}

[data-theme="dark"] .shell-main {
  background-image: none;
}

.shell-main-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 1.5rem 2.25rem;
  position: relative;
  z-index: 0;
}

/* Margem no topo rola junto: evita faixa “morta” de padding acima do sticky onde cards apareciam. */
.shell-main-scroll>section.panel,
.shell-main-scroll>.panel-sheet {
  margin-top: 1.35rem;
}

.panel-sheet {
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.panel-head-text {
  min-width: 0;
  flex: 1 1 12rem;
}

.panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.panel-lead {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 42rem;
}

.panel-top-card {
  position: sticky;
  top: 0;
  /* Acima da lista: irmãos posteriores no DOM pintam por cima sem z-index explícito na lista. */
  z-index: 40;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    0 1px 3px rgba(15, 25, 40, 0.06),
    0 10px 28px rgba(15, 25, 40, 0.06);
}

[data-theme="dark"] .panel-top-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 36px rgba(0, 0, 0, 0.35);
}

.panel-top-card .panel-head {
  margin-bottom: 0;
  padding: 1rem 1.1rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.panel-top-card .list-toolbar {
  margin-bottom: 0;
  padding: 0.85rem 1.1rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.list-toolbar {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 25, 40, 0.06);
}

[data-theme="dark"] .list-toolbar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.list-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.list-toolbar-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.ico--toolbar {
  width: 1rem;
  height: 1rem;
  opacity: 0.85;
}

.list-toolbar-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.list-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
}

.list-toolbar-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .list-toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-toolbar-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .list-toolbar-grid {
    grid-template-columns: 1fr;
  }

  .list-toolbar-grid--2 {
    grid-template-columns: 1fr;
  }
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.filter-field-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.filter-field input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
}

.filter-field input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.filter-field input:focus {
  outline: 2px solid rgba(30, 90, 168, 0.22);
  border-color: var(--primary);
}

[data-theme="dark"] .filter-field input:focus {
  outline-color: rgba(59, 130, 246, 0.35);
}

.list-toolbar-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.btn-text-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-text-ico .ico {
  width: 0.95rem;
  height: 0.95rem;
}

.btn-text-ico:hover {
  color: var(--primary);
  background: var(--card-inner);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-sm-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-sm-with-icon .ico {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.btn-sm.secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  z-index: 0;
}

.user-list-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}

.user-list-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--muted);
}

.user-list-empty-icon .ico--empty {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.65;
}

.user-list-empty-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.user-list-empty-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.user-list-empty--filter {
  border-style: solid;
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: linear-gradient(145deg, var(--surface), var(--card-inner));
}

.user-list-empty-actions {
  margin-top: 1rem;
}

.user-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 25, 40, 0.06), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

[data-theme="dark"] .user-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.user-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  box-shadow: 0 4px 16px rgba(15, 35, 70, 0.1), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

[data-theme="dark"] .user-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.58);
}

.user-card-accent {
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
  opacity: 0.9;
}

.user-card-left {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 0 0.85rem 0.85rem;
}

.user-card-avatar {
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  background: linear-gradient(145deg, var(--input-bg), var(--card-inner));
  border: 1px solid var(--line);
  line-height: 1;
}

.user-card-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.15rem 0 0;
}

.user-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.85rem 0.95rem 0.85rem 0.75rem;
  background: transparent;
}

@media (max-width: 640px) {
  .user-card {
    flex-wrap: wrap;
  }

  .user-card-accent {
    width: 100%;
    height: 3px;
    order: -1;
  }

  .user-card-left {
    flex: 1 1 100%;
    padding-top: 0.65rem;
  }

  .user-card-aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-left: none;
    padding: 0.65rem 0.85rem;
    background: transparent;
  }

  .user-card-actions {
    flex-direction: row !important;
  }
}

.user-card-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.65rem;
  row-gap: 0.25rem;
}

.user-card-line--primary {
  font-size: 0.94rem;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.user-card-line--secondary {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.user-card-pair {
  display: inline;
}

.user-card-lbl {
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.2rem;
}

.user-card-val {
  color: var(--text);
  word-break: break-word;
}

.user-card-val--strong {
  font-weight: 700;
}

.user-card-val--name {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.user-card-val--mono {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}

.user-card-sep {
  color: var(--line);
  font-weight: 300;
  user-select: none;
  opacity: 0.85;
}

.user-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

@media (min-width: 720px) {
  .user-card-actions {
    flex-direction: row;
    align-items: center;
  }
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  background: transparent;
  color: var(--text);
}

.btn-action .ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-action--ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.btn-action--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--input-bg);
}

.btn-action--muted {
  border-color: var(--line);
  color: var(--muted);
}

.btn-action--muted:hover {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.45);
  background: rgba(180, 35, 24, 0.06);
}

[data-theme="dark"] .btn-action--muted:hover {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.ico {
  display: block;
}

.ico--nav {
  width: 1.15rem;
  height: 1.15rem;
}

.ico-theme-sun {
  display: block;
}

.ico-theme-moon {
  display: none;
}

[data-theme="dark"] .ico-theme-sun {
  display: none;
}

[data-theme="dark"] .ico-theme-moon {
  display: block;
}

.nav-dropdown-item--with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-dropdown-item--with-icon .ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.swagger-frame {
  width: 100%;
  height: calc(100vh - 120px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

dialog.dlg {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
}

dialog.dlg::backdrop {
  background: rgba(15, 25, 40, 0.45);
}

.dlg-inner {
  padding: 1.25rem 1.35rem 1.1rem;
}

.dlg-inner h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.em-wrap {
  max-width: 560px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.em-wrap h1 {
  margin-top: 0;
}

/* --- Manifestos em rota --- */
.dlg.dlg--wide {
  max-width: min(720px, calc(100% - 2rem));
  width: 100%;
}

.dlg-inner--manifest {
  padding: 0;
  max-height: min(85vh, 900px);
  display: flex;
  flex-direction: column;
}

.manifest-dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.manifest-dlg-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}

.manifest-subcard-stack {
  padding: 0.85rem 1rem 1.1rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* --- Cards CT-e / NF-e nos modais (mesma linguagem visual dos manifestos) --- */
.manifest-dlg-card {
  --dlg-accent: var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.9rem 1rem 0.95rem 1.15rem;
  color: var(--text);
  font: inherit;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 5px 18px rgba(15, 23, 42, 0.055);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.manifest-dlg-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--dlg-accent);
  transition: background 0.18s ease;
}

.manifest-dlg-card--cte {
  cursor: pointer;
}

.manifest-dlg-card--cte:hover {
  border-color: rgba(30, 90, 168, 0.32);
  --dlg-accent: var(--primary);
  box-shadow:
    0 1px 0 rgba(30, 90, 168, 0.05),
    0 8px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.manifest-dlg-card--cte:focus-visible {
  outline: none;
  border-color: var(--primary);
  --dlg-accent: var(--primary);
  box-shadow:
    0 0 0 3px rgba(30, 90, 168, 0.2),
    0 5px 18px rgba(15, 23, 42, 0.06);
}

.manifest-dlg-card--nf {
  cursor: default;
  background: linear-gradient(165deg, var(--surface) 0%, var(--input-bg) 100%);
}

.manifest-dlg-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.manifest-dlg-card-title-block {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.manifest-dlg-card-title-block--title-inline {
  flex-direction: row;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.4rem;
}

.manifest-dlg-card-title-block--title-inline .manifest-dlg-card-eyebrow {
  flex-shrink: 0;
}

.manifest-dlg-card-title-block--title-inline .manifest-dlg-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifest-dlg-card-eyebrow {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.manifest-dlg-card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  word-break: break-word;
}

.manifest-dlg-card-title--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.93rem;
  font-weight: 650;
  letter-spacing: 0;
}

.manifest-dlg-card-head-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.manifest-dlg-card-chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 10px;
  color: var(--muted);
  background: var(--input-bg);
  border: 1px solid var(--line);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.manifest-dlg-card-chev-svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.manifest-dlg-card--cte:hover .manifest-dlg-card-chev {
  color: var(--primary);
  background: rgba(30, 90, 168, 0.08);
  border-color: rgba(30, 90, 168, 0.22);
}

.manifest-dlg-card-divider {
  height: 1px;
  background: var(--line);
  margin: 0.05rem 0;
}

.manifest-dlg-card-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.manifest-dlg-card-rows .manifest-subcard-line {
  margin-bottom: 0.42rem;
}

.manifest-dlg-card-rows .manifest-subcard-line:last-child {
  margin-bottom: 0;
}

.manifest-dlg-card-rows .manifest-subcard-v {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.manifest-dlg-chave-block {
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.manifest-dlg-chave-val {
  font-family: ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text);
}

.manifest-dlg-card-head--nf {
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.manifest-dlg-card-head--nf .manifest-pix-tag {
  margin-left: auto;
  flex-shrink: 0;
}

.manifest-pix-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}

.manifest-pix-tag--nao_gerado {
  color: var(--muted);
  background: var(--surface-2, rgba(0, 0, 0, 0.04));
  border-color: var(--line);
}

.manifest-pix-tag--pendente {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
}

.manifest-pix-tag--pago {
  color: #047857;
  background: color-mix(in srgb, var(--brand-green) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-green) 45%, var(--line));
}

.manifest-pix-tag--expirado {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.manifest-nf-pix-cta {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}

.manifest-btn-gerar-pix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
  font: inherit;
  padding: 0.62rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 38%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.manifest-btn-gerar-pix:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 45%, transparent);
}

.manifest-btn-gerar-pix:disabled {
  opacity: 0.65;
  cursor: wait;
}

.manifest-nf-pix-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Modal Pix (QR) --- */
dialog.dlg--pix-qr {
  max-width: min(400px, calc(100% - 1.5rem));
  border-radius: 20px;
  overflow: hidden;
}

.dlg-inner--pix-qr {
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: center;
  background: var(--surface);
}

.manifest-pix-qr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 14%, transparent) 0%, transparent 55%);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.manifest-pix-qr-head-main {
  min-width: 0;
  flex: 1;
}

.manifest-pix-qr-head h2 {
  margin: 0.35rem 0 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
}

.manifest-pix-qr-brand {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

.manifest-pix-qr-lead {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.manifest-pix-qr-close {
  flex-shrink: 0;
}

.manifest-pix-qr-hero {
  padding: 0.85rem 1rem;
  background: var(--input-bg);
  border-bottom: 1px solid var(--line);
}

.manifest-pix-qr-hero-k {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.manifest-pix-qr-hero-v {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.manifest-pix-qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1rem 0.5rem;
}

.manifest-pix-qr-img-wrap {
  position: relative;
  padding: 0.85rem;
  background: #fff;
  border-radius: 16px;
  border: 2px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  min-width: min(260px, 100%);
  min-height: min(260px, 72vw);
  display: flex;
  align-items: center;
  justify-content: center;
}

.manifest-pix-qr-loading {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: manifest-pix-spin 0.7s linear infinite;
}

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

.manifest-pix-qr-img {
  display: block;
  width: min(256px, calc(100vw - 5rem));
  height: auto;
  border-radius: 4px;
}

.manifest-pix-qr-img-wrap:has(.manifest-pix-qr-img:not([hidden])) .manifest-pix-qr-loading {
  display: none;
}

.manifest-pix-qr-msg {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 20rem;
}

.manifest-pix-qr-msg--ok {
  color: var(--brand-green);
}

.manifest-pix-qr-msg--reuse {
  color: #b45309;
}

.manifest-pix-qr-msg--err {
  color: var(--danger, #b91c1c);
}

.manifest-pix-qr-foot {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--input-bg);
}

.btn-pix-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.7rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-pix-copy:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.btn-pix-copy-ico {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

[data-theme="dark"] .manifest-pix-qr-img-wrap {
  background: #fff;
}

[data-theme="dark"] .manifest-pix-qr-head {
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 22%, transparent) 0%, transparent 55%);
}

[data-theme="dark"] .manifest-pix-tag--pendente {
  color: #93c5fd;
  background: color-mix(in srgb, var(--primary) 28%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
}

[data-theme="dark"] .manifest-pix-tag--pago {
  color: #6ee7b7;
  background: color-mix(in srgb, var(--brand-green) 22%, transparent);
  border-color: color-mix(in srgb, var(--brand-green) 38%, var(--line));
}

[data-theme="dark"] .manifest-pix-tag--expirado {
  color: #fecaca;
  background: rgba(153, 27, 27, 0.35);
  border-color: rgba(252, 165, 165, 0.35);
}

.manifest-badge--dlg {
  margin-left: 0;
}

[data-theme="dark"] .manifest-dlg-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 5px 20px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .manifest-dlg-card--cte:hover {
  box-shadow:
    0 1px 0 rgba(59, 130, 246, 0.1),
    0 8px 28px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .manifest-dlg-card--cte:hover .manifest-dlg-card-chev {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.28);
}

.manifest-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
}

.manifest-row-card {
  --manifest-accent: var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem 1.1rem 1rem 1.2rem;
  font: inherit;
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 6px 20px rgba(15, 23, 42, 0.06);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.manifest-row-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--manifest-accent);
  transition: background 0.18s ease;
}

.manifest-row-card:hover {
  border-color: rgba(30, 90, 168, 0.35);
  --manifest-accent: var(--primary);
  box-shadow:
    0 1px 0 rgba(30, 90, 168, 0.06),
    0 10px 28px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.manifest-row-card:focus-visible {
  outline: none;
  border-color: var(--primary);
  --manifest-accent: var(--primary);
  box-shadow:
    0 0 0 3px rgba(30, 90, 168, 0.22),
    0 6px 20px rgba(15, 23, 42, 0.07);
}

.manifest-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.manifest-row-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.manifest-row-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.manifest-row-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.manifest-row-chev {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.1rem;
  border-radius: 10px;
  color: var(--muted);
  background: var(--input-bg);
  border: 1px solid var(--line);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.manifest-row-chev-svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.manifest-row-card:hover .manifest-row-chev {
  color: var(--primary);
  background: rgba(30, 90, 168, 0.08);
  border-color: rgba(30, 90, 168, 0.25);
}

.manifest-row-meta {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr);
  gap: 0.75rem 1.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 560px) {
  .manifest-row-meta {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.manifest-row-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.manifest-row-meta-item--grow {
  min-width: 0;
}

.manifest-row-k {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.manifest-row-v {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
}

.manifest-row-v--truncate {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-theme="dark"] .manifest-row-card {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 22px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .manifest-row-card:hover {
  box-shadow:
    0 1px 0 rgba(59, 130, 246, 0.12),
    0 10px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .manifest-row-card:hover .manifest-row-chev {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.manifest-subcard-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.manifest-subcard-line:last-child {
  margin-bottom: 0;
}

.manifest-subcard-line--inline {
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.manifest-subcard-line--inline .manifest-subcard-k {
  flex: 0 0 auto;
}

.manifest-subcard-line--inline .manifest-subcard-v {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

.manifest-subcard-k {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex: 0 0 auto;
}

.manifest-subcard-v {
  font-size: 0.86rem;
  min-width: 0;
  word-break: break-word;
}

.manifest-subcard-v--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
}

.manifest-subcard-v--wrap {
  flex: 1 1 100%;
}

.manifest-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--card-inner);
  color: var(--muted);
  vertical-align: middle;
}

.manifest-empty-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.list-toolbar.list-toolbar--meta-only {
  padding: 0.65rem 1.1rem;
}

.list-toolbar.list-toolbar--meta-only .list-toolbar-head {
  margin: 0;
}

/* Link no menu lateral (abre outra página, ex.: documentação da API). */
.shell-nav-links a.nav-link-external {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.shell-nav.is-collapsed .shell-nav-links a.nav-link-external {
  justify-content: center;
  padding: 0.65rem 0.35rem;
}

.shell-nav-links a.nav-link-external:hover,
.shell-nav-links a.nav-link-external:focus-visible {
  background: var(--input-bg);
  font-weight: 600;
  outline: none;
}

.shell-nav-links a.nav-link-external:hover .nav-item-icon,
.shell-nav-links a.nav-link-external:focus-visible .nav-item-icon {
  opacity: 1;
}

/* Documentação estática da API do sistema (superadmin-system-api.html). */
.docapi-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eceff3;
  color: #1e293b;
}

[data-theme="dark"] .docapi-page {
  background: var(--bg);
  color: var(--text);
}

.docapi-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #dde2ea;
  flex-shrink: 0;
}

[data-theme="dark"] .docapi-toolbar {
  background: var(--surface);
  border-bottom-color: var(--line);
}

.docapi-toolbar-back {
  margin-right: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.docapi-toolbar-back:hover {
  text-decoration: underline;
}

.docapi-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.docapi-aside {
  width: 280px;
  flex-shrink: 0;
  background: #f4f5f7;
  border-right: 1px solid #dde2ea;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .docapi-aside {
  background: #0f1419;
  border-right-color: var(--line);
}

.docapi-aside-head {
  padding: 1rem 1.2rem 1.1rem;
  background: #cfead8;
  border-bottom: 1px solid #b6dfc6;
}

[data-theme="dark"] .docapi-aside-head {
  background: #14532d;
  border-bottom-color: #166534;
  color: #ecfdf5;
}

.docapi-aside-head strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.docapi-aside-head span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  opacity: 0.88;
}

.docapi-nav {
  padding: 0.65rem 0 1.5rem;
  flex: 1;
  overflow: auto;
}

.docapi-nav-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  padding: 0.75rem 1.2rem 0.35rem;
}

[data-theme="dark"] .docapi-nav-cat {
  color: var(--muted);
}

.docapi-nav-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 1rem 0.65rem 1.2rem;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
}

.docapi-nav-item:hover {
  background: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .docapi-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.docapi-nav-item.is-active {
  background: #fff;
  border-left-color: #16a34a;
}

[data-theme="dark"] .docapi-nav-item.is-active {
  background: var(--surface);
  border-left-color: #22c55e;
}

.docapi-nav-item-main {
  min-width: 0;
}

.docapi-nav-item-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.docapi-nav-item-path {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  color: #64748b;
  word-break: break-all;
  line-height: 1.35;
}

[data-theme="dark"] .docapi-nav-item-path {
  color: var(--muted);
}

.docapi-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.42rem;
  border-radius: 4px;
  color: #fff;
  line-height: 1;
}

.docapi-badge--post {
  background: #16a34a;
}

.docapi-badge--get {
  background: #2563eb;
}

.docapi-badge--put {
  background: #ea580c;
}

.docapi-main {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  padding: 1.75rem 2.25rem 3rem;
  overflow: auto;
}

[data-theme="dark"] .docapi-main {
  background: var(--surface);
}

.docapi-main>article {
  scroll-margin-top: 0.75rem;
}

.docapi-main>article+article {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e2e8f0;
}

[data-theme="dark"] .docapi-main>article+article {
  border-top-color: var(--line);
}

.docapi-main h1 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

[data-theme="dark"] .docapi-main h1 {
  color: var(--text);
}

.docapi-endpoint-url {
  margin: 0 0 1.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.84rem;
  color: #1d4ed8;
  word-break: break-all;
  line-height: 1.45;
}

[data-theme="dark"] .docapi-endpoint-url {
  color: var(--primary);
}

.docapi-desc {
  margin: 0 0 2rem;
  max-width: 52rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
}

[data-theme="dark"] .docapi-desc {
  color: var(--muted);
}

.docapi-desc code {
  font-size: 0.86em;
}

.docapi-block {
  margin-bottom: 2rem;
}

.docapi-block-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #334155;
  border-bottom: 2px solid #e2e8f0;
}

[data-theme="dark"] .docapi-block-title {
  color: var(--text);
  border-bottom-color: var(--line);
}

.docapi-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

[data-theme="dark"] .docapi-table-wrap {
  border-color: var(--line);
  background: var(--input-bg);
}

.docapi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.docapi-table th,
.docapi-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e8ecf1;
}

[data-theme="dark"] .docapi-table th,
[data-theme="dark"] .docapi-table td {
  border-bottom-color: var(--line);
}

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

.docapi-table th {
  width: 18%;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f8fafc;
}

[data-theme="dark"] .docapi-table th {
  background: var(--surface);
  color: var(--muted);
}

.docapi-table td:first-child {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.84rem;
  width: 22%;
}

.docapi-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.docapi-tag--req {
  background: #fee2e2;
  color: #b91c1c;
}

[data-theme="dark"] .docapi-tag--req {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.docapi-tag--opt {
  background: #f1f5f9;
  color: #64748b;
}

[data-theme="dark"] .docapi-tag--opt {
  background: var(--line);
  color: var(--muted);
}

.docapi-tag--cond {
  background: #fef3c7;
  color: #b45309;
}

.docapi-param-block {
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.85rem;
  background: #fafbfc;
}

[data-theme="dark"] .docapi-param-block {
  border-color: var(--line);
  background: var(--input-bg);
}

.docapi-param-block:last-child {
  margin-bottom: 0;
}

.docapi-param-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.docapi-param-name {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.88rem;
}

.docapi-param-type {
  font-size: 0.78rem;
  color: #64748b;
}

.docapi-param-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
}

[data-theme="dark"] .docapi-param-desc {
  color: var(--text);
}

.docapi-example {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: #fff;
  border: 1px dashed #cbd5e1;
}

[data-theme="dark"] .docapi-example {
  background: var(--surface);
  border-color: var(--line);
}

.docapi-example-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.docapi-example pre {
  margin: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.docapi-resp-list {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

[data-theme="dark"] .docapi-resp-list {
  border-color: var(--line);
}

.docapi-resp-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e8ecf1;
  background: #fff;
}

[data-theme="dark"] .docapi-resp-row {
  border-bottom-color: var(--line);
  background: var(--surface);
}

.docapi-resp-row:last-child {
  border-bottom: none;
}

.docapi-resp-code {
  flex-shrink: 0;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
}

.docapi-resp-code--ok {
  background: #16a34a;
}

.docapi-resp-code--warn {
  background: #ea580c;
}

.docapi-resp-code--err {
  background: #dc2626;
}

.docapi-resp-text {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  padding-top: 0.15rem;
}

.docapi-resp-text code {
  font-size: 0.86em;
}

.docapi-foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.55;
}

[data-theme="dark"] .docapi-foot {
  border-top-color: var(--line);
  color: var(--muted);
}

.docapi-foot a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.docapi-foot a:hover {
  text-decoration: underline;
}

/* Testador no fim de cada artigo (superadmin-system-api.html) */
.docapi-test-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  background: #f8fafc;
}

[data-theme="dark"] .docapi-test-card {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.docapi-test-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

[data-theme="dark"] .docapi-test-card h2 {
  color: var(--text);
}

.docapi-test-card .field small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

[data-theme="dark"] .docapi-test-card .field small {
  color: var(--muted);
}

.docapi-main .field textarea.docapi-test-textarea {
  min-height: 10rem;
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #dde2ea;
  background: #fff;
  color: #0f172a;
}

[data-theme="dark"] .docapi-main .field textarea.docapi-test-textarea {
  border-color: var(--line);
  background: var(--input-bg);
  color: var(--text);
}

.docapi-main .docapi-test-card .field input.docapi-test-input {
  box-sizing: border-box;
}

.docapi-test-submit {
  width: auto !important;
  min-width: 9rem;
  margin-top: 0.5rem !important;
}

.docapi-test-result-wrap {
  margin-top: 0.25rem;
}

.docapi-test-result {
  margin: 0.35rem 0 0;
  padding: 0.85rem 1rem;
  max-height: 22rem;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-theme="dark"] .docapi-test-result {
  border-color: var(--line);
  background: var(--surface);
}

.docapi-badge--try {
  background: #0d9488;
}

.docapi-gate {
  max-width: 440px;
  margin: 4rem auto;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.docapi-gate p {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.docapi-gate p:last-child {
  margin-bottom: 0;
}

.docapi-gate a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.docapi-gate a:hover {
  text-decoration: underline;
}

/* Dentro do painel do superadmin (iframe ?embed=1): sem barra “voltar”, altura preenchida. */
html.docapi-embed,
html.docapi-embed body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html.docapi-embed .docapi-toolbar {
  display: none !important;
}

html.docapi-embed .docapi-page {
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

html.docapi-embed .docapi-layout {
  flex: 1 1 auto;
  max-width: none;
  min-height: 0;
  height: 100%;
}

html.docapi-embed .docapi-aside,
html.docapi-embed .docapi-main {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 860px) {
  .docapi-layout {
    flex-direction: column;
  }

  .docapi-aside {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #dde2ea;
  }

  [data-theme="dark"] .docapi-aside {
    border-bottom-color: var(--line);
  }

  .docapi-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .docapi-table {
    min-width: 560px;
  }
}

/* --- Motorista: tela única (sem sidebar) --- */
.motorista-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.motorista-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.65rem 1rem;
  padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.motorista-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.motorista-topbar-brand img {
  flex-shrink: 0;
  border-radius: 8px;
}

.motorista-topbar-brand strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.2;
}

.motorista-topbar-brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.motorista-btn-sair {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.motorista-btn-sair:hover {
  background: var(--input-bg);
  border-color: var(--muted);
}

/* Cabeçalho compacto: título + Atualizar na mesma linha */
.motorista-app .panel-head--motorista {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0;
}

.motorista-app .panel-head--motorista .panel-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.motorista-app .panel-head--motorista .btn-sm-with-icon {
  flex-shrink: 0;
  width: auto;
}

.motorista-app .panel-top-card .panel-head {
  padding: 0.65rem 0.75rem;
}

.motorista-main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.motorista-main-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.motorista-main-scroll>.panel-sheet {
  margin-top: 0;
  width: 100%;
}

body.motorista-app:has(.pwa-install-bar:not([hidden])) .motorista-main-scroll {
  padding-bottom: 4.5rem;
}

/* Mobile: usa quase toda a largura (sem “coluna” centralizada) */
@media (max-width: 900px) {
  body.motorista-app {
    background-image: none;
    background-color: var(--bg);
  }

  .motorista-topbar {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .motorista-topbar-brand small {
    max-width: none;
  }

  .motorista-app .panel-top-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0.65rem;
    box-shadow: 0 1px 0 var(--line);
  }

  .motorista-app .panel-top-card .list-toolbar {
    padding: 0.5rem 0.75rem 0.65rem;
  }

  .motorista-app .panel-head--motorista .panel-title {
    font-size: 1.1rem;
  }

  .motorista-app .manifest-stack {
    gap: 0.6rem;
    padding: 0 0.5rem 1rem;
  }

  .motorista-app .manifest-row-card {
    border-radius: 10px;
    padding: 0.85rem 0.75rem 0.85rem 0.95rem;
  }

  .motorista-app .manifest-row-title {
    font-size: 1rem;
  }
}

/* Desktop: conteúdo com largura máxima confortável */
@media (min-width: 901px) {
  .motorista-main-scroll {
    padding: 0 1.5rem 2rem;
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
  }

  .motorista-main-scroll>.panel-sheet {
    margin-top: 1rem;
  }

  .motorista-app .panel-top-card {
    border-radius: 14px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .motorista-app .manifest-stack {
    padding-left: 0;
    padding-right: 0;
  }
}

/* --- Shell mobile: drawer (≤900px); desktop mantém sidebar fixa --- */
.shell-mobile-topbar {
  display: none;
}

.shell-nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .shell {
    flex-direction: column;
  }

  .shell-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    padding: 0.55rem 0.85rem;
    padding-top: calc(0.55rem + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--line);
    background: var(--surface);
  }

  .shell-mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
  }

  .shell-mobile-topbar-brand img {
    flex-shrink: 0;
    border-radius: 8px;
  }

  .shell-mobile-topbar-brand strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.2;
  }

  .shell-mobile-topbar-brand small {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.2;
  }

  .shell-mobile-menu-btn {
    flex-shrink: 0;
  }

  .shell-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: min(292px, 88vw) !important;
    max-width: 292px;
    transform: translateX(-100%);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow: none;
  }

  .shell-nav.is-mobile-open {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(15, 23, 42, 0.2);
  }

  .shell-nav.is-collapsed {
    width: min(292px, 88vw) !important;
    transform: translateX(-100%);
  }

  .shell-nav.is-collapsed.is-mobile-open {
    transform: translateX(0);
  }

  .shell-nav.is-collapsed .shell-nav-brand-text,
  .shell-nav.is-collapsed .nav-item-label,
  .shell-nav.is-collapsed .nav-user-text,
  .shell-nav.is-collapsed .nav-user-divider {
    display: block;
  }

  .shell-nav.is-collapsed .shell-nav-links button,
  .shell-nav.is-collapsed .shell-nav-only {
    justify-content: flex-start;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .shell-nav.is-collapsed .nav-user-card {
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 0.55rem;
  }

  .shell-nav.is-collapsed .nav-user-actions {
    width: auto;
    justify-content: flex-end;
  }

  .shell-nav-head .nav-collapse-toggle {
    display: none;
  }

  .shell-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1095;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .shell-nav-backdrop[hidden] {
    display: none !important;
  }

  body.shell-nav-drawer-open {
    overflow: hidden;
  }

  .shell-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
  }

  .shell-main-scroll {
    padding: 0 0.85rem 1.35rem;
  }

  .shell-main-scroll>.panel-sheet,
  .shell-main-scroll>section.panel {
    margin-top: 0.85rem;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-top-card .panel-head .btn-sm-with-icon,
  .panel-head .btn-sm-with-icon {
    width: 100%;
    justify-content: center;
  }

  .panel-title {
    font-size: 1.15rem;
  }

  .panel-lead {
    font-size: 0.8125rem;
  }

  body:has(.pwa-install-bar:not([hidden])) .shell-main-scroll {
    padding-bottom: 4rem;
  }

  .motorista-app .panel-head--motorista {
    flex-direction: row;
    align-items: center;
  }

  .motorista-app .panel-head--motorista .btn-sm-with-icon {
    width: auto;
    justify-content: center;
  }
}

/* --- PWA (motorista / login; desktop admin sem manifest) --- */
.pwa-install-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
}

.pwa-install-bar[hidden] {
  display: none !important;
}

.pwa-install-bar-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text);
}

.pwa-install-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pwa-install-dismiss {
  font-size: 1.25rem;
  line-height: 1;
}

@media (display-mode: standalone) {
  .shell-nav-head {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  }

  .app-topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .shell-main-scroll {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

}

@media (min-width: 901px) {
  .pwa-install-bar {
    display: none !important;
  }
}
