:root {
  --background: #f7f9fb;
  --surface: #ffffff;
  --surface-low: #f2f4f6;
  --surface-high: #e6e8ea;
  --line: #d8dde5;
  --line-soft: #edf0f4;
  --primary: #1e293b;
  --primary-soft: #334155;
  --secondary: #6a8ee6;
  --secondary-soft: #d8e2ff;
  --text: #191c1e;
  --muted: #657084;
  --danger: #ba1a1a;
  --success: #16a34a;
  --warning: #b45309;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.admin-page {
  background: var(--background);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  min-height: 100vh;
}

.admin-topbar {
  align-items: center;
  background: var(--primary);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  display: flex;
  gap: 28px;
  height: 64px;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand-lockup {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 10px;
  min-width: 230px;
  text-decoration: none;
}

.brand-lockup span:last-child {
  display: flex;
  flex-direction: column;
}

.brand-lockup strong {
  font-size: 15px;
  font-weight: 800;
}

.brand-lockup small {
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
}

.brand-mark {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--primary);
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand-logo-chip {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 4px;
  width: 34px;
}

.brand-logo-chip img {
  display: block;
  height: auto;
  max-height: 26px;
  max-width: 22px;
  width: 22px;
}

.admin-nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 22px;
  min-width: 0;
}

.admin-nav a {
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 6px 0;
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: #fff;
}

.admin-nav a.active {
  position: relative;
}

.admin-nav a.active::after {
  background: var(--secondary);
  border-radius: 999px;
  bottom: -11px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.topbar-search {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: rgba(255, 255, 255, .72);
  display: flex;
  flex: 0 0 320px;
  gap: 8px;
  height: 38px;
  min-width: 220px;
  padding: 0 11px;
}

.topbar-search input {
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 13px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.topbar-search input::placeholder {
  color: rgba(255, 255, 255, .52);
}

.topbar-search .material-symbols-outlined {
  font-size: 19px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.logout-form {
  display: inline;
}

.topbar-button {
  background: var(--secondary);
  border-radius: 8px;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 13px;
  text-decoration: none;
}

.topbar-button.secondary {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
}

.admin-shell {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: none;
  padding: 18px 22px;
  width: 100%;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .045);
  overflow: hidden;
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  padding: 20px 24px;
}

.panel-tools {
  align-items: center;
  display: flex;
  gap: 10px;
}

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

.day-filter label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.day-filter input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  display: block;
  font: inherit;
  height: 32px;
  margin-top: 5px;
  padding: 0 8px;
}

.file-tools label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.file-tools select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  font: inherit;
  height: 34px;
  min-width: 320px;
  padding: 0 8px;
  text-transform: none;
}

#remote-files.panel {
  overflow: visible;
}

.file-modal-backdrop {
  align-items: stretch;
  padding: 20px;
}

.file-modal-backdrop #remote-files.panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 40px);
  width: min(1540px, 100%);
}

.file-modal-backdrop .file-explorer {
  min-height: 0;
}

.file-modal-backdrop .file-table-wrap {
  max-height: 100%;
  min-height: 0;
  overflow: auto;
}

.file-explorer {
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 0;
}

.file-sidebar {
  background: var(--surface-low);
  border-right: 1px solid var(--line);
  min-width: 0;
  overflow: auto;
  padding: 12px 0;
}

.file-sidebar-title {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px 10px;
}

.file-resource-list {
  display: grid;
  gap: 2px;
}

.file-resource {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 9px;
  min-width: 0;
  padding: 9px 14px;
  text-align: left;
}

.file-resource:hover,
.file-resource.active {
  background: #e8edf4;
}

.file-resource .material-symbols-outlined {
  color: var(--primary-soft);
  font-size: 24px;
  flex: 0 0 auto;
}

.file-resource span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-main {
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto 1fr;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px 16px;
}

.file-actionbar {
  align-items: center;
  background: var(--surface-low);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 4px;
  height: 42px;
  padding: 4px;
}

.file-actionbar .icon-button {
  height: 32px;
  min-width: 32px;
  width: 32px;
}

