:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #17202f;
  --muted: #677386;
  --line: #dce3eb;
  --brand: #108463;
  --brand-strong: #0a6049;
  --blue: #2e63c7;
  --amber: #b7791f;
  --red: #ba3434;
  --sidebar: #ffffff;
  --shadow: 0 10px 24px rgba(23, 32, 47, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-root[hidden],
[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  white-space: nowrap;
}

.login-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 36px;
  overflow: hidden;
  padding: 44px clamp(24px, 6vw, 86px);
  color: #fff;
  background:
    radial-gradient(circle at 24% 20%, rgba(16, 132, 99, 0.34), transparent 30%),
    radial-gradient(circle at 80% 74%, rgba(46, 99, 199, 0.26), transparent 34%),
    linear-gradient(135deg, #07111b 0%, #142131 48%, #081117 100%);
}

#loginScene,
.login-shade {
  position: absolute;
  inset: 0;
}

#loginScene {
  width: 100%;
  height: 100%;
}

.login-shade {
  background:
    linear-gradient(90deg, rgba(7, 17, 27, 0.1), rgba(7, 17, 27, 0.68)),
    linear-gradient(0deg, rgba(7, 17, 27, 0.86), rgba(7, 17, 27, 0.05));
}

.login-copy,
.login-card {
  position: relative;
  z-index: 1;
}

.login-copy {
  max-width: 760px;
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand {
  margin-bottom: 48px;
}

.login-brand strong,
.login-brand span,
.brand strong,
.brand span {
  display: block;
}

.login-brand span,
.brand span,
.sidebar-footer span,
.sidebar-footer small {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.login-copy h1 {
  max-width: 820px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1;
}

.login-lead {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 19px;
  line-height: 1.55;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.signal-row span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
}

.login-card {
  justify-self: end;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(20px);
}

.login-card label,
.login-card p {
  color: rgba(255, 255, 255, 0.76);
}

.login-card input {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
  height: 66px;
}

.login-card .password-field input {
  display: block;
  width: 100%;
  height: 66px;
  padding-right: 58px;
}

.login-card .password-field .password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transform: translateY(-50%);
  overflow: hidden;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.login-card .password-field .password-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.login-card .password-field .eye-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50% / 58%;
}

.login-card .password-field .eye-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.login-card .password-field .eye-icon::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 5px;
  display: none;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-34deg);
}

.login-card .password-field .password-toggle.is-hidden .eye-icon::after {
  display: block;
}

.login-card input:focus {
  outline: 2px solid rgba(16, 132, 99, 0.62);
  outline-offset: 2px;
}

.login-submit {
  width: 100%;
  min-height: 48px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #fecaca !important;
  font-weight: 800;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: var(--ink);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 12px;
  color: #354154;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  color: #355066;
  background: #edf2f7;
  font-size: 11px;
  font-weight: 900;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  background: var(--brand);
}

.nav-item.active span {
  color: var(--brand);
  background: #fff;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sidebar-footer strong {
  font-size: 14px;
}

.sidebar-footer small {
  font-size: 12px;
}

.shell {
  min-height: 100vh;
  margin-left: 268px;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

p,
small {
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(16, 132, 99, 0.18);
  border-color: var(--brand);
}

#searchInput {
  width: min(390px, 42vw);
}

.primary-btn,
.icon-btn,
.plain-btn,
.danger-btn,
.filter-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 800;
}

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

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

