/* Jurídico Lions V8.12 — interface leve, sem dependências externas. */
:root {
  --bg: #07111f;
  --bg-deep: #040b14;
  --panel: #0c1b2b;
  --panel-2: #102338;
  --panel-3: #081827;
  --line: #25425f;
  --line-soft: rgba(92, 137, 181, 0.28);
  --text: #f4f8ff;
  --muted: #a5b8cc;
  --muted-2: #7890a9;
  --brand: #ee3342;
  --brand-dark: #b41622;
  --blue: #398bea;
  --blue-dark: #2469b8;
  --green: #16ad74;
  --green-dark: #087a50;
  --amber: #de951a;
  --red: #de4652;
  --shadow: 0 15px 42px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  --topbar-height: 76px;
}

html {
  color-scheme: dark;
  scrollbar-color: #365d82 #07111f;
}

body {
  background:
    radial-gradient(circle at 4% -12%, rgba(57, 139, 234, 0.13), transparent 31rem),
    radial-gradient(circle at 100% 8%, rgba(238, 51, 66, 0.07), transparent 29rem),
    var(--bg-deep);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.006em;
}

body::before {
  display: none;
}

::selection {
  color: #fff;
  background: rgba(57, 139, 234, 0.52);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  background: #2469b8;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: none;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(113, 181, 255, 0.82);
  outline-offset: 2px;
}

.shell {
  width: min(100%, 1500px);
  padding: 24px 30px 44px;
}

.topbar {
  min-height: var(--topbar-height);
  margin: -24px -30px 28px;
  padding: 13px 30px;
  background: rgba(5, 14, 25, 0.97);
  border-bottom-color: rgba(78, 116, 154, 0.44);
  backdrop-filter: none;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(225, 35, 50, 0.22);
}

.brand-mark-image {
  overflow: hidden;
  padding: 4px;
  background: #071827;
  border: 1px solid rgba(115, 158, 201, 0.48);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.brand-mark-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  overflow-wrap: anywhere;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: #91a8bf;
}

.user-pill {
  padding: 8px 11px;
  background: #091a2a;
}

.hero {
  margin: 6px 0 22px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.hero p {
  color: #a8bad0;
}

.eyebrow {
  color: #79b7ff;
}

.card {
  padding: 23px;
  border-color: rgba(76, 117, 158, 0.43);
  background: #0b1c2d;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.17);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 48%);
}

.card-accent {
  border-color: rgba(57, 139, 234, 0.56);
}

.card-accent::before {
  height: 2px;
  background: linear-gradient(90deg, #398bea, #23bd82 70%, transparent);
}

.card-head h2,
.card-head h3 {
  letter-spacing: -0.02em;
}

.stat {
  border-color: rgba(76, 117, 158, 0.34);
  background: #091a2a;
  box-shadow: none;
}

.stat strong {
  font-variant-numeric: tabular-nums;
}

input,
select,
textarea {
  min-height: 45px;
  color: #f8fbff;
  background: #061522;
  border-color: #31516f;
  border-radius: 10px;
}

textarea {
  min-height: 100px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #456b90;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5b9de9;
  background: #081a2a;
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.15);
}

input[type="file"]::file-selector-button {
  color: #eaf4ff;
  background: #204567;
}

.session-policy {
  min-width: 0;
  margin: 1px 0 18px;
  padding: 17px 17px 2px;
  border: 1px solid #31516f;
  border-radius: 13px;
  background: #081929;
}

.session-policy legend {
  padding: 0 8px;
  color: #e8f3ff;
  font-size: 15px;
  font-weight: 850;
}

.session-policy > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 13px;
}

.session-policy-grid {
  gap: 17px;
}

.btn {
  min-height: 42px;
  border-radius: 9px;
  background: #c92331;
  box-shadow: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.btn:hover {
  filter: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: none;
}

.btn-blue {
  background: #2467ad;
}

.btn-blue:hover {
  background: #2b73bf;
}

.btn-green {
  background: #087a50;
}

.btn-green:hover {
  background: #0a8256;
}

.btn-amber {
  background: #925704;
}

.btn-amber:hover {
  background: #a86609;
}

.btn-soft {
  color: #d9ebff;
  background: #142d46;
  border-color: #345878;
}

.btn-soft:hover,
.btn-ghost:hover {
  background: #1a3957;
  border-color: #4b7399;
}

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

.btn-danger {
  color: #ffb8be;
  background: rgba(222, 70, 82, 0.1);
  border-color: rgba(222, 70, 82, 0.55);
}

.btn-danger:hover {
  color: #fff;
  background: #b82f3a;
}

.btn-small {
  min-height: 36px;
}

.process-upload-action {
  max-width: none;
  white-space: nowrap;
  text-align: center;
  line-height: 1.22;
}

.process-list {
  display: grid;
  gap: 12px;
}

.process-list-tools {
  margin-top: 4px;
}

.process-card {
  position: relative;
  min-width: 0;
  padding: 15px;
  border: 1px solid #294b6a;
  border-radius: 14px;
  background: linear-gradient(145deg, #0a1d2f, #081827);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  scroll-margin-top: 155px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.process-card:hover {
  border-color: #376789;
}

.process-card:target,
.process-card.process-card-focus {
  border-color: #4e9cf0;
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.15), 0 12px 30px rgba(0, 0, 0, 0.2);
}

.process-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(66, 105, 141, 0.36);
}

.process-card-title,
.process-card-badges,
.process-actions,
.access-user-heading,
.managed-file-actions,
.managed-file-confirm,
.modal-form-actions,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.process-card-title {
  min-width: 0;
  align-items: flex-start;
}

.process-card-title > div {
  min-width: 0;
}

.process-card-title h3 {
  margin: 0 0 1px;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.process-card-title .mono {
  color: #8eafd0;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.process-number {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(57, 139, 234, 0.43);
  border-radius: 7px;
  color: #b9d9ff;
  background: rgba(57, 139, 234, 0.1);
  font-size: 11px;
  font-weight: 850;
}

.process-card-badges {
  justify-content: flex-end;
}

.process-card-badges > span[data-process-backup] {
  display: contents;
}

.process-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 11px 0;
  border: 1px solid rgba(51, 86, 119, 0.6);
  border-radius: 11px;
  overflow: hidden;
  background: #24415d;
}

.process-fact {
  min-width: 0;
  padding: 9px 11px;
  background: #081a2a;
}