.file-actionbar .material-symbols-outlined {
  font-size: 20px;
}

.toolbar-separator {
  align-self: stretch;
  background: var(--line);
  display: inline-block;
  margin: 3px 4px;
  width: 1px;
}

.danger-icon .material-symbols-outlined {
  color: var(--danger);
}

.file-path-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.file-path-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary);
  font: inherit;
  height: 38px;
  padding: 0 10px;
}

.file-table-wrap {
  max-height: calc(100vh - 295px);
  min-height: 470px;
  overflow: auto;
}

.file-table {
  table-layout: fixed;
}

.file-table th,
.file-table td {
  height: 46px;
  padding-bottom: 8px;
  padding-top: 8px;
  vertical-align: middle;
}

.file-table th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-sort {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: inherit;
  gap: 5px;
  letter-spacing: inherit;
  min-width: 0;
  padding: 0;
  text-align: left;
  text-transform: inherit;
}

.table-sort .sort-mark {
  color: var(--muted);
  font-family: "Material Symbols Outlined";
  font-size: 16px;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  line-height: 1;
}

.table-sort.active {
  color: var(--primary);
}

.table-sort.active .sort-mark {
  color: var(--secondary);
}

.file-table th.select-col,
.file-table td.select-col {
  text-align: center;
  width: 44px;
}

.file-table th:nth-child(2),
.file-table td:nth-child(2) {
  width: 49%;
}

.file-table th:nth-child(3),
.file-table td:nth-child(3) {
  width: 13%;
}

.file-table th:nth-child(4),
.file-table td:nth-child(4) {
  width: 27%;
}

.file-table th:nth-child(5),
.file-table td:nth-child(5) {
  width: 11%;
}

.file-check {
  accent-color: var(--accent);
  cursor: pointer;
  height: 16px;
  width: 16px;
}

.file-name-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.file-name-button:disabled {
  cursor: default;
}

.file-name-button .material-symbols-outlined {
  color: var(--muted);
  font-size: 23px;
  flex: 0 0 auto;
}

.file-name-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row {
  cursor: default;
}

.file-row.selected {
  background: #d8e6ff;
}

.file-row.selected td {
  border-color: #abc3ec;
}

.file-row.checked {
  background: #f4f8ff;
}

.file-table td.right {
  text-align: right;
}

.file-table td.right .icon-button {
  height: 30px;
  min-width: 30px;
  width: 30px;
}

.file-context-menu[hidden] {
  display: none !important;
}

.file-context-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
  display: grid;
  min-width: 190px;
  padding: 6px;
  position: fixed;
  z-index: 120;
}

.file-context-menu button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  padding: 8px 10px;
  text-align: left;
}

.file-context-menu button:hover {
  background: var(--surface-low);
}

.file-context-menu hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 5px 0;
}

.panel-header h2 {
  align-items: center;
  color: var(--primary);
  display: flex;
  font-size: 24px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.panel-body {
  padding: 24px;
}

.eyebrow,
.field-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.version-pill,
.count-pill {
  background: rgba(106, 142, 230, .14);
  border: 1px solid rgba(106, 142, 230, .24);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
}

.count-pill.muted {
  background: rgba(101, 112, 132, .12);
  border-color: rgba(101, 112, 132, .24);
  color: var(--muted);
}

.release-box {
  background: var(--surface-low);
  border: 1px solid rgba(216, 221, 229, .7);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
}

.code-block {
  background: rgba(106, 142, 230, .07);
  border-radius: 6px;
  color: var(--primary-soft);
  display: block;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  padding: 9px;
}

.mono {
  font-family: "JetBrains Mono", Consolas, monospace;
}

.muted-text {
  color: var(--muted);
}

.config-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1.7fr 1.25fr auto;
}

.config-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.config-grid input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: block;
  font: inherit;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  width: 100%;
}

.backup-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 280px;
}

.backup-row-form {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 92px 78px 148px 142px 30px 104px;
  justify-content: end;
}