.icon-btn,
.filter-btn {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.icon-btn.compact {
  padding: 7px 10px;
  font-size: 13px;
}

.filter-btn.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.plain-btn {
  color: var(--muted);
  background: transparent;
}

.danger-btn {
  color: #fff;
  background: var(--red);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.overview-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.overview-command h2 {
  margin-bottom: 4px;
  font-size: 21px;
}

.overview-command p:last-child {
  margin-bottom: 0;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.metric,
.panel,
.status-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  padding: 17px;
}

.metric span,
.metric small {
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
}

.status-strip article {
  display: flex;
  gap: 12px;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.status-strip article:last-child {
  border-right: 0;
}

.status-strip p {
  margin-bottom: 0;
}

.dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.dot.ok {
  background: var(--brand);
}

.dot.warn {
  background: var(--amber);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  gap: 18px;
}

.overview-bottom {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-top: 18px;
}

.overview-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head.split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.client-cards,
.role-list,
.insight-list {
  display: grid;
  gap: 12px;
}

.client-card,
.module-card,
.role-list article,
.check-item,
.insight-list article,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.client-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.client-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.client-card p {
  margin-bottom: 10px;
}

.client-card-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.status,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.tag {
  color: #28506d;
  background: #e9f2f8;
}

.muted-tag {
  color: var(--muted);
  background: var(--surface-2);
}

.badge {
  color: var(--brand-strong);
  background: #dff4ed;
}

.status.active,
.status.trial {
  color: #08764f;
  background: #dff4ed;
}

.status.trial {
  color: #245ca8;
  background: #e1ebfb;
}

.status.suspended,
.status.blocked,
.status.cancelled {
  color: #9d2727;
  background: #ffe1e1;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline div {
  position: relative;
  padding-left: 32px;
}

.timeline p {
  margin-bottom: 0;
}

.step {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.step.done {
  border-color: var(--brand);
  background: var(--brand);
}

.step.active {
  border-color: var(--amber);
  background: #fff7e6;
}

.mini-checklist,
.alert-list,
.activity-list {
  display: grid;
  gap: 10px;
}

.mini-check,
.alert-item,
.activity-list article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.mini-check > span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 900;
}

.mini-check.done > span {
  color: #fff;
  background: var(--brand);
}

.mini-check strong,
.alert-item strong,
.activity-list strong {
  display: block;
  font-size: 13px;
}

.mini-check p,
.alert-item p {
  margin-bottom: 0;
  font-size: 12px;
}

.alert-item > span {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.alert-item.ok > span {
  background: var(--brand);
}

.alert-item.warning > span {
  background: var(--amber);
}

.alert-item.critical > span {
  background: var(--red);
}

.activity-list article {
  align-items: center;
  justify-content: space-between;
}

.activity-list span {
  flex: 0 0 82px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-list strong {
  flex: 1;
  text-align: right;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 930px;
  border-collapse: collapse;
}

.compact-table table {
  min-width: 760px;
}

.compact-table th,
.compact-table td {
  padding: 11px 10px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td strong,
td span,
td small {
  display: block;
}

td code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.table-empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.module-grid {
  display: grid;
  gap: 16px;
}

.module-group {
  display: grid;
  gap: 10px;
}

.module-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card strong {
  display: block;
  margin-bottom: 6px;
}

.module-card p {
  margin-bottom: 0;
}

.pages-layout {
  align-items: start;
}

.pages-panel,
.pages-side-panel {
  display: grid;
  gap: 18px;
}

.pages-headline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.badge-ghost {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.pages-toolbar {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
}

.pages-select,
.pages-search {
  display: grid;
  gap: 6px;
}

.pages-select input,
.pages-select select,
.pages-search input {
  min-width: 0;
}

.pages-actions {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.pages-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pages-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.page-catalog-grid {
  display: grid;
  gap: 16px;
}

.page-stage {
  display: grid;
  gap: 12px;
}

.page-group {
  display: grid;
  gap: 12px;
}

.page-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.page-group-head h3 {
  margin: 0;
  font-size: 18px;
}

.page-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.page-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.page-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.07);
  cursor: default;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.page-card:hover,
.page-card.selected {
  border-color: var(--brand);
  box-shadow: 0 14px 24px rgba(16, 132, 99, 0.14);
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffffff 0%, #f3fff9 100%);
}

.page-card input {
  display: none;
}

.page-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.page-card small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 11px;
  font-weight: 700;
}

.page-card-description {
  min-height: 44px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.page-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.page-action-btn {
  appearance: none;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.page-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.1);
}

.page-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page-action-open {
  background: linear-gradient(180deg, #eef6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.28);
}

.page-action-tenant {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.2);
}

.page-action-assign {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.22);
}

.page-action-unassign {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.22);
}

.page-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.page-chip-visible {
  color: var(--brand);
  background: rgba(18, 167, 107, 0.12);
}

.page-chip-hidden {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

.page-toggle-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.page-toggle-visible {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.1);
}

.page-toggle-hidden {
  color: var(--brand);
  border-color: rgba(18, 167, 107, 0.18);
  background: rgba(18, 167, 107, 0.1);
}

.page-toggle-btn:hover {
  filter: brightness(0.98);
}

.page-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-status-visible {
  color: var(--brand);
  background: rgba(18, 167, 107, 0.12);
}

.page-status-hidden {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
}

.pages-side-panel .pages-note-list {
  display: grid;
  gap: 12px;
}

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

  .page-card-actions {
    grid-template-columns: 1fr;
  }
}

.pages-side-panel article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.pages-side-panel p {
  margin-bottom: 0;
}

.page-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}

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

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.check-item p,
.role-list p {
  margin-bottom: 0;
}

.capacity .bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.capacity .bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--brand);
}