.process-fact > span {
  display: block;
  margin-bottom: 2px;
  color: #7f9bb7;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-fact strong,
.process-fact small,
.process-fact-button {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.process-fact strong {
  color: #edf6ff;
  font-size: 12px;
}

.process-fact small {
  margin-top: 1px;
  color: #8ea7c0;
  font-size: 10px;
}

.process-fact-button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.process-fact-button:hover strong {
  color: #80bdff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.process-description {
  margin: 0 0 10px;
  color: #9eb4ca;
  font-size: 11px;
  line-height: 1.4;
}

.process-actions {
  gap: 7px;
}

.process-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

.process-action-note {
  color: #d7a653;
  font-size: 11px;
}

.process-noscript {
  margin: 10px 0 0;
}

.is-submitting::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-spin 0.75s linear infinite;
}

.alert {
  box-shadow: none;
}

.quick-nav {
  top: calc(var(--topbar-height) + 8px);
  gap: 6px;
  margin-bottom: 20px;
  padding: 7px;
  border-color: rgba(76, 117, 158, 0.52);
  border-radius: 13px;
  background: rgba(7, 22, 36, 0.985);
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: none;
  scrollbar-width: thin;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
}

.quick-nav a[data-icon]::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: #8fc4ff;
  font-size: 15px;
  line-height: 1;
}

.quick-nav a:hover {
  color: #fff;
  background: #132d47;
  border-color: rgba(77, 122, 166, 0.4);
}

.quick-nav a.active,
.admin-nav a.active {
  color: #fff;
  background: #225f9f;
  border-color: #4488cc;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

.quick-nav a.active[data-icon]::before {
  color: #fff;
}

.panel-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.panel-focus {
  display: block;
}

.panel-focus > .card {
  width: 100%;
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.admin-nav a {
  min-width: 0;
  text-align: center;
}

.admin-nav.is-loading {
  pointer-events: none;
}

.admin-nav.is-loading a.active::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-spin 0.75s linear infinite;
}

.admin-content {
  position: relative;
  min-height: 280px;
  outline: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.admin-content.is-loading {
  opacity: 0.45;
  pointer-events: none;
  transform: translateY(3px);
}

.typescript-ui .admin-content {
  animation: ui-reveal 0.18s ease-out;
}

.section-anchor {
  scroll-margin-top: 150px;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.table-tools input[type="search"] {
  width: min(420px, 100%);
  margin: 0;
}

.table-wrap {
  overscroll-behavior-inline: contain;
  border-color: #294865;
  background: #071725;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.015);
  scrollbar-color: #3b668d #071725;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #bad0e7;
  background: #071a2b;
}

td {
  border-top-color: #203c56;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.012);
}

tr:hover td {
  background: rgba(57, 139, 234, 0.055);
}

.upload-option,
.toggle-card,
.connection,
.backup-meter,
details,
.security-item {
  background: #081929;
}

.upload-option:hover,
.upload-option.selected {
  transform: none;
  border-color: #5898dd;
  background: #0c2439;
}

.password-control {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
}

.password-control > input[type="password"],
.password-control > input[type="text"] {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid #35597a;
  border-radius: 7px;
  color: #cce4ff;
  background: #173653;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

.modal {
  background: rgba(1, 7, 13, 0.86);
  backdrop-filter: blur(3px);
}

.modal-box {
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.process-manager-modal-box {
  width: min(900px, 100%);
  max-height: min(90vh, 920px);
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 15px;
}

.copy-field input {
  min-width: 0;
  margin: 0;
  color: #b9daff;
  background: #05131f;
}

.copy-field .btn {
  min-width: 112px;
}

.modal-inline-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #3a648a;
  border-radius: 9px;
  color: #cde5ff;
  background: rgba(40, 103, 165, 0.12);
}

.modal-inline-message[data-kind="success"] {
  border-color: rgba(35, 189, 130, 0.55);
  color: #9cedc9;
  background: rgba(22, 173, 116, 0.1);
}

.modal-inline-message[data-kind="error"] {
  border-color: rgba(222, 70, 82, 0.58);
  color: #ffc0c5;
  background: rgba(222, 70, 82, 0.1);
}

.modal-inline-message[hidden],
.managed-file-confirm[hidden],
.managed-file-actions[hidden],
.access-editor-panel[hidden] {
  display: none !important;
}

.managed-files-list,
.access-users-list {
  display: grid;
  gap: 8px;
}

.managed-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(60, 99, 135, 0.58);
  border-radius: 11px;
  background: #071827;
}

.managed-file-info {
  min-width: 0;
}

.managed-file-info > strong,
.managed-file-info > small {
  display: block;
  overflow-wrap: anywhere;
}

.managed-file-info > strong {
  color: #f1f7ff;
  font-size: 13px;
}

.managed-file-info > small {
  margin-top: 2px;
  font-size: 10px;
}

.managed-file-actions {
  justify-content: flex-end;
}

.managed-file-confirm {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 9px;
  border-top: 1px solid rgba(59, 96, 132, 0.44);
}

.managed-file-confirm span {
  margin-right: auto;
  color: #ffb7bd;
  font-size: 12px;
  font-weight: 750;
}

.access-manager-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 13px;
  align-items: start;
}

.access-users-panel,
.access-editor-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(62, 103, 140, 0.58);
  border-radius: 12px;
  background: #071827;
}

.compact-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.compact-section-head h3,
.compact-section-head p {
  margin: 0;
}

.compact-section-head h3 {
  font-size: 14px;
}

.compact-section-head p {
  margin-top: 2px;
  color: #8ea7c0;
  font-size: 10px;
}

.access-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(57, 91, 124, 0.55);
  border-radius: 10px;
  background: #091c2d;
}

.access-user-info {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.access-user-heading {
  min-width: 0;
}

.access-user-heading strong {
  overflow-wrap: anywhere;
}

.mini-badge {
  padding: 2px 6px;
  border: 1px solid rgba(57, 139, 234, 0.45);
  border-radius: 999px;
  color: #aad2ff;
  background: rgba(57, 139, 234, 0.1);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.access-user-row .status {
  padding: 3px 7px;
  font-size: 9px;
}

.access-active-check {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(61, 103, 141, 0.52);
  border-radius: 9px;
  background: #091c2d;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.span-3 {
  grid-column: 1 / -1;
}

.access-mode-picker {
  min-width: 0;
  margin: 3px 0 16px;
  padding: 0;
  border: 0;
}

.access-mode-picker > legend {
  margin-bottom: 8px;
  color: #deebfb;
  font-weight: 780;
}

.access-mode-picker.compact {
  margin-bottom: 12px;
}

.access-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.access-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid #31536f;
  border-radius: 11px;
  color: #dcecff;
  background: #071827;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.access-mode-card:hover {
  border-color: #4d89c4;
  background: #0a2033;
}

.access-mode-card:has(input:checked) {
  border-color: #4f9bea;
  background: rgba(45, 125, 207, 0.14);
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.08);
}

