/* Portal do Investidor Lions V8.12 — interface leve, sem dependências externas. */
:root {
  --bg: #1f070a;
  --bg-deep: #140406;
  --panel: #2b0c0f;
  --panel-2: #381014;
  --panel-3: #27080b;
  --line: #5f252b;
  --line-soft: rgba(181, 92, 102, 0.28);
  --text: #fff4f5;
  --muted: #cca5a9;
  --muted-2: #a9787d;
  --brand: #ee3342;
  --brand-dark: #b41622;
  --blue: #ea394c;
  --blue-dark: #b82434;
  --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: #82363e #1f070a;
}

body {
  background:
    radial-gradient(circle at 4% -12%, rgba(234, 57, 76, 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: #ffffff;
  background: rgba(234, 57, 76, 0.52);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 9px;
  color: #ffffff;
  background: #b82434;
  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(255, 113, 128, 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(25, 5, 7, 0.97);
  border-bottom-color: rgba(154, 78, 86, 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: #27070a;
  border: 1px solid rgba(201, 115, 124, 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: #bf9196;
}

.user-pill {
  padding: 8px 11px;
  background: #2a090d;
}

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

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

.hero p {
  color: #d0a8ac;
}

.eyebrow {
  color: #ff7987;
}

.card {
  padding: 23px;
  border-color: rgba(158, 76, 85, 0.43);
  background: #2d0b0f;
  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(234, 57, 76, 0.56);
}

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

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

.stat {
  border-color: rgba(158, 76, 85, 0.34);
  background: #2a090d;
  box-shadow: none;
}

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

input,
select,
textarea {
  min-height: 45px;
  color: #fff8f9;
  background: #220609;
  border-color: #6f3138;
  border-radius: 10px;
}

textarea {
  min-height: 100px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #90454d;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #e95b6a;
  background: #2a080c;
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 0.15);
}

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

.session-policy {
  min-width: 0;
  margin: 1px 0 18px;
  padding: 17px 17px 2px;
  border: 1px solid #6f3138;
  border-radius: 13px;
  background: #29080c;
}

.session-policy legend {
  padding: 0 8px;
  color: #ffe8ea;
  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: #ad2433;
}

.btn-blue:hover {
  background: #bf2b3b;
}

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

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

.btn-amber {
  background: #925704;
}

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

.btn-soft {
  color: #ffd9dd;
  background: #461419;
  border-color: #78343b;
}

.btn-soft:hover,
.btn-ghost:hover {
  background: #571a21;
  border-color: #994b53;
}

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

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

.btn-danger:hover {
  color: #ffffff;
  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 #6a2930;
  border-radius: 14px;
  background: linear-gradient(145deg, #2f0a0e, #27080b);
  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: #893740;
}

.process-card:target,
.process-card.process-card-focus {
  border-color: #f04e5f;
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 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(141, 66, 74, 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: #d08e95;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.process-number {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(234, 57, 76, 0.43);
  border-radius: 7px;
  color: #ffb9c1;
  background: rgba(234, 57, 76, 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(119, 51, 58, 0.6);
  border-radius: 11px;
  overflow: hidden;
  background: #5d242a;
}

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

.process-fact > span {
  display: block;
  margin-bottom: 2px;
  color: #b77f85;
  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: #ffedef;
  font-size: 12px;
}

.process-fact small {
  margin-top: 1px;
  color: #c08e93;
  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: #ff808e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.process-description {
  margin: 0 0 10px;
  color: #ca9ea3;
  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: #ffffff;
  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(158, 76, 85, 0.52);
  border-radius: 13px;
  background: rgba(36, 7, 10, 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: #ff8f9b;
  font-size: 15px;
  line-height: 1;
}

.quick-nav a:hover {
  color: #ffffff;
  background: #471319;
  border-color: rgba(166, 77, 87, 0.4);
}

.quick-nav a.active,
.admin-nav a.active {
  color: #ffffff;
  background: #9f222f;
  border-color: #cc4453;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

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

.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: #ffffff;
  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: #65292f;
  background: #25070a;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.015);
  scrollbar-color: #8d3b44 #25070a;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #e7babf;
  background: #2b070b;
}

td {
  border-top-color: #562026;
}

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

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

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

.upload-option:hover,
.upload-option.selected {
  transform: none;
  border-color: #dd5866;
  background: #390c11;
}

.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 #7a353c;
  border-radius: 7px;
  color: #ffccd2;
  background: #53171d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

.modal {
  background: rgba(13, 1, 2, 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: #ffb9c1;
  background: #1f0508;
}

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

.modal-inline-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #8a3a43;
  border-radius: 9px;
  color: #ffcdd2;
  background: rgba(165, 40, 53, 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(135, 60, 68, 0.58);
  border-radius: 11px;
  background: #27070a;
}

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

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

.managed-file-info > strong {
  color: #fff1f3;
  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(132, 59, 67, 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(140, 62, 70, 0.58);
  border-radius: 12px;
  background: #27070a;
}

.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: #c08e93;
  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(124, 57, 64, 0.55);
  border-radius: 10px;
  background: #2d090d;
}

.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(234, 57, 76, 0.45);
  border-radius: 999px;
  color: #ffaab3;
  background: rgba(234, 57, 76, 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(141, 61, 70, 0.52);
  border-radius: 9px;
  background: #2d090d;
}

.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: #fbdee1;
  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 #6f3138;
  border-radius: 11px;
  color: #ffdce0;
  background: #27070a;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.access-mode-card:hover {
  border-color: #c44d5a;
  background: #330a0e;
}

.access-mode-card:has(input:checked) {
  border-color: #ea4f60;
  background: rgba(207, 45, 62, 0.14);
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 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: #ea394c;
}

.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: #c19196;
  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(140, 62, 70, 0.58);
  border-radius: 12px;
  background: #27070a;
}

.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(132, 59, 67, 0.5);
  border-radius: 10px;
  color: #c49197;
  background: #27070a;
  font-size: 12px;
}

.status-protected {
  color: #ff8390;
  background: rgba(234, 57, 76, 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(132, 59, 67, 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: #d2aaae;
}

.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(234, 57, 76, 0.38);
  border-radius: 9px;
  color: #ffbec5 !important;
  background: rgba(234, 57, 76, 0.08);
}

.add-files-process strong {
  color: #ffffff;
  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 #8f353f;
  border-radius: 12px;
  color: #fbcfd4;
  background: #250609;
}

.quick-upload-progress.active {
  border-color: #ca3c4b;
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 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: #ff8390;
  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(222, 126, 136, 0.25);
  border-top-color: #ff6a7a;
  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: #9f2431;
}

.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(164, 80, 89, 0.48);
  border-radius: 21px;
  background: #27080b;
  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, #ea394c, #24bd84 66%, #d12a38);
}

.auth-art {
  display: none;
}

.auth-form {
  min-width: 0;
  padding: clamp(28px, 6vw, 48px);
  background: linear-gradient(155deg, rgba(49, 13, 17, 0.98), rgba(35, 6, 9, 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: #d2a9ad;
}

.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: #ff8d99;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.auth-link-row a:hover,
.auth-back-link:hover {
  color: #ffc9cf;
  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(234, 57, 76, 0.46);
  border-radius: 12px;
  color: #ffc9cf;
  background: rgba(185, 41, 57, 0.11);
}

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

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

.email-delivery-indicator {
  position: relative;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border: 3px solid rgba(255, 125, 139, 0.28);
  border-top-color: #ff7281;
  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: #ffffff;
  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: #ffffff;
  border-radius: 50%;
  animation: ui-spin 0.7s linear infinite;
}

.public-header {
  background: #2a090d;
  backdrop-filter: none;
}

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

.public-file {
  background: #2d0a0e;
}

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

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

@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 #65292f;
    border-radius: 13px;
    background: #2a080c;
    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 #562026;
    background: transparent;
    overflow-wrap: anywhere;
  }

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

  td::before {
    content: attr(data-label);
    align-self: start;
    color: #c49197;
    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: #340a0f;
  --form-surface-raised: #420d13;
  --form-surface-deep: #27070a;
  --form-line: rgba(200, 93, 105, 0.52);
  --form-line-soft: rgba(174, 76, 87, 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(39, 7, 10, 0.78);
}

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

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

.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(222, 79, 94, 0.56);
  background: linear-gradient(145deg, rgba(82, 17, 24, 0.86), rgba(47, 8, 12, 0.92));
}

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

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

.form-block-upload {
  border-color: rgba(35, 189, 130, 0.42);
  background: linear-gradient(145deg, rgba(48, 7, 11, 0.72), rgba(40, 7, 11, 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(50, 9, 13, 0.82);
}

.form-grid > div.span-2 {
  padding: 12px 13px 1px;
  border: 1px solid rgba(174, 76, 87, 0.44);
  border-radius: 11px;
  background: rgba(44, 8, 12, 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(196, 86, 98, 0.52);
  background: linear-gradient(145deg, #450d13, #31090d);
}

.upload-option + .upload-option {
  border-color: rgba(35, 189, 130, 0.48);
  background: linear-gradient(145deg, #380b10, #2b090d);
}

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

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

.access-mode-panel,
.credential-editor-section,
.session-policy,
.toggle-grid,
.connection,
.backup-meter {
  border-color: var(--form-line);
  background: linear-gradient(145deg, rgba(60, 12, 17, 0.94), rgba(39, 7, 10, 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(174, 76, 87, 0.36);
  border-radius: 10px;
  background: rgba(43, 7, 11, 0.72);
}

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

.toggle-card {
  border-color: rgba(193, 87, 98, 0.52);
  background: #410b11;
}

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

.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(205, 90, 102, 0.58);
  background: #430a10;
}

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

.access-mode-card:has(input:checked) {
  border-color: #fa6b7a;
  background: linear-gradient(145deg, rgba(183, 38, 54, 0.5), rgba(76, 12, 19, 0.9));
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 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(184, 82, 93, 0.35);
}

details form {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--form-line-soft);
  border-radius: 10px;
  background: rgba(39, 7, 10, 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 compartilhamentos: cada cartão e cada informação tem seu próprio plano. */
.process-list {
  gap: 16px;
}

.process-card {
  padding: 18px;
  border-color: #80353d;
  border-radius: 16px;
  background: linear-gradient(140deg, #3d1015 0%, #2f0b0f 64%, #27080b 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, #ed4c5d, #ba2535);
  box-shadow: 0 0 18px rgba(234, 57, 76, 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: #a94a54;
  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: #f36272;
  box-shadow: 0 0 0 3px rgba(234, 57, 76, 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(153, 71, 80, 0.72);
  border-radius: 11px;
  background: linear-gradient(155deg, #3a0d12, #2a090d);
  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(232, 74, 91, 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(236, 128, 140, 0.86);
}

.process-actions {
  gap: 8px;
  margin-top: 3px;
  padding-top: 14px;
  border-top: 1px solid rgba(153, 71, 80, 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(234, 57, 76, 0.48);
  border-radius: 12px;
  color: #ffc9cf;
  background: rgba(164, 34, 48, 0.13);
}

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

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

.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(181, 77, 88, 0.48);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(57, 10, 15, 0.96), rgba(41, 7, 11, 0.98));
}

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

.branding-group-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(231, 84, 100, 0.55);
  border-radius: 9px;
  color: #ffb9c1;
  background: rgba(234, 57, 76, 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: #fff3f4;
  font-size: 16px;
}

.branding-group-heading p {
  margin-top: 3px;
  color: #cc9ea3;
  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(174, 76, 87, 0.38);
  background: rgba(44, 7, 11, 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(190, 83, 95, 0.48);
  border-radius: 12px;
  background: rgba(49, 8, 12, 0.88);
}

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

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

.branding-asset-heading p {
  margin-top: 2px;
  color: #c39096;
  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(201, 93, 105, 0.55);
  border-radius: 13px;
  color: #ffffff;
  background: #220609;
  font-size: 27px;
}

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

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

.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: #c08f94;
  font-size: 12px;
}

.branding-previews {
  position: sticky;
  top: calc(var(--topbar-height) + 76px);
  padding: 14px;
  border: 1px solid rgba(184, 79, 90, 0.48);
  border-radius: 14px;
  background: #27070a;
  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: #ff7987;
  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: #b38287;
  font-size: 11px;
}

.branding-preview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(177, 70, 82, 0.52);
  border-radius: 12px;
  background: linear-gradient(145deg, #460c12, #2a080c 72%);
}

.branding-preview-public {
  background: linear-gradient(145deg, #531219, #2a080c 72%);
}

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

.branding-preview-lockup {
  padding: 12px;
  border-bottom: 1px solid rgba(171, 75, 85, 0.35);
  background: rgba(30, 5, 8, 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: #fff3f4;
  font-size: 19px;
  line-height: 1.18;
}

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

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

.branding-preview-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(171, 75, 85, 0.32);
  color: #b68389;
  background: rgba(27, 4, 6, 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(180, 85, 95, 0.4);
  border-radius: 10px;
  background: #330a0e;
}

.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: #b47f85;
  font-size: 10px;
}

.branding-tab-preview strong {
  overflow: hidden;
  color: #fbdde0;
  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: #cbaeb1;
  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(174, 76, 87, 0.43);
  border-radius: 13px;
  background: #27070a;
}

.analytics-filters label {
  margin-bottom: 5px;
  color: #e8b9be;
  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(169, 77, 87, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, #370b10, #27070a);
}

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

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

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

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

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

.analytics-kpi-green::before { background: #2aca91; }
.analytics-kpi-violet::before { background: #e97884; }
.analytics-kpi-amber::before { background: #de951a; }
.analytics-kpi-cyan::before { background: #cb293a; }
.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(174, 76, 87, 0.43);
  border-radius: 13px;
  background: #27070a;
}

.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: #fff2f3;
}

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

.analytics-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cc9fa4;
  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: #ea394c;
}

.analytics-legend .legend-pages::before { background: #e97884; }
.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(150, 63, 72, 0.35);
  border-radius: 11px;
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 54px, rgba(185, 98, 107, 0.11) 55px),
    rgba(29, 4, 7, 0.62);
  scrollbar-color: #8d3b44 #25070a;
}

.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, #af2332, #f24b5d);
  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 #974b53;
  border-radius: 5px;
  color: #ffffff;
  background: #210609;
  font-size: 9px;
  transform: translateX(-50%);
}

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

.analytics-day time {
  display: block;
  margin-top: 8px;
  color: #ac777d;
  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(159, 67, 77, 0.37);
  border-radius: 10px;
  background: rgba(55, 10, 15, 0.72);
}

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

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

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

.analytics-highlights small {
  margin-top: 2px;
  color: #aa787d;
  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(174, 75, 86, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(57, 10, 15, 0.97), rgba(38, 6, 9, 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(159, 69, 79, 0.4);
  background: rgba(33, 5, 8, 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(216, 69, 85, 0.49);
  border-radius: 10px;
  color: #fb8f9b;
  background: rgba(234, 57, 76, 0.11);
}

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

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

.analytics-visitor small,
.analytics-visit-status small {
  margin-top: 2px;
  color: #b48388;
  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(162, 68, 78, 0.42);
  border-radius: 10px;
}

.analytics-visit-facts > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid rgba(162, 68, 78, 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: #e57581;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

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

.analytics-visit-facts small {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #b17f84;
  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: #c89fa3;
  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(164, 67, 77, 0.42);
  background: #250609;
}

.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: #f17784; }
.analytics-timeline-details[open] > summary::before { content: "▾"; }
.analytics-timeline-details > summary span { flex: 1; }
.analytics-timeline-details > summary small { color: #aa787d; 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: #aa757b;
  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 #27070a;
  border-radius: 50%;
  background: #ea394c;
  box-shadow: 0 0 0 2px rgba(234, 57, 76, 0.36);
}

.analytics-event-dot::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 2px;
  width: 1px;
  height: 35px;
  background: rgba(162, 69, 79, 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: #ffdce0;
  font-size: 11px;
}

.analytics-event p {
  margin-top: 1px;
  color: #b7868b;
  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(174, 76, 87, 0.38);
  border-radius: 12px;
  background: rgba(39, 7, 10, 0.78);
}

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

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

.analytics-retention p {
  max-width: 760px;
  margin-top: 3px;
  color: #b48388;
  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(162, 68, 78, 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(162, 68, 78, 0.34);
  }

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

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

/* V8.13: pastas e subpastas, preservando a identidade já configurada. */
.folder-breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:14px 0 18px;overflow-wrap:anywhere}
.folder-current{font-weight:700;color:var(--text);padding:7px 0}
.folder-up{margin-left:auto}
.folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;margin-bottom:20px}
.folder-card{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:20px;background:var(--panel-2);border:1px solid var(--line);border-radius:14px;text-decoration:none;text-align:left;color:var(--text);font:inherit;cursor:pointer;min-width:0;overflow-wrap:anywhere;transition:border-color .15s,background .15s}
.folder-card:hover{border-color:var(--blue);background:var(--panel)}
.folder-card small{color:var(--muted);font-size:.82rem}
.folder-card .folder-icon{font-size:2rem;line-height:1.2}
.destination-folder{margin:14px 0 20px}
.destination-folder .hint{display:block;margin-top:6px}
@media(max-width:600px){.folder-grid{grid-template-columns:1fr}.folder-up{margin-left:0}.folder-breadcrumbs .btn{max-width:100%;white-space:normal}}

/* Identidade exclusiva do Portal do Investidor. Estados de sucesso continuam verdes. */
:root{--brand:#ef3340;--brand-dark:#a51d30;--blue:#e83c50;--blue-dark:#b6253b}
.btn-green{background:#b9253c;border-color:#d34355;color:#fff}
.btn-green:hover{background:#d12c45;border-color:#ef6171}
.brand-mark{background:linear-gradient(145deg,#d53449,#89182c);color:#fff}