.insight-list {
  margin-top: 16px;
}

.insight-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.insight-list span {
  color: var(--muted);
}

dialog {
  width: min(720px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(23, 32, 47, 0.25);
}

dialog::backdrop {
  background: rgba(17, 25, 39, 0.48);
}

form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

@media (max-width: 1080px) {
  .metrics,
  .status-strip,
  .grid.two,
  .overview-command,
  .overview-grid,
  .overview-bottom,
  .module-group > div,
  .checklist,
  .page-group-grid,
  .pages-toolbar {
    grid-template-columns: 1fr;
  }

  .overview-command {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-actions {
    justify-content: flex-start;
  }

  .status-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-strip article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  .login-screen {
    grid-template-columns: 1fr;
    align-items: end;
    padding: 24px;
  }

  .login-copy h1 {
    font-size: 40px;
  }

  .login-brand {
    margin-bottom: 30px;
  }

  .login-card {
    justify-self: stretch;
  }

  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .topbar,
  .top-actions,
  .panel-head.split,
  .dialog-head,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #searchInput {
    width: 100%;
  }

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

.reference-dashboard {
  --content-scale: 0.64;
  --sidebar-width: 230px;
  --sidebar-collapsed-width: 14px;
  --ref-bg: #f7f9fc;
  --ref-text: #172033;
  --ref-muted: #647083;
  --ref-line: #e2e8f0;
  --ref-green: #12a76b;
  --ref-blue: #2c7be5;
  --ref-orange: #fb8c16;
  --ref-red: #ef4444;
  color: var(--ref-text);
  background: var(--ref-bg);
  overflow-x: hidden;
  max-width: 100vw;
}

.reference-dashboard .sidebar {
  width: var(--sidebar-width);
  padding: 16px 16px 0;
  background: #fff;
  border-right: 1px solid var(--ref-line);
  box-shadow: none;
  overflow: hidden;
}

.reference-dashboard .brand {
  flex: 0 0 auto;
  gap: 11px;
  padding: 0 14px 14px;
}

.reference-dashboard .brand-symbol {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--ref-green);
  font-size: 14px;
  font-weight: 900;
}

.reference-dashboard .brand strong {
  color: var(--ref-green);
  font-size: 15px;
  letter-spacing: 0;
}

.reference-dashboard .brand span {
  color: #2d374f;
  font-weight: 600;
}

.reference-dashboard .nav {
  display: block;
  flex: 1 1 auto;
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.reference-dashboard .nav::-webkit-scrollbar {
  width: 6px;
}

.reference-dashboard .nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.reference-dashboard .nav p {
  margin: 10px 12px 4px;
  color: #7b8798;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-dashboard .nav-item {
  height: 24px;
  gap: 8px;
  margin-bottom: 2px;
  border-radius: 7px;
  padding: 0 12px;
  color: #253149;
  font-size: 9px;
  font-weight: 700;
}

.reference-dashboard .nav-item.active,
.reference-dashboard .nav-item:hover {
  color: #fff;
  background: linear-gradient(180deg, #12b875, #079957);
  box-shadow: 0 8px 18px rgba(18, 167, 107, 0.24);
}

.reference-dashboard .nav-ico {
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  color: inherit;
  background: transparent;
  font-size: 9px;
}

.reference-dashboard .sidebar-collapse {
  flex: 0 0 auto;
  width: calc(100% + 32px);
  margin: 0 -16px;
  border-top: 1px solid var(--ref-line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  padding: 8px 22px;
  color: #566274;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.reference-dashboard .sidebar-collapse span {
  margin-left: 12px;
}

.reference-dashboard .sidebar-footer {
  flex: 0 0 auto;
  grid-template-columns: 30px 1fr 20px;
  align-items: center;
  gap: 8px;
  margin: 0 -16px;
  border-top: 1px solid var(--ref-line);
  padding: 10px 18px 12px;
}

.reference-dashboard .avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #075a8f;
  font-size: 11px;
  font-weight: 900;
}

.reference-dashboard .sidebar-footer strong,
.reference-dashboard .sidebar-footer small {
  display: block;
}

.reference-dashboard .sidebar-footer small {
  color: #667386;
  font-size: 8px;
}

.reference-dashboard .sidebar-footer strong {
  font-size: 9.5px;
}

.reference-dashboard .chevron-btn {
  border: 0;
  color: #526071;
  background: transparent;
  cursor: pointer;
}

.reference-dashboard .sync-label {
  display: none;
}

.reference-dashboard .shell {
  width: calc((100vw - var(--sidebar-width)) / var(--content-scale));
  min-height: 100vh;
  margin-left: calc(var(--sidebar-width) / var(--content-scale));
  padding: 0;
  zoom: var(--content-scale);
  overflow-x: hidden;
  max-width: calc((100vw - var(--sidebar-width)) / var(--content-scale));
}

.reference-dashboard.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed-width);
}

.reference-dashboard.sidebar-collapsed .sidebar {
  padding-right: 0;
  padding-left: 0;
}

.reference-dashboard.sidebar-collapsed .brand,
.reference-dashboard.sidebar-collapsed .nav,
.reference-dashboard.sidebar-collapsed .sidebar-footer,
.reference-dashboard.sidebar-collapsed .brand strong,
.reference-dashboard.sidebar-collapsed .nav p,
.reference-dashboard.sidebar-collapsed .nav-item:not(.active),
.reference-dashboard.sidebar-collapsed .sidebar-footer > div:not(.avatar),
.reference-dashboard.sidebar-collapsed .chevron-btn,
.reference-dashboard.sidebar-collapsed .sidebar-collapse span {
  display: none;
}

.reference-dashboard.sidebar-collapsed .sidebar-collapse {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 60;
  display: grid;
  width: 18px;
  height: 72px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--ref-line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 0;
  color: #fff;
  background: var(--ref-green);
  box-shadow: 0 12px 24px rgba(18, 167, 107, 0.22);
  text-align: center;
  transform: translateY(-50%);
}

.reference-dashboard .nav-item.is-search-hidden,
.reference-dashboard .nav p.is-search-hidden {
  display: none;
}

.reference-dashboard .topbar {
  height: 80px;
  margin: 0;
  border-bottom: 1px solid var(--ref-line);
  padding: 0 22px 0 36px;
  background: #fff;
}

.reference-dashboard .topbar h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}