.access-mode-card-public:has(input:checked) {
  border-color: rgba(222, 149, 26, 0.7);
  background: rgba(222, 149, 26, 0.1);
  box-shadow: 0 0 0 3px rgba(222, 149, 26, 0.07);
}

.access-mode-card input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #398bea;
}

.access-mode-card b,
.access-mode-card small {
  display: block;
}

.access-mode-card b {
  font-size: 13px;
}

.access-mode-card small {
  margin-top: 3px;
  color: #91a9c1;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.public-access-warning {
  display: grid;
  gap: 4px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid rgba(222, 149, 26, 0.54);
  border-radius: 11px;
  color: #ffdda3;
  background: rgba(222, 149, 26, 0.09);
}

.public-slug-control {
  margin: 14px 0;
}

input[aria-invalid="true"] {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.14);
}

.public-access-warning.compact {
  margin-top: 10px;
  padding: 10px 12px;
}

.public-access-warning span {
  color: #cbb993;
  font-size: 11px;
  line-height: 1.5;
}

.access-mode-panel,
.credential-editor-section {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(62, 103, 140, 0.58);
  border-radius: 12px;
  background: #071827;
}

.access-mode-form,
.no-js-access-mode-form {
  margin-bottom: 16px;
}

.public-expiration-control {
  margin: 12px 0 14px;
}

.process-mode-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 96, 132, 0.5);
  border-radius: 10px;
  color: #91abc4;
  background: #071827;
  font-size: 12px;
}

.status-protected {
  color: #83bdff;
  background: rgba(57, 139, 234, 0.14);
}

.status-public {
  color: #ffd08a;
  background: rgba(222, 149, 26, 0.14);
}

.public-link-policy input,
.public-link-policy select {
  margin-bottom: 0;
}

.modal-form-actions {
  margin-top: 14px;
}

.modal-footer {
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid rgba(59, 96, 132, 0.44);
}

.confirm-modal-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  width: min(560px, 100%);
}

.confirm-modal-box > .alert,
.confirm-modal-box > form {
  grid-column: 1 / -1;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(222, 70, 82, 0.62);
  border-radius: 12px;
  color: #ffb8be;
  background: rgba(222, 70, 82, 0.12);
  font-size: 22px;
  font-weight: 900;
}

.confirm-modal-box h2,
.confirm-modal-box p {
  margin: 0;
}

.confirm-modal-box p {
  margin-top: 5px;
  color: #aabed2;
}

.add-files-modal-box {
  width: min(820px, 100%);
  max-height: min(88vh, 860px);
}

.add-files-process {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px !important;
  padding: 7px 10px;
  border: 1px solid rgba(57, 139, 234, 0.38);
  border-radius: 9px;
  color: #bedcff !important;
  background: rgba(57, 139, 234, 0.08);
}

.add-files-process strong {
  color: #fff;
  overflow-wrap: anywhere;
}

.modal-upload-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.modal-upload-actions .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: wait;
  pointer-events: none;
}

.quick-upload-progress {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #35658f;
  border-radius: 12px;
  color: #cfe5fb;
  background: #061725;
}

.quick-upload-progress.active {
  border-color: #3c83ca;
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.08);
}

.quick-upload-progress.success {
  border-color: rgba(35, 189, 130, 0.62);
  background: rgba(17, 154, 102, 0.1);
}

.quick-upload-progress.error {
  border-color: rgba(224, 68, 80, 0.62);
  color: #ffc0c5;
  background: rgba(169, 46, 57, 0.12);
}

.quick-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.quick-upload-progress-head strong {
  color: #83bdff;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.quick-upload-progress.success .quick-upload-progress-head strong {
  color: #75e8b5;
}

.quick-upload-progress.error .quick-upload-progress-head strong {
  color: #ff9ca4;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 110px;
  color: var(--muted);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(126, 174, 222, 0.25);
  border-top-color: #6aaeff;
  border-radius: 50%;
  animation: ui-spin 0.75s linear infinite;
}

.toast {
  display: block;
  max-width: min(420px, calc(100vw - 32px));
  visibility: hidden;
  opacity: 0;
  background: #117349;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  transform: translateY(10px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.toast[data-kind="error"] {
  background: #a92e39;
}

.toast[data-kind="info"] {
  background: #245f9f;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  animation: none;
  transform: none;
}

.auth-wrap {
  position: relative;
  width: min(500px, 100%);
  display: block;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border-color: rgba(80, 123, 164, 0.48);
  border-radius: 21px;
  background: #081827;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.33);
}

.auth-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #398bea, #24bd84 66%, #d12a38);
}

.auth-art {
  display: none;
}

.auth-form {
  min-width: 0;
  padding: clamp(28px, 6vw, 48px);
  background: linear-gradient(155deg, rgba(13, 31, 49, 0.98), rgba(6, 21, 35, 0.99));
}

.auth-form .eyebrow {
  margin-bottom: 11px;
  letter-spacing: 0.13em;
}

.auth-form h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 5vw, 31px);
  line-height: 1.17;
  letter-spacing: -0.035em;
}

.auth-form > p {
  margin-bottom: 25px;
  color: #a9bdd2;
}

.auth-form form > label {
  font-size: 13px;
}

.auth-form input {
  min-height: 49px;
  margin-bottom: 17px;
}

.auth-form .btn {
  min-height: 47px;
}

.auth-link-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 16px;
}

.auth-link-row a,
.auth-back-link {
  color: #8dc4ff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.auth-link-row a:hover,
.auth-back-link:hover {
  color: #c9e4ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-back-link {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
}

.auth-form .code-input {
  padding-left: 20px;
  letter-spacing: 10px;
}

.email-delivery {
  margin: -5px 0 19px;
}

.email-delivery-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 139, 234, 0.46);
  border-radius: 12px;
  color: #c9e3ff;
  background: rgba(41, 112, 185, 0.11);
}

