@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --bg: #f5f0e8;
  --card: #fffdf9;
  --accent: #5c2e2e;
  --accent-hover: #3d1f1f;
  --accent-soft: #f3e8e8;
  --muted: #6b6560;
  --border: #e0d5c8;
  --ok: #2d6a4f;
  --ok-bg: #e8f5ee;
  --warn: #b5651d;
  --warn-bg: #fef3e8;
  --danger: #9b2226;
  --sidebar-w: 308px;
  --nav-icon-col: 64px;
  --nav-text-gap: 16px;
  --sidebar-bg: #2e1218;
  --sidebar-active-bar: #ff5c8a;
  --shadow: 0 4px 24px rgba(92, 46, 46, 0.08);
}

* { box-sizing: border-box; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #f5f0e8 0%, #ebe3d6 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #3a3530;
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.login-hint {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.btn-linkish {
  font-size: 0.8rem;
  color: var(--accent);
}

.backup-codes-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0,0,0,0.15);
}

.backup-codes-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}

.backup-codes-list code {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.sidebar-user {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.8rem;
}

.sidebar-user strong {
  display: block;
  font-size: 0.9rem;
}

.sidebar-user .btn {
  margin-top: 0.5rem;
  width: 100%;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

.admin-users {
  display: grid;
  gap: 1rem;
}

.admin-user-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-user-card input,
.admin-user-card select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-msg {
  font-size: 0.85rem;
  margin-left: 0.5rem;
  color: var(--muted);
}

.admin-msg.ok { color: var(--ok); }
.admin-msg.err { color: var(--danger); }

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

/* ——— Equipa / Administradores (Opção A) ——— */
.team-admin {
  display: grid;
  gap: 1rem;
}

.team-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.team-admin-title {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent);
}

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

.team-kpi {
  padding: 0.85rem 1rem;
  text-align: center;
}

.team-kpi-val {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.team-kpi-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-toolbar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr));
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  align-items: end;
}

.team-toolbar label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.team-toolbar input,
.team-toolbar select {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.team-table-wrap {
  overflow: auto;
  padding: 0;
}

.team-table {
  margin: 0;
}

.team-table tbody tr.team-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.team-table tbody tr.team-row:hover {
  background: rgba(90, 58, 42, 0.04);
}

.team-user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 200px;
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8b4b3a, #c76b52);
  flex-shrink: 0;
}

.team-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.team-user-name {
  display: block;
  font-size: 0.92rem;
}

.team-user-email {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.team-muted {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.team-actions {
  text-align: right;
  white-space: nowrap;
}

.team-table-foot {
  padding: 0.65rem 1rem;
  margin: 0;
  border-top: 1px solid var(--border);
}

.role-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.role-super { background: #3d2a4a; color: #f3e8ff; }
.role-lead { background: #4a3528; color: #ffe8d9; }
.role-tech { background: #2a3d4a; color: #dff3ff; }
.role-noc { background: #2f3d2a; color: #e8f5df; }
.role-default { background: #eee; color: #444; }

.team-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.team-drawer.hidden {
  display: none !important;
}

.team-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 14, 0.45);
  backdrop-filter: blur(2px);
}

.team-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 420px);
  height: 100%;
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(42, 37, 32, 0.15);
  display: flex;
  flex-direction: column;
  animation: teamDrawerIn 0.2s ease;
}

@keyframes teamDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.team-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: #fffdf9;
}

.team-drawer-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent);
}

.team-drawer-body {
  padding: 1rem 1.1rem 1.5rem;
  overflow: auto;
  flex: 1;
}

.team-drawer-profile {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}

.team-drawer-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.team-drawer-meta {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.team-drawer-form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.team-drawer-form input,
.team-drawer-form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.team-drawer-danger {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(180, 60, 50, 0.06);
  border: 1px solid rgba(180, 60, 50, 0.15);
}

.team-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .team-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .team-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .team-toolbar {
    grid-template-columns: 1fr;
  }
  .team-drawer-panel {
    width: 100%;
  }
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: #2a2520;
  min-height: 100vh;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(circle at top left, rgba(255, 92, 138, 0.1), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.04), transparent 26%),
    linear-gradient(180deg, #34131a 0%, #250d14 100%);
  color: #fff;
  padding: 1.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.04);
}

.brand {
  padding: 0 1.75rem 1.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.9rem;
}

.brand h1 {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.2;
}

.brand-ops {
  color: var(--sidebar-active-bar);
}

.brand p {
  margin: 0.75rem 0 0;
  font-size: 0.98rem;
  color: rgba(255,255,255,0.68);
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0.18rem 1rem;
  flex: 1;
}

.nav button,
.nav .nav-item {
  position: relative;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.88);
  padding: 0.54rem 1.15rem;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--nav-text-gap);
  min-height: 56px;
  margin-bottom: 0.02rem;
  border-radius: 14px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  text-decoration: none;
}

.nav .nav-item:visited {
  color: rgba(255,255,255,0.88);
}

.nav-icon-wrap {
  width: var(--nav-icon-col);
  height: var(--nav-icon-col);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--nav-icon-col);
  overflow: visible;
  pointer-events: none;
  border-radius: 16px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nav-icon-svg {
  width: 54px;
  height: 54px;
  display: block;
  overflow: visible;
  filter: url(#nav-shadow);
}

.nav-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  font-size: 0.99rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav button:hover,
.nav .nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  transform: translateX(1px);
}

.nav button.active {
  background: linear-gradient(180deg, rgba(255, 119, 159, 0.18), rgba(255, 255, 255, 0.07));
  color: #fff;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 10px 28px rgba(0,0,0,0.14);
}

.nav button.active .nav-icon-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    0 8px 22px rgba(0,0,0,0.16);
}

.nav button:hover .nav-icon-wrap,
.nav .nav-item:hover .nav-icon-wrap {
  transform: translateY(-1px);
}

.nav-item-dashboard .nav-icon-svg { width: 52px; height: 52px; }
.nav-item-console .nav-icon-svg { width: 52px; height: 52px; }
.nav-item-overview .nav-icon-svg { width: 50px; height: 50px; }
.nav-item-tickets .nav-icon-svg { width: 52px; height: 52px; }
.nav-item-leads .nav-icon-svg { width: 54px; height: 54px; }
.nav-item-events .nav-icon-svg { width: 52px; height: 52px; }
.nav-item-tenants .nav-icon-svg { width: 53px; height: 53px; }
.nav-item-infra .nav-icon-svg { width: 51px; height: 51px; }
.nav-item-account .nav-icon-svg { width: 54px; height: 54px; }
.nav-item-messages .nav-icon-svg { width: 54px; height: 54px; }
.nav-item-admin .nav-icon-svg { width: 54px; height: 54px; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  font-size: 0.72rem;
  opacity: 0.65;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.main { padding: 1.5rem 1.75rem 2rem; overflow-x: auto; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.page-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.page-header p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.9rem; }

.page-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-user {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
}

.header-user strong {
  font-size: 0.85rem;
  color: var(--accent);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.login-notice {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.85rem;
  line-height: 1.45;
}

.login-notice code {
  font-size: 0.8rem;
  word-break: break-all;
}

.register-done {
  text-align: center;
  padding: 0.5rem 0;
}

.activate-page {
  align-items: flex-start;
  padding: 1.25rem;
}

.activate-card {
  width: 100%;
  max-width: 960px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem 1.25rem;
  box-shadow: var(--shadow);
}

.activate-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.activate-header h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent);
}

.activate-sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.activate-account {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}

.factor-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.factor-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.factor-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ok), #40916c);
  border-radius: 999px;
  transition: width 0.25s ease;
}

#factor-progress-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.factor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.factor-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
  min-height: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.factor-tile-done {
  border-color: #b7dfc9;
  background: var(--ok-bg);
  box-shadow: inset 0 0 0 1px rgba(45, 106, 79, 0.15);
}

.factor-tile-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.factor-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.factor-desc {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.factor-check {
  margin-left: auto;
  color: var(--ok);
  font-weight: 700;
  font-size: 1rem;
}

.factor-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #3a3530;
  margin: 0;
}

.factor-label input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  text-align: center;
  letter-spacing: 0.15em;
}