.reference-dashboard .topbar p {
  margin: 0;
  color: #617084;
  font-size: 14px;
}

.reference-dashboard .global-search {
  position: absolute;
  left: 50%;
  top: 18px;
  display: flex;
  width: 452px;
  height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  padding: 0 12px;
  color: #8793a4;
  background: #fff;
  transform: translateX(-50%);
}

.reference-dashboard .global-search input {
  flex: 1;
  height: auto;
  border: 0;
  padding: 0;
  color: #2b3547;
  background: transparent;
}

.reference-dashboard .global-search input:focus {
  outline: 0;
}

.reference-dashboard kbd {
  border-radius: 6px;
  padding: 3px 7px;
  color: #98a2b3;
  background: #f2f5f9;
  font-size: 12px;
  font-family: inherit;
}

.reference-dashboard .top-actions {
  gap: 12px;
}

.reference-dashboard .round-btn {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  color: #334155;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.reference-dashboard .round-btn em {
  position: absolute;
  right: 0;
  top: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--ref-red);
  font-size: 10px;
  font-style: normal;
  line-height: 18px;
}

.reference-dashboard .top-new-tenant {
  height: 42px;
  border-radius: 7px 0 0 7px;
  padding: 0 18px;
  box-shadow: 0 10px 18px rgba(18, 167, 107, 0.22);
}