.email-delivery-status strong,
.email-delivery-status small {
  display: block;
}

.email-delivery-status small {
  margin-top: 3px;
  color: #9eb6ce;
  font-size: 12px;
}

.email-delivery-indicator {
  position: relative;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border: 3px solid rgba(125, 187, 255, 0.28);
  border-top-color: #72b5ff;
  border-radius: 50%;
  animation: ui-spin 0.8s linear infinite;
}

.email-delivery-status[data-state="sent"] {
  border-color: rgba(22, 173, 116, 0.48);
  color: #9af0ca;
  background: rgba(22, 173, 116, 0.1);
}

.email-delivery-status[data-state="sent"] .email-delivery-indicator {
  display: grid;
  place-items: center;
  border: 0;
  color: #d9ffef;
  background: #11845a;
  animation: none;
}

.email-delivery-status[data-state="sent"] .email-delivery-indicator::after {
  content: "✓";
  font-size: 16px;
  font-weight: 900;
}

.email-delivery-status[data-state="error"] {
  border-color: rgba(222, 70, 82, 0.55);
  color: #ffb8bf;
  background: rgba(222, 70, 82, 0.11);
}

.email-delivery-status[data-state="error"] .email-delivery-indicator {
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: #ae303c;
  animation: none;
}

.email-delivery-status[data-state="error"] .email-delivery-indicator::after {
  content: "!";
  font-size: 17px;
  font-weight: 900;
}

[data-staff-code-form][aria-busy="true"] .code-input {
  cursor: wait;
}

.auth-form .is-submitting::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}

.public-header {
  background: #091a2a;
  backdrop-filter: none;
}