.backup-row-form input,
.backup-row-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  height: 32px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.backup-row-form input:focus,
.backup-row-form select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(106, 142, 230, .16);
  outline: none;
}

.backup-extra-picker {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) 30px;
  min-width: 0;
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, .42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 80;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  width: min(720px, 100%);
}

.modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.modal-header h3 {
  color: var(--primary);
  font-size: 18px;
  margin: 0;
}

.modal-header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.backup-browser-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr);
}

.detail-modal-panel {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr);
  width: min(920px, calc(100vw - 48px));
}

.detail-modal-body {
  background: #f8fafc;
  color: var(--primary);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  max-height: min(620px, calc(100vh - 150px));
  overflow: auto;
  padding: 18px;
  white-space: pre-wrap;
}

.elevation-panel {
  width: min(430px, calc(100vw - 36px));
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.modal-body label {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  text-transform: uppercase;
}

.modal-body input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  height: 38px;
  padding: 0 10px;
}

.modal-body input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(106, 142, 230, .16);
  outline: none;
}

.modal-actions {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px;
}

.modal-actions .topbar-button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--primary);
}

.browser-path-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 32px auto;
  padding: 14px 18px 8px;
}

.browser-path-row input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  height: 34px;
  min-width: 0;
  padding: 0 10px;
}

.browser-status {
  font-size: 12px;
  min-height: 28px;
  padding: 0 18px 8px;
}

.browser-list {
  border-top: 1px solid var(--line-soft);
  max-height: 420px;
  overflow: auto;
  padding: 6px 0;
}

.browser-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr) 32px 32px;
  min-height: 42px;
  padding: 6px 18px;
}

.browser-row:last-child {
  border-bottom: 0;
}