.reference-dashboard .top-pages-btn {
  height: 42px;
  border-radius: 7px;
  padding: 0 18px;
}

.reference-dashboard .top-new-menu {
  height: 42px;
  min-width: 43px;
  border-left: 1px solid rgba(255,255,255,0.26);
  border-radius: 0 7px 7px 0;
  padding: 0;
  box-shadow: 0 10px 18px rgba(18, 167, 107, 0.22);
}

.reference-dashboard #overviewView {
  padding: 26px;
}

.reference-dashboard .metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.reference-dashboard .metric,
.reference-dashboard .panel {
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.reference-dashboard .metric {
  position: relative;
  min-height: 132px;
  padding: 26px 28px;
  overflow: hidden;
}

.reference-dashboard .metric div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reference-dashboard .metric p {
  margin: 0;
  color: #242e40;
  font-size: 15px;
  font-weight: 800;
}

.reference-dashboard .metric-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ref-green);
  font-size: 28px;
  line-height: 1;
}

.reference-dashboard .metric strong {
  display: block;
  margin: 23px 0 6px;
  color: #162033;
  font-size: 29px;
  line-height: 1;
  font-weight: 900;
}

.reference-dashboard .metric small {
  color: var(--ref-green);
  font-size: 14px;
  font-weight: 800;
}

.reference-dashboard .sparkline {
  position: absolute;
  right: 25px;
  bottom: 38px;
  width: 125px;
  height: 35px;
  background:
    linear-gradient(135deg, transparent 8%, var(--ref-green) 8% 11%, transparent 11% 22%, var(--ref-green) 22% 25%, transparent 25% 38%, var(--ref-green) 38% 41%, transparent 41% 55%, var(--ref-green) 55% 58%, transparent 58% 72%, var(--ref-green) 72% 75%, transparent 75% 86%, var(--ref-green) 86% 89%, transparent 89%);
  opacity: 0.95;
}

.reference-dashboard .risk-card strong {
  color: var(--ref-orange);
}

.reference-dashboard .risk-card small {
  color: #566274;
}

.reference-dashboard .risk-ring {
  position: absolute;
  right: 26px;
  top: 37px;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ref-orange) 0 21%, #e6e9ee 21% 100%);
}

.reference-dashboard .risk-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.reference-dashboard .risk-ring b,
.reference-dashboard .risk-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.reference-dashboard .risk-ring b {
  color: var(--ref-orange);
  font-size: 18px;
}

.reference-dashboard .risk-ring span {
  margin-top: -22px;
  color: #7a8493;
  font-size: 12px;
}

.reference-dashboard .dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  max-width: 100%;
  overflow: hidden;
}

.reference-dashboard .chart-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.reference-dashboard .tenants-panel {
  min-height: 390px;
  padding: 0;
}

.reference-dashboard .reference-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 22px 22px 14px;
}

.reference-dashboard .reference-head h2,
.reference-dashboard .panel-title-line h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 900;
}

.reference-dashboard .reference-head h2 {
  flex: 0 0 100%;
}

.reference-dashboard .segmented {
  display: flex;
  flex: 0 0 auto;
  width: fit-content;
  overflow: hidden;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  background: #fff;
}