.factor-tile-totp .factor-label input {
  letter-spacing: 0.2em;
}

.qr-panel {
  text-align: center;
}

.qr-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 0.35rem;
  background: #fff;
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.qr-placeholder {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.qr-error {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--danger);
}

.ntfy-box {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: #f8f6f2;
  border: 1px solid var(--border);
  font-size: 0.72rem;
}

.ntfy-title {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-weight: 600;
}

.ntfy-link {
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

.btn-block {
  width: 100%;
}

.activate-submit {
  margin-top: 0.25rem;
}

.activate-feedback {
  margin: 0.75rem 0 0;
}

.activate-footer {
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 860px) {
  .factor-grid {
    grid-template-columns: 1fr;
  }

  .activate-card {
    padding: 1.25rem;
  }
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
}

.status-pill.ok { background: var(--ok-bg); color: var(--ok); border-color: #b7dfc9; }
.status-pill.err { background: #fde8e8; color: var(--danger); border-color: #f5c2c2; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Dashboard — KPI strip premium compacto */
.dashboard-top {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.dashboard-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.kpi-card {
  position: relative;
  flex: 1 1 0;
  min-width: 108px;
  max-width: 160px;
  background: linear-gradient(160deg, #fffdf9 0%, #faf6f0 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.5rem;
  box-shadow: 0 1px 3px rgba(92, 46, 46, 0.05), 0 4px 14px rgba(92, 46, 46, 0.04);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kpi-card--click {
  cursor: pointer;
}
.kpi-card--click:hover {
  transform: translateY(-1px);
  border-color: #c9a8a8;
  box-shadow: 0 6px 18px rgba(92, 46, 46, 0.1);
}

.kpi-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.85;
}

.kpi-card--open .kpi-card-glow { background: linear-gradient(90deg, #5c2e2e, #8b5a5a); }
.kpi-card--assisting .kpi-card-glow { background: linear-gradient(90deg, #1d4e89, #4a7ab8); }
.kpi-card--escalated .kpi-card-glow { background: linear-gradient(90deg, #9b2226, #c45c5c); }
.kpi-card--sessions .kpi-card-glow { background: linear-gradient(90deg, #b5651d, #d4a574); }
.kpi-card--leads .kpi-card-glow { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.kpi-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

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

.dashboard-pulse {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.pulse-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: min(100%, 200px);
  max-width: 100%;
  padding: 0.45rem 0.65rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  box-shadow: 0 1px 2px rgba(92, 46, 46, 0.04);
}

.pulse-chip--ok { border-left: 3px solid var(--ok); }
.pulse-chip--warn { border-left: 3px solid var(--warn); }
.pulse-chip--alert { border-left: 3px solid var(--danger); }

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.pulse-chip--ok .pulse-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.pulse-chip--warn .pulse-dot { background: var(--warn); }
.pulse-chip--alert .pulse-dot { background: var(--danger); }

.pulse-body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  flex: 1;
}
.pulse-body strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3a3530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse-body span {
  font-size: 0.7rem;
  color: var(--muted);
}

.card-compact {
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.card-compact h3 { margin-bottom: 0.65rem; font-size: 0.92rem; }
.ranking-card .ranking-table { font-size: 0.8rem; }
.ranking-card .ranking-table th,
.ranking-card .ranking-table td { padding: 0.35rem 0.45rem; }

@media (max-width: 720px) {
  .dashboard-kpis { display: grid; grid-template-columns: repeat(3, 1fr); }
  .kpi-card { max-width: none; min-width: 0; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--accent);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: column; padding: 1rem 0 0.75rem; }
  .brand { padding: 0 1rem 1rem; margin: 0 0 0.45rem; }
  .brand h1 { font-size: 1.8rem; }
  .brand p { font-size: 0.92rem; margin-top: 0.55rem; }
  .nav { display: block; padding: 0.35rem 0.75rem; }
  .nav button {
    width: 100%;
    min-height: 64px;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
  }
  .nav-icon-wrap { width: 56px; height: 56px; flex-basis: 56px; }
  .nav-icon-svg { width: 46px; height: 46px; }
  .sidebar-footer { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

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

.ticket-list { display: flex; flex-direction: column; gap: 0.65rem; }

.ticket-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.ticket-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.ticket-row.selected { border-color: var(--accent); background: var(--accent-soft); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.open { background: var(--warn-bg); color: var(--warn); }
.badge.closed { background: #eee; color: var(--muted); }
.badge.escalated { background: #fde8e8; color: #9b2226; }
.badge.assisting { background: #e8f0fd; color: #1d4e89; }
.badge.resolved { background: var(--ok-bg); color: var(--ok); }
.badge.assist-observing { background: #f0ebe3; color: var(--muted); }


.assist-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #faf7f2;
}
.assist-panel h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.badge.review { background: #fde8e8; color: var(--danger); }
.badge.wazuh { background: #ede9fe; color: #5b21b6; }
.badge.onboard { background: #e8f5ee; color: var(--ok); }
.badge.sev-critical { background: #fde8e8; color: #9b2226; }
.badge.sev-high { background: #fef3e8; color: var(--warn); }
.badge.sev-med { background: #fff8e6; color: #a16207; }
.badge.sev-low { background: #eee; color: var(--muted); }
.toolbar-sep { color: var(--border); padding: 0 0.25rem; }

.ticket-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.ticket-meta--hash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.session-hash {
  font-size: 0.68rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f0ebe3;
  color: #5c5348;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  word-break: break-all;
}
.ticket-subject { font-weight: 600; font-size: 0.92rem; color: #2a2520; }

.detail-panel { position: sticky; top: 1rem; }

.detail-panel .empty {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 0.35rem 0.75rem; font-size: 0.88rem; margin-bottom: 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.event-list li:last-child { border-bottom: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }

.hidden { display: none !important; }
.loading { color: var(--muted); font-size: 0.9rem; padding: 1rem; }

/* Poll suave — sem flash "Carregando…" */
.view--refreshing {
  opacity: 0.94;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.infra-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

pre.raw {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.75rem;
  overflow: auto;
  max-height: 200px;
}

.view { display: none; }
.view.active { display: block; }

.funnel-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
}

.funnel-label { color: var(--muted); }
.funnel-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.funnel-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b4513);
  border-radius: 999px;
  min-width: 4px;
}
.funnel-count { text-align: right; font-size: 0.85rem; }

/* Dashboard — layout 3 colunas (funil | sessões | tickets) */
.dashboard-ops {
  display: grid;
  grid-template-columns: minmax(180px, 210px) minmax(0, 1fr) minmax(190px, 230px) minmax(190px, 230px);
  grid-template-areas: "funnel sessions leads tickets";
  gap: 1rem;
  align-items: stretch;
  min-height: 340px;
  margin-bottom: 0.75rem;
}

.dashboard-funnel { grid-area: funnel; }
.dashboard-sessions-panel { grid-area: sessions; }
.dashboard-leads-panel { grid-area: leads; }
.dashboard-tickets { grid-area: tickets; }

.dashboard-ops:not(:has(.dashboard-leads-panel)) {
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(220px, 280px);
  grid-template-areas: "funnel sessions tickets";
}

.dashboard-leads-panel .lead-row,
.lead-grid .lead-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.5rem;
  background: #fff8f8;
  cursor: pointer;
  font: inherit;
}
.dashboard-leads-panel .lead-row:hover,
.lead-grid .lead-row:hover {
  border-color: #c45c5c;
}
.lead-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
}

.assist-console-actions,
.assist-console-links {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}
.assist-console-actions h5,
.assist-console-links h5 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn-danger { color: #b91c1c; border-color: #fecaca; }
.audit-mini {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.ranking-table th,
.ranking-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.ranking-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; }

.dashboard-ops > .card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-funnel h3 { flex-shrink: 0; }

.dashboard-sessions-panel {
  flex: 1;
  min-width: 0;
}

.dashboard-tickets .ticket-list-compact {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  padding-right: 0.15rem;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.card-head-row h3 { margin: 0; }

.session-legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
}
.session-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.dot-assisting, .dot-observing {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-assisting { background: #1d4e89; }
.dot-observing { background: var(--warn); }

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  max-height: 420px;
  padding-right: 0.15rem;
}

.session-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdf9;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  min-height: 108px;
}

.session-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.session-card.stale { opacity: 0.72; }

.session-card--assisting {
  border-color: #93b4e0;
  background: linear-gradient(145deg, #f8fbff 0%, #fffdf9 100%);
}
.session-card--escalated {
  border-color: #e8b4b4;
  background: linear-gradient(145deg, #fff8f8 0%, #fffdf9 100%);
}

.session-card-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.session-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}
.session-card--assisting .session-card-dot { background: #1d4e89; box-shadow: 0 0 0 3px #e8f0fd; }
.session-card--escalated .session-card-dot { background: #9b2226; box-shadow: 0 0 0 3px #fde8e8; }
.session-card--observing .session-card-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }

.session-card-domain {
  font-size: 0.92rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-card-stage {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.session-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.session-card-meta code,
.session-card-meta .session-hash {
  font-size: 0.65rem;
  background: #f0ebe3;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  word-break: break-all;
  line-height: 1.35;
}
.session-card-ticket {
  font-weight: 600;
  color: var(--warn);
}

.session-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

@media (max-width: 1200px) {
  .dashboard-ops {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "funnel tickets"
      "sessions leads"
      "sessions sessions";
  }
  .dashboard-funnel { grid-area: funnel; }
  .dashboard-sessions-panel { grid-area: sessions; }
  .dashboard-leads-panel { grid-area: leads; }
  .dashboard-tickets { grid-area: tickets; }
  .session-grid { max-height: 320px; }
}

@media (max-width: 720px) {
  .dashboard-ops {
    grid-template-columns: 1fr;
    grid-template-areas: "funnel" "sessions" "leads" "tickets";
  }
  .session-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
  }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.5rem;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  padding: 0 0 1rem 1.25rem;
}
.timeline-dot {
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.health-card {
  border-left: 4px solid var(--border);
}
.health-card.health-healthy { border-left-color: var(--ok); }
.health-card.health-degraded { border-left-color: var(--warn); }
.health-card.health-critical { border-left-color: var(--danger); }

.health-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.health-score {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.35rem 0;
}

.issue-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.account-pwd-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #3a3530;
}

.account-pwd-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.account-kv {
  margin: 0;
  font-size: 0.85rem;
}

.account-kv dt {
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.5rem;
}

.account-kv dd {
  margin: 0.15rem 0 0;
}

button.health-card {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.health-card--click {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.health-card--click:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(92, 46, 46, 0.12);
}

.health-card-hint {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 14, 0.55);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  width: min(100%, 720px);
  max-height: min(88vh, 900px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(42, 37, 32, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-panel-lg {
  width: min(100%, 980px);
}

.vm112-modal-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: min(96vw, 1320px);
  max-height: min(88vh, 900px);
}
.vm112-modal-shell .modal-panel {
  flex: 1 1 auto;
  min-width: 0;
  max-height: min(88vh, 900px);
}
.vm112-purge-drawer {
  flex: 0 0 0;
  width: 0;
  opacity: 0;
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 16px 16px 0;
  display: flex;
  flex-direction: column;
  transition: width 0.35s ease, opacity 0.3s ease, flex-basis 0.35s ease;
}
.vm112-modal-shell--purge-open .vm112-purge-drawer {
  flex: 0 0 min(340px, 38vw);
  width: min(340px, 38vw);
  opacity: 1;
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(42, 37, 32, 0.08);
}
.vm112-purge-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #faf8f4;
}
.vm112-purge-drawer-head h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
}
.vm112-purge-elapsed {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #6b7280);
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}
.vm112-purge-timeline {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.85rem 1rem;
  overflow-y: auto;
  flex: 1;
}
.vm112-purge-step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem 0.65rem;
  padding: 0.5rem 0;
  border-left: 2px solid #e8e4dc;
  margin-left: 0.35rem;
  padding-left: 0.75rem;
  position: relative;
}
.vm112-purge-step::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.vm112-purge-step--ok::before { background: #16a34a; }
.vm112-purge-step--fail::before { background: #dc2626; }
.vm112-purge-step--running::before { background: #2f6fed; }
.vm112-purge-step--pulse::before {
  animation: vm112-purge-pulse 1s ease infinite;
}
@keyframes vm112-purge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 #2f6fed66; }
  50% { box-shadow: 0 0 0 6px #2f6fed00; }
}
.vm112-purge-step-time {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted, #6b7280);
  padding-top: 0.1rem;
}
.vm112-purge-step-body strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.3;
}
.vm112-purge-step-body span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  margin-top: 0.15rem;
}
@media (max-width: 900px) {
  .vm112-modal-shell {
    flex-direction: column;
    max-height: 92vh;
  }
  .vm112-modal-shell--purge-open .vm112-purge-drawer {
    flex: 0 0 auto;
    width: 100%;
    max-height: 42vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fffdf9;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.modal-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow: auto;
}

.overview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.overview-stat {
  flex: 1 1 120px;
  min-width: 110px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.overview-stat strong {
  display: block;
  font-size: 1.2rem;
  color: var(--accent);
}

.overview-stat span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overview-domain-row {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.5rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.overview-domain-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.overview-domain-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.overview-domain-top strong {
  font-size: 0.95rem;
  color: var(--accent);
}

.overview-domain-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.overview-domain-issues {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.modal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
}

.modal-section {
  margin-top: 1rem;
}

.modal-section h4 {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  color: var(--accent);
}

.detail-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
}

.detail-kv div {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
}

.detail-kv dt {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}

.detail-kv dd {
  margin: 0;
  word-break: break-word;
}

.timeline-compact .timeline-item {
  padding-bottom: 0.75rem;
}

.timeline-compact .timeline-dot {
  width: 8px;
  height: 8px;
  left: -0.4rem;
}

.nav-badge-new {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.18);
  color: #93c5fd;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.nav-item-overview-home .nav-icon-svg {
  width: 50px;
  height: 50px;
}

/* ── Overview Home (Cloudflare Account Home style) ── */
.cf-home {
  --cf-bg: #f6f8fb;
  --cf-card: #ffffff;
  --cf-border: #e2e8f0;
  --cf-text: #1e293b;
  --cf-muted: #64748b;
  --cf-blue: #2f6fed;
  --cf-blue-soft: #eef4ff;
  --cf-red: #dc2626;
  --cf-green: #16a34a;
  color: var(--cf-text);
}

.cf-home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cf-home-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cf-select {
  border: 1px solid var(--cf-border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  background: var(--cf-card);
  color: var(--cf-text);
}

.cf-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.cf-metric-card {
  background: var(--cf-card);
  border: 1px solid var(--cf-border);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cf-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cf-metric-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cf-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cf-metric-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: end;
}

.cf-metric-stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--cf-text);
}

.cf-metric-stat span {
  display: block;
  font-size: 0.78rem;
  color: var(--cf-muted);
  margin-top: 0.15rem;
}

.cf-trend-up { color: var(--cf-green); font-size: 0.75rem; font-weight: 600; }
.cf-trend-down { color: var(--cf-red); font-size: 0.75rem; font-weight: 600; }
.cf-trend-neutral { color: var(--cf-muted); font-size: 0.75rem; font-weight: 600; }

.cf-spark-wrap {
  grid-row: span 2;
  align-self: center;
}

.cf-spark {
  display: block;
}

.cf-grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.cf-panel {
  background: var(--cf-card);
  border: 1px solid var(--cf-border);
  border-radius: 10px;
  overflow: hidden;
}

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

.cf-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cf-text);
}

.cf-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cf-icon-btn {
  border: 1px solid var(--cf-border);
  background: #fff;
  color: var(--cf-muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
}

.cf-icon-btn:hover {
  border-color: var(--cf-blue);
  color: var(--cf-blue);
}

.cf-panel-body {
  padding: 0.35rem 0;
}

.cf-domain-row,
.cf-trail-row,
.cf-node-row,
.cf-step-row {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: grid;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}

.cf-domain-row:hover,
.cf-trail-row:hover,
.cf-node-row:hover,
.cf-step-row:hover {
  background: #f8fafc;
}

.cf-domain-row:last-child,
.cf-trail-row:last-child,
.cf-node-row:last-child,
.cf-step-row:last-child {
  border-bottom: none;
}

.cf-domain-row {
  grid-template-columns: auto 1fr auto auto;
}

.cf-domain-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cf-domain-status.ok { background: var(--cf-green); }
.cf-domain-status.warn { background: #f59e0b; }
.cf-domain-status.bad { background: var(--cf-red); }
.cf-domain-status.unknown { background: #94a3b8; }

.cf-domain-main strong {
  display: block;
  font-size: 0.88rem;
  color: var(--cf-text);
}

.cf-domain-main span {
  display: block;
  font-size: 0.75rem;
  color: var(--cf-muted);
  margin-top: 0.12rem;
}

.cf-domain-metric {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cf-blue);
  min-width: 2.5rem;
  text-align: right;
}

.cf-trail-row {
  grid-template-columns: 1fr auto auto;
}

.cf-trail-action {
  font-size: 0.84rem;
  color: var(--cf-text);
}

.cf-trail-target {
  font-size: 0.78rem;
  color: var(--cf-blue);
}

.cf-trail-time {
  font-size: 0.75rem;
  color: var(--cf-muted);
  white-space: nowrap;
}

.cf-tabs {
  display: flex;
  gap: 0.25rem;
}

.cf-tab {
  border: none;
  background: transparent;
  color: var(--cf-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.cf-tab.active {
  background: var(--cf-blue-soft);
  color: var(--cf-blue);
}

.cf-node-row {
  grid-template-columns: 1fr auto;
}

.cf-node-row strong {
  display: block;
  font-size: 0.88rem;
}

.cf-node-row span {
  display: block;
  font-size: 0.75rem;
  color: var(--cf-muted);
  margin-top: 0.12rem;
}

.cf-step-row {
  grid-template-columns: 1fr auto;
  cursor: default;
}

.cf-step-row button {
  cursor: pointer;
}

.cf-step-row strong {
  font-size: 0.84rem;
}

.cf-step-row span {
  display: block;
  font-size: 0.75rem;
  color: var(--cf-muted);
  margin-top: 0.12rem;
}

.cf-empty {
  padding: 1.25rem 1rem;
  font-size: 0.85rem;
  color: var(--cf-muted);
}

@media (max-width: 1100px) {
  .cf-metrics-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cf-metrics-row { grid-template-columns: 1fr; }
  .cf-domain-row {
    grid-template-columns: auto 1fr;
  }
  .cf-domain-metric,
  .cf-domain-row .badge {
    grid-column: 2;
  }
}

.dns-purpose-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #eef4ff;
  color: #2f6fed;
}

.dns-purpose-badge.purpose-mx { background: #e8f5ee; color: #2d6a4f; }
.dns-purpose-badge.purpose-spf { background: #fef3e8; color: #b5651d; }
.dns-purpose-badge.purpose-dkim { background: #ede9fe; color: #5b21b6; }
.dns-purpose-badge.purpose-dmarc { background: #fde8e8; color: #9b2226; }
.dns-purpose-badge.purpose-mail-host { background: #e8f0fd; color: #1d4e89; }

.dns-records-table td code {
  font-size: 0.76rem;
  word-break: break-all;
}

.dns-records-table .dns-content {
  max-width: 280px;
  word-break: break-word;
  font-size: 0.8rem;
}

.cf-dns-metric-card {
  min-height: 132px;
}

.cf-dns-metric-card .cf-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cf-dns-metric-card .cf-metric-title {
  font-size: 0.72rem;
  line-height: 1.2;
}

.cf-dns-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  max-height: 200px;
}

.cf-dns-empty,
.cf-dns-error,
.cf-dns-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--cf-muted, #64748b);
  line-height: 1.45;
}

.cf-dns-error {
  color: #b91c1c;
}

.cf-dns-inline-summary {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.cf-dns-inline-summary .cf-metric-stat strong {
  font-size: 1.15rem;
}

.cf-dns-inline-summary .cf-metric-stat span {
  font-size: 0.68rem;
}

.cf-dns-table-wrap {
  overflow: auto;
  max-height: 120px;
}

.dns-records-table-compact {
  font-size: 0.72rem;
}

.dns-records-table-compact th,
.dns-records-table-compact td {
  padding: 0.25rem 0.35rem;
}

.dns-records-table-compact .dns-content {
  max-width: 140px;
}

.modal-dns-highlight,
.dns-records-section {
  margin-top: 0.75rem;
  border: 1px solid #dbe4f4;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #f8fbff;
}

.dns-viewer-section .dns-viewer-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.dns-viewer-msg {
  font-style: italic;
  color: var(--muted, #5c6570);
}

.dns-viewer-ns-warn {
  color: #b5651d;
}

.dns-viewer-checks {
  margin: 0.35rem 0 0.65rem;
}

.dns-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.dns-source-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #eef2f7;
  color: #445;
}

.dns-viewer-sub {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
}

/* ── Infra 2 — SOC Operations Console (dark, scoped) ── */
.soc-console {
  --soc-bg: #0b0f14;
  --soc-surface: #121820;
  --soc-surface-2: #1a2230;
  --soc-border: rgba(56, 189, 248, 0.14);
  --soc-border-strong: rgba(56, 189, 248, 0.28);
  --soc-text: #e8edf4;
  --soc-muted: #8b9cb3;
  --soc-cyan: #22d3ee;
  --soc-blue: #38bdf8;
  --soc-green: #34d399;
  --soc-amber: #fbbf24;
  --soc-red: #f87171;
  --soc-purple: #a78bfa;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(34, 211, 238, 0.08), transparent 55%),
    linear-gradient(180deg, #0d1219 0%, var(--soc-bg) 100%);
  border: 1px solid var(--soc-border);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.25rem;
  color: var(--soc-text);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.soc-console--refreshing {
  opacity: 0.94;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.soc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--soc-border);
}

.soc-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.soc-header-left h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--soc-text);
}

.soc-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--soc-green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: soc-pulse 2s ease-in-out infinite;
}

.soc-live-dot.warn { background: var(--soc-amber); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); animation-name: soc-pulse-warn; }
.soc-live-dot.critical { background: var(--soc-red); box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); animation-name: soc-pulse-critical; }

@keyframes soc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}
@keyframes soc-pulse-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}
@keyframes soc-pulse-critical {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(248, 113, 113, 0); }
}

.soc-meta {
  font-size: 0.72rem;
  color: var(--soc-muted);
  font-variant-numeric: tabular-nums;
}

.soc-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.soc-select {
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  color: var(--soc-text);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  font: inherit;
}

.soc-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid var(--soc-border-strong);
  color: var(--soc-cyan);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}
.soc-btn:hover { background: rgba(56, 189, 248, 0.22); }
.soc-btn--ghost {
  background: transparent;
  border-color: var(--soc-border);
  color: var(--soc-muted);
}

.soc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.soc-kpi {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  position: relative;
  overflow: hidden;
}
.soc-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--soc-kpi-accent, var(--soc-blue));
  opacity: 0.85;
}
.soc-kpi--ok { --soc-kpi-accent: var(--soc-green); }
.soc-kpi--warn { --soc-kpi-accent: var(--soc-amber); }
.soc-kpi--critical { --soc-kpi-accent: var(--soc-red); }
.soc-kpi--info { --soc-kpi-accent: var(--soc-cyan); }

.soc-kpi-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--soc-muted);
  margin-bottom: 0.25rem;
}
.soc-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--soc-text);
}
.soc-kpi-sub {
  font-size: 0.68rem;
  color: var(--soc-muted);
  margin-top: 0.15rem;
}

.soc-topology {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 10px;
  font-size: 0.75rem;
}

.soc-node {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  font-weight: 600;
}
.soc-node-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--soc-muted);
}
.soc-node-dot.ok { background: var(--soc-green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.6); }
.soc-node-dot.warn { background: var(--soc-amber); }
.soc-node-dot.bad { background: var(--soc-red); box-shadow: 0 0 6px rgba(248, 113, 113, 0.55); }

.soc-flow {
  color: var(--soc-muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.soc-flow strong { color: var(--soc-cyan); font-weight: 600; }

.soc-main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.95fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.soc-panel {
  background: var(--soc-surface);
  border: 1px solid var(--soc-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
}

.soc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--soc-border);
  background: rgba(0, 0, 0, 0.15);
}
.soc-panel-head h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soc-muted);
}
.soc-panel-body {
  flex: 1;
  padding: 0.55rem 0.65rem;
  overflow: auto;
  min-height: 0;
}

.soc-feed {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}
.soc-feed th {
  text-align: left;
  color: var(--soc-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--soc-border);
  position: sticky;
  top: 0;
  background: var(--soc-surface);
}
.soc-feed td {
  padding: 0.4rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.soc-feed tr:hover td { background: rgba(56, 189, 248, 0.06); }
.soc-feed tr.soc-feed-row--new td { animation: soc-row-flash 1.2s ease-out; }

@keyframes soc-row-flash {
  from { background: rgba(34, 211, 238, 0.18); }
  to { background: transparent; }
}

.soc-sev {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.soc-sev--info { background: var(--soc-cyan); }
.soc-sev--warn { background: var(--soc-amber); }
.soc-sev--high { background: var(--soc-red); }
.soc-sev--ok { background: var(--soc-green); }

.soc-event-name { color: var(--soc-text); font-weight: 500; }
.soc-event-domain { color: var(--soc-blue); font-family: ui-monospace, monospace; font-size: 0.68rem; }
.soc-event-time { color: var(--soc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.soc-chart-wrap {
  padding: 0.35rem 0.25rem 0.15rem;
}
.soc-chart-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--soc-muted);
  padding: 0 0.25rem 0.35rem;
}

.soc-area-chart {
  width: 100%;
  height: auto;
  display: block;
}

.soc-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.soc-pipe-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 1.75rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
}
.soc-pipe-label { color: var(--soc-muted); }
.soc-pipe-bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
}
.soc-pipe-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--soc-blue), var(--soc-cyan));
  transition: width 0.4s ease;
}
.soc-pipe-count {
  text-align: right;
  font-weight: 700;
  color: var(--soc-text);
  font-variant-numeric: tabular-nums;
}

.soc-session-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.soc-session-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.soc-session-card:hover { border-color: var(--soc-border-strong); background: rgba(56, 189, 248, 0.08); }
.soc-session-card.stale { opacity: 0.72; border-style: dashed; }

.soc-session-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--soc-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--soc-cyan);
}
.soc-session-ring.completed { border-color: var(--soc-green); color: var(--soc-green); }
.soc-session-ring.failed { border-color: var(--soc-red); color: var(--soc-red); }

.soc-session-main strong {
  display: block;
  font-size: 0.78rem;
  color: var(--soc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.soc-session-main span {
  font-size: 0.65rem;
  color: var(--soc-muted);
}
.soc-session-hash {
  display: block;
  margin-top: 0.2rem;
}
.soc-session-hash .session-hash {
  font-size: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--soc-muted);
}

.soc-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.soc-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.soc-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  border: 1px solid var(--soc-border);
  background: var(--soc-surface-2);
}
.soc-alert-item--critical { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.soc-alert-item--warn { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.06); }
.soc-alert-item--ok { border-color: rgba(52, 211, 153, 0.25); color: var(--soc-muted); }

.soc-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.soc-health-card {
  padding: 0.55rem 0.65rem;
  background: var(--soc-surface-2);
  border: 1px solid var(--soc-border);
  border-radius: 8px;
}
.soc-health-card h5 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--soc-text);
}
.soc-health-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  font-size: 0.68rem;
}
.soc-health-card dt { color: var(--soc-muted); }
.soc-health-card dd { margin: 0; color: var(--soc-text); text-align: right; font-variant-numeric: tabular-nums; }

.soc-empty {
  color: var(--soc-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.soc-console .badge {
  font-size: 0.62rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

@media (max-width: 1200px) {
  .soc-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .soc-main-grid { grid-template-columns: 1fr; }
  .soc-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .soc-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soc-health-grid { grid-template-columns: 1fr; }
  .soc-topology { font-size: 0.68rem; }
}

/* Modal resultado teste webhook (SOC) */
.soc-test-modal-panel {
  max-width: 520px;
  background: #121820;
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #e8edf4;
}
.soc-test-modal-panel .modal-header {
  border-bottom-color: rgba(56, 189, 248, 0.14);
  background: rgba(0, 0, 0, 0.2);
}
.soc-test-modal-panel .modal-header h3 {
  color: #e8edf4;
}
.soc-test-modal-panel .ticket-meta {
  color: #8b9cb3;
}
.soc-test-result {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.soc-test-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
}
.soc-test-status--ok {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.soc-test-status--fail {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}
.soc-test-kv {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 0.65rem;
  margin: 0;
  font-size: 0.78rem;
}
.soc-test-kv dt {
  color: #8b9cb3;
  margin: 0;
}
.soc-test-kv dd {
  margin: 0;
  color: #e8edf4;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  word-break: break-all;
}
.soc-test-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #8b9cb3;
  line-height: 1.45;
  padding: 0.55rem 0.65rem;
  background: rgba(56, 189, 248, 0.06);
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.12);
}
.soc-test-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.health-card--wazuh {
  border-left: 3px solid #7c3aed;
}

.wazuh-score {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.wazuh-api-ok { color: var(--ok); }
.wazuh-api-bad { color: var(--danger); }

.wazuh-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.75rem;
}

.wazuh-table-wrap {
  overflow: auto;
  max-height: 220px;
}

.wazuh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.wazuh-table th,
.wazuh-table td {
  text-align: left;
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.wazuh-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Spec 014 — relógio por fase */
.timing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  font-size: 0.82rem;
}

.timing-stat strong {
  color: var(--accent, #38bdf8);
}

.timing-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  vertical-align: middle;
}

.timing-badge--muted {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.soc-timing-badge {
  flex-shrink: 0;
  align-self: center;
}

/* Spec 015 — módulos */
.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.module-row--locked {
  opacity: 0.72;
  cursor: default;
}

.module-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.module-id {
  font-size: 0.7rem;
  color: var(--muted);
}

.module-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.modules-admin-card {
  max-width: 52rem;
}

/* Card relógio por fase */
.phase-timing-card {
  margin-bottom: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
}

.phase-timing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.phase-timing-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.phase-timing-kpi {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.phase-timing-kpi-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.phase-timing-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
}

.phase-timing-kpi-value--sm {
  font-size: 0.82rem;
  font-weight: 600;
}

.phase-timing-kpi-value--live {
  font-variant-numeric: tabular-nums;
  animation: timing-live-pulse 2s ease-in-out infinite;
}

@keyframes timing-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.phase-timing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.phase-timing-table th,
.phase-timing-table td {
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.phase-timing-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.timing-cell-delta strong {
  color: #4ade80;
}

.timing-cell-total {
  color: #94a3b8;
  font-size: 0.78rem;
}

.cf-dns-panel-body .phase-timing-card {
  margin-bottom: 0.85rem;
}


@media (max-width: 900px) {
  .wazuh-modal-grid { grid-template-columns: 1fr; }
}

/* Spec 017 — Domínios VM112 (Account Home) */
.vm112-domains-panel { margin-bottom: 1.25rem; }
.vm112-domains-search { min-width: 14rem; max-width: 100%; }
.vm112-domains-foot { padding: 0.5rem 1rem 0.75rem; margin: 0; }
.vm112-domain-badges { display: flex; flex-wrap: wrap; gap: 0.25rem; justify-content: flex-end; }
.vm112-infra-steps { margin: 0; padding-left: 1.2rem; }
.vm112-infra-steps li.ok { color: var(--ok, #16a34a); }
.vm112-infra-steps li.fail { color: #b91c1c; }
.vm112-purge-zone {
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}
.vm112-purge-warn { color: #7f1d1d; font-size: 0.9rem; margin-bottom: 0.75rem; }
.vm112-purge-input {
  display: block;
  width: 100%;
  max-width: 24rem;
  margin: 0.35rem 0 0.75rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.vm112-purge-zone .btn-danger {
  background: #fef2f2;
  margin-top: 0.25rem;
}
.vm112-purge-zone .btn-danger:hover:not(:disabled) {
  background: #fee2e2;
}

/* Modal purge — loading VM112 detail (Spec 018) */
.vm112-load-panel {
  padding: 0.25rem 0;
}
.vm112-load-progress {
  height: 4px;
  background: #fecaca;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.vm112-load-progress-bar {
  display: block;
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, #b91c1c, #f87171, #b91c1c);
  border-radius: 999px;
  animation: vm112-load-bar 1.35s ease-in-out infinite;
}
@keyframes vm112-load-bar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
.vm112-load-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #7f1d1d;
}
.vm112-load-steps {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}
.vm112-load-step {
  position: relative;
  padding: 0.28rem 0 0.28rem 1.35rem;
  font-size: 0.82rem;
  color: var(--muted, #6b7280);
}
.vm112-load-step::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.62rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d1d5db;
}
.vm112-load-step--active {
  color: #991b1b;
  font-weight: 600;
}
.vm112-load-step--active::before {
  background: #dc2626;
  animation: vm112-purge-pulse 1s ease infinite;
}
.vm112-load-spinner {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  border: 2px solid rgba(185, 28, 28, 0.22);
  border-top-color: #b91c1c;
  border-radius: 50%;
  animation: vm112-load-spin 0.65s linear infinite;
  vertical-align: -0.12em;
  margin-right: 0.4rem;
}
@keyframes vm112-load-spin {
  to { transform: rotate(360deg); }
}
.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 9rem;
  cursor: wait;
  opacity: 0.92;
}
.vm112-load-dots::after {
  display: inline-block;
  width: 1.1em;
  text-align: left;
  animation: vm112-load-dots 1.4s steps(4, end) infinite;
  content: '';
}
@keyframes vm112-load-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75%, 100% { content: '...'; }
}
.vm112-modal-sub-loading {
  color: var(--muted, #6b7280);
}

/* Contas — Orquestração VM112 (Spec 017) */
.contas-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.25rem 0 2rem;
}
.contas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contas-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
  margin: 0 0 0.25rem;
}
.contas-title {
  margin: 0;
  font-size: 1.65rem;
  color: var(--text, #1a1a2e);
}
.contas-sub {
  margin: 0.35rem 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.92rem;
}
.contas-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.contas-stat {
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.contas-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}
.contas-stat span {
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
}
.contas-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  align-items: start;
}
.contas-panel {
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 12px;
  overflow: hidden;
}
.contas-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eee8dc;
  background: #faf8f4;
}
.contas-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}
.contas-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.contas-search {
  flex: 1;
  max-width: 16rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.88rem;
}
.contas-panel-body {
  padding: 0.5rem;
  max-height: min(70vh, 560px);
  overflow-y: auto;
}
.contas-domain-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.contas-domain-row:hover {
  background: #f3f6fb;
}
.contas-domain-row--selected {
  background: #e8f0fe;
  outline: 1px solid #2f6fed44;
}
.contas-domain-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.contas-domain-dot.ok { background: #16a34a; }
.contas-domain-dot.warn { background: #d97706; }
.contas-domain-main strong {
  display: block;
  font-size: 0.95rem;
}
.contas-domain-main span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
  margin-top: 0.15rem;
}
.contas-domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}
.contas-domain-tags .tag {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}
.contas-domain-tags .tag-ok { background: #dcfce7; color: #166534; }
.contas-domain-tags .tag-warn { background: #fef3c7; color: #92400e; }
.contas-domain-tags .tag-muted { background: #f1f5f9; color: #94a3b8; }
.contas-domain-action {
  font-size: 0.78rem;
  color: #2f6fed;
  white-space: nowrap;
}
.contas-scopes .contas-scope-item {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f0ebe3;
}
.contas-scopes .contas-scope-item:last-child { border-bottom: none; }
.contas-scopes strong {
  display: block;
  font-size: 0.85rem;
}
.contas-scopes span {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
}
.contas-scope-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  color: #7f1d1d;
  background: #fff8f8;
  border-top: 1px solid #fecaca;
}
.contas-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted, #6b7280);
}
@media (max-width: 900px) {
  .contas-stats-row { grid-template-columns: repeat(2, 1fr); }
  .contas-layout { grid-template-columns: 1fr; }
  .contas-domain-row { grid-template-columns: auto 1fr; }
  .contas-domain-tags, .contas-domain-action { grid-column: 2; }
}

/* Serviços — Orquestração multi-produto (Spec 018) */
.servicos-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.25rem 0 2rem;
}
.servicos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.servicos-poll-status {
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
}
.servicos-poll-status--err {
  color: #b91c1c;
}
.servicos-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
  margin: 0 0 0.25rem;
}
.servicos-title {
  margin: 0;
  font-size: 1.65rem;
  color: var(--text, #1a1a2e);
}
.servicos-sub {
  margin: 0.35rem 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.95rem;
  font-weight: 500;
}
.servicos-lead {
  margin: 0.5rem 0 0;
  color: var(--muted, #6b7280);
  font-size: 0.88rem;
  line-height: 1.45;
}
.servicos-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.servicos-stat {
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.servicos-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}
.servicos-stat span {
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
}
.servicos-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr minmax(200px, 260px);
  gap: 1rem;
  align-items: start;
}
.servicos-panel {
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 12px;
  overflow: hidden;
}
.servicos-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eee8dc;
  background: #faf8f4;
}
.servicos-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.servicos-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #2f6fed;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.servicos-search {
  flex: 1;
  max-width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.85rem;
}
.servicos-panel--clients .servicos-panel-head {
  flex-wrap: wrap;
}
.servicos-panel-body {
  padding: 0.5rem;
  max-height: min(72vh, 620px);
  overflow-y: auto;
}
.servicos-client-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.servicos-client-main {
  min-width: 0;
  overflow: hidden;
}
.servicos-client-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}
.servicos-client-row:hover { background: #f3f6fb; }
.servicos-client-row--selected {
  background: #e8f0fe;
  outline: 1px solid #2f6fed44;
}
.servicos-client-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.servicos-client-dot.ok { background: #16a34a; }
.servicos-client-dot.warn { background: #d97706; }
.servicos-client-main strong {
  display: block;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.servicos-client-main span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  margin-top: 0.1rem;
}
.servicos-client-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}
.servicos-client-badge--active { background: #dcfce7; color: #166534; }
.servicos-client-badge--inactive { background: #f1f5f9; color: #64748b; }
.servicos-client-badge--planned { background: #fef3c7; color: #92400e; }
.servicos-client-banner {
  padding: 0.65rem 0.85rem 0.85rem;
  border-bottom: 1px solid #eee8dc;
  margin: -0.5rem -0.5rem 0.75rem;
  background: #f8fafc;
}
.servicos-client-banner strong { display: block; font-size: 1rem; }
.servicos-client-banner span {
  font-size: 0.78rem;
  color: var(--muted, #6b7280);
}
.servicos-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 0.25rem;
}
.servicos-tile {
  position: relative;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 0.85rem 0.75rem 2.2rem;
  background: #fafafa;
  min-height: 130px;
}
.servicos-tile--clickable {
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.servicos-tile--clickable:hover {
  border-color: #2f6fed;
  box-shadow: 0 2px 8px #2f6fed22;
}
.servicos-tile--selected {
  border-color: #2f6fed;
  background: #f0f6ff;
}
.servicos-tile--active { border-left: 3px solid #16a34a; }
.servicos-tile--inactive { opacity: 0.85; }
.servicos-tile--planned { opacity: 0.7; border-style: dashed; }
.servicos-tile-tier {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.servicos-tile-tier--saas { background: #dbeafe; color: #1e40af; }
.servicos-tile-tier--iaas { background: #fef3c7; color: #92400e; }
.servicos-tile-tier--paas { background: #ede9fe; color: #5b21b6; }
.servicos-tiles-section { margin-bottom: 1rem; }
.servicos-tiles-section-title {
  margin: 0 0 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #6b7280);
}
.servicos-wizard-note {
  margin: 0.75rem 0.25rem 0.25rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  color: #475569;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}
.servicos-tile-icon {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.servicos-tile-title {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
}
.servicos-tile-desc {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  line-height: 1.35;
}
.servicos-tile-status {
  position: absolute;
  bottom: 0.55rem;
  left: 0.75rem;
  font-size: 0.65rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
}
.servicos-tile-status--active { background: #dcfce7; color: #166534; }
.servicos-tile-status--inactive { background: #f1f5f9; color: #64748b; }
.servicos-tile-status--planned { background: #fef3c7; color: #92400e; }
.servicos-tile-wizard {
  display: block;
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}
.servicos-tile-action {
  position: absolute;
  bottom: 0.55rem;
  right: 0.75rem;
  font-size: 0.68rem;
  color: #2f6fed;
}
.servicos-scopes .servicos-scope-item {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f0ebe3;
}
.servicos-scope-item--clickable {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease;
}
.servicos-scope-item--clickable:hover,
.servicos-scope-item--clickable:focus-visible {
  background: #faf6f0;
  outline: none;
}
.servicos-scope-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}
.servicos-scopes .servicos-scope-item:last-child { border-bottom: none; }
.servicos-scopes strong { display: block; font-size: 0.85rem; }
.servicos-scope-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  margin-bottom: 0.35rem;
}
.servicos-scope-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.5rem;
  font-size: 0.68rem;
}
.servicos-scope-spec {
  color: #7c3aed;
}
.servicos-scope-goto {
  color: #2f6fed;
  font-weight: 600;
}
.servicos-scope-layer {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}
.servicos-scope-layer--tenant { background: #dbeafe; color: #1d4ed8; }
.servicos-scope-layer--app { background: #fce7f3; color: #9d174d; }
.servicos-scope-layer--infra { background: #e7e5e4; color: #44403c; }
.servicos-blocklist-banner {
  margin: 0.65rem 0.85rem 0.5rem;
  padding: 0.55rem 0.65rem;
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #7f1d1d;
}
.servicos-blocklist-banner p { margin: 0.35rem 0 0; }
.servicos-blocklist-banner code {
  font-size: 0.72rem;
  background: #fee2e2;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}
.servicos-client-badge--protected {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
}
.servicos-tile-layer {
  position: absolute;
  top: 0.45rem;
  left: 0.55rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.servicos-tile-layer--tenant { background: #dbeafe; color: #1d4ed8; }
.servicos-tile-layer--app { background: #fce7f3; color: #9d174d; }
.servicos-tile-layer--infra { background: #e7e5e4; color: #44403c; }
.servicos-scopes span { font-size: 0.75rem; color: var(--muted, #6b7280); }
.servicos-scope-hint {
  padding: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted, #6b7280);
  margin: 0;
}
.servicos-scope-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  color: #7f1d1d;
  background: #fff8f8;
  border-top: 1px solid #fecaca;
}
.servicos-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted, #6b7280);
}
.servicos-empty--center {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 1024px) {
  .servicos-layout { grid-template-columns: 1fr; }
  .servicos-stats-row { grid-template-columns: repeat(2, 1fr); }
}

.purge-history-table tbody tr.purge-history-row {
  cursor: pointer;
}
.purge-history-table tbody tr.purge-history-row:hover {
  background: rgba(47, 111, 237, 0.06);
}
.event-auditor-row {
  cursor: pointer;
}
.event-auditor-row:hover {
  background: rgba(47, 111, 237, 0.06);
}
.purge-history-link {
  color: var(--accent, #2f6fed);
  font-size: 0.85rem;
}
.purge-history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .purge-history-grid { grid-template-columns: 1fr; }
}
.purge-history-kv {
  width: 100%;
  font-size: 0.9rem;
}
.purge-history-kv td {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.purge-history-kv td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.purge-history-vm112-sum {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}
.purge-history-error {
  color: #dc2626;
  font-size: 0.9rem;
}
.purge-history-timeline {
  max-height: 420px;
  overflow-y: auto;
  margin-top: 0.75rem;
}
.purge-history-removed {
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
  max-width: 14rem;
}

/* Infra — layout tipo wizard (ws-panel + aqua/teal) */
.infra-page {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.infra-stack-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 70%);
}
.infra-vm-section {
  margin-bottom: 0.5rem;
}
.infra-vm-head {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.02em;
}
.infra-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.infra-hero-chip {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f0fdfa 0%, #fff 55%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.infra-hero-chip--openpanel {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%);
  border-color: #fed7aa;
}
.infra-panel--featured {
  border-color: #fdba74;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.12);
}
.infra-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}
.infra-hero-dot--warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.infra-hero-dot--bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }
.infra-hero-body strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}
.infra-hero-body span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}
.infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.infra-panel--wide { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .infra-grid { grid-template-columns: 1fr; }
}
.infra-panel .ws-panel-body { padding: 0.85rem 1rem; }
.infra-kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}
.infra-kv div {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.infra-kv dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0;
}
.infra-kv dd {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.infra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.infra-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
}
.infra-alert-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.infra-alert-list li {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
}
.ws-panel-head--aqua {
  background: linear-gradient(135deg, #0891b2 0%, #22d3ee 45%, #2dd4bf 100%);
}
.ws-panel-head--slate {
  background: linear-gradient(90deg, #334155, #64748b);
}
.ws-panel-head--violet {
  background: linear-gradient(90deg, #6d28d9, #8b5cf6);
}
.ws-panel-head--rose {
  background: linear-gradient(90deg, #be123c, #f43f5e);
}
.infra-domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.infra-domain-chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-family: ui-monospace, monospace;
}
.purge-auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin-top: 0.5rem;
  padding: 0.85rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  border: 1px solid #ccfbf1;
}
.purge-auth-form label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}
.purge-auth-form input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.purge-auth-form input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}
.purge-auth-form button {
  grid-column: 1 / -1;
  justify-self: start;
}
.purge-auth-generated {
  margin: 0.75rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid #6ee7b7;
  text-align: center;
}
.purge-auth-generated.hidden { display: none; }
.purge-auth-code-display {
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: #0f766e;
  font-weight: 700;
}
.infra-table-wrap {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.infra-table-wrap table {
  margin: 0;
}
.infra-table-wrap th {
  background: #f1f5f9;
  font-size: 0.68rem;
}
.infra-table-wrap td {
  font-size: 0.82rem;
}
.infra-json-panel pre.raw {
  margin: 0;
  max-height: 240px;
  border-radius: 0;
  border: none;
  background: #0f172a;
}

/* Process cards — grid uniforme (Spec 033 § proc-card) */
.proc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.proc-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.proc-card--teal { border-top: 3px solid #14b8a6; }
.proc-card--orange { border-top: 3px solid #f97316; }
.proc-card--rose { border-top: 3px solid #f43f5e; }
.proc-card--slate { border-top: 3px solid #64748b; }
.proc-card--violet { border-top: 3px solid #8b5cf6; }
.proc-card--aqua { border-top: 3px solid #06b6d4; }
.proc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.proc-card-heading {
  flex: 1;
  min-width: 0;
}
.proc-card-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.proc-card--teal .proc-card-icon { background: #ccfbf1; }
.proc-card--orange .proc-card-icon { background: #ffedd5; }
.proc-card--rose .proc-card-icon { background: #ffe4e6; }
.proc-card--slate .proc-card-icon { background: #f1f5f9; }
.proc-card--violet .proc-card-icon { background: #ede9fe; }
.proc-card--aqua .proc-card-icon { background: #cffafe; }
.proc-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.proc-card-spec {
  font-size: 0.62rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  line-height: 1.2;
}
.proc-card-badge {
  position: static;
  font-size: 0.6rem;
  flex-shrink: 0;
}
.proc-card-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}
.proc-card-desc {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proc-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.proc-card-foot .btn { flex: 1 1 auto; min-width: 0; }

/* INFRA detail modal */
#infra-process-modal .modal-panel {
  width: min(100%, 920px);
}
.infra-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #fffdf9 0%, #f8fafc 100%);
  margin-bottom: 14px;
}
.infra-detail-hero__icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.35rem;
  background: #fff;
  flex-shrink: 0;
}
.infra-detail-hero__copy { flex: 1; min-width: 0; }
.infra-detail-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}
.infra-detail-hero__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.infra-detail-hero__sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #64748b;
}
.infra-detail-hero__status { flex-shrink: 0; margin-top: 2px; }
.infra-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.infra-detail-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e8edf2;
  background: #fff;
}
.infra-detail-card--wide { grid-column: 1 / -1; }
.infra-detail-card__title {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5c2e2e;
}
.infra-detail-kv {
  margin: 0;
  display: grid;
  gap: 6px;
}
.infra-detail-kv dt {
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.infra-detail-kv dd {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #1e293b;
  word-break: break-word;
}
.infra-detail-kv dd code {
  font-size: 0.74rem;
  word-break: break-all;
}
.infra-detail-code-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.infra-detail-code-list code {
  font-size: 0.72rem;
  color: #334155;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}
.infra-detail-validation {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
}
.infra-detail-id {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}
.infra-detail-id span {
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 6px;
}
.infra-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8edf2;
}
@media (max-width: 720px) {
  .infra-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .proc-grid { grid-template-columns: 1fr; }
}

/* Spec 021 — Acesso utilizador (separado do VM112 Onboard) */
.ws-access-zone {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  border: 1px solid #99f6e4;
}
.ws-zone-banner { margin-bottom: 1rem; }
.ws-zone-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
  background: #ccfbf1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}
.ws-zone-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.ws-zone-desc {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  max-width: 52rem;
}

.ws-access-health-card {
  margin-bottom: 0.75rem;
  border-left-width: 4px;
}
.ws-access-health-card .ws-dash-inner {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
}
.ws-dash-grid--inner { margin-bottom: 0; }

.ws-info-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 720px) {
  .ws-info-cards-row { grid-template-columns: 1fr; }
}
.ws-info-card {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e2e8f0;
}
.ws-info-card-head {
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
}
.ws-info-card-head--teal { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.ws-info-card-head--orange { background: linear-gradient(90deg, #ea580c, #f97316); }
.ws-info-card-body {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
}
.ws-info-card-body p { margin: 0 0 0.5rem; }
.ws-info-list, .ws-info-steps {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
}
.ws-info-list li, .ws-info-steps li { margin-bottom: 0.4rem; }
.ws-info-note {
  margin-top: 0.65rem !important;
  padding: 0.45rem 0.55rem;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 0.78rem !important;
  color: #92400e !important;
}

.ws-zone-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ws-zone-divider::before,
.ws-zone-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}
.ws-zone-divider span {
  white-space: nowrap;
  padding: 0.35rem 0.85rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
}

.overview-tenant-zone {
  padding: 0.75rem;
  border-radius: 10px;
  background: #fafaf9;
  border: 1px solid var(--border, #e5e7eb);
}
.overview-zone-label {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.overview-zone-label h4 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: #3a3530;
}
.overview-zone-label .btn {
  margin-top: 0.35rem;
}

.ws-access-overview-card {
  border-left-width: 4px;
}
.ws-access-overview-card .health-card-head h3 {
  color: #0f766e;
}

.ws-dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 960px) {
  .ws-dash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ws-dash-grid { grid-template-columns: 1fr; }
}

.ws-panel {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 11rem;
}
.ws-panel-head {
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
}
.ws-panel-head--teal { background: linear-gradient(90deg, #0d9488, #14b8a6); }
.ws-panel-head--orange { background: linear-gradient(90deg, #ea580c, #f97316); }
.ws-panel-body {
  flex: 1;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
}
.ws-panel-body--donut {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ws-panel-body--table { padding: 0; overflow-x: auto; }
.ws-panel-body--ips { display: flex; flex-direction: column; gap: 0.35rem; }

.ws-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  color: #475569;
}
.ws-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.ws-legend span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ws-hbar-row {
  display: grid;
  grid-template-columns: 7rem 1fr 1.5rem;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}
.ws-hbar-label { color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-hbar-track {
  height: 14px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.ws-hbar-fill { height: 100%; border-radius: 4px; min-width: 2px; }
.ws-hbar-val { text-align: right; font-weight: 700; color: #0f172a; }

.ws-ip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.ws-ip-rank {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #f1f5f9;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.ws-ip-addr { flex: 1; font-size: 0.8rem; }
.ws-ip-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.ws-threat-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
}
.ws-threat-table th {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 2px solid #fed7aa;
}
.ws-threat-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ws-threat-table tbody tr.wizard-sec-row { cursor: pointer; }
.ws-threat-table tbody tr.wizard-sec-row:hover { background: #fff7ed; }
.ws-threat-level {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.ws-empty-chart {
  margin: 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 1.5rem 0;
}

.ws-dash-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0 0;
  margin-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.overview-domains-section {
  margin-top: 0.5rem;
}

.wizard-sec-table tbody tr.wizard-sec-row:hover {
  background: rgba(47, 111, 237, 0.06);
}
.soc-feed-row--security td.soc-event-name { color: #b45309; }

.badge.billing { background: #f59e0b33; color: #fbbf24; font-size: 0.65rem; }
.kpi-card--billing-pending .kpi-value { color: #f59e0b; }
.kpi-card--billing-active .kpi-value { color: #22c55e; }
.servicos-billing-badge { cursor: pointer; font-size: 0.85rem; opacity: 0.45; }
.servicos-billing-badge--active { opacity: 1; filter: drop-shadow(0 0 4px #22c55e88); }
.migration-job-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.migration-gate-ready { color: #22c55e; }
.migration-gate-blocked { color: #ef4444; }
.migration-gate-warning { color: #f59e0b; }

/* Console v2 migration banners (Desk → console.ligbox.com.br) */
.console-v2-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, #e6f4ff 0%, #f0f7ff 100%);
  border: 1px solid #91caff;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #1a1c21;
}
.console-v2-banner a {
  color: #006bb4;
  font-weight: 600;
}
.billing-modal-backdrop { position: fixed; inset: 0; background: #0009; z-index: 900; display: flex; align-items: center; justify-content: center; }
.billing-modal { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; max-width: 480px; width: 90%; }
.billing-modal-wide { max-width: 920px; }
.billing-activation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 0.75rem; }
.billing-activation-col { border: 1px solid var(--border); border-radius: 6px; padding: 0.65rem 0.75rem; background: var(--bg-subtle, #f8f9fa); }
.billing-activation-col h4 { margin: 0 0 0.5rem; font-size: 0.85rem; }
.kv-compact dt, .kv-compact dd { font-size: 0.8rem; }
@media (max-width: 768px) { .billing-activation-grid { grid-template-columns: 1fr; } }
.ticket-card-aside {
  display: flex;
  align-items: flex-start;
  padding: 0.65rem 0.75rem 0.65rem 0;
}
.tickets-kpi {
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tickets-kpi:hover { border-color: var(--accent); }
.tickets-kpi.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  background: var(--accent-soft);
}
.tickets-queue-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.tickets-queue-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 0.25rem;
}
.tickets-queue-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.74rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.tickets-queue-chip:hover { border-color: var(--accent); }
.tickets-queue-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tickets-queue-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}
.ticket-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.ticket-detail-tabs {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin: 0.75rem 0 1rem;
  padding-bottom: 0;
}
.ticket-detail-tab {
  border: none;
  background: transparent;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ticket-detail-tab:hover { color: #2a2520; }
.ticket-detail-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.ticket-detail-pane[hidden] { display: none !important; }
.ticket-next-action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}
.ticket-next-action--live { background: #ecfdf5; border-color: rgba(52, 211, 153, 0.4); }
.ticket-next-action--stale { background: #fef3e8; border-color: rgba(234, 179, 8, 0.35); }
.ticket-next-action--warn { background: #fef3e8; }
.ticket-next-action--danger { background: #fde8e8; }
.ticket-next-action--billing { background: #eff6ff; }
.ticket-next-action--info { background: #f5f2ed; }
.ticket-next-action-icon { font-size: 1.25rem; line-height: 1; }
.ticket-next-action-body { flex: 1; min-width: 0; }
.ticket-next-action-body strong { display: block; font-size: 0.85rem; }
.ticket-next-action-body span { display: block; font-size: 0.76rem; color: var(--muted); }
.ticket-live-presence-card {
  padding: 0.75rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 8px;
  background: #f0fdf8;
  margin-bottom: 0.75rem;
}
.kv--compact dt { font-size: 0.72rem; }
.kv--compact dd { font-size: 0.82rem; }
.ticket-payload-details { margin-top: 1rem; }
.ticket-payload-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
}
@media (max-width: 1200px) {