.process-hero {
  background: linear-gradient(145deg, #113252, #091b2c);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.public-file {
  background: #0a1c2d;
}

.public-file:hover {
  transform: translateY(-1px);
}

.progress-panel,
.transfer-step,
.structure,
.codebox {
  background: #061725;
}

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

@keyframes ui-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
  .admin-nav {
    display: flex;
  }

  .admin-nav a {
    flex: 0 0 auto;
    min-width: 150px;
  }

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

@media (max-width: 980px) {
  .access-manager-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  :root {
    --topbar-height: 70px;
  }

  .shell {
    padding-inline: 18px;
  }

  .topbar {
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .panel-nav {
    display: flex;
  }

  .panel-nav a {
    flex: 0 0 auto;
    min-width: 150px;
  }

  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .table-tools input[type="search"] {
    width: 100%;
  }

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

  .process-card-badges {
    justify-content: flex-start;
  }

  .managed-file-row,
  .access-user-row {
    grid-template-columns: 1fr;
  }

  .managed-file-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table {
    display: block;
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    display: grid;
    padding: 5px 13px;
    border: 1px solid #294865;
    border-radius: 13px;
    background: #081a2a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  }

  tbody tr[hidden] {
    display: none;
  }

  td,
  tbody tr:nth-child(even) td,
  tr:hover td {
    display: grid;
    grid-template-columns: minmax(104px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #203c56;
    background: transparent;
    overflow-wrap: anywhere;
  }

  td:first-child {
    border-top: 0;
  }

  td::before {
    content: attr(data-label);
    align-self: start;
    color: #91abc4;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  td .button-row,
  td details {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-height: 66px;
  }

  .shell,
  .public-shell {
    padding: 14px;
  }

  .topbar {
    margin: -14px -14px 20px;
    padding: 11px 14px;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .btn {
    padding-inline: 11px;
  }

  .quick-nav {
    top: calc(var(--topbar-height) + 4px);
    margin-inline: -2px;
    border-radius: 11px;
  }

  .admin-nav a,
  .panel-nav a {
    min-width: 138px;
  }

  .card {
    padding: 17px;
  }

  .button-row {
    align-items: stretch;
  }

  .modal {
    align-items: start;
    padding: 12px;
    overflow-y: auto;
  }

  .add-files-modal-box {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .modal-upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-upload-actions .btn {
    width: 100%;
  }

  .process-summary {
    grid-template-columns: 1fr;
  }

  .access-mode-options {
    grid-template-columns: 1fr;
  }

  .process-mode-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-card {
    padding: 12px;
    scroll-margin-top: 132px;
  }

  .process-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-actions .btn,
  .process-actions .status {
    width: 100%;
    max-width: none;
    justify-content: center;
    white-space: normal;
  }

  .copy-field {
    grid-template-columns: 1fr;
  }

  .copy-field .btn,
  .modal-form-actions .btn,
  .modal-footer .btn {
    width: 100%;
  }

  .compact-section-head,
  .managed-file-confirm {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-section-head .btn,
  .managed-file-actions .btn,
  .managed-file-confirm .btn,
  .access-user-row > .btn {
    width: 100%;
  }

  .managed-file-confirm span {
    margin-right: 0;
  }

  td .button-row .btn,
  td .button-row form {
    width: 100%;
  }

  td .button-row .process-upload-action {
    max-width: none;
  }

  td .button-row form .btn {
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }

  .auth-page {
    place-items: start center;
    padding: 16px;
  }

  .auth-wrap {
    margin-block: max(12px, 5vh);
    border-radius: 17px;
  }

  .auth-form {
    padding: 27px 20px;
  }

  .secondary-auth-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .process-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Form surfaces: clear visual grouping for the dark theme. */
:root {
  --form-surface: #0a2034;
  --form-surface-raised: #0d2942;
  --form-surface-deep: #071827;
  --form-line: rgba(93, 148, 200, 0.52);
  --form-line-soft: rgba(76, 126, 174, 0.38);
}

.card > form,
.modal-box > form,
.access-mode-panel > form,
.access-editor-panel > form,
.credential-editor-section > form,
#upload-form,
#edit-upload-form,
#edit-access-mode-form {
  margin-top: 4px;
  padding: 17px;
  border: 1px solid var(--form-line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--form-surface), var(--form-surface-deep));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 8px 22px rgba(0, 0, 0, 0.12);
}

.form-block {
  margin: 0 0 14px;
  padding: 13px 14px 1px;
  border: 1px solid var(--form-line-soft);
  border-radius: 12px;
  background: rgba(7, 24, 39, 0.78);
}

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

.form-block > label,
.form-block > legend {
  color: #f0f7ff;
}

.form-block > label {
  margin-bottom: 8px;
}

.form-block > .hint,
.form-block .hint {
  margin: 2px 0 12px;
}

.form-block-access {
  padding-top: 12px;
  border-color: rgba(79, 148, 222, 0.56);
  background: linear-gradient(145deg, rgba(17, 52, 82, 0.86), rgba(8, 29, 47, 0.92));
}

.form-block-credentials {
  gap: 12px;
  padding-top: 14px;
  border-color: rgba(75, 151, 213, 0.46);
  background: rgba(8, 29, 47, 0.92);
}

.form-block-credentials > div {
  padding: 10px 11px 0;
  border: 1px solid rgba(82, 137, 184, 0.36);
  border-radius: 10px;
  background: rgba(13, 41, 66, 0.7);
}

.form-block-upload {
  border-color: rgba(35, 189, 130, 0.42);
  background: linear-gradient(145deg, rgba(7, 42, 48, 0.72), rgba(7, 27, 40, 0.9));
}

.form-block-expiration {
  border-color: rgba(222, 149, 26, 0.44);
  background: linear-gradient(145deg, rgba(55, 43, 19, 0.64), rgba(24, 29, 27, 0.88));
}

.form-grid {
  gap: 12px 14px;
}

.form-grid > div:not(.span-2) {
  padding: 12px 13px 1px;
  border: 1px solid var(--form-line-soft);
  border-radius: 11px;
  background: rgba(9, 31, 50, 0.82);
}

.form-grid > div.span-2 {
  padding: 12px 13px 1px;
  border: 1px solid rgba(76, 126, 174, 0.44);
  border-radius: 11px;
  background: rgba(8, 27, 44, 0.86);
}

.form-grid > fieldset.span-2 {
  margin: 0;
}

.form-grid > div > .hint {
  margin: 2px 0 11px;
}

.form-grid > div > .check:last-child {
  margin-bottom: 11px;
}

.upload-options {
  gap: 12px;
  margin-top: 2px;
  margin-bottom: 12px;
}

.upload-option {
  min-width: 0;
  border-style: solid;
  border-color: rgba(86, 145, 196, 0.52);
  background: linear-gradient(145deg, #0d2b45, #091e31);
}

.upload-option + .upload-option {
  border-color: rgba(35, 189, 130, 0.48);
  background: linear-gradient(145deg, #0b3038, #091f2b);
}

.upload-option h3 {
  color: #f2f8ff;
}

.upload-option p {
  color: #aec5da;
}

.access-mode-panel,
.credential-editor-section,
.session-policy,
.toggle-grid,
.connection,
.backup-meter {
  border-color: var(--form-line);
  background: linear-gradient(145deg, rgba(12, 37, 60, 0.94), rgba(7, 24, 39, 0.96));
}

.session-policy {
  padding: 17px 17px 3px;
}

.session-policy-grid {
  gap: 12px;
}

.session-policy-grid > div {
  padding: 11px 12px 0;
  border: 1px solid rgba(76, 126, 174, 0.36);
  border-radius: 10px;
  background: rgba(7, 26, 43, 0.72);
}

.toggle-grid {
  padding: 11px;
  border: 1px solid var(--form-line-soft);
  border-radius: 12px;
}

.toggle-card {
  border-color: rgba(87, 145, 193, 0.52);
  background: #0b2941;
}

.toggle-card:nth-child(2) {
  border-color: rgba(35, 189, 130, 0.48);
  background: #0a2d35;
}

.toggle-card:nth-child(3) {
  border-color: rgba(222, 149, 26, 0.48);
  background: #2a281d;
}

.access-mode-options {
  gap: 12px;
}

.access-mode-card {
  min-height: 76px;
  padding: 14px;
  border-width: 2px;
  border-color: rgba(90, 150, 205, 0.58);
  background: #0a2943;
}

.access-mode-card-public {
  border-color: rgba(222, 149, 26, 0.58);
  background: #2a271d;
}

.access-mode-card:has(input:checked) {
  border-color: #6bb2fa;
  background: linear-gradient(145deg, rgba(38, 112, 183, 0.5), rgba(12, 48, 76, 0.9));
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.14), inset 0 1px rgba(255, 255, 255, 0.08);
}

.access-mode-card-public:has(input:checked) {
  border-color: #f0b74e;
  background: linear-gradient(145deg, rgba(153, 97, 13, 0.62), rgba(60, 44, 17, 0.9));
  box-shadow: 0 0 0 3px rgba(222, 149, 26, 0.14), inset 0 1px rgba(255, 255, 255, 0.08);
}

.modal-form-actions {
  padding-top: 13px;
  border-top: 1px solid rgba(82, 137, 184, 0.35);
}

details form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--form-line-soft);
  border-radius: 10px;
  background: rgba(7, 24, 39, 0.86);
}

@media (max-width: 640px) {
  .card > form,
  .modal-box > form,
  .access-mode-panel > form,
  .access-editor-panel > form,
  .credential-editor-section > form,
  #upload-form,
  #edit-upload-form,
  #edit-access-mode-form {
    padding: 12px;
  }

  .form-block,
  .form-grid > div:not(.span-2),
  .form-grid > div.span-2 {
    padding-inline: 11px;
  }

  .form-block-credentials {
    grid-template-columns: 1fr;
  }

  .form-block-credentials > .span-3 {
    grid-column: auto;
  }

  .session-policy-grid {
    grid-template-columns: 1fr;
  }

  .access-mode-card {
    min-height: 0;
  }
}

/* Hierarquia visual dos processos: cada cartão e cada informação tem seu próprio plano. */
.process-list {
  gap: 16px;
}

.process-card {
  padding: 18px;
  border-color: #355e80;
  border-radius: 16px;
  background: linear-gradient(140deg, #10273d 0%, #0b1d2f 64%, #081827 100%);
  box-shadow: 0 11px 30px rgba(0, 0, 0, 0.19), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.process-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #4ca0ed, #2573ba);
  box-shadow: 0 0 18px rgba(57, 139, 234, 0.22);
  pointer-events: none;
}

.process-card[data-access-mode="public"]::before {
  background: linear-gradient(180deg, #f1b84e, #bd720b);
  box-shadow: 0 0 18px rgba(222, 149, 26, 0.2);
}

.process-card:hover {
  border-color: #4a82a9;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.process-card:target,
.process-card.process-card-focus {
  border-color: #62aaf3;
  box-shadow: 0 0 0 3px rgba(57, 139, 234, 0.17), 0 14px 34px rgba(0, 0, 0, 0.25);
}

.process-summary {
  gap: 10px;
  margin: 16px 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.process-fact {
  padding: 12px 13px;
  border: 1px solid rgba(71, 116, 153, 0.72);
  border-radius: 11px;
  background: linear-gradient(155deg, #0d253a, #091a2a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.process-fact:nth-child(1) {
  border-top-color: rgba(74, 157, 232, 0.86);
}

.process-fact:nth-child(2) {
  border-top-color: rgba(42, 202, 145, 0.86);
}

.process-fact:nth-child(3) {
  border-top-color: rgba(222, 149, 26, 0.86);
}

.process-fact:nth-child(4) {
  border-top-color: rgba(164, 128, 236, 0.86);
}

.process-actions {
  gap: 8px;
  margin-top: 3px;
  padding-top: 14px;
  border-top: 1px solid rgba(71, 116, 153, 0.58);
}

@media (max-width: 640px) {
  .process-card {
    padding: 14px;
  }

  .process-card::before {
    inset: 14px auto 14px 0;
  }

  .process-summary {
    gap: 8px;
    margin: 14px 0;
  }

  .process-fact {
    padding: 11px 12px;
  }

  .process-actions {
    gap: 8px;
    padding-top: 12px;
  }
}

/* Identidade do site: editor administrativo e prévias das áreas interna e pública. */
.public-footer {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.branding-panel {
  overflow: visible;
}

.branding-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(57, 139, 234, 0.48);
  border-radius: 12px;
  color: #c9e3ff;
  background: rgba(34, 99, 164, 0.13);
}

.branding-notice strong {
  color: #f2f8ff;
}

.branding-notice span {
  color: #a9c4df;
}

.branding-form {
  margin-top: 0 !important;
  padding: 18px !important;
}

.branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.branding-fields,
.branding-previews {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.branding-group {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(77, 132, 181, 0.48);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(10, 35, 57, 0.96), rgba(7, 25, 41, 0.98));
}

.branding-group-heading {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(72, 121, 164, 0.36);
}

.branding-group-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(84, 159, 231, 0.55);
  border-radius: 9px;
  color: #b9dcff;
  background: rgba(57, 139, 234, 0.14);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.branding-group-heading h3,
.branding-group-heading p,
.branding-asset-heading h4,
.branding-asset-heading p,
.branding-preview-heading h3,
.branding-preview-heading small {
  margin: 0;
}

.branding-group-heading h3 {
  color: #f3f8ff;
  font-size: 16px;
}

.branding-group-heading p {
  margin-top: 3px;
  color: #9eb6cc;
  font-size: 13px;
}

.branding-group .form-grid {
  gap: 11px 12px;
}

.branding-group .form-grid > div:not(.span-2),
.branding-group .form-grid > div.span-2 {
  padding: 11px 12px 1px;
  border-color: rgba(76, 128, 174, 0.38);
  background: rgba(7, 27, 44, 0.72);
}

.branding-group textarea {
  min-height: 92px;
}

.branding-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.branding-asset-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(83, 140, 190, 0.48);
  border-radius: 12px;
  background: rgba(8, 30, 49, 0.88);
}

.branding-asset-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.branding-asset-heading h4 {
  color: #f2f8ff;
  font-size: 15px;
}

.branding-asset-heading p {
  margin-top: 2px;
  color: #90abc3;
  font-size: 12px;
}

.branding-asset-preview {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(93, 151, 201, 0.55);
  border-radius: 13px;
  color: #fff;
  background: #061522;
  font-size: 27px;
}

.branding-asset-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.branding-favicon-preview {
  padding: 12px;
  background: #eaf2fa;
}

.branding-asset-card input[type="file"] {
  min-width: 0;
  margin-bottom: 10px;
}

.branding-asset-card .hint {
  margin: 0 0 12px;
}

.branding-remove {
  min-height: 38px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(222, 70, 82, 0.35);
  border-radius: 9px;
  color: #ffc1c6;
  background: rgba(222, 70, 82, 0.07);
}

.branding-remove:has(input:disabled) {
  opacity: 0.5;
}

.branding-file-warning {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(222, 149, 26, 0.43);
  border-radius: 10px;
  color: #e9c887;
  background: rgba(146, 87, 4, 0.1);
  font-size: 13px;
}

.branding-file-warning strong {
  color: #ffdda0;
}

.branding-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 3px;
}

.branding-actions span {
  color: #8fa9c0;
  font-size: 12px;
}

.branding-previews {
  position: sticky;
  top: calc(var(--topbar-height) + 76px);
  padding: 14px;
  border: 1px solid rgba(79, 135, 184, 0.48);
  border-radius: 14px;
  background: #071827;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.branding-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.branding-preview-heading span,
.branding-preview-content > span,
.branding-preview-label {
  color: #79b7ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.branding-preview-heading h3 {
  margin-top: 2px;
  font-size: 16px;
}

.branding-preview-heading small {
  color: #829bb3;
  font-size: 11px;
}

.branding-preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(70, 126, 177, 0.52);
  border-radius: 12px;
  background: linear-gradient(145deg, #0c2b46, #081a2a 72%);
}

.branding-preview-public {
  background: linear-gradient(145deg, #123653, #081a2a 72%);
}

.branding-preview-label {
  position: absolute;
  top: 11px;
  right: 11px;
  padding: 4px 7px;
  border: 1px solid rgba(105, 169, 229, 0.38);
  border-radius: 999px;
  color: #b9ddff;
  background: rgba(5, 20, 33, 0.7);
}

.branding-preview-lockup {
  padding: 12px;
  border-bottom: 1px solid rgba(75, 126, 171, 0.35);
  background: rgba(5, 18, 30, 0.58);
}

.branding-preview-lockup .brand {
  max-width: calc(100% - 68px);
  gap: 9px;
}

.branding-preview-lockup .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
}

.branding-preview-lockup .brand strong {
  font-size: 13px;
  line-height: 1.2;
}

.branding-preview-lockup .brand small {
  margin-top: 1px;
  font-size: 8px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.branding-preview-content {
  padding: 16px;
}

.branding-preview-content h3 {
  margin: 5px 0 9px;
  color: #f3f8ff;
  font-size: 19px;
  line-height: 1.18;
}

.branding-preview-content strong {
  display: block;
  margin-bottom: 4px;
  color: #d7e9fb;
  font-size: 13px;
}

.branding-preview-content p {
  margin: 0;
  color: #9fb7cd;
  font-size: 12px;
  line-height: 1.5;
}

.branding-preview-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(75, 126, 171, 0.32);
  color: #839db6;
  background: rgba(4, 16, 27, 0.42);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.branding-tab-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(85, 136, 180, 0.4);
  border-radius: 10px;
  background: #0a2033;
}

.branding-tab-preview img {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.branding-tab-preview span,
.branding-tab-preview small,
.branding-tab-preview strong {
  display: block;
  min-width: 0;
}

.branding-tab-preview small {
  color: #7f9ab4;
  font-size: 10px;
}

.branding-tab-preview strong {
  overflow: hidden;
  color: #ddecfb;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branding-reset-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(222, 70, 82, 0.39);
  border-radius: 12px;
  background: rgba(222, 70, 82, 0.065);
}

.branding-reset-zone strong,
.branding-reset-zone span {
  display: block;
}

.branding-reset-zone strong {
  color: #ffd3d7;
}

.branding-reset-zone span {
  margin-top: 3px;
  color: #aebdcb;
  font-size: 12px;
}

.branding-reset-form {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 1080px) {
  .branding-layout {
    grid-template-columns: 1fr;
  }

  .branding-previews {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branding-preview-heading,
  .branding-tab-preview {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .branding-asset-grid,
  .branding-previews {
    grid-template-columns: 1fr;
  }

  .branding-preview-heading,
  .branding-tab-preview {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .branding-notice {
    grid-template-columns: 1fr;
  }

  .branding-form {
    padding: 12px !important;
  }

  .branding-group,
  .branding-previews {
    padding: 12px;
  }

  .branding-actions,
  .branding-reset-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .branding-actions .btn,
  .branding-reset-form,
  .branding-reset-form .btn {
    width: 100%;
  }
}

/* Estatísticas próprias do portal: leitura gerencial separada da auditoria técnica. */
.analytics-panel {
  overflow: visible;
}

.analytics-heading {
  align-items: center;
}

.analytics-privacy-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(42, 202, 145, 0.42);
  border-radius: 12px;
  color: #d8f8eb;
  background: rgba(15, 125, 85, 0.1);
}

.analytics-privacy-note > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  color: #72e8b7;
  background: rgba(42, 202, 145, 0.13);
}

.analytics-privacy-note strong,
.analytics-privacy-note p {
  margin: 0;
}

.analytics-privacy-note p {
  margin-top: 3px;
  color: #9fc7b8;
  font-size: 12px;
}

.analytics-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(76, 128, 174, 0.43);
  border-radius: 13px;
  background: #071827;
}

.analytics-filters label {
  margin-bottom: 5px;
  color: #b9d1e8;
  font-size: 11px;
}

.analytics-filters :is(input, select) {
  min-height: 42px;
  margin: 0;
}

.analytics-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.analytics-filter-actions .btn {
  flex: 1 1 auto;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}

.analytics-kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 15px 16px 14px;
  border: 1px solid rgba(77, 126, 169, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, #0b2237, #071827);
}

.analytics-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #398bea;
}

.analytics-kpi > span,
.analytics-kpi > strong,
.analytics-kpi > small {
  display: block;
}

.analytics-kpi > span {
  color: #9fb7cf;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.analytics-kpi > strong {
  margin: 4px 0 2px;
  overflow-wrap: anywhere;
  color: #f5f9ff;
  font-size: clamp(21px, 2.2vw, 29px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.analytics-kpi > small {
  color: #7993ac;
  font-size: 11px;
}

.analytics-kpi-green::before { background: #2aca91; }
.analytics-kpi-violet::before { background: #9a78e9; }
.analytics-kpi-amber::before { background: #de951a; }
.analytics-kpi-cyan::before { background: #29b9cb; }
.analytics-kpi-red::before { background: #de4652; }

.analytics-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  margin-bottom: 18px;
}

.analytics-chart-card,
.analytics-highlights,
.analytics-visits {
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(76, 128, 174, 0.43);
  border-radius: 13px;
  background: #071827;
}

.analytics-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.analytics-section-heading h3,
.analytics-section-heading p {
  margin: 0;
}

.analytics-section-heading h3 {
  color: #f2f8ff;
}

.analytics-section-heading p {
  margin-top: 3px;
  color: #8fa9c1;
  font-size: 12px;
}

.analytics-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9fb6cc;
  font-size: 10px;
  white-space: nowrap;
}

.analytics-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.analytics-legend span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #398bea;
}

.analytics-legend .legend-pages::before { background: #9a78e9; }
.analytics-legend .legend-clicks::before { background: #de951a; }

.analytics-chart {
  display: flex;
  align-items: stretch;
  gap: 7px;
  min-height: 255px;
  overflow-x: auto;
  padding: 20px 8px 4px;
  border: 1px solid rgba(63, 109, 150, 0.35);
  border-radius: 11px;
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 54px, rgba(98, 144, 185, 0.11) 55px),
    rgba(4, 17, 29, 0.62);
  scrollbar-color: #3b668d #071725;
}

.analytics-day {
  display: grid;
  grid-template-rows: minmax(200px, 1fr) auto;
  flex: 1 0 48px;
  min-width: 42px;
  max-width: 90px;
  text-align: center;
}

.analytics-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-height: 200px;
}

.analytics-bar {
  position: relative;
  width: min(10px, 28%);
  min-height: 3px;
  height: max(3px, var(--analytics-height, 0%));
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, #2369af, #4b9df2);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.analytics-bar:hover,
.analytics-bar:focus-within {
  z-index: 2;
  filter: brightness(1.18);
  transform: scaleX(1.12);
}

.analytics-bar b {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  display: none;
  padding: 3px 5px;
  border: 1px solid #4b7297;
  border-radius: 5px;
  color: #fff;
  background: #061421;
  font-size: 9px;
  transform: translateX(-50%);
}

.analytics-bar:hover b { display: block; }
.analytics-bar.bar-pages { background: linear-gradient(to top, #6242a9, #9a78e9); }
.analytics-bar.bar-clicks { background: linear-gradient(to top, #9b5c05, #de951a); }

.analytics-day time {
  display: block;
  margin-top: 8px;
  color: #7792ac;
  font-size: 9px;
  line-height: 1.15;
}

.analytics-highlights dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.analytics-highlights dl > div {
  padding: 11px 12px;
  border: 1px solid rgba(67, 116, 159, 0.37);
  border-radius: 10px;
  background: rgba(10, 34, 55, 0.72);
}

.analytics-highlights dt,
.analytics-highlights dd,
.analytics-highlights small {
  display: block;
  margin: 0;
}

.analytics-highlights dt {
  color: #85a3be;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.analytics-highlights dd {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #eef6ff;
  font-weight: 800;
}

.analytics-highlights small {
  margin-top: 2px;
  color: #7892aa;
  font-size: 10px;
}

.analytics-visits {
  padding: 17px;
}

.analytics-visits-heading {
  align-items: center;
}

.analytics-visit-list {
  display: grid;
  gap: 12px;
}

.analytics-visit-card {
  overflow: hidden;
  border: 1px solid rgba(75, 128, 174, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(10, 35, 57, 0.97), rgba(6, 23, 38, 0.98));
}

.analytics-visit-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(69, 117, 159, 0.4);
  background: rgba(5, 20, 33, 0.42);
}

.analytics-visitor {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.analytics-visitor-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(69, 145, 216, 0.49);
  border-radius: 10px;
  color: #8fc5fb;
  background: rgba(57, 139, 234, 0.11);
}

.analytics-visitor strong,
.analytics-visitor small,
.analytics-visit-status small {
  display: block;
}

.analytics-visitor strong {
  color: #eef7ff;
  font-size: 14px;
}

.analytics-visitor small,
.analytics-visit-status small {
  margin-top: 2px;
  color: #839cb4;
  font-size: 10px;
}

.analytics-visit-status {
  text-align: right;
}

.analytics-visit-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px;
  overflow: hidden;
  border: 1px solid rgba(68, 119, 162, 0.42);
  border-radius: 10px;
}

.analytics-visit-facts > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid rgba(68, 119, 162, 0.34);
}

.analytics-visit-facts > div:last-child { border-right: 0; }

.analytics-visit-facts span,
.analytics-visit-facts strong,
.analytics-visit-facts small {
  display: block;
}

.analytics-visit-facts span {
  color: #75aee5;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.analytics-visit-facts strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #f0f7ff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.analytics-visit-facts small {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #7f99b1;
  font-size: 10px;
}

.analytics-process-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 8px 10px;
  border: 1px solid rgba(222, 149, 26, 0.31);
  border-radius: 9px;
  color: #9fb4c8;
  background: rgba(124, 78, 8, 0.08);
  font-size: 11px;
}

.analytics-process-context strong {
  color: #f1d49e;
}

.analytics-timeline-details {
  margin: 0 12px 12px;
  padding: 0;
  border-color: rgba(67, 119, 164, 0.42);
  background: #061725;
}

.analytics-timeline-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  list-style: none;
}

.analytics-timeline-details > summary::-webkit-details-marker { display: none; }
.analytics-timeline-details > summary::before { content: "▸"; color: #77b5f1; }
.analytics-timeline-details[open] > summary::before { content: "▾"; }
.analytics-timeline-details > summary span { flex: 1; }
.analytics-timeline-details > summary small { color: #7892aa; font-size: 10px; }

.analytics-timeline {
  margin: 0;
  padding: 3px 14px 13px;
  list-style: none;
}

.analytics-event {
  display: grid;
  grid-template-columns: 72px 12px minmax(0, 1fr);
  gap: 8px;
  min-height: 49px;
}

.analytics-event time {
  padding-top: 2px;
  color: #7591aa;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.analytics-event-dot {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid #071827;
  border-radius: 50%;
  background: #398bea;
  box-shadow: 0 0 0 2px rgba(57, 139, 234, 0.36);
}

.analytics-event-dot::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 2px;
  width: 1px;
  height: 35px;
  background: rgba(69, 119, 162, 0.46);
}

.analytics-event:last-child .analytics-event-dot::after { display: none; }
.analytics-event-click .analytics-event-dot { background: #de951a; box-shadow: 0 0 0 2px rgba(222, 149, 26, 0.32); }
.analytics-event-heartbeat .analytics-event-dot { background: #2aca91; box-shadow: 0 0 0 2px rgba(42, 202, 145, 0.28); }

.analytics-event strong,
.analytics-event p,
.analytics-event small {
  display: block;
  margin: 0;
}

.analytics-event strong {
  color: #dcecff;
  font-size: 11px;
}

.analytics-event p {
  margin-top: 1px;
  color: #869fb7;
  font-size: 10px;
}

.analytics-event small {
  margin-top: 2px;
  color: #63cfa1;
  font-size: 9px;
}

.analytics-empty {
  padding: 28px 16px;
}

.analytics-retention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid rgba(76, 128, 174, 0.38);
  border-radius: 12px;
  background: rgba(7, 24, 39, 0.78);
}

.analytics-retention h3,
.analytics-retention p {
  margin: 0;
}

.analytics-retention h3 {
  color: #dcecff;
  font-size: 14px;
}

.analytics-retention p {
  max-width: 760px;
  margin-top: 3px;
  color: #839cb4;
  font-size: 11px;
}

.analytics-retention form {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}

.analytics-retention select {
  width: auto;
  min-width: 112px;
  margin: 0;
  padding-block: 8px;
}

@media (max-width: 1180px) {
  .analytics-filters,
  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .analytics-highlights dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .analytics-visit-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-visit-facts > div:nth-child(2) { border-right: 0; }
  .analytics-visit-facts > div:nth-child(-n + 2) { border-bottom: 1px solid rgba(68, 119, 162, 0.34); }
}

@media (max-width: 640px) {
  .analytics-heading,
  .analytics-section-heading,
  .analytics-visit-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-privacy-note,
  .analytics-filters,
  .analytics-kpis,
  .analytics-highlights dl,
  .analytics-visit-facts {
    grid-template-columns: 1fr;
  }

  .analytics-filter-actions,
  .analytics-filter-actions .btn {
    width: 100%;
  }

  .analytics-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-retention,
  .analytics-retention form {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-retention select,
  .analytics-retention .btn {
    width: 100%;
  }

  .analytics-visit-status { text-align: left; }

  .analytics-visit-facts > div,
  .analytics-visit-facts > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(68, 119, 162, 0.34);
  }

  .analytics-visit-facts > div:last-child { border-bottom: 0; }

  .analytics-event {
    grid-template-columns: 58px 10px minmax(0, 1fr);
    gap: 6px;
  }
}