.reference-dashboard .filter-btn {
  height: 34px;
  border: 0;
  border-right: 1px solid var(--ref-line);
  border-radius: 0;
  padding: 0 16px;
  color: #263448;
  background: #fff;
  font-size: 13px;
}

.reference-dashboard .filter-btn:last-child {
  border-right: 0;
}

.reference-dashboard .filter-btn.active {
  color: #fff;
  background: var(--ref-green);
}

.reference-dashboard .table-tools {
  display: flex;
  flex: 1 1 430px;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
}

.reference-dashboard .table-tools label {
  display: flex;
  width: min(250px, 100%);
  height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  padding: 0 12px;
  color: #94a1b3;
}

.reference-dashboard .table-tools input {
  border: 0;
  padding: 0;
}

.reference-dashboard .table-tools input:focus {
  outline: 0;
}

.reference-dashboard .icon-btn {
  height: 40px;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  padding: 0 16px;
  color: #263448;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.reference-dashboard .filter-toggle-btn span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--ref-green);
  font-size: 10px;
}

.reference-dashboard .filter-toggle-btn span:empty {
  display: none;
}

.reference-dashboard .filter-toggle-btn.active {
  border-color: var(--ref-green);
  color: var(--ref-green);
  background: #ecfdf5;
}

.reference-dashboard .advanced-filters {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.reference-dashboard .advanced-filters[hidden] {
  display: none !important;
}

.reference-dashboard .filter-field {
  display: grid;
  gap: 5px;
}

.reference-dashboard .filter-field span {
  color: #647083;
  font-size: 11px;
  font-weight: 900;
}

.reference-dashboard .filter-field select {
  height: 34px;
  border: 1px solid var(--ref-line);
  border-radius: 7px;
  padding: 0 9px;
  color: #253149;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

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

.reference-dashboard .filter-actions .primary-btn,
.reference-dashboard .filter-actions .plain-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.reference-dashboard table {
  min-width: 910px;
  border-collapse: separate;
  border-spacing: 0;
}

.reference-dashboard th {
  height: 35px;
  border-top: 1px solid var(--ref-line);
  border-bottom: 1px solid var(--ref-line);
  padding: 0 10px;
  color: #273246;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.reference-dashboard td {
  height: 49px;
  border-bottom: 1px solid #edf1f5;
  padding: 6px 10px;
  color: #293548;
  font-size: 13px;
  vertical-align: middle;
}

.reference-dashboard .tenant-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-dashboard .tenant-cell > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: linear-gradient(135deg, #2073c9, #005986);
  font-size: 12px;
  font-weight: 900;
}

.reference-dashboard .tenant-cell strong {
  font-size: 13px;
}

.reference-dashboard .tenant-cell small {
  color: #7a8697;
  font-size: 11px;
}

.reference-dashboard .external {
  margin-left: 5px;
  color: #64748b;
}

.reference-dashboard .status,
.reference-dashboard .risk-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.reference-dashboard .status.active,
.reference-dashboard .risk-pill.ok {
  color: #0f8b5f;
  background: #ddf5ea;
}

.reference-dashboard .status.trial {
  color: #2c6ed5;
  background: #e2edff;
}

.reference-dashboard .status.suspended {
  color: #5b6472;
  background: #eef1f5;
}

.reference-dashboard .status.risk,
.reference-dashboard .risk-pill.warn {
  color: #e87813;
  background: #fff0db;
}

.reference-dashboard .risk-pill.high {
  color: var(--ref-red);
  background: #ffe6e6;
}

.reference-dashboard .health {
  display: grid;
  grid-template-columns: 70px auto;
  align-items: center;
  gap: 8px;
}

.reference-dashboard .health::before {
  content: "";
  grid-column: 1;
  height: 5px;
  border-radius: 99px;
  background: #dfe5ec;
}

.reference-dashboard .health span {
  grid-column: 1;
  grid-row: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--ref-green);
}

.reference-dashboard .health.warn span {
  background: var(--ref-blue);
}

.reference-dashboard .health.high span {
  background: var(--ref-orange);
}

.reference-dashboard .kebab {
  border: 0;
  color: #8a96a8;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.reference-dashboard .table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 18px;
  color: #617084;
  font-size: 13px;
}

.reference-dashboard .pager {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reference-dashboard .pager button {
  border: 0;
  color: #253149;
  background: transparent;
}

.reference-dashboard .pager button.active {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #fff;
  background: var(--ref-green);
}

.reference-dashboard .pager select {
  width: 118px;
  height: 33px;
  border-radius: 7px;
  color: #526071;
  font-size: 13px;
}

.reference-dashboard .right-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

.reference-dashboard .onboarding-card,
.reference-dashboard .alert-card {
  padding: 22px;
}

.reference-dashboard .panel-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.reference-dashboard .panel-title-line a {
  color: var(--ref-green);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.reference-dashboard .onboarding-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.reference-dashboard .progress-ring {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ref-green) 0 64%, #e6eaf0 64% 100%);
}

.reference-dashboard .progress-ring::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
}

.reference-dashboard .progress-ring b {
  position: relative;
  z-index: 1;
  font-size: 18px;
}

.reference-dashboard .onboarding-summary strong,
.reference-dashboard .onboarding-summary span {
  display: block;
}

.reference-dashboard .onboarding-summary span {
  color: #647083;
  margin-top: 4px;
}

.reference-dashboard .onboarding-bars {
  display: grid;
  gap: 17px;
}

.reference-dashboard .onboarding-bar div {
  display: grid;
  grid-template-columns: 1fr auto 20px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.reference-dashboard .onboarding-bar strong,
.reference-dashboard .onboarding-bar span {
  font-size: 13px;
}

.reference-dashboard .onboarding-bar b {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--ref-green);
  font-size: 13px;
}

.reference-dashboard .onboarding-bar i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6ebf1;
}