.browser-row strong {
  color: var(--primary);
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-row small {
  color: var(--muted);
  display: block;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-grid input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(106, 142, 230, .16);
  outline: none;
}

.primary-action {
  background: var(--primary);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  height: 44px;
  padding: 0 16px;
}

.primary-action.compact {
  height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.primary-action:hover,
.topbar-button:hover {
  filter: brightness(1.08);
}

.modern-table table {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}

.backup-table {
  overflow-x: hidden;
}

.backup-table table {
  table-layout: fixed;
}

.backup-table th,
.backup-table td {
  padding-left: 8px;
  padding-right: 8px;
}

.backup-table th:nth-child(1),
.backup-table td:nth-child(1) {
  width: 105px;
}

.backup-table th:nth-child(2),
.backup-table td:nth-child(2) {
  width: 210px;
}

.backup-table th:nth-child(3),
.backup-table td:nth-child(3) {
  width: 62px;
}

.backup-table th:nth-child(4),
.backup-table td:nth-child(4) {
  width: 140px;
}

.backup-table th:nth-child(5),
.backup-table td:nth-child(5),
.backup-table th:nth-child(6),
.backup-table td:nth-child(6) {
  width: 70px;
  text-align: center;
}

.backup-table th:nth-child(7),
.backup-table td:nth-child(7) {
  width: 118px;
}

.backup-table th:nth-child(8),
.backup-table td:nth-child(8) {
  width: 100px;
}

.backup-table th:nth-child(9),
.backup-table td:nth-child(9) {
  width: 530px;
}

.station-table {
  overflow-x: hidden;
}

.station-table table {
  table-layout: fixed;
}

.station-table th,
.station-table td {
  padding-left: 8px;
  padding-right: 8px;
}

.station-table th:nth-child(1),
.station-table td:nth-child(1) {
  width: 108px;
}

.station-table th:nth-child(2),
.station-table td:nth-child(2) {
  width: 220px;
}

.station-table th:nth-child(3),
.station-table td:nth-child(3) {
  width: 145px;
}

.station-table th:nth-child(4),
.station-table td:nth-child(4) {
  text-align: center;
  width: 92px;
  padding-right: 14px;
}

.station-table th:nth-child(5),
.station-table td:nth-child(5) {
  text-align: center;
  width: 82px;
  padding-left: 14px;
}

.station-table th:nth-child(6),
.station-table td:nth-child(6) {
  width: 122px;
}

.station-table th:nth-child(7),
.station-table td:nth-child(7) {
  width: 112px;
}

.station-table th:nth-child(8),
.station-table td:nth-child(8) {
  width: 564px;
}

.station-table .icon-button.light {
  height: 30px;
  min-width: 30px;
  width: 30px;
}

.station-table .primary-action.compact {
  font-size: 12px;
  height: 32px;
  padding: 0 10px;
}

.modern-table th {
  background: #fbfcfe;
  border-bottom: 1px solid #cfd6e3;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  height: 48px;
  letter-spacing: .04em;
  padding: 0 24px;
  text-transform: uppercase;
  white-space: nowrap;
}

.modern-table td {
  border-bottom: 1px solid #d7dde8;
  padding: 12px 24px;
  vertical-align: middle;
}

.modern-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.modern-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.modern-table tr:hover {
  background: #eef4ff;
}

.modern-table tbody tr + tr td {
  border-top: 1px solid #eef1f6;
}

.modern-table.search-empty::after {
  color: var(--muted);
  content: "Nenhum resultado para a busca.";
  display: block;
  font-size: 13px;
  padding: 18px 24px;
}

.modern-table td strong {
  color: var(--primary);
  display: block;
  font-weight: 800;
}

.modern-table td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.right {
  text-align: right;
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.row-actions form {
  display: inline;
}

button,
.button-link,
.icon-button,
.inline-copy,
.screen-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  justify-content: center;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

button:active,
.button-link:active,
.icon-button:active,
.inline-copy:active {
  transform: scale(.98);
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

.icon-button {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
  height: 36px;
  width: 36px;
}

.icon-button.light {
  background: #fff;
  border-color: var(--line);
  color: var(--muted);
  height: 32px;
  width: 32px;
}

.icon-button:hover,
.inline-copy:hover,
.screen-link:hover,
.modern-table button:hover {
  background: var(--secondary-soft);
  border-color: rgba(106, 142, 230, .45);
  color: var(--primary);
}

.material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

.copy-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 150px;
}

.inline-copy {
  background: transparent;
  border-color: transparent;
  color: var(--secondary);
  height: 28px;
  opacity: .75;
  width: 28px;
}

.screen-link {
  background: #fff;
  border-color: var(--line);
  color: var(--secondary);
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  text-decoration: none;
  white-space: nowrap;
}

.screen-link .material-symbols-outlined {
  font-size: 18px;
}

.secret-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 128px;
}

.secret {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #14532d;
  padding: 7px 9px;
  white-space: nowrap;
}

.inline-reveal {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.serial-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--secondary);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  padding: 0;
}

.serial-toggle .material-symbols-outlined {
  font-size: 16px;
}

.serial-toggle:hover {
  color: var(--primary);
  text-decoration: underline;
}

.inline-detail {
  background: rgba(106, 142, 230, .08);
  border: 1px solid rgba(106, 142, 230, .18);
  border-radius: 6px;
  color: var(--primary-soft);
  display: block;
  margin-top: 6px;
  max-width: min(520px, 100%);
  overflow-wrap: anywhere;
  padding: 6px 8px;
  white-space: normal;
  width: max-content;
}

.backup-detail {
  max-height: 280px;
  overflow: auto;
  text-align: left;
  white-space: pre-wrap;
  width: min(760px, 72vw);
}

.inline-detail[hidden] {
  display: none;
}

.danger-soft {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.danger-soft:hover {
  background: #fff1f2;
}

.status-badge {
  align-items: center;
  background: var(--surface-high);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 7px;
  padding: 4px 9px;
  text-transform: uppercase;
}

.status-badge i {
  background: rgba(101, 112, 132, .55);
  border-radius: 999px;
  display: inline-block;
  height: 6px;
  width: 6px;
}

.status-badge.active,
.status-badge.completed,
.status-badge.online {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-badge.active i,
.status-badge.completed i,
.status-badge.online i {
  background: var(--success);
  box-shadow: 0 0 8px rgba(22, 163, 74, .45);
}

.status-badge.pending {
  background: #fef3c7;
  border-color: #fde68a;
  color: var(--warning);
}

.status-badge.pending i,
.status-badge.queued i,
.status-badge.dispatched i,
.status-badge.running i {
  background: var(--warning);
}

.status-badge.queued,
.status-badge.dispatched,
.status-badge.running {
  background: #fef3c7;
  border-color: #fde68a;
  color: var(--warning);
}

.status-badge.network,
.status-badge.local {
  background: rgba(106, 142, 230, .14);
  border-color: rgba(106, 142, 230, .24);
  color: var(--secondary);
}

.status-badge.network i,
.status-badge.local i {
  background: var(--secondary);
}

.status-badge.failed,
.status-badge.archived {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.status-badge.failed i,
.status-badge.archived i {
  background: var(--danger);
}

.status-badge.closed,
.status-badge.expired,
.status-badge.idle,
.status-badge.offline {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #374151;
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
  padding: 44px 24px !important;
  text-align: center;
}

.empty-state .material-symbols-outlined {
  display: block;
  font-size: 40px;
  margin-bottom: 8px;
}

.status-note {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

.table-link {
  color: var(--secondary);
  font-weight: 800;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.error-text {
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: normal;
}

.toast {
  background: var(--primary);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .24);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 13px;
  position: fixed;
  right: 18px;
  top: 76px;
  z-index: 50;
}

.admin-footer {
  background: var(--surface-low);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 18px;
  text-align: center;
}

.password-value {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #14532d;
  display: inline-block;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 24px;
  padding: 16px;
}

.public-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(106, 142, 230, .25), transparent 28rem),
    linear-gradient(135deg, #0f172a 0%, #1d355f 100%);
  position: relative;
}

.public-card {
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.brand {
  letter-spacing: .16em;
}

.public-logo {
  display: block;
  height: auto;
  margin-bottom: 18px;
  max-width: 58px;
  width: 58px;
}

.public-actions {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 5;
}

.public-actions a,
.public-actions button {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
}

.public-actions a:hover,
.public-actions button:hover {
  background: rgba(255, 255, 255, .22);
}

.topbar .topbar-brand {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.topbar .topbar-brand img {
  background: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 4px;
  width: 34px;
}

.topbar .topbar-brand span {
  display: flex;
  flex-direction: column;
}

.login-page {
  align-items: center;
  background:
    radial-gradient(circle at 14% 12%, rgba(106, 142, 230, .24), transparent 28rem),
    linear-gradient(135deg, #0f172a 0%, #1d355f 100%);
  display: flex;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  max-width: 420px;
  padding: 30px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.login-brand .brand-mark {
  background: var(--primary);
  color: #fff;
}

.login-logo {
  display: block;
  height: auto;
  max-width: 42px;
  width: 42px;
}

.login-brand div {
  display: flex;
  flex-direction: column;
}

.login-brand strong {
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
}

.login-brand small {
  color: var(--muted);
  font-size: 12px;
}

.login-card h1 {
  color: var(--primary);
  font-size: 26px;
  margin: 0 0 18px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  font: inherit;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  width: 100%;
}

.login-form input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(106, 142, 230, .16);
  outline: none;
}

.login-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.login-public {
  color: var(--secondary);
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  margin-top: 18px;
  text-decoration: none;
}

.login-public:hover {
  text-decoration: underline;
}

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

  .config-grid {
    grid-template-columns: 1fr;
  }

  .backup-summary,
  .backup-row-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-topbar {
    gap: 12px;
    padding: 0 14px;
  }

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

  .brand-lockup small {
    display: none;
  }

  .admin-shell {
    padding: 14px;
  }

  .panel-header,
  .panel-body {
    padding: 16px;
  }
}

/* Coluna Agente na tabela de Acesso Permanente */
.agent-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.agent-version {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.agent-cell .status-badge {
  align-self: flex-start;
  font-size: 10px;
  padding: 2px 8px;
}

.agent-cell .muted-text {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}