.reference-dashboard .onboarding-bar i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ref-green);
}

.reference-dashboard .alert-list {
  gap: 18px;
}

.reference-dashboard .reference-alert {
  display: grid;
  grid-template-columns: 22px 1fr 20px;
  align-items: center;
  gap: 12px;
}

.reference-dashboard .reference-alert span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.reference-dashboard .reference-alert strong {
  color: #526071;
  font-size: 14px;
}

.reference-dashboard .reference-alert b {
  text-align: right;
  font-size: 15px;
}

.reference-dashboard .reference-alert.warn,
.reference-dashboard .reference-alert.warn b {
  color: var(--ref-orange);
}

.reference-dashboard .reference-alert.danger,
.reference-dashboard .reference-alert.danger b {
  color: var(--ref-red);
}

.reference-dashboard .reference-alert.info,
.reference-dashboard .reference-alert.info b {
  color: var(--ref-blue);
}

.reference-dashboard .reference-alert strong {
  color: #526071;
}

.reference-dashboard .chart-card {
  min-height: 220px;
  padding: 20px 22px;
  min-width: 0;
  overflow: hidden;
}

.reference-dashboard .chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.reference-dashboard .chart-card h3 {
  margin: 0;
  color: #263144;
  font-size: 16px;
  font-weight: 900;
}

.reference-dashboard .chart-focus-btn {
  height: 30px;
  border: 1px solid var(--ref-line);
  border-radius: 7px;
  padding: 0 10px;
  color: #253149;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.reference-dashboard .chart-focus-btn:hover,
.reference-dashboard .chart-focus-btn:focus-visible {
  outline: 2px solid rgba(18, 167, 107, 0.22);
  border-color: var(--ref-green);
  color: var(--ref-green);
}

.reference-dashboard .donut-row {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.reference-dashboard .donut {
  display: grid;
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  place-items: center;
  border-radius: 50%;
}

.reference-dashboard .donut::before {
  content: "";
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #fff;
}

.reference-dashboard .donut b,
.reference-dashboard .donut span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.reference-dashboard .donut b {
  align-self: end;
  margin-top: 35px;
  font-size: 15px;
}

.reference-dashboard .donut span {
  align-self: start;
  color: #647083;
  font-size: 12px;
}

.reference-dashboard .donut.mrr {
  background: conic-gradient(#2c7be5 0 56%, #12a76b 56% 90%, #fb8c16 90% 97%, #8b5cf6 97% 100%);
}

.reference-dashboard .status-donut {
  background: conic-gradient(#12a76b 0 64%, #2c7be5 64% 82%, #a5afbd 82% 93%, #fb8c16 93% 100%);
}

.reference-dashboard .chart-card ul {
  display: grid;
  flex: 1;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-dashboard .chart-card li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 9px;
  color: #405069;
  font-size: 13px;
}

.reference-dashboard .chart-card li span {
  color: #647083;
}

.reference-dashboard .chart-card i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.reference-dashboard .blue { background: #2c7be5; }
.reference-dashboard .green { background: #12a76b; }
.reference-dashboard .orange { background: #fb8c16; }
.reference-dashboard .purple { background: #8b5cf6; }
.reference-dashboard .gray { background: #a5afbd; }

.reference-dashboard .line-chart {
  position: relative;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  height: 158px;
  padding-left: 62px;
  color: #647083;
  font-size: 12px;
}

.reference-dashboard .line-chart::before {
  content: "";
  position: absolute;
  inset: 0 0 0 62px;
  background: repeating-linear-gradient(to bottom, #e9edf3 0 1px, transparent 1px 31px);
}

.reference-dashboard .line-chart svg {
  position: absolute;
  inset: 4px 8px 0 62px;
  width: calc(100% - 70px);
  height: calc(100% - 10px);
  overflow: visible;
}

.reference-dashboard .chart-focus-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 44px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.reference-dashboard .chart-focus-overlay[hidden] {
  display: none !important;
}

.reference-dashboard .chart-focus-panel {
  width: min(1060px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  overflow: auto;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.26);
}

.reference-dashboard .chart-focus-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ref-line);
  padding: 18px 22px;
}

.reference-dashboard .chart-focus-panel h2 {
  margin: 0;
  font-size: 22px;
}

.reference-dashboard .chart-focus-body {
  padding: 28px;
}

.reference-dashboard .chart-focus-body .chart-card {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.reference-dashboard .chart-focus-body .chart-head {
  display: none;
}

.reference-dashboard .chart-focus-body .donut-row {
  justify-content: center;
  gap: 56px;
  min-height: 300px;
}

.reference-dashboard .chart-focus-body .donut {
  flex-basis: 220px;
  width: 220px;
  height: 220px;
}

.reference-dashboard .chart-focus-body .donut::before {
  width: 142px;
  height: 142px;
}

.reference-dashboard .chart-focus-body .line-chart {
  height: 360px;
}

.reference-dashboard .line-chart polyline {
  fill: none;
  stroke: var(--ref-green);
  stroke-width: 4;
}

.reference-dashboard .line-chart circle {
  fill: var(--ref-green);
}

.reference-dashboard .chart-legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 8px;
  color: #647083;
  font-size: 12px;
}

@media (max-width: 1280px) {
  .reference-dashboard .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .reference-dashboard .right-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reference-dashboard .chart-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .reference-dashboard .sidebar {
    position: static;
    width: auto;
  }

  .reference-dashboard .shell {
    margin-left: 0;
  }

  .reference-dashboard .topbar {
    height: auto;
    align-items: stretch;
    padding: 18px;
  }

  .reference-dashboard .global-search {
    position: static;
    width: 100%;
    transform: none;
  }

  .reference-dashboard .metrics,
  .reference-dashboard .right-column,
  .reference-dashboard .reference-head {
    grid-template-columns: 1fr;
  }

  .reference-dashboard .table-tools {
    grid-column: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Ícone da página no card (mesmos glifos lucide da base — PAGE_ICON_SVGS em app.js) */
.page-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.page-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-card-icon svg {
  width: 19px;
  height: 19px;
}

.page-card-icon:empty {
  display: none;
}
