/**
 * Canonical authenticated-portal design tokens.
 *
 * The legacy dark UI currently redeclares its own values on
 * `.portal-dashboard`, so adding these root tokens is intentionally
 * non-breaking. Page migration phases remove those local declarations as
 * each surface adopts the new light system.
 */
:root {
  --portal-bg: #e2e7e6;
  --portal-atmosphere-opacity: 0.86;
  --portal-text: #0d1114;
  --portal-muted: #687977;

  --portal-surface-shell: rgba(255, 255, 255, 0.22);
  --portal-surface: rgba(255, 255, 255, 0.27);
  --portal-surface-raised: rgba(255, 255, 255, 0.42);
  --portal-surface-hover: rgba(255, 255, 255, 0.36);
  --portal-surface-control: rgba(255, 255, 255, 0.42);
  --portal-surface-control-strong: rgba(255, 255, 255, 0.46);
  --portal-surface-selected: rgba(255, 255, 255, 0.72);
  --portal-surface-selected-strong: rgba(255, 255, 255, 0.78);
  --portal-reflection: rgba(255, 255, 255, 0.68);
  --portal-divider: rgba(13, 17, 20, 0.07);
  --portal-control-border: rgba(13, 17, 20, 0.08);

  --portal-accent: linear-gradient(120deg, #75fafa, #21e4bf);
  --portal-accent-v: linear-gradient(180deg, #75fafa, #21e4bf);
  --portal-accent-solid: #21e4bf;
  --portal-status-complete: linear-gradient(120deg, #75fafa, #21e4bf);
  --portal-status-attention: linear-gradient(120deg, #effb53, #fb923c);
  --portal-status-negative: linear-gradient(120deg, #ff6b9d, #e11d48);
  --portal-status-neutral: rgba(255, 255, 255, 0.46);

  --portal-text-accent: #075f56;
  --portal-text-success: #087a68;
  --portal-text-neutral: #405653;
  --portal-text-attention: #87540d;
  --portal-text-negative: #b42343;

  --portal-content-max: 1560px;
  --portal-content-wide: 1720px;

  --portal-motion-fast: 160ms;
  --portal-motion-standard: 180ms;
  --portal-ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --portal-radius-shell: 24px;
  --portal-radius-region: 18px;
  --portal-radius-row: 14px;
  --portal-radius-control: 999px;
  --portal-radius-flap: 0 7px 7px 0;
  --portal-blur-shell: 28px;
  --portal-blur-surface: 65px;
  --portal-shadow-ambient: 0 34px 110px rgba(61, 79, 76, 0.07);
  --portal-shadow-float: 0 38px 130px rgba(61, 79, 76, 0.1);
}
/** Shared, namespaced primitives for the authenticated portal redesign. */

.portal-glass {
  position: relative;
  border: 0;
  border-radius: var(--portal-radius-region);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
}

.portal-glass::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--portal-reflection),
    transparent
  );
  pointer-events: none;
}

.portal-glass--raised {
  background: var(--portal-surface-raised);
  box-shadow: var(--portal-shadow-float);
}

.portal-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--portal-control-border);
  border-radius: var(--portal-radius-control);
  padding: 0 18px;
  color: var(--portal-text);
  background: var(--portal-surface-control);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.portal-button:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.62);
}

.portal-button:active:not(:disabled) {
  transform: translateY(1px);
}

.portal-button--primary {
  border: 0;
  background: var(--portal-accent);
}

.portal-button--negative {
  border: 0;
  background: var(--portal-status-negative);
}

.portal-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.portal-icon-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--portal-control-border);
  border-radius: 50%;
  color: var(--portal-text);
  background: var(--portal-surface-control);
}

.portal-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--portal-control-border);
  border-radius: var(--portal-radius-control);
  padding: 0 16px;
  color: var(--portal-text);
  background: var(--portal-surface-control);
  outline: none;
}

.portal-field::placeholder {
  color: var(--portal-muted);
}

.portal-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--portal-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.portal-textarea {
  min-height: 100px;
  border-radius: 16px;
  padding: 12px 16px;
  resize: vertical;
}

.portal-type-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--portal-muted);
  background: rgba(104, 121, 119, 0.09);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.portal-status-flap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--portal-radius-flap);
  padding: 6px 14px;
  color: var(--portal-text);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.portal-status-flap--complete {
  background: var(--portal-status-complete);
}

.portal-status-flap--attention {
  background: var(--portal-status-attention);
}

.portal-status-flap--negative {
  background: var(--portal-status-negative);
}

.portal-status-flap--neutral {
  border: 1px solid var(--portal-control-border);
  color: var(--portal-muted);
  background: var(--portal-status-neutral);
}

.portal-focusable:focus-visible,
.portal-button:focus-visible,
.portal-icon-button:focus-visible,
.portal-field:focus-visible {
  outline: 2px solid #75fafa;
  outline-offset: 3px;
}

/* Phase 2: shared authenticated navigation and shell states. */

.portal-shell-frame .portal-dashboard,
.portal-shell-frame .resources-dashboard {
  grid-template-columns: 188px minmax(0, 1fr);
}

.portal-shell-frame .portal-dashboard.sidebar-collapsed,
.portal-shell-frame .resources-dashboard.sidebar-collapsed {
  grid-template-columns: 78px minmax(0, 1fr);
}

.portal-shell-frame .portal-sidebar {
  position: relative;
  z-index: 10;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  color: #0d1114;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
  transition: width 180ms ease, transform 220ms ease;
}

.portal-rail-head {
  position: relative;
  min-height: 106px;
  display: flex;
  align-items: center;
}

.portal-shell-frame .portal-brand {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  color: #0d1114;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.portal-brand-short { display: none; }

.portal-shell-frame .sidebar-collapse {
  position: absolute;
  top: 37px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(13, 17, 20, 0.08);
  border-radius: 50%;
  color: #687977;
  background: rgba(255, 255, 255, 0.42);
}

.portal-rail-navigation {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.portal-nav-section + .portal-nav-section { margin-top: 12px; }

.portal-nav-section-label {
  padding: 8px 22px 6px;
  color: #687977;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-shell-frame .portal-sidebar .portal-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0 12px 10px;
}

.portal-shell-frame .portal-sidebar .portal-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 13px;
  padding: 0 13px;
  color: #4a5e5a;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.portal-shell-frame .portal-sidebar .portal-nav a:hover {
  color: #0d1114;
  background: rgba(255, 255, 255, 0.34);
}

.portal-shell-frame .portal-sidebar .portal-nav a.active {
  color: #075f56;
  background: linear-gradient(105deg, rgba(117, 250, 250, 0.28), rgba(255, 255, 255, 0.42));
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.72);
}

.portal-shell-frame .portal-sidebar .portal-nav i {
  width: 22px;
  color: currentColor;
  font-size: 1rem;
  text-align: center;
}

.portal-shell-frame .portal-sidebar .portal-nav em {
  margin-left: auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: #0d1114;
  background: var(--portal-accent);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-rail-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px 12px 16px;
}

.portal-rail-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.portal-rail-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #0d1114;
  background: var(--portal-accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.portal-rail-user-copy { min-width: 0; }
.portal-rail-user-copy strong,
.portal-rail-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-rail-user-copy strong { font-size: 0.72rem; }
.portal-rail-user-copy small { margin-top: 3px; color: #687977; font-size: 0.62rem; }

.portal-rail-logout {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: #4a5e5a;
  background: rgba(255, 255, 255, 0.32);
  font-size: 0.72rem;
  font-weight: 700;
}

.portal-rail-logout:hover { color: #0d1114; background: rgba(255, 255, 255, 0.48); }

.sidebar-collapsed .portal-brand-full,
.sidebar-collapsed .portal-nav span,
.sidebar-collapsed .portal-nav em,
.sidebar-collapsed .portal-nav-section-label,
.sidebar-collapsed .portal-rail-user-copy,
.sidebar-collapsed .portal-rail-logout span { display: none; }
.sidebar-collapsed .portal-brand-short { display: inline; }
.sidebar-collapsed .portal-brand { justify-content: center; width: 100%; padding: 0; }
.sidebar-collapsed .sidebar-collapse { right: 24px; top: 72px; }
.sidebar-collapsed .portal-rail-head { min-height: 120px; }
.sidebar-collapsed .portal-sidebar .portal-nav a { justify-content: center; padding: 0; }
.sidebar-collapsed .portal-rail-identity,
.sidebar-collapsed .portal-rail-logout { justify-content: center; padding-left: 0; padding-right: 0; }

.portal-mobile-header,
.portal-mobile-backdrop,
.portal-mobile-close { display: none; }

/* Shell-level system states */
.portal-shell-frame .idle-overlay {
  background: rgba(170, 187, 183, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portal-shell-frame .idle-modal,
.portal-shell-frame .maintenance-card {
  border: 0;
  color: var(--portal-text);
  background: var(--portal-surface-raised);
  box-shadow: var(--portal-shadow-float);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
}

.portal-shell-frame .idle-icon,
.portal-shell-frame .maintenance-icon {
  border: 0;
  color: #087a68;
  background: rgba(33, 228, 191, 0.13);
}

.portal-shell-frame .idle-stay-btn {
  color: var(--portal-text);
  background: var(--portal-accent);
}

.portal-shell-frame .idle-leave-btn,
.portal-shell-frame .maintenance-badge {
  border-color: var(--portal-control-border);
  color: var(--portal-muted);
  background: rgba(255, 255, 255, 0.42);
}

.portal-shell-frame .maintenance-page {
  min-height: 100%;
  background: transparent;
}

.portal-shell-frame .announcement-banner,
.portal-shell-frame .impersonation-banner {
  margin: 10px 16px 0;
  border: 0;
  border-radius: 999px;
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 60px rgba(61, 79, 76, 0.08);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
}

.portal-shell-frame .impersonation-banner strong { color: var(--portal-text); }
.portal-shell-frame .impersonation-exit {
  border-color: var(--portal-control-border);
  border-radius: 999px;
  color: var(--portal-text);
  background: var(--portal-status-attention);
}

.portal-loading {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--portal-bg);
}

.portal-loading::after {
  content: "";
  width: 32px;
  height: 32px;
  border: 3px solid rgba(13, 17, 20, 0.1);
  border-top-color: #21e4bf;
  border-radius: 50%;
  animation: portal-loading-spin 700ms linear infinite;
}

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

@media (max-width: 900px) {
  .portal-shell-frame .portal-dashboard,
  .portal-shell-frame .resources-dashboard,
  .portal-shell-frame .portal-dashboard.sidebar-collapsed,
  .portal-shell-frame .resources-dashboard.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .portal-mobile-header {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 40;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 18px;
    padding: 0 10px 0 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 24px 80px rgba(61, 79, 76, 0.1);
    backdrop-filter: blur(var(--portal-blur-shell));
    -webkit-backdrop-filter: blur(var(--portal-blur-shell));
  }

  .portal-mobile-brand { color: #0d1114; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; }
  .portal-mobile-menu-button,
  .portal-mobile-close {
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--portal-control-border);
    border-radius: 50%;
    color: #0d1114;
    background: rgba(255, 255, 255, 0.48);
  }
  .portal-mobile-menu-button { display: grid; }
  .portal-mobile-close { display: grid; margin-left: auto; }

  .portal-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    display: block;
    border: 0;
    background: rgba(104, 121, 119, 0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .portal-shell-frame .portal-sidebar {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 50;
    width: min(320px, calc(100vw - 24px));
    height: auto;
    border-radius: 22px;
    background: rgba(245, 248, 247, 0.86);
    box-shadow: var(--portal-shadow-float);
    transform: translateX(calc(-100% - 24px));
  }

  .portal-shell-frame .portal-sidebar.is-mobile-open { transform: translateX(0); }
  .portal-shell-frame .portal-sidebar .portal-rail-head { min-height: 82px; }
  .portal-shell-frame .portal-sidebar .portal-brand { padding-left: 20px; }
  .portal-shell-frame .portal-sidebar .sidebar-collapse { display: none; }
  .portal-shell-frame .portal-sidebar .portal-nav { grid-template-columns: 1fr; }
  .portal-shell-frame .portal-sidebar .portal-nav a { min-height: 48px; justify-content: flex-start; padding: 0 13px; }
  .portal-shell-frame .portal-sidebar .portal-nav span,
  .portal-shell-frame .portal-sidebar .portal-nav em,
  .portal-shell-frame .portal-sidebar .portal-nav-section-label,
  .portal-shell-frame .portal-sidebar .portal-rail-user-copy,
  .portal-shell-frame .portal-sidebar .portal-rail-logout span { display: initial; }
  .portal-shell-frame .portal-sidebar .portal-rail-identity,
  .portal-shell-frame .portal-sidebar .portal-rail-logout { justify-content: flex-start; }
  .portal-shell-frame .dashboard-main { padding-top: 88px; }
  .portal-shell-frame .admin-dashboard .admin-main { padding-top: 88px; }

  .portal-shell-frame .announcement-banner,
  .portal-shell-frame .impersonation-banner { margin-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell-frame .portal-sidebar,
  .portal-shell-frame .portal-sidebar .portal-nav a { transition: none; }
  .portal-loading::after { animation-duration: 1.4s; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .portal-shell-frame .portal-sidebar,
  .portal-mobile-header,
  .portal-shell-frame .announcement-banner,
  .portal-shell-frame .impersonation-banner { background: rgba(244, 247, 246, 0.96); }
}
#root {
  min-height: 100vh;
}

body,
button,
input,
textarea,
select {
  font-family: "Rubik", sans-serif;
}

body {
  background-color: var(--body-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Rubik", sans-serif;
}

.wow,
.fadeInUp {
  animation: none !important;
  visibility: visible !important;
}

button:disabled {
  cursor: progress;
  opacity: 0.75;
}

.form-error {
  color: #ff8a8a;
  margin-top: 18px;
  text-align: center;
}

.header-main .main-menu ul li a {
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  text-transform: capitalize;
}

.header-main .main-menu ul li .submenu li a {
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  line-height: 38px;
}

.header-main .header-right,
.header-main .header-right a,
.join-text,
.sidebar__toggle,
.search-icon {
  font-family: "Rubik", sans-serif;
}

.offcanvas__wrapper,
.offcanvas__wrapper p,
.offcanvas__wrapper a,
.offcanvas__wrapper li,
.offcanvas__wrapper button {
  font-family: "Rubik", sans-serif;
}

.offcanvas__wrapper .offcanvas__content .text {
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  color: var(--text);
}

.offcanvas__wrapper .offcanvas__content .offcanvas__contact h4 {
  font-family: "Rubik", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}

.offcanvas__wrapper .offcanvas__content .offcanvas__contact ul li a {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.footer-section,
.footer-section input,
.footer-section button,
.footer-section a,
.footer-section p,
.footer-section li {
  font-family: "Rubik", sans-serif;
}

.footer-widgets-wrapper .single-footer-widget .footer-content h3,
.footer-widgets-wrapper .single-footer-widget .widget-head h3 {
  font-family: "Rubik", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}

.footer-widgets-wrapper .single-footer-widget .footer-content p,
.footer-bottom p {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  color: var(--text);
}

.footer-widgets-wrapper .single-footer-widget .list-items li a {
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.footer-widgets-wrapper
  .single-footer-widget
  .footer-content
  .footer-input
  input {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #cdcdcd;
}

.footer-bottom p a,
.footer-bottom .social-icon a {
  font-family: "Rubik", sans-serif;
  font-weight: 400;
}

.login-wrapper .signin-item,
.login-wrapper .signin-item input,
.login-wrapper .signin-item button {
  font-family: "Rubik", sans-serif;
}

.login-wrapper .signin-item .input-item span,
.login-wrapper .signin-item .input-item .lable-text {
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
}

.login-wrapper .signin-item .input-item input {
  font-family: "Rubik", sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--white);
}

.login-wrapper .signin-item .input-item input[type="email"] {
  text-transform: lowercase;
}

.login-wrapper .signin-item .input-item input::placeholder {
  color: var(--text);
  opacity: 1;
}

.login-wrapper .signin-item .form-check .form-check-label,
.login-wrapper .signin-item .form-check span {
  font-family: "Rubik", sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.login-wrapper .signin-item .button-items .theme-btn {
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.login-wrapper .signin-item form > p a {
  color: var(--theme);
  margin-left: 4px;
}

/* ── Login: no-label layout corrections ─────────────────────────────────────
   The theme's .icon uses a fixed top offset sized for the label span.
   Without the label we re-center it vertically via transform.          */
.login-wrapper .signin-item .input-item {
  position: relative;
}
.login-wrapper .signin-item .input-item .icon {
  position: absolute !important;
  right: 20px !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}

/* Ensure remember-me / forgot-pw row spaces out properly */
.login-wrapper .signin-item .form-check {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}

/* Give the sign-in panel a bit more breathing room, keep it centered */
.login-wrapper .signin-item {
  width: 100%;
  max-width: 460px;
  padding: 0 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

.ghost-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--theme);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

/* ── MFA setup page ────────────────────────────────────────────────────────── */

.mfa-setup-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0.5rem 0 0.75rem;
  text-align: center;
  line-height: 1.3;
}

.mfa-manual-entry--centered {
  text-align: center;
  width: 100%;
}

.mfa-manual-entry--centered summary {
  justify-content: center;
}

.mfa-code-input--ghost {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  border-radius: 0;
  padding: 0.5rem 0;
}

.mfa-code-input--ghost:focus {
  border-bottom-color: var(--theme);
  border-color: transparent;
  border-bottom-color: var(--theme);
}

.mfa-verify-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mfa-code-input {
  width: 100%;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  outline: none;
  transition: border-color 150ms;
  font-family: monospace;
  box-sizing: border-box;
}

.mfa-code-input:focus {
  border-color: var(--theme);
}

.mfa-code-input--inline {
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  padding: 0.5rem 0.75rem;
}

.mfa-verify-error {
  font-size: 0.82rem;
  color: #f87171;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.mfa-sign-out-link {
  background: none;
  border: none;
  padding: 0;
  margin-top: 1.25rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 120ms;
}

.mfa-sign-out-link:hover {
  color: rgba(255,255,255,0.6);
}

/* ─── Login: passkey button + divider ─── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: #aaa;
  font-size: 0.8rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.12);
}
.passkey-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.passkey-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.3);
}
.passkey-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.portal-atmosphere,
.portal-custom-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--portal-bg);
}

.portal-custom-background img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.portal-atmosphere {
  isolation: isolate;
  background:
    radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.46), transparent 48%),
    var(--portal-bg);
}

.portal-atmosphere__bubbles {
  opacity: var(--portal-atmosphere-opacity, 0.86);
  transition: opacity 240ms ease;
}

.portal-bubbles,
.portal-bubbles__field {
  position: absolute;
  inset: 0;
}

.portal-bubbles {
  overflow: hidden;
}

.portal-bubbles__filters {
  position: absolute;
  width: 0;
  height: 0;
}

.portal-bubbles__field {
  filter: url("#portal-bubble-goo") blur(52px);
  transform: translateZ(0);
}

.portal-bubble,
.portal-bubble-orbit {
  position: absolute;
  will-change: transform;
}

.portal-bubble {
  width: clamp(620px, 68vw, 1320px);
  height: clamp(580px, 76vh, 1060px);
  border-radius: 50%;
  opacity: 0.22;
  background: radial-gradient(
    circle at center,
    rgba(var(--bubble-color), var(--bubble-core, 0.72)) 0%,
    rgba(var(--bubble-color), 0.3) 31%,
    rgba(var(--bubble-color), 0.08) 55%,
    transparent 72%
  );
}

.portal-bubble-orbit {
  inset: -12%;
  transform: translateZ(0);
}

.portal-bubble--one {
  --bubble-color: var(--bubble-first);
  --bubble-core: 0.72;
  top: -28%;
  right: -23%;
  opacity: 0.28;
}

.portal-bubble-orbit--two {
  transform-origin: 18% 74%;
}

.portal-bubble--two {
  --bubble-color: var(--bubble-second);
  top: 4%;
  left: -27%;
  width: clamp(680px, 72vw, 1380px);
  opacity: 0.25;
}

.portal-bubble-orbit--three {
  transform-origin: 82% 22%;
}

.portal-bubble--three {
  --bubble-color: var(--bubble-third);
  right: -19%;
  bottom: -31%;
  width: clamp(700px, 74vw, 1420px);
  opacity: 0.22;
}

.portal-bubble--four {
  --bubble-color: var(--bubble-fourth);
  top: 16%;
  left: 14%;
  width: clamp(560px, 57vw, 1080px);
  height: clamp(520px, 65vh, 900px);
  opacity: 0.2;
}

.portal-bubble-orbit--five {
  transform-origin: 12% 18%;
}

.portal-bubble--five {
  --bubble-color: var(--bubble-fifth);
  --bubble-core: 0.6;
  right: -32%;
  bottom: -25%;
  width: clamp(520px, 58vw, 1080px);
  height: clamp(500px, 62vh, 860px);
  opacity: 0.12;
}

.portal-bubble-orbit--six {
  transform-origin: 88% 78%;
}

.portal-bubble--six {
  --bubble-color: var(--bubble-sixth);
  --bubble-core: 0.56;
  top: -27%;
  left: 17%;
  width: clamp(500px, 52vw, 980px);
  height: clamp(460px, 58vh, 820px);
  opacity: 0.11;
}

.portal-bubble--seven {
  --bubble-color: var(--bubble-first);
  right: 8%;
  bottom: -37%;
  width: clamp(560px, 60vw, 1120px);
  opacity: 0.16;
}

.portal-atmosphere__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

@media (max-width: 760px) {
  .portal-bubbles__field {
    filter: url("#portal-bubble-goo") blur(44px);
  }

  .portal-bubble--six,
  .portal-bubble--seven {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-bubble,
  .portal-bubble-orbit {
    will-change: auto;
  }
}
.portal-dashboard {
  --portal-bg: #0d1114;
  --portal-card: #1d1d21;
  --portal-card-soft: #222226;
  --portal-line: rgba(207, 208, 212, 0.18);
  --portal-line-strong: rgba(117, 250, 250, 0.35);
  --portal-text: #fff;
  --portal-muted: #cdcdcd;
  --portal-soft: #8e9da2;
  --portal-cyan: #75fafa;
  --portal-mint: #21e4bf;
  --portal-yellow: #effb53;
  height: 100%;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  overflow: hidden;
  color: var(--portal-text);
  background:
    linear-gradient(rgba(13, 17, 20, 0.9), rgba(13, 17, 20, 0.98)),
    url("https://www.simpsec.org/assets/img/service/Pattern.png") center / cover fixed,
    var(--portal-bg);
  font-family: "Rubik", sans-serif;
}

.portal-dashboard.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.portal-dashboard *,
.portal-dashboard *::before,
.portal-dashboard *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.portal-dashboard button {
  cursor: pointer;
}

.portal-sidebar {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--portal-line);
  background: rgba(13, 17, 20, 0.9);
  backdrop-filter: blur(16px);
  transition: width 180ms ease;
}

.sidebar-collapse {
  position: absolute;
  top: 18px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 50%;
  color: var(--portal-cyan);
  background: rgba(29, 29, 33, 0.82);
}

.portal-brand {
  min-height: 126px;
  display: flex;
  align-items: center;
  padding: 0 28px;
}

.sidebar-collapsed .portal-brand {
  justify-content: center;
  padding: 0 14px;
}

.portal-brand img {
  width: 182px;
  max-width: 100%;
  height: auto;
  display: block;
}

.sidebar-collapsed .portal-brand img {
  width: 48px;
}

.portal-nav {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
}

.portal-nav a {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid transparent;
  color: var(--portal-muted);
  padding: 0 26px;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.sidebar-collapsed .portal-nav a {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .portal-nav span,
.sidebar-collapsed .portal-nav em,
.sidebar-collapsed .sidebar-help {
  display: none;
}

.portal-nav a:hover,
.portal-nav a.active {
  border-left-color: var(--portal-mint);
  color: var(--portal-text);
  background: linear-gradient(90deg, rgba(33, 228, 191, 0.2), rgba(33, 228, 191, 0.03));
}

.portal-nav i,
.sidebar-help > i,
.panel-heading i {
  width: 28px;
  color: var(--portal-cyan);
  font-size: 1.1rem;
  text-align: center;
}

.portal-nav em,
.news-card em,
.panel-label em,
.action-list em {
  margin-left: auto;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 4px 9px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-help {
  margin: auto 18px 22px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(117, 250, 250, 0.08), transparent 60%),
    rgba(29, 29, 33, 0.82);
  padding: 22px;
}

.sidebar-help strong {
  display: block;
  color: var(--portal-text);
}

.sidebar-help p {
  color: var(--portal-soft);
  font-size: 0.88rem;
}

.sidebar-help a,
.sidebar-help button,
.portal-panel a {
  color: var(--portal-cyan);
  font-weight: 600;
  text-decoration: none;
}

.sidebar-help a:hover,
.sidebar-help button:hover,
.portal-panel a:hover {
  color: var(--portal-yellow);
}

.sidebar-help button {
  margin-top: 10px;
  text-align: left;
}

.avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 250, 250, 0.28);
  border-radius: 50%;
  color: var(--portal-text);
  background: rgba(33, 228, 191, 0.14);
}

.dashboard-main {
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 38px;
  overflow: hidden;
}

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

.dashboard-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
}

.dashboard-topbar h1 {
  margin: 0 0 8px;
  color: var(--portal-text);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 700;
  line-height: 1.12;
}

.dashboard-topbar h1::after {
  content: "  ";
}

.dashboard-topbar p {
  margin: 0;
  color: var(--portal-muted);
}

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

.range-control {
  display: inline-flex;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(29, 29, 33, 0.86);
  padding: 4px;
}

.range-control button {
  min-height: 38px;
  border-radius: 999px;
  color: var(--portal-muted);
  padding: 0 14px;
}

.range-control button.selected {
  color: #061012;
  background: var(--portal-mint);
}

.customize-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-pill,
.ghost-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  padding: 0 16px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.theme-pill {
  color: #061012;
  background: var(--portal-yellow);
}

.theme-pill.active {
  background: var(--portal-mint);
}

.ghost-button {
  border: 1px solid var(--portal-line);
  color: var(--portal-cyan);
  background: rgba(29, 29, 33, 0.86);
}

.theme-pill:hover,
.ghost-button:hover,
.icon-button:hover,
.avatar:hover {
  transform: translateY(-1px);
}

.icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 50%;
  color: var(--portal-text);
  background: rgba(29, 29, 33, 0.86);
}

.icon-button:hover {
  border-color: var(--portal-line-strong);
  color: var(--portal-cyan);
}

.notification-button span {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061012;
  background: var(--portal-mint);
  font-size: 0.72rem;
  font-weight: 800;
}

.popover-wrap {
  position: relative;
}

.portal-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 20;
  width: 260px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  background: #1d1d21;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  padding: 16px;
  animation: portal-pop 160ms ease-out;
}

.portal-popover p {
  margin: 8px 0 0;
  color: var(--portal-muted);
}

.profile-popover {
  display: grid;
  gap: 10px;
}

.profile-popover a,
.profile-popover button {
  color: var(--portal-cyan);
  text-align: left;
}

.dashboard-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
  gap: 22px;
  overflow: hidden;
}

.dashboard-component-layer {
  position: relative;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
}

.dashboard-components {
  --dashboard-grid-gap: 20px;
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 92px;
  grid-auto-flow: row dense;
  align-content: start;
  gap: var(--dashboard-grid-gap);
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 250, 250, 0.22) transparent;
}

.dashboard-components.reorder-enabled {
  background-image: none;
}

.dashboard-components::-webkit-scrollbar {
  width: 4px;
}

.dashboard-components::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.dashboard-components::-webkit-scrollbar-thumb {
  background: rgba(117, 250, 250, 0.22);
  border-radius: 999px;
}

.card-slot {
  display: contents;
}

.portal-panel {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(117, 250, 250, 0.08), transparent 56%),
    rgba(29, 29, 33, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.portal-panel:hover {
  border-color: rgba(117, 250, 250, 0.3);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}

.portal-panel.can-drag {
  cursor: grab;
}

.portal-panel.can-drag:active {
  cursor: grabbing;
}

.card-edit-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(117, 250, 250, 0.2);
  border-radius: 999px;
  color: var(--portal-soft);
  background: rgba(13, 17, 20, 0.78);
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: opacity 160ms ease;
}

.reorder-enabled .portal-panel {
  outline: 1px dashed rgba(117, 250, 250, 0.28);
  outline-offset: -8px;
}

.card-resize-handle {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 250, 250, 0.28);
  border-radius: 10px;
  color: var(--portal-cyan);
  background:
    linear-gradient(145deg, rgba(117, 250, 250, 0.16), rgba(13, 17, 20, 0.72)),
    rgba(13, 17, 20, 0.82);
  cursor: nwse-resize;
  opacity: 0.72;
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.card-resize-handle:hover {
  border-color: rgba(239, 251, 83, 0.5);
  opacity: 1;
  transform: translate(1px, 1px);
}

.reorder-enabled .card-edit-tools,
.portal-panel.can-drag:hover .card-edit-tools {
  opacity: 1;
}

.card-slot.dragging .portal-panel {
  opacity: 0.52;
  transform: scale(0.985);
}

.portal-panel.can-drag {
  user-select: none;
}

/* ── Shared skeleton utilities ────────────────────────────────────────────── */
/* Used by all portal pages for loading wireframes */

.sk-line {
  display: block;
  border-radius: 6px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03),
      rgba(117, 250, 250, 0.09),
      rgba(255, 255, 255, 0.03)
    );
  background-size: 220% 100%;
  animation: skeleton-sheen 1.1s ease-in-out infinite;
}

.sk-line--h8  { height: 8px; }
.sk-line--h12 { height: 12px; }
.sk-line--h16 { height: 16px; }
.sk-line--h20 { height: 20px; }
.sk-line--h28 { height: 28px; }
.sk-line--h32 { height: 32px; }
.sk-line--h40 { height: 40px; }
.sk-line--w25 { width: 25%; }
.sk-line--w40 { width: 40%; }
.sk-line--w55 { width: 55%; }
.sk-line--w70 { width: 70%; }
.sk-line--w100 { width: 100%; }

.sk-circle {
  border-radius: 50%;
  flex-shrink: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03),
      rgba(117, 250, 250, 0.09),
      rgba(255, 255, 255, 0.03)
    );
  background-size: 220% 100%;
  animation: skeleton-sheen 1.1s ease-in-out infinite;
}

/* Summary stat cards (3-up grid shared by Services / Support / Documents) */
.sk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sk-summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: rgba(29, 29, 33, 0.6);
}

/* Generic panel + list row skeleton */
.sk-panel {
  padding: 24px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: rgba(29, 29, 33, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sk-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--portal-line);
}

.sk-row:last-child { border-bottom: none; }

.sk-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Account field grid skeleton */
.sk-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sk-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Dashboard skeleton cards ─────────────────────────────────────────────── */
.skeleton-card {
  position: relative;
  z-index: 1;
  grid-column: span 2;
  grid-row: span 3;
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04),
      rgba(117, 250, 250, 0.1),
      rgba(255, 255, 255, 0.04)
    ),
    rgba(29, 29, 33, 0.78);
  background-size: 220% 100%;
  animation: skeleton-sheen 1.1s ease-in-out infinite;
}

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

.skeleton-half {
  grid-column: span 3;
  grid-row: span 3;
}

.skeleton-short {
  grid-row: span 2;
}

.panel-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.portal-panel[data-rows="2"] {
  padding: 18px 22px;
}

.portal-panel[data-rows="2"] .panel-heading {
  margin-bottom: 10px;
  padding-right: 84px;
}

.portal-panel[data-rows="2"] .panel-heading h2 {
  font-size: 0.9rem;
}

.portal-panel[data-rows="2"] .panel-heading a {
  font-size: 0.82rem;
  white-space: nowrap;
}

.portal-panel[data-rows="2"] .drag-handle {
  padding: 3px 8px;
  font-size: 0;
}

.portal-panel[data-rows="2"] .drag-handle i {
  font-size: 0.75rem;
}

.portal-panel[data-rows="2"] .card-resize-handle {
  width: 30px;
  height: 30px;
  right: 10px;
  bottom: 10px;
}

.portal-panel[data-rows="2"] .score-summary-layout {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
}

.portal-panel[data-rows="2"] .score-ring {
  width: 112px;
  height: 112px;
  border-width: 10px;
}

.portal-panel[data-rows="2"] .score-ring strong {
  font-size: 2.8rem;
}

.portal-panel[data-rows="2"] .score-ring span {
  font-size: 1.18rem;
}

.portal-panel[data-rows="2"] .risk-label {
  font-size: 1rem;
}

.portal-panel[data-rows="2"] p {
  font-size: 0.88rem;
  line-height: 1.45;
}

.portal-panel[data-rows="2"] .pulse-radar svg {
  max-width: 250px;
  transform: scale(0.9);
}

.portal-panel[data-rows="2"] .radar-labels text {
  font-size: 11px;
}

.portal-panel[data-rows="2"] .portal-row,
.portal-panel[data-rows="2"] .timeline-list li {
  min-height: 42px;
}

.portal-panel[data-rows="2"] .portal-row:nth-child(n + 3),
.portal-panel[data-rows="2"] .timeline-list li:nth-child(n + 3),
.portal-panel[data-rows="2"] .action-list label:nth-child(n + 3) {
  display: none;
}

.portal-panel[data-rows="2"] .recommendation {
  display: none;
}

.portal-panel[data-rows="2"] .stat-number {
  font-size: 2.7rem;
}

.portal-panel[data-rows="2"] .service-chip-list {
  gap: 7px;
}

.portal-panel[data-rows="2"] .review-card time,
.review-card[data-rows="2"] time {
  font-size: 1.45rem;
}

.portal-panel[data-cols="2"][data-rows="2"] .panel-heading {
  padding-right: 72px;
}

.portal-panel[data-cols="2"][data-rows="2"] .panel-heading a {
  display: none;
}

.portal-panel[data-cols="2"][data-rows="2"] .score-summary-layout {
  grid-template-columns: auto minmax(0, 1fr);
}

.portal-panel[data-cols="2"][data-rows="2"] .score-ring {
  width: 96px;
  height: 96px;
  border-width: 9px;
}

.portal-panel[data-cols="2"][data-rows="2"] .score-ring strong {
  font-size: 2.35rem;
}

.portal-panel[data-cols="2"][data-rows="2"] .score-ring span {
  font-size: 1rem;
}

.portal-panel[data-cols="2"][data-rows="2"] .risk-label {
  font-size: 0.92rem;
}

.portal-panel[data-cols="2"][data-rows="2"] p {
  font-size: 0.8rem;
}

.portal-panel[data-cols="2"][data-rows="2"] .action-list {
  gap: 8px;
}

.portal-panel[data-cols="2"][data-rows="2"] .action-list label {
  padding: 9px 10px;
  font-size: 0.82rem;
}

.portal-panel[data-cols="2"][data-rows="2"] .action-list em {
  padding: 4px 7px;
  font-size: 0.62rem;
}

.posture-card,
.score-summary-card {
  padding: 28px;
}

.posture-layout {
  display: grid;
  grid-template-columns: 240px 250px minmax(260px, 1fr) 300px;
  align-items: center;
  gap: 28px;
}

.score-summary-layout {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.score-block {
  display: grid;
  gap: 18px;
}

.score-ring {
  width: 150px;
  height: 150px;
  display: grid;
  place-content: center;
  border: 14px solid rgba(117, 250, 250, 0.18);
  border-top-color: var(--portal-mint);
  border-right-color: var(--portal-cyan);
  border-radius: 50%;
  background: #14191c;
}

.score-ring strong {
  color: var(--portal-text);
  font-size: 3.8rem;
  line-height: 1;
}

.score-summary-card .score-ring strong {
  font-size: 3.2rem;
}

.score-summary-card,
.actions-card,
.services-card,
.review-card,
.radar-card,
.category-card,
.table-card,
.timeline-card {
  overflow: hidden;
}

.score-ring span {
  color: var(--portal-muted);
  font-size: 1.45rem;
}

.risk-label {
  color: var(--portal-yellow);
  font-size: 1.2rem;
}

.risk-label--pending {
  color: var(--portal-muted);
}

.score-ring--empty strong {
  color: var(--portal-muted);
}

.empty-state {
  color: var(--portal-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.coming-soon-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
  padding: 1.5rem;
  text-align: center;
  color: var(--portal-muted);
}

.coming-soon-state i {
  font-size: 2rem;
  opacity: 0.3;
}

.coming-soon-state p {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.score-block p,
.posture-copy p,
.recommendation,
.guide-panel p,
.news-card p {
  color: var(--portal-muted);
  line-height: 1.55;
}

.posture-copy strong {
  color: var(--portal-mint);
}

.recommendation {
  flex: 0 0 auto;
  display: grid;
  gap: 5px;
  margin-top: 18px;
  border-left: 3px solid var(--portal-mint);
  padding-left: 14px;
}

.recommendation span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.recommendation strong {
  color: var(--portal-text);
}

.radar-card,
.category-card {
  padding: 24px;
}

.pulse-radar svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.radar-card .pulse-radar {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}

.radar-grid polygon,
.radar-grid line {
  fill: none;
  stroke: rgba(207, 208, 212, 0.24);
  stroke-width: 1;
}

.radar-area {
  fill: rgba(33, 228, 191, 0.28);
  stroke: var(--portal-mint);
  stroke-width: 3;
  filter: drop-shadow(0 0 14px rgba(33, 228, 191, 0.45));
}

.radar-points circle {
  fill: var(--portal-cyan);
  stroke: #0d1114;
  stroke-width: 2;
}

.radar-labels text {
  fill: var(--portal-muted);
  font-family: "Rubik", sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.score-list {
  flex: 1;
  align-content: center;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.score-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 62px;
  align-items: center;
  gap: 12px;
  color: var(--portal-muted);
}

.category-card .score-list {
  margin-top: 10px;
}

.score-list meter {
  width: 84px;
  height: 6px;
  accent-color: var(--portal-mint);
}

.score-list strong {
  color: var(--portal-text);
  font-weight: 500;
  text-align: right;
}

.score-summary-card,
.actions-card,
.services-card,
.review-card,
.radar-card,
.category-card,
.table-card,
.timeline-card,
.support-banner,
.guide-panel,
.quick-actions,
.news-card {
  padding: 24px;
}

.action-list {
  flex: 1;
  align-content: center;
  display: grid;
  gap: 12px;
}

.action-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 12px;
  padding: 12px;
}

.action-list input {
  accent-color: var(--portal-mint);
}

.action-list em {
  background: var(--portal-yellow);
}

.stat-number {
  flex: 0 0 auto;
  color: var(--portal-text);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.service-chip-list {
  display: grid;
  gap: 10px;
  margin: auto 0 14px;
}

.service-chip-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 999px;
  color: var(--portal-muted);
  padding: 8px 12px;
}

.service-chip-list em {
  color: var(--portal-mint);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.review-card time {
  display: block;
  margin: auto 0 6px;
  color: var(--portal-text);
  font-size: 1.8rem;
  font-weight: 800;
}

.review-card p {
  color: var(--portal-muted);
}

.review-card button {
  margin-top: 18px;
  margin-bottom: auto;
  color: #061012;
  border-radius: 999px;
  background: var(--portal-yellow);
  padding: 12px 18px;
  font-weight: 800;
}

.portal-table {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
}

.portal-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 84px 100px 36px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-row i {
  color: var(--portal-cyan);
}

.portal-row small,
.portal-row time {
  color: var(--portal-soft);
}

.portal-row button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  color: var(--portal-cyan);
  background: rgba(255, 255, 255, 0.06);
}

.timeline-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline-list li {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-list i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--portal-cyan);
  background: rgba(33, 228, 191, 0.12);
}

.timeline-list time {
  color: var(--portal-soft);
  text-align: right;
}

.support-banner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.support-banner > i {
  color: var(--portal-cyan);
  font-size: 2rem;
}

.support-banner div {
  flex: 1;
}

.support-banner h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: 1.3rem;
}

.support-banner p {
  margin: 6px 0 0;
  color: var(--portal-muted);
}

.support-banner a,
.guide-panel a {
  border: 1px solid var(--portal-mint);
  border-radius: 10px;
  padding: 12px 18px;
}

.right-rail {
  max-height: 100%;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 20px;
}

.right-rail .portal-panel:hover {
  transform: none;
}

.assistant-card {
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(239, 251, 83, 0.08), transparent 56%),
    rgba(29, 29, 33, 0.88);
}

.assistant-card p {
  color: var(--portal-muted);
  line-height: 1.55;
}

.news-card div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-card span,
.panel-label {
  color: var(--portal-text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.quick-actions {
  display: grid;
  gap: 12px;
}

.quick-actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--portal-text);
  padding-top: 12px;
}

.quick-actions a i {
  width: 22px;
  color: var(--portal-cyan);
}

.guide-progress {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.guide-progress .panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-ring {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  margin: 2px auto 0;
  border: 10px solid rgba(117, 250, 250, 0.16);
  border-top-color: var(--portal-mint);
  border-right-color: var(--portal-yellow);
  border-radius: 50%;
  background: #14191c;
}

.progress-ring strong {
  color: var(--portal-text);
  font-size: 1.65rem;
}

.guide-progress p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.45;
}

.guide-progress a {
  width: fit-content;
}

.guide-cover {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  margin: 18px 0;
  border: 1px solid rgba(117, 250, 250, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(145deg, transparent, rgba(33, 228, 191, 0.22)),
    #12181b;
  padding: 22px;
}

.guide-cover span {
  color: var(--portal-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em !important;
}

.guide-cover strong {
  max-width: 14rem;
  line-height: 1.35;
  text-transform: uppercase;
}

@keyframes portal-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes skeleton-sheen {
  0% {
    background-position: 160% 0;
  }

  100% {
    background-position: -60% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-panel,
  .portal-popover,
  .theme-pill,
  .ghost-button,
  .icon-button,
  .avatar,
  .skeleton-card {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1420px) {
  .portal-dashboard {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .portal-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .sidebar-collapse {
    display: none;
  }

  .portal-nav {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 18px 18px;
  }

  .sidebar-help {
    display: none;
  }

  .dashboard-main {
    height: auto;
    min-height: 100vh;
     overflow: visible;
    padding: 24px;
  }
}


/* ─── Mobile / Tablet Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
  /* Stack rail below main content */
  .dashboard-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    gap: 20px;
  }

  .dashboard-component-layer {
    height: auto;
    overflow: visible;
  }

  .dashboard-components {
    height: auto;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .right-rail {
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .right-rail .portal-panel {
    height: auto !important;
    min-height: 140px;
  }
}

@media (max-width: 640px) {
  /* Topbar: stack heading above controls */
  .dashboard-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
  }

  .dashboard-topbar h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* 2-column card grid — each span-2 card = full row */
  .dashboard-components {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 14px !important;
  }

  /* Override inline span styles — all cards full-width on phone */
  .dashboard-components .portal-panel {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
    height: auto !important;
    min-height: 160px;
  }

  /* Right rail: single column on phone */
  .right-rail {
    grid-template-columns: 1fr;
  }

  .right-rail .portal-panel {
    min-height: 120px;
  }

  /* Tighten dashboard padding */
  .dashboard-main {
    padding: 16px !important;
  }

  /* Nav: 2-col on very small screens */
  .portal-nav {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 12px 14px;
  }

  .portal-nav a {
    padding: 10px 6px;
    font-size: 0.72rem;
    gap: 5px;
  }
}
/* ── Entitlement gate ─────────────────────────────────────────────────────── */
.entitlement-gate-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.entitlement-gate-card {
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 48px 40px;
}

.entitlement-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(117, 250, 250, 0.07);
  border: 1px solid rgba(117, 250, 250, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--color-cyan);
  margin-bottom: 8px;
}

.entitlement-gate-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.entitlement-gate-card p {
  font-size: 14px;
  color: #8a9199;
  line-height: 1.7;
  margin: 0;
}

/* ── Resources dashboard ──────────────────────────────────────────────────── */
.resources-dashboard {
  grid-template-columns: 284px minmax(0, 1fr);
}

.resources-dashboard.sidebar-collapsed {
  grid-template-columns: 88px minmax(0, 1fr);
}

.resources-main {
  gap: 26px;
  min-width: 0;
}

.resources-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.resources-header h1 {
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(2.1rem, 3.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.resources-header p {
  margin: 10px 0 0;
  color: var(--portal-muted);
}

.resources-search {
  min-width: 320px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: rgba(29, 29, 33, 0.86);
  padding: 0 18px;
}

.resources-search i {
  color: var(--portal-cyan);
}

.resources-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--portal-text);
  background: transparent;
  font: inherit;
}

.resources-shell {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  overflow: hidden;
}

.resources-content {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 250, 250, 0.22) transparent;
}

.resource-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.resource-filters button {
  min-height: 40px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 15px;
  font-weight: 700;
}

.resource-filters button.selected {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.featured-resource {
  margin-bottom: 24px;
}

.resource-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.resource-section-heading h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.resource-section-heading span {
  color: var(--portal-soft);
}

.resource-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 28px;
}

.resource-card {
  min-width: 0;
  max-width: 100%;
  min-height: 292px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(117, 250, 250, 0.08), transparent 56%),
    rgba(29, 29, 33, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  padding: 24px;
}

.featured-resource-card {
  min-height: 250px;
  background:
    linear-gradient(135deg, rgba(33, 228, 191, 0.16), transparent 55%),
    linear-gradient(145deg, rgba(239, 251, 83, 0.08), transparent 60%),
    rgba(29, 29, 33, 0.9);
}

.resource-card-top,
.resource-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-kind {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.resource-card h2 {
  margin: 20px 0 10px;
  color: var(--portal-text);
  font-size: 1.35rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.resource-card p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.resource-access {
  margin-left: auto;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.resource-access.locked {
  color: var(--portal-text);
  background: rgba(239, 251, 83, 0.16);
}

.resource-access.coming-soon {
  color: var(--portal-muted);
  background: rgba(255, 255, 255, 0.08);
}

.resource-meta {
  margin-top: auto;
  padding-top: 22px;
}

.resource-meta span {
  max-width: 100%;
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 999px;
  color: var(--portal-soft);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.resource-progress {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.resource-progress::before {
  content: "";
  height: 7px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.14);
}

.resource-progress span {
  height: 7px;
  margin-top: -15px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--portal-mint), var(--portal-yellow));
}

.resource-progress strong {
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.resource-button {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  border: 1px solid var(--portal-mint);
  border-radius: 10px;
  color: var(--portal-cyan);
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
}

.resource-button.disabled {
  color: var(--portal-soft);
  border-color: var(--portal-line);
  pointer-events: none;
}

.resources-rail {
  min-height: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 20px;
}

.resources-rail .portal-panel {
  padding: 24px;
}

.resources-rail h2 {
  margin: 0 0 12px;
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.resources-rail p {
  color: var(--portal-muted);
  line-height: 1.55;
}

.access-summary-card strong {
  color: var(--portal-yellow);
}

.access-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.14);
}

.access-meter span {
  width: 50%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-mint), var(--portal-yellow));
}

.recommended-card span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.recommended-card a,
.resource-request-card a {
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.resource-request-card > i {
  color: var(--portal-yellow);
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.resource-start-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.resource-start-actions button,
.resource-primary-action,
.guide-back-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 18px;
  font-weight: 900;
}

.resource-primary-action:hover {
  color: #061012;
}

.resource-start-actions a {
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.privacy-guide-app {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.privacy-guide-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.guide-back-button {
  min-height: 36px;
  margin-bottom: 14px;
  color: var(--portal-cyan);
  border: 1px solid var(--portal-line);
  background: rgba(29, 29, 33, 0.86);
  padding: 0 14px;
}

.privacy-guide-header h1 {
  margin: 0;
  color: var(--portal-text);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
}

.privacy-guide-progress {
  min-width: 210px;
  text-align: right;
}

.privacy-guide-progress span {
  color: var(--portal-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

.privacy-guide-progress div {
  height: 6px;
  margin: 8px 0 6px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.14);
  overflow: hidden;
}

.privacy-guide-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-cyan), var(--portal-mint));
}

.privacy-guide-progress strong {
  color: var(--portal-cyan);
  font-size: 1.45rem;
}

.privacy-guide-progress small {
  display: block;
  color: var(--portal-soft);
}

.privacy-guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-guide-tabs button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 16px;
  font-weight: 800;
}

.privacy-guide-tabs button.selected {
  color: var(--portal-cyan);
  border-color: rgba(117, 250, 250, 0.55);
  background: rgba(117, 250, 250, 0.08);
}

.privacy-guide-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background: rgba(13, 17, 20, 0.58);
  overflow: hidden;
}

.privacy-guide-workspace:has(.privacy-guide-panel:first-child) {
  grid-template-columns: 1fr;
}

.privacy-topic-list {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--portal-line);
  background: rgba(13, 17, 20, 0.55);
  padding: 14px 0;
}

.privacy-topic-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px 12px;
  border-left: 3px solid transparent;
  color: var(--portal-muted);
  padding: 12px 16px;
  text-align: left;
}

.privacy-topic-list button.selected {
  border-left-color: var(--portal-cyan);
  color: var(--portal-text);
  background: rgba(117, 250, 250, 0.07);
}

.privacy-topic-list button > span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
}

.privacy-topic-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-topic-list small {
  color: var(--portal-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.privacy-topic-list em {
  grid-column: 2;
  height: 3px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.12);
  overflow: hidden;
}

.privacy-topic-list em i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--portal-cyan), var(--portal-mint));
}

.privacy-guide-panel {
  min-height: 0;
  overflow: auto;
  padding: 28px;
}

.privacy-guide-section-intro {
  margin-bottom: 22px;
}

.privacy-guide-section-intro span {
  color: var(--portal-cyan);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
}

.privacy-guide-section-intro h2 {
  margin: 8px 0;
  color: var(--portal-text);
  font-size: 1.8rem;
}

.privacy-guide-section-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.65;
}

.guide-accordion-list {
  display: grid;
  gap: 10px;
}

.guide-accordion {
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(29, 29, 33, 0.68);
}

.guide-accordion.open {
  border-color: rgba(207, 208, 212, 0.18);
}

.privacy-guide-panel[data-section="data-brokers"] > .privacy-guide-section-intro,
.privacy-guide-panel[data-section="data-brokers"] > .guide-accordion-list {
  display: none;
}

.guide-accordion-header {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 14px;
  color: var(--portal-text);
  padding: 16px 18px;
  text-align: left;
}

.guide-accordion-header > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 50%;
  color: var(--portal-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.guide-accordion-header > span.complete {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.guide-accordion-header h3 {
  margin: 0;
  color: var(--portal-text);
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.guide-accordion-header small {
  color: var(--portal-soft);
}

.guide-accordion-header a {
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-cyan);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-accordion.open .guide-accordion-header > i {
  transform: rotate(90deg);
}

.guide-step-list {
  background: rgba(13, 17, 20, 0.72);
}

.guide-step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-step > button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  align-self: start;
  justify-self: center;
  margin-top: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 50%;
  color: var(--portal-soft);
  background: rgba(29, 29, 33, 0.86);
  font-size: 0.75rem;
  font-weight: 900;
}

.guide-step.complete > button {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.guide-step > div {
  padding: 18px 22px 20px 0;
}

.guide-step label {
  width: fit-content;
  display: inline-flex;
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 999px;
  color: var(--portal-text);
  background: rgba(29, 29, 33, 0.75);
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.guide-step.complete label {
  color: var(--portal-mint);
  text-decoration: line-through;
  opacity: 0.72;
}

.guide-step p {
  margin: 12px 0 0;
  color: var(--portal-soft);
  line-height: 1.72;
}

.broker-guide-panel {
  display: grid;
  gap: 24px;
}

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

.broker-exposure-card,
.broker-card,
.opt-out-service-card {
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 18px;
  background: rgba(29, 29, 33, 0.68);
  padding: 18px;
}

.broker-exposure-card i {
  color: var(--portal-cyan);
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.broker-exposure-card h3,
.broker-card h4,
.opt-out-service-card h4 {
  margin: 0;
  color: var(--portal-text);
  font-size: 1rem;
}

.broker-exposure-card p,
.broker-card p,
.opt-out-service-card p,
.broker-subheading p {
  margin: 8px 0 0;
  color: var(--portal-soft);
  line-height: 1.6;
}

.broker-subheading span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.broker-subheading h3 {
  margin: 6px 0 0;
  color: var(--portal-text);
  font-size: 1.25rem;
}

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

.broker-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.broker-card.complete {
  border-color: rgba(117, 250, 250, 0.24);
  opacity: 0.6;
}

.broker-card > button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--portal-line);
  border-radius: 50%;
  color: #061012;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 900;
}

.broker-card.complete > button {
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.broker-card header,
.opt-out-service-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.broker-card header span {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.difficulty-easy {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

.difficulty-medium {
  color: var(--portal-yellow);
  background: rgba(239, 251, 83, 0.12);
}

.difficulty-hard {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.broker-card a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 7px 13px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.opt-out-services-panel {
  padding: 24px;
}

.opt-out-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.opt-out-service-card {
  background: rgba(13, 17, 20, 0.62);
}

.opt-out-service-card header span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.opt-out-service-card a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.resource-detail-header {
  display: grid;
  gap: 18px;
}

.resource-detail-header > a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.resource-detail-header span,
.resource-detail-kicker {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.resource-detail-header h1 {
  margin: 8px 0 10px;
  color: var(--portal-text);
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
}

.resource-detail-header p {
  max-width: 760px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.resource-detail-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  overflow: hidden;
}

.resource-detail-content {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 20px;
  padding-right: 6px;
}

.resource-overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.resource-overview-panel h2 {
  margin: 10px 0;
  color: var(--portal-text);
  font-size: 1.65rem;
}

.resource-overview-panel p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.resource-detail-progress {
  width: 150px;
  height: 150px;
  display: grid;
  place-content: center;
  justify-self: end;
  border: 12px solid rgba(117, 250, 250, 0.18);
  border-top-color: var(--portal-mint);
  border-radius: 50%;
  text-align: center;
  background: rgba(13, 17, 20, 0.62);
}

.resource-detail-progress strong {
  color: var(--portal-text);
  font-size: 2.6rem;
  line-height: 1;
}

.resource-detail-progress span {
  color: var(--portal-soft);
  font-size: 0.82rem;
}

.lesson-list-panel {
  padding: 24px;
}

.lesson-list {
  display: grid;
}

.lesson-row {
  min-height: 84px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
}

.lesson-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061012;
  background: var(--portal-mint);
  font-weight: 900;
}

.lesson-row h3 {
  margin: 0 0 4px;
  color: var(--portal-text);
  font-size: 1rem;
}

.lesson-row p {
  margin: 0;
  color: var(--portal-soft);
}

.lesson-row > span {
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 999px;
  color: var(--portal-muted);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.simple-portal-page {
  grid-template-rows: auto minmax(0, 1fr);
}

.simple-placeholder-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
}

.simple-placeholder-panel > i {
  color: var(--portal-cyan);
  font-size: 2rem;
  margin-bottom: 16px;
}

.simple-placeholder-panel h2 {
  margin: 0 0 8px;
  color: var(--portal-text);
  font-size: 1.35rem;
}

.simple-placeholder-panel p {
  max-width: 540px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.mock-resource-hero {
  grid-template-columns: minmax(0, 1fr) 190px;
}

.mock-resource-type-card {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(117, 250, 250, 0.2);
  border-radius: 18px;
  background: rgba(13, 17, 20, 0.62);
  text-align: center;
}

.mock-resource-type-card i {
  color: var(--portal-cyan);
  font-size: 2.2rem;
}

.mock-resource-type-card strong {
  color: var(--portal-text);
  font-size: 1.25rem;
}

.mock-resource-type-card > span {
  color: var(--portal-soft);
}

.mock-resource-type-card .resource-access {
  margin-left: 0;
}

.resource-content-panel {
  height: auto;
  padding: 24px;
}

.article-content-panel span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.article-content-panel h2,
.template-section-card h3,
.tool-score-row h3,
.mock-checklist-item h3 {
  margin: 8px 0;
  color: var(--portal-text);
}

.article-content-panel p,
.template-section-card p,
.tool-score-row p,
.mock-checklist-item p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.62;
}

.mock-checklist-list,
.template-section-list,
.tool-score-list {
  display: grid;
  gap: 12px;
}

.mock-checklist-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
}

.mock-checklist-item button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 50%;
  color: var(--portal-cyan);
  background: rgba(13, 17, 20, 0.62);
  font-weight: 900;
}

.mock-checklist-item > span {
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 999px;
  color: var(--portal-soft);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.template-section-card {
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 18px;
  background: rgba(13, 17, 20, 0.58);
  padding: 18px;
}

.template-section-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.template-section-card span {
  border: 1px solid rgba(117, 250, 250, 0.18);
  border-radius: 999px;
  color: var(--portal-cyan);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.tool-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 48px;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
}

.tool-score-row meter {
  width: 150px;
  accent-color: var(--portal-mint);
}

.tool-score-row strong {
  color: var(--portal-yellow);
  font-size: 1.25rem;
  text-align: right;
}

.resource-workspace {
  min-height: 0;
  overflow: hidden;
}

.article-workspace,
.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.article-reader-panel,
.reader-action-panel,
.checklist-progress-panel,
.start-checklist-panel,
.template-editor-panel,
.tool-result-panel,
.tool-question-panel {
  height: auto;
  padding: 28px;
}

.article-reader-panel {
  overflow: auto;
}

.reader-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.reader-kicker span,
.reader-kicker em {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.article-reader-panel h2 {
  margin: 14px 0 22px;
  color: var(--portal-text);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
}

.article-reader-panel section {
  max-width: 820px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
}

.article-reader-panel h3,
.reader-action-panel h2,
.checklist-progress-panel h2,
.template-editor-panel h2 {
  margin: 0 0 10px;
  color: var(--portal-text);
}

.article-reader-panel p,
.reader-action-panel p,
.checklist-progress-panel p,
.template-editor-panel p,
.tool-result-panel p {
  color: var(--portal-muted);
  line-height: 1.7;
}

.reader-action-panel {
  align-content: start;
  display: grid;
  gap: 12px;
}

.reader-action-panel label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 14px;
  padding: 12px;
}

.reader-action-panel input {
  accent-color: var(--portal-mint);
}

.checklist-workspace {
  display: grid;
  gap: 20px;
}

.checklist-progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 22px;
}

.start-checklist-panel {
  display: grid;
}

.start-checklist-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
}

.start-checklist-row:first-child {
  border-top: 0;
}

.start-checklist-row > button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--portal-line);
  border-radius: 50%;
  color: #061012;
  background: transparent;
  font-weight: 900;
}

.start-checklist-row.complete > button {
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.start-checklist-row h3,
.tool-question-row h3 {
  margin: 0 0 6px;
  color: var(--portal-text);
}

.start-checklist-row p,
.tool-question-row p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.start-checklist-row > span {
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 999px;
  color: var(--portal-soft);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.template-outline {
  display: grid;
  align-content: start;
  gap: 8px;
}

.template-outline button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.76);
  padding: 14px;
  text-align: left;
}

.template-outline button.selected {
  color: var(--portal-text);
  border-color: rgba(117, 250, 250, 0.38);
  background: rgba(117, 250, 250, 0.08);
}

.template-outline span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061012;
  background: var(--portal-mint);
  font-weight: 900;
}

.template-field-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.template-field-stack label {
  display: grid;
  gap: 8px;
  color: var(--portal-text);
  font-weight: 800;
}

.template-field-stack textarea {
  min-height: 100px;
  resize: vertical;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  color: var(--portal-text);
  background: rgba(13, 17, 20, 0.72);
  padding: 14px;
  font: inherit;
}

.template-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.template-footer-actions button {
  min-height: 42px;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 16px;
  font-weight: 900;
}

.template-footer-actions button + button {
  color: var(--portal-cyan);
  border: 1px solid var(--portal-line);
  background: rgba(13, 17, 20, 0.72);
}

.tool-result-panel {
  align-content: start;
  display: grid;
  gap: 14px;
}

.tool-result-panel strong {
  color: var(--portal-yellow);
  font-size: 4rem;
  line-height: 1;
}

.tool-question-panel {
  display: grid;
  align-content: start;
  gap: 4px;
}

.tool-question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 42px;
  align-items: center;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
}

.tool-question-row input {
  accent-color: var(--portal-mint);
}

.tool-question-row strong {
  color: var(--portal-yellow);
  text-align: right;
}

@media (max-width: 1420px) {
  .resources-dashboard,
  .resources-dashboard.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .resources-main {
    min-height: auto;
  }

  .resources-shell,
  .resource-detail-shell {
    overflow: visible;
  }

  .resources-content,
  .resource-detail-content {
    overflow: visible;
    padding-right: 0;
  }

  .resources-rail {
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .resources-shell,
  .resource-detail-shell,
  .article-workspace,
  .template-workspace,
  .tool-workspace,
  .broker-exposure-grid,
  .broker-card-grid,
  .opt-out-service-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .privacy-topic-list {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }
}

@media (max-width: 980px) {
  .resources-header,
  .privacy-guide-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-overview-panel {
    grid-template-columns: 1fr;
  }

  .checklist-progress-panel {
    grid-template-columns: 1fr;
  }

  .resource-detail-progress {
    justify-self: start;
  }

  .privacy-guide-progress {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .resources-rail,
  .privacy-guide-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .resources-main {
    overflow-x: hidden;
  }

  .resources-shell,
  .resources-content,
  .resource-detail-shell,
  .resource-detail-content,
  .resource-workspace,
  .privacy-guide-app,
  .privacy-guide-workspace,
  .privacy-guide-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .resources-header h1,
  .resource-detail-header h1,
  .privacy-guide-header h1 {
    font-size: 2.1rem;
    line-height: 1.08;
  }

  .resources-search {
    min-height: 48px;
    min-width: 0;
    width: 100%;
  }

  .resource-card,
  .resources-rail .portal-panel,
  .resource-overview-panel,
  .resource-content-panel,
  .article-reader-panel,
  .reader-action-panel,
  .checklist-progress-panel,
  .start-checklist-panel,
  .template-editor-panel,
  .tool-result-panel,
  .tool-question-panel,
  .lesson-list-panel,
  .privacy-guide-panel,
  .opt-out-services-panel,
  .simple-placeholder-panel {
    padding: 18px;
  }

  .resource-card {
    min-height: 0;
    width: 100%;
    overflow: hidden;
  }

  .resource-card-top,
  .resource-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-meta {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .resource-access {
    margin-left: 0;
  }

  .resource-kind,
  .resource-meta span,
  .resource-button {
    max-width: 100%;
  }

  .resource-kind {
    align-items: flex-start;
    white-space: normal;
  }

  .lesson-row,
  .guide-accordion-header,
  .guide-step,
  .broker-card,
  .mock-checklist-item,
  .tool-score-row,
  .start-checklist-row,
  .tool-question-row {
    grid-template-columns: 1fr;
  }

  .lesson-number,
  .guide-step > button,
  .broker-card > button,
  .mock-checklist-item button {
    justify-self: start;
    margin-top: 0;
  }

  .tool-score-row meter {
    width: 100%;
  }

  .guide-step {
    gap: 8px;
    padding: 16px;
  }

  .guide-step > div {
    padding: 0;
  }

  .guide-accordion-header {
    gap: 10px;
    padding: 16px;
  }

  .guide-accordion-header a {
    width: fit-content;
  }

  .privacy-guide-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .privacy-guide-tabs button,
  .resource-filters button {
    white-space: nowrap;
  }

  .resource-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .resource-detail-progress {
    width: 128px;
    height: 128px;
    border-width: 10px;
  }

  .privacy-topic-list button {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
  }

  .privacy-topic-list button > span {
    width: 30px;
    height: 30px;
  }

  .broker-card header,
  .opt-out-service-card header {
    align-items: flex-start;
    flex-direction: column;
  }
}
.dashboard-revamp {
  --portal-surface: rgba(255, 255, 255, 0.38);
  --portal-surface-raised: rgba(255, 255, 255, 0.58);
  color: var(--portal-text);
  background: transparent;
}

.dashboard-revamp::before { display: none; }

.portal-shell-frame .dashboard-revamp {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.revamp-dashboard-main {
  display: block;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  padding: 34px clamp(24px, 3vw, 48px) 48px;
  overflow-x: hidden;
  overflow-y: auto;
}

.revamp-dashboard-head {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--portal-content-wide);
  margin: 0 auto 26px;
}

.revamp-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--portal-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.revamp-dashboard-intro h1 {
  margin: 0 0 9px;
  color: var(--portal-text);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.revamp-dashboard-intro > p,
.revamp-company-copy > span {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.revamp-attention-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--portal-text);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.revamp-attention-link > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--portal-status-attention);
}

.revamp-attention-link > i { font-size: 0.65rem; }

.revamp-dashboard-context {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.revamp-dashboard-context-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.revamp-company-name { font-size: 0.88rem; white-space: nowrap; }
.revamp-company-copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  text-align: right;
}
.revamp-company-copy em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--portal-text-success);
  background: rgba(33, 228, 191, 0.12);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
}

.revamp-header-controls { display: flex; align-items: center; gap: 9px; }
.revamp-range {
  display: flex;
  gap: 3px;
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.35);
}
.revamp-range button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--portal-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
}
.revamp-range button.selected { color: var(--portal-text); background: var(--portal-surface-selected); }

.revamp-popover-wrap { position: relative; }
.revamp-notification-count {
  position: absolute;
  top: -3px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0d1114;
  background: var(--portal-status-attention);
  font-size: 0.625rem;
  font-weight: 800;
}
.revamp-avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #0d1114;
  background: var(--portal-accent);
  cursor: pointer;
  font-weight: 800;
}
.revamp-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  padding: 18px;
  color: var(--portal-text);
}
.revamp-popover p { margin: 9px 0 0; color: var(--portal-muted); font-size: 0.75rem; line-height: 1.5; }
.revamp-popover a { color: var(--portal-text-success); }
.revamp-profile-popover { display: grid; gap: 10px; width: 200px; }
.revamp-profile-popover button { border: 0; padding: 0; color: var(--portal-text-negative); background: none; cursor: pointer; text-align: left; }

.revamp-dashboard-layout { max-width: var(--portal-content-wide); margin: 0 auto; }
.revamp-panel { min-width: 0; padding: 23px; }
.revamp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}
.revamp-section-head h2,
.revamp-review h2,
.revamp-support-banner h2,
.revamp-advisor-callout h2 {
  margin: 0;
  color: var(--portal-text);
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.revamp-section-head > a,
.revamp-progress-wrap a {
  color: #3f5451;
  font-size: 0.67rem;
  font-weight: 700;
  text-decoration: none;
}

.revamp-advisor-callout {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.revamp-callout-icon,
.revamp-review-icon,
.revamp-document-row > span,
.revamp-update-row > span,
.revamp-support-banner > span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--portal-text-success);
  background: rgba(33, 228, 191, 0.12);
}
.revamp-callout-icon { width: 38px; height: 38px; }
.revamp-advisor-callout .revamp-eyebrow { margin-bottom: 5px; }

.revamp-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.08fr) minmax(250px, 0.9fr);
  gap: 14px;
}
.revamp-dashboard-stack { display: grid; gap: 14px; }
.revamp-posture-body {
  min-height: 160px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}
.revamp-score-arc { position: relative; width: 190px; height: 112px; margin: 0 auto; overflow: hidden; }
.revamp-score-arc::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 9px;
  width: 172px;
  height: 172px;
  border: 9px solid rgba(104, 121, 119, 0.11);
  border-radius: 50%;
}
.revamp-score-arc > div { position: absolute; z-index: 1; top: 48px; left: 0; right: 0; text-align: center; }
.revamp-score-arc strong { display: block; font-size: 2.8rem; line-height: 0.9; }
.revamp-score-arc span { color: var(--portal-muted); font-size: 0.68rem; }
.revamp-posture-copy strong { color: var(--portal-text-neutral); font-size: 0.82rem; }
.revamp-posture-copy p { margin: 7px 0 0; color: var(--portal-muted); font-size: 0.75rem; line-height: 1.55; }
.revamp-category-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding-top: 15px;
  border-top: 1px solid var(--portal-divider);
}
.revamp-category-row span { color: var(--portal-muted); font-size: 0.625rem; letter-spacing: 0.04em; text-transform: uppercase; }
.revamp-category-row b { display: block; margin-top: 7px; color: var(--portal-text-neutral); font-size: 0.6875rem; font-weight: 600; text-transform: none; }
.revamp-category-row b::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: rgba(104, 121, 119, 0.35); }

.revamp-divider-list > * + * { border-top: 1px solid var(--portal-divider); }
.revamp-service-row {
  min-height: 47px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  color: var(--portal-text);
  font-size: 0.78rem;
  text-decoration: none;
}
.revamp-service-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revamp-service-row em { color: var(--portal-text-success); font-size: 0.625rem; font-style: normal; }
.revamp-service-row > i { color: var(--portal-muted); font-size: 0.58rem; }
.revamp-empty { margin: 24px 0 0; color: var(--portal-muted); font-size: 0.78rem; line-height: 1.55; }

.revamp-alert-row {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--portal-text);
  text-decoration: none;
}
.revamp-alert-row > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #aa6710; background: rgba(239, 251, 83, 0.22); }
.revamp-alert-row strong { font-size: 0.7rem; }
.revamp-alert-row small,
.revamp-document-row small,
.revamp-support-row small,
.revamp-update-row small { display: block; margin-top: 4px; color: var(--portal-muted); font-size: 0.6875rem; line-height: 1.4; }
.revamp-alert-row > i { color: var(--portal-muted); font-size: 0.625rem; }
.revamp-review {
  min-height: 106px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
}
.revamp-review-icon { width: 36px; height: 36px; }
.revamp-review p { margin: 5px 0 0; color: var(--portal-muted); font-size: 0.6875rem; line-height: 1.4; }
.revamp-review > a { color: var(--portal-muted); }

.revamp-secondary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.05fr 1.1fr 1.25fr;
  gap: 14px;
  margin-top: 14px;
}
.revamp-secondary-grid > .revamp-panel { min-height: 194px; }
.revamp-document-row,
.revamp-update-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 11px;
  color: var(--portal-text);
  text-decoration: none;
}
.revamp-document-row > span { width: 29px; height: 35px; border-radius: 7px; }
.revamp-document-row strong,
.revamp-update-row strong,
.revamp-support-row strong,
.revamp-progress-wrap strong { font-size: 0.7rem; }
.revamp-document-row > i { color: var(--portal-muted); font-size: 0.625rem; }
.revamp-progress-wrap { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 13px; }
.revamp-progress-ring {
  --guide-progress: 0%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2fd6c2 var(--guide-progress), rgba(104, 121, 119, 0.12) 0);
}
.revamp-progress-ring::before { content: ""; width: 64px; height: 64px; grid-area: 1 / 1; border-radius: 50%; background: rgba(255, 255, 255, 0.66); }
.revamp-progress-ring strong { z-index: 1; grid-area: 1 / 1; font-size: 1.2rem; }
.revamp-progress-wrap p { margin: 5px 0 12px; color: var(--portal-muted); font-size: 0.6875rem; line-height: 1.45; }
.revamp-progress-wrap a { display: inline-flex; border-radius: 8px; padding: 7px 10px; color: var(--portal-text-accent); background: rgba(33, 228, 191, 0.14); }
.revamp-support-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; color: var(--portal-text); text-decoration: none; }
.revamp-support-row > span { border-radius: 7px; padding: 5px 8px; color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); font-size: 0.625rem; }
.revamp-update-row { grid-template-columns: 35px 1fr; }
.revamp-update-row > span { width: 34px; height: 34px; }

.revamp-support-banner {
  min-height: 104px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.revamp-support-banner > span { width: 42px; height: 42px; }
.revamp-support-banner p { margin: 6px 0 0; color: var(--portal-muted); font-size: 0.7rem; }

.revamp-dashboard-skeleton {
  max-width: var(--portal-content-wide);
  display: grid;
  grid-template-columns: 1.2fr 1.08fr 0.9fr;
  gap: 14px;
  margin: 0 auto;
}
.revamp-skeleton {
  min-height: 300px;
  border-radius: var(--portal-radius-region);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.27) 20%, rgba(255, 255, 255, 0.58) 40%, rgba(255, 255, 255, 0.27) 60%);
  background-size: 220% 100%;
  animation: revamp-skeleton-wave 1.8s ease-in-out infinite;
}
.revamp-skeleton--small { min-height: 194px; }
.revamp-skeleton:nth-last-child(-n + 4) { grid-column: span 1; }
@keyframes revamp-skeleton-wave { to { background-position-x: -220%; } }

.dashboard-revamp a:focus-visible,
.dashboard-revamp button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 191, 162, 0.34);
}

@media (max-width: 1220px) {
  .revamp-primary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revamp-dashboard-stack { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revamp-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .revamp-dashboard-main { padding: 92px 18px 30px; }
  .revamp-dashboard-head { display: grid; gap: 20px; }
  .revamp-dashboard-context { justify-items: start; gap: 10px; }
  .revamp-dashboard-context-row { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
  .revamp-company-copy { justify-content: flex-start; text-align: left; }
  .revamp-header-controls { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .revamp-dashboard-intro h1 { font-size: 2rem; }
  .revamp-range { order: 3; width: 100%; }
  .revamp-range button { flex: 1; }
  .revamp-primary-grid,
  .revamp-dashboard-stack,
  .revamp-secondary-grid,
  .revamp-dashboard-skeleton { grid-template-columns: 1fr; }
  .revamp-posture-body { grid-template-columns: 1fr; }
  .revamp-posture-copy { text-align: center; }
  .revamp-category-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .revamp-advisor-callout,
  .revamp-support-banner { grid-template-columns: 40px 1fr; }
  .revamp-advisor-callout .portal-button,
  .revamp-support-banner .portal-button { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .revamp-skeleton { animation: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dashboard-revamp .portal-glass { background: rgba(246, 248, 248, 0.94); }
}
.documents-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
}

.documents-main .portal-panel {
  height: auto;
}

.documents-main .resources-header {
  flex: 0 0 auto;
}

.documents-main .resources-header h1 {
  font-size: clamp(2.25rem, 3vw, 3.25rem);
}

.document-request-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 18px;
  font-weight: 900;
}

.document-summary-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.document-summary-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  padding: 24px;
}

.document-summary-card i {
  color: var(--portal-cyan);
  font-size: 1.2rem;
}

.document-summary-card span {
  color: var(--portal-muted);
  font-weight: 800;
  line-height: 1.25;
}

.document-summary-card strong {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  color: var(--portal-text);
  font-size: clamp(3rem, 4.6vw, 4.25rem);
  line-height: 1;
}

.document-summary-card.warning i,
.document-summary-card.warning strong {
  color: var(--portal-yellow);
}

.document-library-panel {
  flex: 0 0 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
}

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.document-search {
  min-width: 0;
}

.document-type-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.document-type-filters button {
  min-height: 38px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 13px;
  font-weight: 800;
}

.document-type-filters button.selected {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.document-table {
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(117, 250, 250, 0.22) transparent;
}

.document-table-head,
.document-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(160px, 0.8fr) 150px minmax(140px, 0.7fr) 92px;
  align-items: center;
  gap: 16px;
}

.document-table-head {
  min-height: 42px;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.document-row {
  min-height: 86px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.document-title-cell,
.document-service-cell,
.document-date-cell,
.document-actions {
  min-width: 0;
}

.document-title-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.document-title-cell > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.1);
}

.document-title-cell h2 {
  margin: 0 0 5px;
  color: var(--portal-text);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.document-title-cell p,
.document-service-cell small,
.document-date-cell small {
  margin: 0;
  color: var(--portal-soft);
  font-size: 0.8rem;
}

.document-service-cell,
.document-date-cell {
  display: grid;
  gap: 4px;
  color: var(--portal-muted);
}

.document-service-cell span,
.document-date-cell span {
  color: var(--portal-text);
}

.document-status {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #061012;
  background: var(--portal-mint);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-status.sent,
.document-status.pending-signature {
  background: var(--portal-yellow);
  color: #061012;
}

.document-status.awaiting-client-signature {
  background: #f97316;
  color: #fff;
}

.document-status.voided,
.document-status.expired {
  color: var(--portal-soft);
  background: rgba(255, 255, 255, 0.08);
}

.document-status.shared {
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.12);
}

.document-status.archived {
  color: var(--portal-soft);
  background: rgba(255, 255, 255, 0.08);
}

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

.document-actions button,
.document-actions a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 12px;
  color: var(--portal-cyan);
  background: rgba(29, 29, 33, 0.8);
  text-decoration: none;
}

.document-actions button:hover,
.document-actions a:hover {
  border-color: var(--portal-line-strong);
  color: var(--portal-yellow);
}

.document-empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  color: var(--portal-muted);
  text-align: center;
}

.document-empty-state i {
  color: var(--portal-cyan);
  font-size: 2rem;
}

.document-empty-state h2 {
  margin: 0;
  color: var(--portal-text);
}

.document-empty-state p {
  margin: 0;
}

@media (max-width: 1180px) {
  .document-summary-grid,
  .document-toolbar {
    grid-template-columns: 1fr;
  }

  .document-type-filters {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .document-request-button {
    width: 100%;
    justify-content: center;
  }

  .document-summary-grid {
    gap: 12px;
  }

  .document-summary-card,
  .document-library-panel {
    padding: 18px;
  }

  .document-summary-card {
    min-height: 112px;
  }

  .document-summary-card strong {
    font-size: 2.35rem;
  }

  .document-type-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .document-type-filters button {
    white-space: nowrap;
  }

  .document-table {
    display: grid;
    gap: 12px;
    overflow: visible;
  }

  .document-table-head {
    display: none;
  }

  .document-row {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    border: 1px solid rgba(207, 208, 212, 0.14);
    border-radius: 18px;
    background: rgba(29, 29, 33, 0.58);
    padding: 16px;
  }

  .document-title-cell {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .document-title-cell > i {
    width: 34px;
    height: 34px;
  }

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

.document-detail-main {
  gap: 22px;
}

.document-detail-header {
  display: grid;
  gap: 18px;
}

.document-detail-header > a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.document-detail-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.document-detail-title-row span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.document-detail-title-row h1 {
  margin: 8px 0 10px;
  color: var(--portal-text);
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.document-detail-title-row p {
  max-width: 780px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.document-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
}

.document-preview-panel,
.document-detail-card {
  height: auto;
  padding: 24px;
}

.document-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.document-preview-toolbar span {
  color: var(--portal-text);
  font-weight: 900;
}

.document-preview-toolbar button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: var(--portal-cyan);
  background: transparent;
  padding: 0 14px;
  font-weight: 900;
}

.document-preview-frame {
  min-height: 620px;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 10px;
  border: 1px dashed rgba(117, 250, 250, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(117, 250, 250, 0.06), transparent 55%),
    rgba(13, 17, 20, 0.48);
  text-align: center;
}

.document-preview-frame i {
  color: var(--portal-cyan);
  font-size: 3rem;
}

.document-preview-frame strong {
  color: var(--portal-text);
  font-size: 1.3rem;
}

.document-preview-frame p {
  max-width: 420px;
  margin: 0;
  color: var(--portal-muted);
}

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

.document-detail-card h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--portal-text);
  font-size: 1.05rem;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.document-detail-card h2 i {
  color: var(--portal-cyan);
}

.document-detail-fields,
.document-activity-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.document-detail-fields div,
.document-activity-list div {
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 14px;
  background: rgba(13, 17, 20, 0.38);
  padding: 14px;
}

.document-detail-fields dt,
.document-activity-list span {
  color: var(--portal-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.document-detail-fields dd,
.document-activity-list strong {
  display: block;
  margin: 6px 0 0;
  color: var(--portal-text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .document-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .document-detail-title-row,
  .document-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-preview-panel,
  .document-detail-card {
    padding: 18px;
  }

  .document-preview-frame {
    min-height: 360px;
  }

  .document-preview-toolbar button {
    width: 100%;
    justify-content: center;
  }
}

/* ── Summary card — action state ─────────────────────────────────────────────── */

.document-summary-card.action i,
.document-summary-card.action strong {
  color: #f97316;
}

/* ── Clickable rows ──────────────────────────────────────────────────────────── */

.document-row--clickable {
  cursor: pointer;
  transition: background 120ms;
}

.document-row--clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.document-row--clickable:focus-visible {
  outline: 2px solid var(--portal-cyan);
  outline-offset: -2px;
  border-radius: 4px;
}

.document-row--action .document-title-cell > i {
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

/* ── Action required badge ───────────────────────────────────────────────────── */

.document-action-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── Status banner ───────────────────────────────────────────────────────────── */

.document-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid;
}

.document-status-banner > i {
  flex-shrink: 0;
  font-size: 1.2rem;
  margin-top: 2px;
}

.document-status-banner > div {
  display: grid;
  gap: 4px;
}

.document-status-banner strong {
  font-weight: 800;
  font-size: 0.95rem;
}

.document-status-banner span {
  font-size: 0.85rem;
  opacity: 0.8;
}

.document-status-banner--action {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.35);
  color: #fed7aa;
}

.document-status-banner--action > i {
  color: #f97316;
}

.document-status-banner--pending {
  background: rgba(250, 204, 21, 0.08);
  border-color: rgba(250, 204, 21, 0.25);
  color: var(--portal-text);
}

.document-status-banner--pending > i {
  color: var(--portal-yellow);
}

.document-status-banner--signed {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--portal-text);
}

.document-status-banner--signed > i {
  color: #22c55e;
}

.document-status-banner--voided {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--portal-soft);
}

.document-status-banner--voided > i {
  color: var(--portal-muted);
}

/* ── Preview toolbar actions ─────────────────────────────────────────────────── */

.document-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.document-preview-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: var(--portal-cyan);
  background: transparent;
  padding: 0 16px;
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 150ms, border-color 150ms;
  white-space: nowrap;
}

.document-preview-btn:hover:not(:disabled) {
  background: rgba(117, 250, 250, 0.08);
}

.document-preview-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.document-preview-btn--sign {
  border-color: #f97316;
  color: #f97316;
}

.document-preview-btn--sign:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.1);
}

.document-preview-btn--void {
  border-color: #dc2626;
  color: #dc2626;
}

.document-preview-btn--void:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
}

.document-preview-btn--cert {
  border-color: #4ade80;
  color: #4ade80;
}

.document-preview-btn--cert:hover:not(:disabled) {
  background: rgba(74, 222, 128, 0.08);
}

/* ── Document hash ───────────────────────────────────────────────────────────── */

.document-hash-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--portal-soft);
  cursor: help;
}

/* ── Preview frame sig count ─────────────────────────────────────────────────── */

.document-preview-sig-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--portal-soft);
  margin: 0;
}

/* ── Signature trail ─────────────────────────────────────────────────────────── */

.document-sig-trail {
  display: grid;
  gap: 10px;
}

.document-sig-event {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(13, 17, 20, 0.38);
  border: 1px solid rgba(207, 208, 212, 0.1);
}

.document-sig-event-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.document-sig-event--simpsec .document-sig-event-icon {
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.12);
}

.document-sig-event--client .document-sig-event-icon {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.document-sig-event--void .document-sig-event-icon {
  color: var(--portal-muted);
  background: rgba(255, 255, 255, 0.06);
}

.document-sig-event-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-sig-event-body strong {
  color: var(--portal-text);
  font-weight: 800;
  font-size: 0.88rem;
}

.document-sig-event-body span,
.document-sig-event-body time {
  color: var(--portal-soft);
  font-size: 0.78rem;
}

.document-sig-email {
  color: var(--portal-muted) !important;
}

.document-sig-ip {
  color: var(--portal-muted) !important;
  font-family: monospace;
  font-size: 0.72rem !important;
}

.document-sig-notes {
  color: var(--portal-text) !important;
  font-style: italic;
}

/* ── SOW body text ───────────────────────────────────────────────────────────── */

.document-sow-body {
  margin: 0;
  color: var(--portal-soft);
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* ── Generate PDF button ─────────────────────────────────────────────────────── */

.document-preview-btn--generate {
  border-color: rgba(117, 250, 250, 0.45);
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.06);
}

.document-preview-btn--generate:hover:not(:disabled) {
  background: rgba(117, 250, 250, 0.12);
  border-color: var(--portal-cyan);
}

/* ── PDF generation toast ────────────────────────────────────────────────────── */

.document-pdf-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
  border: 1px solid;
}

.document-pdf-toast--success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.document-pdf-toast--error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
/* ── Overlay ──────────────────────────────────────────────────────────────────── */

.sigmodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 10, 14, 0.82);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

/* ── Modal card ───────────────────────────────────────────────────────────────── */

.sigmodal {
  background: #0d1114;
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 24px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────────── */

.sigmodal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(207, 208, 212, 0.1);
}

.sigmodal-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--portal-text);
}

.sigmodal-header p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--portal-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 360px;
}

.sigmodal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 10px;
  color: var(--portal-soft);
  cursor: pointer;
  transition: background 150ms;
}

.sigmodal-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--portal-text);
}

/* ── Party label ──────────────────────────────────────────────────────────────── */

.sigmodal-party {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(14, 165, 233, 0.07);
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
  color: var(--portal-cyan);
  font-size: 0.85rem;
}

.sigmodal-party i {
  font-size: 1rem;
}

.sigmodal-party strong {
  color: var(--portal-text);
}

/* ── Tabs ─────────────────────────────────────────────────────────────────────── */

.sigmodal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(207, 208, 212, 0.1);
  padding: 0 28px;
}

.sigmodal-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--portal-soft);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
  margin-bottom: -1px;
}

.sigmodal-tabs button.active {
  color: var(--portal-cyan);
  border-bottom-color: var(--portal-cyan);
}

.sigmodal-tabs button:hover:not(.active) {
  color: var(--portal-text);
}

/* ── Draw panel ───────────────────────────────────────────────────────────────── */

.sigmodal-draw-panel {
  padding: 20px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sigmodal-canvas-wrap {
  position: relative;
  border: 1px solid rgba(117, 250, 250, 0.25);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  cursor: crosshair;
  touch-action: none;
}

.sigmodal-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
}

.sigmodal-canvas-guide {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  pointer-events: none;
  padding: 0 18px;
}

.sigmodal-canvas-guide::before {
  content: '';
  display: block;
  height: 1px;
  background: rgba(117, 250, 250, 0.18);
  margin-bottom: 6px;
}

.sigmodal-canvas-guide span {
  font-size: 0.7rem;
  color: rgba(117, 250, 250, 0.35);
  font-style: italic;
}

.sigmodal-clear {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid rgba(207, 208, 212, 0.15);
  border-radius: 999px;
  background: transparent;
  color: var(--portal-soft);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}

.sigmodal-clear:hover:not(:disabled) {
  color: var(--portal-text);
  border-color: rgba(207, 208, 212, 0.3);
}

.sigmodal-clear:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Type panel ───────────────────────────────────────────────────────────────── */

.sigmodal-type-panel {
  padding: 20px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sigmodal-type-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--portal-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sigmodal-type-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(207, 208, 212, 0.16);
  border-radius: 12px;
  color: var(--portal-text);
  font-size: 1rem;
  outline: none;
  transition: border-color 150ms;
  box-sizing: border-box;
}

.sigmodal-type-input:focus {
  border-color: var(--portal-cyan);
}

.sigmodal-type-preview {
  padding: 16px 20px;
  border: 1px solid rgba(117, 250, 250, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  font-family: 'Segoe Script', 'Brush Script MT', 'Comic Sans MS', cursive;
  font-size: 1.9rem;
  color: #0ea5e9;
  text-align: center;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  overflow: hidden;
  word-break: break-all;
}

/* ── Consent ──────────────────────────────────────────────────────────────────── */

.sigmodal-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 28px;
  cursor: pointer;
  border-top: 1px solid rgba(207, 208, 212, 0.08);
  margin-top: 8px;
}

.sigmodal-consent input[type='checkbox'] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--portal-cyan);
  cursor: pointer;
}

.sigmodal-consent span {
  font-size: 0.82rem;
  color: var(--portal-soft);
  line-height: 1.5;
}

.sigmodal-consent strong {
  color: var(--portal-text);
}

/* ── Footer ───────────────────────────────────────────────────────────────────── */

.sigmodal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 28px;
}

.sigmodal-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 150ms, opacity 150ms;
  border: 1px solid transparent;
}

.sigmodal-btn--cancel {
  background: transparent;
  border-color: rgba(207, 208, 212, 0.18);
  color: var(--portal-soft);
}

.sigmodal-btn--cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--portal-text);
}

.sigmodal-btn--confirm {
  background: var(--portal-cyan);
  color: #061012;
}

.sigmodal-btn--confirm:hover:not(:disabled) {
  background: #38bdf8;
}

.sigmodal-btn--confirm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Mobile ───────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .sigmodal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .sigmodal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }

  .sigmodal-header,
  .sigmodal-draw-panel,
  .sigmodal-type-panel,
  .sigmodal-consent,
  .sigmodal-footer,
  .sigmodal-tabs {
    padding-left: 20px;
    padding-right: 20px;
  }

  .sigmodal-footer {
    flex-direction: column-reverse;
  }

  .sigmodal-btn {
    width: 100%;
    justify-content: center;
  }
}
/* ── Overlay ──────────────────────────────────────────────────────────────── */

.voidmodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 10, 14, 0.82);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
}

/* ── Modal card ───────────────────────────────────────────────────────────── */

.voidmodal {
  background: #0d1114;
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.voidmodal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(207, 208, 212, 0.1);
}

.voidmodal-header-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.voidmodal-header > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.voidmodal-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--portal-text);
}

.voidmodal-header p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--portal-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.voidmodal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 10px;
  color: var(--portal-soft);
  cursor: pointer;
  transition: background 150ms;
}

.voidmodal-close:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: var(--portal-text);
}

/* ── Warning callout ──────────────────────────────────────────────────────── */

.voidmodal-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 28px 0;
  padding: 14px 16px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 12px;
  color: #f87171;
  font-size: 0.83rem;
  line-height: 1.55;
}

.voidmodal-warning i {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.9rem;
}

.voidmodal-warning p {
  margin: 0;
}

/* ── Reason textarea ──────────────────────────────────────────────────────── */

.voidmodal-reason {
  padding: 20px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voidmodal-reason label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--portal-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.voidmodal-reason label span {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(207, 208, 212, 0.35);
}

.voidmodal-textarea {
  width: 100%;
  resize: vertical;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(207, 208, 212, 0.16);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--portal-text);
  box-sizing: border-box;
  transition: border-color 150ms;
  outline: none;
  min-height: 80px;
}

.voidmodal-textarea::placeholder {
  color: rgba(207, 208, 212, 0.3);
}

.voidmodal-textarea:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.voidmodal-textarea:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.voidmodal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 28px;
}

.voidmodal-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 150ms, opacity 150ms;
  border: 1px solid transparent;
}

.voidmodal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.voidmodal-btn--cancel {
  background: transparent;
  border-color: rgba(207, 208, 212, 0.18);
  color: var(--portal-soft);
}

.voidmodal-btn--cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--portal-text);
}

.voidmodal-btn--confirm {
  background: #dc2626;
  color: #ffffff;
}

.voidmodal-btn--confirm:hover:not(:disabled) {
  background: #b91c1c;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .voidmodal-overlay {
    padding: 12px;
    align-items: flex-end;
  }

  .voidmodal {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }

  .voidmodal-header,
  .voidmodal-reason,
  .voidmodal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .voidmodal-warning {
    margin-left: 20px;
    margin-right: 20px;
  }

  .voidmodal-footer {
    flex-direction: column-reverse;
  }

  .voidmodal-btn {
    width: 100%;
    justify-content: center;
  }
}
.services-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
}

.services-main .portal-panel {
  height: auto;
}

.services-main .resources-header {
  flex: 0 0 auto;
}

.services-main .resources-header h1 {
  font-size: clamp(2.25rem, 3vw, 3.25rem);
}

.service-request-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 18px;
  font-weight: 900;
}

.service-summary-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-summary-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px 10px;
  padding: 24px;
}

.service-summary-card i {
  color: var(--portal-cyan);
  font-size: 1.2rem;
}

.service-summary-card span {
  color: var(--portal-muted);
  font-weight: 800;
  line-height: 1.25;
}

.service-summary-card strong {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  color: var(--portal-text);
  font-size: clamp(3rem, 4.6vw, 4.25rem);
  line-height: 1;
}

.service-summary-card.warning i,
.service-summary-card.warning strong {
  color: var(--portal-yellow);
}

.services-layout {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}

.service-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
}

.service-filters button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 15px;
  font-weight: 800;
}

.service-filters button.selected {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.service-card-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.service-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.service-accordion-trigger,
.service-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.service-accordion-trigger {
  width: 100%;
  min-height: 116px;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 22px 24px;
  text-align: left;
}

.service-accordion-trigger:hover {
  background: rgba(117, 250, 250, 0.04);
}

.service-category {
  flex: 0 0 190px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.service-trigger-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.service-trigger-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.service-trigger-meta > span {
  color: var(--portal-soft);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.service-trigger-meta > i {
  color: var(--portal-cyan);
  transition: transform 180ms ease;
}

.service-card.open .service-trigger-meta > i {
  transform: rotate(90deg);
}

.service-status {
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-status.action-needed {
  background: var(--portal-yellow);
}

.service-status.in-review,
.service-status.scheduled {
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.12);
}

.service-card h2 {
  margin: 0 0 8px;
  color: var(--portal-text);
  font-size: 1.35rem;
  line-height: 1.2;
}

.service-card p {
  max-width: 700px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.service-accordion-panel {
  display: grid;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 24px 24px;
}

.service-progress {
  display: grid;
  gap: 8px;
}

.service-progress div {
  height: 8px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.14);
  overflow: hidden;
}

.service-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-mint), var(--portal-yellow));
}

.service-progress strong {
  color: var(--portal-soft);
  font-size: 0.82rem;
}

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

.service-meta-grid div {
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 14px;
  background: rgba(13, 17, 20, 0.38);
  padding: 14px;
}

.service-meta-grid dt {
  color: var(--portal-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.service-meta-grid dd {
  margin: 6px 0 0;
  color: var(--portal-text);
  font-weight: 800;
}

.service-included-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-included-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 999px;
  color: var(--portal-muted);
  padding: 7px 10px;
  font-size: 0.82rem;
}

.service-included-list i {
  color: var(--portal-mint);
}

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

.service-actions a,
.service-actions button,
.next-milestone-card a,
.service-action-card a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.service-actions a {
  border: 1px solid var(--portal-mint);
  color: var(--portal-cyan);
  padding: 0 15px;
}

.service-actions button {
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 15px;
}

@media (max-width: 1180px) {
  .service-summary-grid,
  .service-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .service-request-button {
    width: 100%;
    justify-content: center;
  }

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

  .service-summary-card,
  .service-accordion-trigger,
  .service-accordion-panel {
    padding: 18px;
  }

  .service-summary-card {
    min-height: 112px;
  }

  .service-summary-card strong {
    font-size: 2.35rem;
  }

  .service-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .service-filters button {
    white-space: nowrap;
  }

  .service-accordion-trigger,
  .service-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-category {
    flex-basis: auto;
  }

  .service-trigger-meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .service-actions a,
  .service-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* ─── Empty / pending states ──────────────────────────────────────────────── */

.service-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 40px 24px;
  text-align: center;
  color: var(--portal-muted);
}

.service-empty-state i {
  font-size: 2rem;
  color: var(--portal-line);
  margin-bottom: 4px;
}

.service-empty-state p {
  margin: 0;
  line-height: 1.55;
}

.service-empty-state a {
  color: var(--portal-cyan);
  text-decoration: none;
}

.service-field-pending {
  color: var(--portal-soft) !important;
  font-style: italic;
  opacity: 0.6;
}

/* ─── Service detail ──────────────────────────────────────────────────────── */

.service-detail-main {
  gap: 22px;
}

.service-detail-header {
  display: grid;
  gap: 18px;
}

.service-detail-header > a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.service-detail-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.service-detail-title-row span,
.service-detail-kicker {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.service-detail-title-row h1 {
  margin: 8px 0 10px;
  color: var(--portal-text);
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  line-height: 1.05;
}

.service-detail-title-row p {
  max-width: 760px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.service-detail-hero {
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: 26px;
  padding: 28px;
  overflow: hidden;
}

.service-detail-hero h2 {
  margin: 8px 0;
  color: var(--portal-text);
  font-size: 2rem;
}

.service-detail-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.service-detail-progress {
  display: grid;
  gap: 8px;
}

.service-detail-progress div {
  height: 10px;
  border-radius: 999px;
  background: rgba(117, 250, 250, 0.14);
  overflow: hidden;
}

.service-detail-progress div span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--portal-mint), var(--portal-yellow));
}

.service-detail-progress strong {
  color: var(--portal-text);
  font-size: 1.05rem;
}

.service-detail-progress small {
  color: var(--portal-soft);
  font-weight: 800;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.service-detail-grid.wide {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.service-detail-panel {
  height: auto;
  padding: 24px;
}

.service-detail-panel h2,
.service-detail-actions h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--portal-text);
  font-size: 1.15rem;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.service-detail-panel h2 i {
  color: var(--portal-cyan);
}

.service-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-scope-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(207, 208, 212, 0.14);
  border-radius: 999px;
  color: var(--portal-muted);
  padding: 9px 12px;
  font-weight: 800;
}

.service-scope-list i {
  color: var(--portal-mint);
}

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

.service-field-list div {
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 14px;
  background: rgba(13, 17, 20, 0.38);
  padding: 14px;
}

.service-field-list dt {
  color: var(--portal-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.service-field-list dd {
  margin: 6px 0 0;
  color: var(--portal-text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.service-milestone-list,
.service-document-list {
  display: grid;
}

.service-milestone,
.service-document-list a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
}

.service-milestone:first-child,
.service-document-list a:first-child {
  border-top: 0;
  padding-top: 0;
}

.service-milestone span,
.service-document-list em {
  width: fit-content;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.service-milestone h3 {
  margin: 0 0 5px;
  color: var(--portal-text);
  font-size: 1rem;
}

.service-milestone p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.5;
}

.service-milestone time,
.service-document-list time {
  color: var(--portal-soft);
  font-weight: 800;
  text-align: right;
}

.service-document-list a {
  grid-template-columns: 28px minmax(0, 1fr) auto 110px;
  color: var(--portal-text);
  text-decoration: none;
}

.service-document-list i {
  color: var(--portal-cyan);
}

.service-detail-actions {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.service-detail-actions p {
  max-width: 680px;
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.55;
}

.service-detail-actions > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.service-detail-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: var(--portal-cyan);
  padding: 0 15px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .service-detail-hero,
  .service-detail-grid,
  .service-detail-grid.wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .service-detail-title-row,
  .service-detail-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-detail-hero,
  .service-detail-panel,
  .service-detail-actions {
    padding: 18px;
  }

  .service-field-list,
  .service-milestone,
  .service-document-list a {
    grid-template-columns: 1fr;
  }

  .service-milestone time,
  .service-document-list time {
    text-align: left;
  }

  .service-detail-actions > div:last-child,
  .service-detail-actions a {
    width: 100%;
  }

  .service-detail-actions a {
    justify-content: center;
  }
}
.account-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
}

.account-main .portal-panel {
  height: auto;
}

.account-main .resources-header h1 {
  font-size: clamp(2.25rem, 3vw, 3.25rem);
}


.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
}

.account-form {
  display: grid;
  gap: 18px;
}

.account-panel,
.account-card {
  padding: 24px;
}

.account-panel-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.account-panel-heading h2,
.account-card h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--portal-text);
  font-size: 1.1rem;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.account-panel-heading i {
  color: var(--portal-cyan);
}

.account-panel-heading span {
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.account-field-grid label {
  display: grid;
  gap: 8px;
  color: var(--portal-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.account-field-grid input {
  min-height: 48px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  color: var(--portal-text);
  background: rgba(13, 17, 20, 0.6);
  padding: 0 14px;
  font: inherit;
  text-transform: none;
}

.account-field-grid input:focus {
  outline: 0;
  border-color: rgba(117, 250, 250, 0.55);
}

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

.account-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 250, 250, 0.35);
  border-radius: 50%;
  color: var(--portal-text);
  background: rgba(33, 228, 191, 0.14);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.account-card p {
  margin: 8px 0;
  color: var(--portal-muted);
}

.account-card > span {
  color: var(--portal-cyan);
  font-weight: 900;
}

.account-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
}

.account-toggle-row span {
  color: var(--portal-muted);
}

.account-toggle-row strong {
  color: var(--portal-mint);
}

.account-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--portal-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}


.account-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--portal-muted);
  line-height: 1.5;
}

.account-note a {
  color: var(--portal-cyan);
  text-decoration: none;
}

.account-field-grid input[readonly] {
  opacity: 0.7;
  cursor: default;
}

.account-change-password {
  color: var(--portal-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.account-change-password:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .account-layout,
  .account-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .account-save-button {
    width: 100%;
    justify-content: center;
  }

  .account-panel,
  .account-card {
    padding: 18px;
  }
}

/* ── Inline password change form ─────────────────────────────────────────── */

.account-password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.account-password-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--portal-muted);
  font-weight: 500;
}

.account-password-form input {
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--portal-text);
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 160ms ease;
}

.account-password-form input:focus {
  border-color: var(--portal-cyan);
}

.account-password-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.account-password-save {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  background: var(--portal-cyan);
  color: #061012;
  font-weight: 700;
  font-size: 0.85rem;
}

.account-password-save:disabled {
  opacity: 0.55;
}

.account-password-cancel {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  color: var(--portal-muted);
  font-size: 0.85rem;
}

.account-password-cancel:hover {
  color: var(--portal-text);
  border-color: var(--portal-line-strong);
}

.account-password-error {
  color: #f87171;
  font-size: 0.82rem;
  margin: 0;
}

.account-password-success {
  color: var(--portal-mint);
  font-size: 0.82rem;
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-status-active {
  color: var(--portal-mint) !important;
}

/* ── Website field with external link ─────────────────────────────────────── */

.account-website-field {
  position: relative;
  display: flex;
  align-items: center;
}

.account-website-field input {
  flex: 1;
  padding-right: 44px;
}

.account-website-link {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  color: var(--portal-cyan);
  font-size: 0.85rem;
  opacity: 0.75;
  transition: opacity 120ms ease;
}

.account-website-link:hover {
  opacity: 1;
}

/* ── Edit mode ─────────────────────────────────────────────────────────────── */

.account-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 120ms ease, border-color 120ms ease;
}

.account-edit-btn:hover {
  color: var(--portal-text);
  border-color: var(--portal-cyan);
}

.account-panel--editing {
  border-color: rgba(117, 250, 250, 0.3);
}

.account-field-grid input:not([readonly]),
.account-field-grid select {
  opacity: 1;
  cursor: text;
  border-color: var(--portal-line);
  background: rgba(255, 255, 255, 0.06);
}

.account-field-grid input:not([readonly]):focus,
.account-field-grid select:focus {
  outline: 0;
  border-color: rgba(117, 250, 250, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.account-field--readonly {
  opacity: 0.45 !important;
  cursor: default !important;
}

.account-select {
  min-height: 48px;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  color: var(--portal-text);
  background: rgba(13, 17, 20, 0.6);
  padding: 0 14px;
  font: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2375FAFA' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.account-select option {
  background: #0d1114;
  color: var(--portal-text);
}

.account-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.account-save-btn {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--portal-cyan);
  color: #061012;
  font-weight: 700;
  font-size: 0.875rem;
  transition: opacity 120ms ease;
}

.account-save-btn:disabled {
  opacity: 0.55;
}

.account-cancel-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  font-size: 0.875rem;
  transition: color 120ms ease, border-color 120ms ease;
}

.account-cancel-btn:hover:not(:disabled) {
  color: var(--portal-text);
  border-color: rgba(255, 255, 255, 0.25);
}

.account-form-error {
  color: #f87171;
  font-size: 0.82rem;
  margin: 12px 0 0;
}

/* ── MFA enrollment (Account page) ────────────────────────────────────────── */

.account-security-section {
  border-top: 1px solid var(--portal-line);
  padding-top: 1.25rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-security-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-security-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.account-security-header strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--portal-text);
}

.account-security-header span {
  font-size: 0.8rem;
  color: var(--portal-muted);
}

.mfa-status-text {
  font-size: 0.82rem;
  color: var(--portal-muted);
  margin: 0;
}

.mfa-factor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(72,187,120,0.08);
  border: 1px solid rgba(72,187,120,0.2);
}

.mfa-factor-active {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #68d391;
}

.mfa-remove-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--portal-muted);
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
  font-family: inherit;
  flex-shrink: 0;
}

.mfa-remove-btn:hover:not(:disabled) {
  color: #f87171;
  border-color: rgba(248,113,113,0.4);
}

.mfa-enroll-flow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--portal-line);
}

.mfa-enroll-step {
  font-size: 0.82rem;
  color: var(--portal-muted);
  margin: 0;
  line-height: 1.5;
}

.mfa-enroll-step strong {
  color: var(--portal-text);
}

.mfa-qr-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0;
}

.mfa-qr-code {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  border: 4px solid #fff;
}

.mfa-manual-entry {
  font-size: 0.78rem;
  color: var(--portal-muted);
  cursor: pointer;
}

.mfa-manual-entry summary {
  list-style: none;
  color: var(--theme);
  font-size: 0.78rem;
  cursor: pointer;
}

.mfa-secret {
  display: block;
  margin-top: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--portal-text);
  word-break: break-all;
  user-select: all;
}

.mfa-confirm-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.support-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: auto;
}

.support-main .portal-panel {
  height: auto;
}

.support-main .resources-header h1,
.support-detail-title-row h1 {
  font-size: clamp(2.25rem, 3vw, 3.25rem);
}

.support-request-button,
.support-reply-panel button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--portal-mint);
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 18px;
  font-weight: 900;
}

.support-request-button {
  text-decoration: none;
}

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

.support-summary-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px 10px;
  padding: 24px;
}

.support-summary-card i {
  color: var(--portal-cyan);
}

.support-summary-card span {
  color: var(--portal-muted);
  font-weight: 800;
}

.support-summary-card strong {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  color: var(--portal-text);
  font-size: clamp(3rem, 4.6vw, 4.25rem);
  line-height: 1;
}

.support-summary-card.warning i,
.support-summary-card.warning strong {
  color: var(--portal-yellow);
}

.support-landing-panel,
.support-case-panel,
.support-reply-panel {
  padding: 24px;
}

.support-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.support-filter-row button {
  min-height: 40px;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: rgba(29, 29, 33, 0.72);
  padding: 0 15px;
  font-weight: 800;
}

.support-filter-row button.selected {
  color: #061012;
  border-color: var(--portal-mint);
  background: var(--portal-mint);
}

.support-case-list {
  display: grid;
}

.support-case-row {
  min-height: 88px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 190px 150px 100px;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--portal-text);
  text-decoration: none;
  padding: 14px 0;
}

.support-case-row > i {
  color: var(--portal-cyan);
}

.support-case-row h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.support-case-row p,
.support-case-row > span,
.support-case-row time {
  margin: 0;
  color: var(--portal-muted);
}

.case-status {
  width: fit-content;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-status.waiting-on-client {
  background: var(--portal-yellow);
}

.case-status.resolved {
  color: var(--portal-soft);
  background: rgba(255, 255, 255, 0.08);
}

.support-detail-header {
  display: grid;
  gap: 18px;
}

.support-detail-header > a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

.support-detail-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.support-detail-title-row span {
  color: var(--portal-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
}

.support-detail-title-row h1 {
  margin: 8px 0 10px;
  color: var(--portal-text);
}

.support-detail-title-row p {
  max-width: 760px;
  margin: 0;
  color: var(--portal-muted);
}

.support-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.support-case-panel h2,
.support-reply-panel h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--portal-text);
  font-size: 1.1rem;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.support-case-panel i {
  color: var(--portal-cyan);
}

.support-activity-list {
  display: grid;
}

.support-activity-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0;
}

.support-activity-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.support-activity-item div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.support-activity-item strong {
  color: var(--portal-text);
}

.support-activity-item time,
.support-activity-item p {
  color: var(--portal-muted);
}

.support-activity-item p {
  margin: 0;
  line-height: 1.55;
}

.support-case-fields {
  display: grid;
  gap: 10px;
  margin: 0;
}

.support-case-fields div {
  border: 1px solid rgba(207, 208, 212, 0.12);
  border-radius: 14px;
  background: rgba(13, 17, 20, 0.38);
  padding: 14px;
}

.support-case-fields dt {
  color: var(--portal-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
}

.support-case-fields dd {
  margin: 6px 0 0;
  color: var(--portal-text);
  font-weight: 800;
}

.support-reply-panel {
  display: grid;
  gap: 14px;
}

.support-reply-panel textarea {
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  color: var(--portal-text);
  background: rgba(13, 17, 20, 0.6);
  padding: 14px;
  font: inherit;
}

.support-reply-panel button {
  width: fit-content;
}

.support-reply-panel form {
  display: grid;
  gap: 12px;
}

.support-reply-error {
  margin: 0;
  color: var(--portal-yellow);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-reply-sent {
  margin: 0;
  color: var(--portal-mint);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-reply-panel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.support-activity-empty {
  margin: 0;
  padding: 16px 0;
  color: var(--portal-muted);
  font-size: 0.88rem;
  font-style: italic;
}

.support-activity-system strong {
  color: var(--portal-soft) !important;
  font-size: 0.82rem;
}

.support-case-closed-note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--portal-muted);
  font-size: 0.88rem;
}

.support-case-closed-note i {
  color: var(--portal-soft);
}

.support-case-closed-note a {
  color: var(--portal-cyan);
  text-decoration: none;
}

.new-case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.new-case-form,
.new-case-side .portal-panel {
  height: auto;
}

.new-case-form {
  gap: 24px;
  padding: 24px;
}

.new-case-section {
  display: grid;
  gap: 16px;
}

.new-case-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.new-case-section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.new-case-section-heading i {
  color: var(--portal-cyan);
}

.new-case-section-heading span {
  border-radius: 999px;
  color: #061012;
  background: var(--portal-mint);
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.case-context-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(117, 250, 250, 0.18);
  border-radius: 18px;
  background: rgba(13, 17, 20, 0.54);
  padding: 18px;
  margin-bottom: 14px;
}

.case-context-summary > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--portal-cyan);
  background: rgba(117, 250, 250, 0.1);
}

.case-context-summary strong,
.case-context-summary span {
  display: block;
}

.case-context-summary strong {
  color: var(--portal-text);
  font-size: 1.08rem;
}

.case-context-summary span,
.case-context-summary p {
  color: var(--portal-muted);
}

.case-context-summary p {
  margin: 6px 0 0;
}

.new-case-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.new-case-field {
  display: grid;
  gap: 8px;
  color: var(--portal-text);
  font-weight: 800;
}

.new-case-field.full {
  grid-column: 1 / -1;
}

.new-case-field input,
.new-case-field select,
.new-case-field textarea {
  width: 100%;
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  color: var(--portal-text);
  background: rgba(13, 17, 20, 0.68);
  padding: 13px 14px;
  font: inherit;
}

.new-case-field select {
  color-scheme: dark;
}

.new-case-field textarea {
  min-height: 160px;
  resize: vertical;
}

.new-case-success {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(33, 228, 191, 0.28);
  border-radius: 16px;
  background: rgba(33, 228, 191, 0.08);
  padding: 14px;
}

.new-case-success i {
  color: var(--portal-mint);
  font-size: 1.3rem;
}

.new-case-success strong {
  color: var(--portal-text);
}

.new-case-success p {
  margin: 4px 0 0;
  color: var(--portal-muted);
}

.new-case-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.new-case-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  color: #061012;
  background: var(--portal-yellow);
  padding: 0 18px;
  font-weight: 900;
}

.new-case-actions a {
  color: var(--portal-cyan);
  font-weight: 800;
  text-decoration: none;
}

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

@media (max-width: 1180px) {
  .support-detail-grid,
  .new-case-layout,
  .support-summary-grid {
    grid-template-columns: 1fr;
  }

  .support-case-row {
    grid-template-columns: 34px minmax(0, 1fr) 140px;
  }

  .support-case-row > span,
  .support-case-row time {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .support-request-button,
  .support-reply-panel button {
    width: 100%;
    justify-content: center;
  }

  .support-summary-card,
  .support-landing-panel,
  .support-case-panel,
  .support-reply-panel,
  .new-case-form {
    padding: 18px;
  }

  .support-case-row,
  .case-context-summary,
  .new-case-field-grid,
  .new-case-success,
  .support-detail-title-row,
  .support-activity-item div {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }

  .support-case-row {
    border: 1px solid rgba(207, 208, 212, 0.14);
    border-radius: 18px;
    margin-bottom: 12px;
    padding: 16px;
  }
}
/* ─── Admin portal styles ─────────────────────────────────────────────────── */

/* Sidebar section labels */
.admin-nav-section-label {
  padding: 1.5rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #555);
}

/* Admin nav link in client portal sidebar */
.admin-nav-link {
  /* inherits portal-nav styles */
  border-top: 1px solid rgba(255 255 255 / 0.06);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* Main content — override dashboard-main grid so settings panels expand freely */
.admin-dashboard .admin-main {
  display: block;
  height: 100%;
  padding: 2rem;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Two-column layout for companies + users */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

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

/* Panel header row */
.admin-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-panel-header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #e8e8e8);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  background: rgba(255 255 255 / 0.08);
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
}

.admin-clear-filter {
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255 255 255 / 0.12);
  border-radius: 6px;
  color: var(--text-secondary, #aaa);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.admin-clear-filter:hover {
  border-color: rgba(255 255 255 / 0.25);
  color: var(--text-primary, #e8e8e8);
}

/* Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #555);
  border-bottom: 1px solid rgba(255 255 255 / 0.06);
}

.admin-table td {
  padding: 0.6rem 0.6rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255 255 255 / 0.04);
  color: var(--text-secondary, #ccc);
}

.admin-table td strong {
  display: block;
  color: var(--text-primary, #e8e8e8);
  font-weight: 500;
}

.admin-table td small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted, #666);
  margin-top: 0.1rem;
}

.admin-table-row {
  cursor: pointer;
  transition: background 0.15s;
}

.admin-table-row:hover {
  background: rgba(255 255 255 / 0.03);
}

.admin-table-row.selected {
  background: rgba(0 229 204 / 0.06);
}

.admin-empty {
  text-align: center;
  color: var(--text-muted, #555);
  padding: 1.5rem !important;
}

/* Role badges */
.admin-role-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255 255 255 / 0.06);
  color: var(--text-secondary, #aaa);
}

.admin-role-badge.simpsec_admin {
  background: rgba(0 229 204 / 0.15);
  color: #00e5cc;
}

.admin-role-badge.admin {
  background: rgba(120 80 255 / 0.15);
  color: #9b7eff;
}

/* Status badges */
.admin-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 500;
}

.admin-status.linked {
  background: rgba(0 229 204 / 0.12);
  color: #00e5cc;
}

.admin-status.pending {
  background: rgba(255 179 0 / 0.12);
  color: #ffb300;
}

.admin-status.none {
  background: rgba(255 255 255 / 0.05);
  color: var(--text-muted, #666);
}

/* Loading / error states */
.admin-loading,
.admin-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary, #aaa);
}

.admin-error {
  color: #ff6b6b;
}

/* Invite page */
.admin-invite-panel {
  max-width: 800px;
  margin-top: 1.5rem;
}

.admin-search-form {
  margin-bottom: 1.25rem;
}

.admin-search-row {
  display: flex;
  gap: 0.75rem;
}

.admin-search-input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: rgba(255 255 255 / 0.05);
  border: 1px solid rgba(255 255 255 / 0.1);
  border-radius: 8px;
  color: var(--text-primary, #e8e8e8);
  font-size: 0.9rem;
}

.admin-search-input:focus {
  outline: none;
  border-color: rgba(0 229 204 / 0.4);
}

.admin-search-input::placeholder {
  color: var(--text-muted, #555);
}

.admin-contacts-table {
  margin-top: 0.5rem;
}

.admin-invite-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(0 229 204 / 0.1);
  border: 1px solid rgba(0 229 204 / 0.25);
  border-radius: 6px;
  color: #00e5cc;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.admin-invite-button:hover:not(:disabled) {
  background: rgba(0 229 204 / 0.18);
  border-color: rgba(0 229 204 / 0.45);
}

.admin-invite-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-invite-result {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.admin-invite-result.ok {
  color: #00e5cc;
}

.admin-invite-result.err {
  color: #ff6b6b;
}

.admin-empty-search {
  color: var(--text-muted, #666);
  font-size: 0.85rem;
  padding: 1rem 0;
}

/* Create-contact fallback in invite panel */
.admin-create-contact-section {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255 255 255 / 0.06);
}

.admin-create-hint {
  color: var(--portal-muted, #aaa);
}

.admin-create-contact-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 640px;
}

.admin-create-contact-row {
  display: flex;
  gap: 0.75rem;
}

.admin-create-contact-row .admin-search-input {
  flex: 1;
}

.admin-company-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.admin-create-contact-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-invite-toggle-active {
  opacity: 0.75;
}

.admin-deactivate-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255 80 80 / 0.08);
  border: 1px solid rgba(255 80 80 / 0.22);
  border-radius: 6px;
  color: #ff6b6b;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.admin-deactivate-button:hover:not(:disabled) {
  background: rgba(255 80 80 / 0.16);
  border-color: rgba(255 80 80 / 0.4);
}

.admin-deactivate-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Admin Settings ────────────────────────────────────────────────────────── */

.admin-settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
}

.admin-settings-panel {
  padding: 28px;
  height: auto !important;  /* override portal-panel height: 100% */
}

.admin-settings-panel h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--portal-text);
}

.admin-settings-panel h2 i {
  color: var(--portal-cyan);
}

.admin-settings-description {
  margin: 0 0 24px;
  color: var(--portal-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.admin-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 18px 0;
}

.admin-settings-row-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-settings-row-label strong {
  color: var(--portal-text);
  font-size: 0.9rem;
}

.admin-settings-row-label span {
  color: var(--portal-muted);
  font-size: 0.8rem;
}

/* Toggle switch */
.admin-toggle {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 180ms ease, border-color 180ms ease;
  position: relative;
}

.admin-toggle input:checked + .admin-toggle-track {
  background: rgba(117, 250, 250, 0.25);
  border-color: var(--portal-cyan);
}

.admin-toggle input:disabled + .admin-toggle-track {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--portal-muted);
  transition: transform 180ms ease, background 180ms ease;
}

.admin-toggle input:checked + .admin-toggle-track .admin-toggle-thumb {
  transform: translateX(20px);
  background: var(--portal-cyan);
}

/* Duration input */
.admin-duration-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-duration-input {
  width: 70px;
  min-height: 40px;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--portal-text);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: 0 10px;
  transition: border-color 140ms ease;
}

.admin-duration-input:focus {
  outline: 0;
  border-color: var(--portal-cyan);
}

.admin-duration-unit {
  color: var(--portal-muted);
  font-size: 0.85rem;
}

/* Actions */
.admin-settings-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-settings-save {
  min-height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--portal-cyan);
  color: #061012;
  font-weight: 700;
  font-size: 0.875rem;
  transition: opacity 120ms ease;
}

.admin-settings-save:disabled {
  opacity: 0.55;
}

.admin-settings-saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-mint);
  font-size: 0.85rem;
}

.admin-settings-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f87171;
  font-size: 0.85rem;
  margin: 0;
}

/* ── Admin settings additions ─────────────────────────────────────────────── */

.admin-settings-row--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.admin-settings-textarea {
  width: 100%;
  background: var(--portal-input-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  color: var(--portal-text);
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 64px;
  transition: border-color 150ms;
}

.admin-settings-textarea:focus {
  outline: none;
  border-color: var(--portal-mint, #4fd1c5);
}

.admin-settings-input {
  background: var(--portal-input-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  color: var(--portal-text);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  width: 260px;
  transition: border-color 150ms;
}

.admin-settings-input:focus {
  outline: none;
  border-color: var(--portal-mint, #4fd1c5);
}

.admin-settings-input--wide {
  width: 100%;
}

.admin-range-control {
  display: grid;
  grid-template-columns: minmax(180px, 320px) 52px;
  align-items: center;
  gap: 14px;
  flex: 0 1 390px;
}

.admin-range-control input[type="range"] {
  width: 100%;
  accent-color: var(--portal-accent-solid, #21e4bf);
  cursor: pointer;
}

.admin-range-control output {
  min-width: 52px;
  padding: 7px 8px;
  border-radius: 999px;
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 680px) {
  .admin-settings-row--slider {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .admin-range-control {
    flex-basis: auto;
    grid-template-columns: minmax(0, 1fr) 52px;
  }
}

.admin-segment-control {
  display: flex;
  gap: 4px;
}

.admin-segment-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--portal-line);
  background: rgba(255,255,255,0.04);
  color: var(--portal-muted);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 150ms;
}

.admin-segment-btn:hover {
  color: var(--portal-text);
  border-color: rgba(255,255,255,0.2);
}

.admin-segment-btn.active {
  background: rgba(79, 209, 197, 0.12);
  border-color: var(--portal-mint, #4fd1c5);
  color: var(--portal-mint, #4fd1c5);
}

/* ── Admin Users page ─────────────────────────────────────────────────────── */

.admin-users-panel {
  height: auto !important;
  padding: 28px;
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-users-tabs {
  display: flex;
  gap: 4px;
}

.admin-users-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--portal-line);
  background: rgba(255,255,255,0.04);
  color: var(--portal-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 150ms;
}

.admin-users-tab:hover {
  color: var(--portal-text);
  border-color: rgba(255,255,255,0.2);
}

.admin-users-tab.active {
  background: rgba(79, 209, 197, 0.1);
  border-color: var(--portal-mint, #4fd1c5);
  color: var(--portal-mint, #4fd1c5);
}

.admin-users-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--portal-muted);
}

.admin-users-tab.active .admin-users-tab-count {
  background: rgba(79, 209, 197, 0.15);
  color: var(--portal-mint, #4fd1c5);
}

.admin-users-search {
  margin-left: auto;
  width: 260px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  color: var(--portal-text);
  font-size: 0.875rem;
  transition: border-color 150ms;
}

.admin-users-search:focus {
  outline: none;
  border-color: var(--portal-mint, #4fd1c5);
}

.admin-users-search::placeholder {
  color: var(--portal-muted);
}

.admin-users-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-users-table {
  table-layout: fixed;
  width: 100%;
  min-width: 820px;
}

.admin-users-table th:nth-child(1) { width: 22%; }  /* User */
.admin-users-table th:nth-child(2) { width: 18%; }  /* Company */
.admin-users-table th:nth-child(3) { width: 14%; }  /* Role */
.admin-users-table th:nth-child(4) { width: 11%; }  /* Last active */
.admin-users-table th:nth-child(5) { width: 9%;  }  /* Status */
.admin-users-table th:nth-child(6) { width: 9%;  }  /* MFA */
.admin-users-table th:nth-child(7) { width: 17%; }  /* Actions */

.admin-users-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-users-table td:last-child {
  overflow: visible;
  white-space: normal;
}

/* ─── Guide Editor ─────────────────────────────────────────────────────────── */

.admin-guide-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  min-height: 0;
}

/* Far left panel — guides list */
.admin-guide-list {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

/* Middle panel — section list */
.admin-guide-sections {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* Right panel — content area */
.admin-guide-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Panel header row */
.guide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--portal-line);
}

.guide-panel-header h2,
.guide-panel-header h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--portal-muted);
}

/* Section rows */
.guide-section-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--portal-line);
  transition: background 120ms;
}

.guide-section-row.selected {
  background: color-mix(in srgb, var(--color-cyan, #4fd1c5) 10%, transparent);
}

.guide-section-row:last-child {
  border-bottom: none;
}

.guide-section-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--portal-text);
  font-size: 0.875rem;
  text-align: left;
  min-width: 0;
}

.guide-section-name i {
  font-size: 0.8rem;
  color: var(--portal-muted);
  flex-shrink: 0;
}

.guide-section-name span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-draft-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--portal-muted);
  background: var(--portal-line);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Action icon buttons (reorder / edit / delete) */
.guide-row-actions {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  flex-shrink: 0;
}

.guide-row-actions button {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--portal-muted);
  font-size: 0.75rem;
  border-radius: 4px;
  transition: color 120ms, background 120ms;
  line-height: 1;
}

.guide-row-actions button:hover:not(:disabled) {
  color: var(--portal-text);
  background: var(--portal-line);
}

.guide-row-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Add item buttons */
.guide-add-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0.625rem 1rem;
  cursor: pointer;
  color: var(--portal-muted);
  font-size: 0.8rem;
  width: 100%;
  text-align: left;
  transition: color 120ms;
}

.guide-add-btn:hover {
  color: var(--color-cyan, #4fd1c5);
}

.guide-add-section-btn {
  border-top: 1px dashed var(--portal-line);
  margin-top: 0.25rem;
}

/* Empty state */
.guide-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 2rem;
  color: var(--portal-muted);
  font-size: 0.9rem;
}

.guide-empty-state i {
  font-size: 1.5rem;
  opacity: 0.4;
}

.guide-empty {
  padding: 2rem 1.25rem;
  color: var(--portal-muted);
  font-size: 0.875rem;
}

/* ── Inline edit forms ───────────────────────────────────────────────────── */

.guide-inline-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--portal-bg, #0f1117) 60%, transparent);
  border-radius: 6px;
  border: 1px solid var(--portal-line);
  flex: 1;
}

.guide-new-form {
  margin: 0.5rem 0.75rem;
}

.guide-section-form {
  margin: 0.5rem;
}

.guide-form-input {
  background: var(--portal-bg, #0f1117);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.825rem;
  color: var(--portal-text);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 150ms;
}

.guide-form-input:focus {
  outline: none;
  border-color: var(--color-cyan, #4fd1c5);
}

.guide-form-url {
  font-size: 0.75rem;
  color: var(--portal-muted);
}

.guide-form-short {
  width: auto;
}

.guide-form-textarea {
  background: var(--portal-bg, #0f1117);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.825rem;
  color: var(--portal-text);
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 150ms;
}

.guide-form-textarea:focus {
  outline: none;
  border-color: var(--color-cyan, #4fd1c5);
}

.guide-form-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: var(--portal-muted);
  cursor: pointer;
}

.guide-form-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.guide-form-save {
  background: var(--color-cyan, #4fd1c5);
  color: #0f1117;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 120ms;
}

.guide-form-save:disabled {
  opacity: 0.5;
  cursor: default;
}

.guide-form-cancel {
  background: none;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--portal-muted);
  cursor: pointer;
  transition: border-color 120ms, color 120ms;
}

.guide-form-cancel:hover {
  border-color: var(--portal-text);
  color: var(--portal-text);
}

.guide-form-error {
  font-size: 0.775rem;
  color: #fc8181;
}

/* ── Topics layout ──────────────────────────────────────────────────────── */

.guide-topics-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.guide-topic-panel {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.guide-topic-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--portal-line);
  transition: background 120ms;
}

.guide-topic-row.selected {
  background: color-mix(in srgb, var(--color-cyan, #4fd1c5) 8%, transparent);
}

.guide-topic-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--portal-text);
  font-size: 0.825rem;
  text-align: left;
  min-width: 0;
}

.guide-topic-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.guide-topic-name strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-topic-name small {
  font-size: 0.7rem;
  color: var(--portal-muted);
  flex-shrink: 0;
}

/* ── Subsection panel ───────────────────────────────────────────────────── */

.guide-subsection-panel {
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.guide-sub-list {
  display: flex;
  flex-direction: column;
}

.guide-sub-block {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--portal-line);
  align-items: flex-start;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
}

.guide-sub-reorder {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex-shrink: 0;
  padding-top: 2px;
}

.guide-sub-reorder button {
  background: none;
  border: none;
  padding: 0.2rem;
  cursor: pointer;
  color: var(--portal-muted);
  font-size: 0.65rem;
  border-radius: 3px;
  transition: color 120ms;
  line-height: 1;
}

.guide-sub-reorder button:hover:not(:disabled) { color: var(--portal-text); }
.guide-sub-reorder button:disabled { opacity: 0.25; cursor: default; }

.guide-sub-row {
  flex: 1;
  min-width: 0;
}

.guide-sub-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-sub-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0.25rem 0;
  cursor: pointer;
  color: var(--portal-text);
  font-size: 0.875rem;
  text-align: left;
  min-width: 0;
}

.guide-sub-toggle i { font-size: 0.7rem; color: var(--portal-muted); flex-shrink: 0; }
.guide-sub-toggle strong { flex-shrink: 0; }
.guide-sub-toggle small { font-size: 0.75rem; color: var(--portal-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-sub-count { font-size: 0.7rem; color: var(--portal-muted); margin-left: auto; flex-shrink: 0; }

/* ── Step editor ────────────────────────────────────────────────────────── */

.guide-step-editor {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--portal-line);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.guide-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--portal-line) 50%, transparent);
}

.guide-step-row:last-child { border-bottom: none; }

.guide-step-content {
  flex: 1;
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  min-width: 0;
}

.guide-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--portal-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--portal-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-step-content div { min-width: 0; }

.guide-step-content strong {
  display: block;
  font-size: 0.8rem;
  color: var(--portal-text);
  line-height: 1.4;
}

.guide-step-content p {
  font-size: 0.75rem;
  color: var(--portal-muted);
  margin: 0.125rem 0 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-step-form {
  flex: 1;
}

.guide-add-step-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0.375rem 0;
  cursor: pointer;
  color: var(--portal-muted);
  font-size: 0.775rem;
  transition: color 120ms;
}

.guide-add-step-btn:hover { color: var(--color-cyan, #4fd1c5); }

/* ── Brokers layout ─────────────────────────────────────────────────────── */

.guide-brokers-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-broker-panel {
  padding: 0;
  overflow: hidden;
}

.guide-broker-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--portal-line);
}

.guide-broker-row:last-child { border-bottom: none; }

.guide-broker-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.guide-broker-info strong {
  font-size: 0.875rem;
}

.guide-broker-info span {
  font-size: 0.75rem;
  color: var(--portal-muted);
}

.guide-broker-info small {
  font-size: 0.775rem;
  color: var(--portal-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-users-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-users-status.active {
  background: rgba(79, 209, 197, 0.1);
  color: var(--portal-mint, #4fd1c5);
  border: 1px solid rgba(79, 209, 197, 0.25);
}

.admin-users-status.inactive {
  background: rgba(255,255,255,0.05);
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
}

.admin-users-row {
  cursor: pointer;
  transition: background 120ms;
}
.admin-users-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.admin-users-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--portal-line);
  background: rgba(255,255,255,0.04);
  color: var(--portal-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.admin-users-view-btn:hover {
  color: var(--portal-text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
}

/* ── MFA admin column ────────────────────────────────────────────────────────── */

.admin-mfa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.admin-mfa-badge.enrolled {
  background: rgba(72, 187, 120, 0.12);
  color: #68d391;
  border: 1px solid rgba(72, 187, 120, 0.25);
}

.admin-mfa-badge.none {
  color: var(--portal-muted);
}

.admin-users-actions-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.admin-mfa-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: #f87171;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms, border-color 120ms;
  white-space: nowrap;
}

.admin-mfa-remove-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.5);
}

.admin-mfa-remove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── User Detail Page (AdminUserDetail) ────────────────────────────────────── */

.admin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--portal-muted, #888);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 120ms;
}
.admin-back-btn:hover { color: var(--portal-text, #fff); }

/* Two-column detail layout */
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .admin-detail-grid { grid-template-columns: 1fr; }
}

.admin-detail-main,
.admin-detail-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Detail card */
.admin-detail-card {
  padding: 1.25rem 1.5rem;
}
.admin-detail-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--portal-muted, #888);
  margin: 0 0 1rem;
}

/* Definition list */
.admin-detail-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.85rem;
}
.admin-detail-dl dt {
  color: var(--portal-muted, #888);
  font-weight: 500;
}
.admin-detail-dl dd { margin: 0; }

.admin-detail-muted { color: var(--portal-muted, #888); font-size: 0.85rem; }
.admin-detail-code  {
  font-family: monospace;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Role toggle inline button */
.admin-detail-role-toggle {
  background: none;
  border: 1px solid var(--portal-line, rgba(255,255,255,0.1));
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--portal-muted, #888);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 120ms, color 120ms;
}
.admin-detail-role-toggle:hover {
  border-color: var(--portal-accent, #6366f1);
  color: var(--portal-text, #fff);
}

/* Activity summary strip */
.admin-activity-strip {
  display: flex;
  gap: 1.5rem;
}
.admin-activity-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.admin-activity-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--portal-text, #fff);
}
.admin-activity-label {
  font-size: 0.72rem;
  color: var(--portal-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Audit log timeline */
.admin-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 420px;
  overflow-y: auto;
}
.admin-audit-event {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.82rem;
}
.admin-audit-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.audit-event-success { background: rgba(34,197,94,0.15);  color: #4ade80; }
.audit-event-fail    { background: rgba(239,68,68,0.15);   color: #f87171; }
.audit-event-mfa     { background: rgba(99,102,241,0.15);  color: #818cf8; }
.audit-event-neutral { background: rgba(255,255,255,0.07); color: var(--portal-muted, #888); }
.admin-audit-meta {
  color: var(--portal-muted, #888);
  font-size: 0.78rem;
}

/* Actions panel */
.admin-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-detail-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--portal-line, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  color: var(--portal-text, #fff);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 120ms, border-color 120ms;
}
.admin-detail-action-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}
.admin-detail-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.admin-detail-action-btn.admin-detail-action-danger {
  color: #f87171;
  border-color: rgba(248,113,113,0.25);
}
.admin-detail-action-btn.admin-detail-action-danger:hover:not(:disabled) {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.5);
}

/* Notes textarea */
.admin-detail-notes {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--portal-line, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--portal-text, #fff);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  transition: border-color 120ms;
}
.admin-detail-notes:focus {
  outline: none;
  border-color: var(--portal-accent, #6366f1);
}
.admin-detail-notes::placeholder { color: var(--portal-muted, #888); }

/* Success feedback */
.admin-detail-success {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
  font-size: 0.85rem;
}

/* ─── Admin Guide Card Grid (AdminGuideList) ────────────────────────────────── */

.admin-guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.admin-guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 140ms, box-shadow 140ms;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
}
.admin-guide-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Top bar: status pill */
.admin-guide-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-guide-status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.admin-guide-status-pill.published {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.admin-guide-status-pill.draft {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

/* Center: icon + title + description */
.admin-guide-card-center {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.admin-guide-card-icon {
  font-size: 1.4rem;
  color: var(--portal-accent, #6366f1);
  margin-bottom: 0.1rem;
}
.admin-guide-card-center h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--portal-text, #fff);
  line-height: 1.3;
}
.admin-guide-card-center p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--portal-muted, #888);
  line-height: 1.4;
}

/* Bottom bar: meta + chevron */
.admin-guide-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.admin-guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.75rem;
  color: var(--portal-muted, #888);
}
.admin-guide-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.admin-guide-card-arrow {
  color: var(--portal-muted, #888);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: color 120ms, transform 120ms;
}
.admin-guide-card:hover .admin-guide-card-arrow {
  color: var(--portal-text, #fff);
  transform: translateX(2px);
}

/* Guide settings fields in create form */
.guide-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
}
.guide-settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.guide-settings-field--full {
  grid-column: 1 / -1;
}
.guide-settings-hint {
  font-size: 0.72rem;
  color: var(--portal-muted, #888);
  margin: 0;
}

/* New guide creation panel */
.admin-guide-new-panel {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

/* ─── Admin Dashboard (Phase 4D) ────────────────────────────────────────────── */

/* Stats strip */
.admin-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 700px) {
  .admin-dash-stats { grid-template-columns: repeat(2, 1fr); }
}

.admin-dash-stat {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.admin-dash-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--portal-text, #fff);
  line-height: 1;
}
.admin-dash-stat-pct {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--portal-muted, #888);
}
.admin-dash-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--portal-muted, #888);
  font-weight: 600;
}

/* Two-column row */
.admin-dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 800px) {
  .admin-dash-row { grid-template-columns: 1fr; }
}

.admin-dash-panel {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-dash-panel--full {
  margin-bottom: 1.25rem;
}

.admin-dash-panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--portal-muted, #888);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Security signal groups */
.admin-dash-signal-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-dash-signal-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--portal-muted, #888);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.1rem;
}
.admin-dash-signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: background 120ms;
  font-size: 0.82rem;
}
.admin-dash-signal-row:hover { background: rgba(255,255,255,0.07); }
.admin-dash-signal-row strong { display: block; }
.admin-dash-signal-row small  { color: var(--portal-muted, #888); font-size: 0.75rem; }
.admin-dash-signal-danger { border-left: 2px solid rgba(248,113,113,0.5); }
.admin-dash-signal-meta {
  font-size: 0.75rem;
  color: var(--portal-muted, #888);
  white-space: nowrap;
}

/* All-clear state */
.admin-dash-all-clear {
  font-size: 0.82rem;
  color: var(--portal-muted, #888);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
}

/* MFA event feed */
.admin-dash-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-dash-event {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.admin-dash-event-who {
  flex: 1;
  color: var(--portal-text, #fff);
}
.admin-dash-event-actor {
  color: var(--portal-muted, #888);
}

/* Guide adoption */
.admin-dash-adoption-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-dash-adoption-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}
@media (max-width: 600px) {
  .admin-dash-adoption-row { grid-template-columns: 1fr auto; }
  .admin-dash-adoption-bar-wrap { display: none; }
}
.admin-dash-adoption-title {
  color: var(--portal-text, #fff);
  font-weight: 500;
}
.admin-dash-adoption-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}
.admin-dash-adoption-bar {
  height: 100%;
  background: var(--portal-accent, #6366f1);
  border-radius: 99px;
  transition: width 600ms ease;
  min-width: 2px;
}
.admin-dash-adoption-count {
  text-align: right;
  color: var(--portal-muted, #888);
  white-space: nowrap;
}

/* ─── Guide Detail (AdminGuideDetail) ─────────────────────────────────────── */

.admin-guide-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0 0 0.25rem;
  color: var(--portal-muted);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 120ms;
}
.admin-guide-back-btn:hover { color: var(--portal-text); }

.admin-guide-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-guide-settings-card { padding: 1.25rem 1.5rem; }

.admin-guide-settings-view {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.admin-guide-settings-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--theme);
  background: rgba(var(--theme-rgb, 59,130,246), 0.1);
  border-radius: 10px;
}

.admin-guide-settings-info { flex: 1; min-width: 0; }

.admin-guide-settings-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.admin-guide-settings-title-row h2 { margin: 0; font-size: 1rem; font-weight: 600; }

.admin-guide-settings-info p {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--portal-muted);
}

.admin-guide-settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--portal-muted);
}
.admin-guide-settings-meta span { display: flex; align-items: center; gap: 0.3rem; }

.admin-guide-settings-stats { display: flex; gap: 1.25rem; flex-shrink: 0; }

.admin-guide-stat { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.admin-guide-stat strong { font-size: 1.3rem; font-weight: 700; color: var(--portal-text); line-height: 1; }
.admin-guide-stat span { font-size: 0.7rem; color: var(--portal-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.admin-guide-settings-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.admin-guide-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.guide-settings-field { display: flex; flex-direction: column; gap: 0.3rem; }
.guide-settings-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.guide-settings-hint { font-size: 0.72rem; color: var(--portal-muted); margin: 0; }

.admin-guide-drag-handle {
  flex-shrink: 0;
  color: var(--portal-muted);
  opacity: 0.4;
  font-size: 0.8rem;
  cursor: grab;
  padding: 0 2px;
}
.admin-guide-drag-handle:hover { opacity: 0.8; }

/* ─── AdminSettings conflict label ─── */
.admin-settings-conflict {
  display: block;
  font-size: 0.72rem;
  color: var(--portal-warning, #f59e0b);
  margin-top: 0.2rem;
}
.admin-toggle input:disabled + .admin-toggle-track {
  opacity: 0.35;
  cursor: not-allowed;
}
.admin-toggle:has(input:disabled) {
  cursor: not-allowed;
}

/* ─── Auth method segmented selector ───────────────────────────────────────── */
.auth-method-selector {
  display: flex;
  align-items: center;
  background: var(--portal-surface-2, rgba(255,255,255,0.06));
  border: 1px solid var(--portal-border, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.auth-method-opt {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--portal-text-muted, rgba(255,255,255,0.45));
  cursor: pointer;
  transition: background 150ms, color 150ms;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.auth-method-opt:hover:not(.active) {
  background: rgba(255,255,255,0.07);
  color: var(--portal-text, rgba(255,255,255,0.8));
}

.auth-method-opt.active {
  background: var(--portal-accent, #0ea5e9);
  color: #fff;
}
/* ── Team page ─────────────────────────────────────────────────────────────── */

.team-panel {
  margin-bottom: 20px;
  height: auto !important;  /* override portal-panel height: 100% */
  padding: 28px;
}

.team-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.team-panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--portal-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.team-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--portal-muted);
  font-weight: 500;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */

.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

/* Column widths for members table */
.team-table th:nth-child(1) { width: 45%; }   /* Email */
.team-table th:nth-child(2) { width: 22%; }   /* Role */
.team-table th:nth-child(3) { width: 20%; }   /* Joined */
.team-table th:nth-child(4) { width: 13%; }   /* Actions */

/* Contacts table: no Joined column */
.team-contacts-table th:nth-child(1) { width: 50%; }
.team-contacts-table th:nth-child(2) { width: 20%; }
.team-contacts-table th:nth-child(3) { width: 30%; }

.team-table th {
  text-align: left;
  padding: 8px 12px 8px 0;
  color: var(--portal-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--portal-line);
}

.team-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--portal-text);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Let the last (actions) column wrap naturally */
.team-table td:last-child {
  overflow: visible;
  white-space: normal;
  text-align: right;
}

.team-table td strong {
  display: block;
  font-weight: 500;
}

.team-table td small {
  display: block;
  color: var(--portal-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.team-table tbody tr:last-child td {
  border-bottom: none;
}

.team-empty {
  color: var(--portal-muted);
  font-style: italic;
  padding: 24px 0 !important;
}

/* ── Role badges ───────────────────────────────────────────────────────────── */

.team-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.team-role-badge--simpsec_admin {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.team-role-badge--admin {
  background: rgba(79, 209, 197, 0.1);
  border-color: rgba(79, 209, 197, 0.25);
  color: var(--portal-mint, #4fd1c5);
}

.team-role-badge--member {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--portal-line);
  color: var(--portal-muted);
}

/* ── Role change buttons ───────────────────────────────────────────────────── */

.team-role-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.team-role-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.team-role-btn--promote {
  color: var(--portal-mint, #4fd1c5);
  border-color: rgba(79, 209, 197, 0.3);
}

.team-role-btn--promote:hover:not(:disabled) {
  background: rgba(79, 209, 197, 0.08);
}

.team-role-btn--demote {
  color: var(--portal-muted);
}

.team-role-btn--demote:hover:not(:disabled) {
  color: var(--portal-text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Invite section ────────────────────────────────────────────────────────── */

.team-invite-description {
  color: var(--portal-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0 0 16px;
}

.team-load-contacts-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--portal-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 150ms;
}

.team-load-contacts-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.team-load-contacts-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Status chips ──────────────────────────────────────────────────────────── */

.team-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.team-status--pending {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.team-status--none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
}

/* ── Invite button + result ────────────────────────────────────────────────── */

.team-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(79, 209, 197, 0.3);
  background: rgba(79, 209, 197, 0.08);
  color: var(--portal-mint, #4fd1c5);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.team-invite-btn:hover:not(:disabled) {
  background: rgba(79, 209, 197, 0.14);
}

.team-invite-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.team-invite-result {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.team-invite-result.ok {
  color: var(--portal-mint, #4fd1c5);
}

.team-invite-result.err {
  color: #f87171;
}

/* ── Loading / error states ────────────────────────────────────────────────── */

.team-loading {
  color: var(--portal-muted);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.team-error {
  color: #f87171;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-empty-contacts {
  color: var(--portal-muted);
  font-size: 0.875rem;
}
.portal-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

/* ── Idle timeout warning modal ──────────────────────────────────────────── */

.idle-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: idle-fade-in 200ms ease;
}

@keyframes idle-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.idle-modal {
  width: min(420px, 90vw);
  padding: 36px 32px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: var(--portal-card);
  text-align: center;
  animation: idle-slide-up 220ms ease;
}

@keyframes idle-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.idle-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(117, 250, 250, 0.1);
  border: 1px solid rgba(117, 250, 250, 0.25);
  margin: 0 auto 20px;
  font-size: 1.4rem;
  color: var(--portal-cyan);
}

.idle-modal h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--portal-text);
}

.idle-modal p {
  margin: 0 0 28px;
  color: var(--portal-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.idle-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idle-stay-btn {
  min-height: 44px;
  padding: 0 28px;
  border-radius: 999px;
  border: none;
  background: #fbbf24;
  color: #1a0f00;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.idle-stay-btn:hover {
  opacity: 0.88;
}

.idle-leave-btn {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 0.9rem;
  transition: color 120ms ease, border-color 120ms ease;
}

.idle-leave-btn:hover {
  color: var(--portal-text);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Maintenance page ──────────────────────────────────────────────────── */

.maintenance-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--portal-bg, #0a0c10);
}

.maintenance-card {
  width: min(480px, 100%);
  padding: 48px 40px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: var(--portal-surface);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.maintenance-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--portal-mint, #4fd1c5);
  margin-bottom: 8px;
}

.maintenance-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--portal-text);
  margin: 0;
}

.maintenance-card p {
  color: var(--portal-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 340px;
  margin: 0;
}

.maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Announcement banner ───────────────────────────────────────────────── */

.announcement-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.875rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.announcement-banner--info {
  background: rgba(79, 209, 197, 0.12);
  border-bottom: 1px solid rgba(79, 209, 197, 0.25);
  color: var(--portal-text);
}

.announcement-banner--info i:first-child {
  color: var(--portal-mint, #4fd1c5);
}

.announcement-banner--warning {
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--portal-text);
}

.announcement-banner--warning i:first-child {
  color: #fbbf24;
}

.announcement-text {
  flex: 1;
}

.announcement-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--portal-muted);
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 150ms;
}

.announcement-dismiss:hover {
  color: var(--portal-text);
}

/* ── Portal shell frame ──────────────────────────────────────────────────── */

.portal-shell-frame {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--portal-bg);
}

.portal-shell-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.portal-shell-frame > .announcement-banner,
.portal-shell-frame > .impersonation-banner {
  position: relative;
  z-index: 2;
}

/* Transitional dark-page diffusion. Page phases replace this layer with the
   final light glass system while the shared atmosphere remains mounted. */
.portal-shell-frame .portal-dashboard {
  background:
    linear-gradient(rgba(13, 17, 20, 0.86), rgba(13, 17, 20, 0.92)),
    transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Impersonation banner ────────────────────────────────────────────────── */

.impersonation-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-size: 0.875rem;
  width: 100%;
  flex-shrink: 0;
}

.impersonation-banner strong {
  font-weight: 600;
  color: #fde68a;
}

.impersonation-exit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
}

.impersonation-exit:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
}
/* Phases 4–5: authenticated client surfaces. Admin and auth routes are excluded. */

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) {
  --portal-text: #0d1114;
  --portal-muted: #687977;
  --portal-soft: #7e8d8b;
  --portal-card: rgba(255, 255, 255, 0.38);
  --portal-card-soft: rgba(255, 255, 255, 0.3);
  --portal-line: rgba(13, 17, 20, 0.07);
  --portal-line-strong: rgba(33, 228, 191, 0.28);
  --portal-cyan: #21e4bf;
  --portal-mint: #21e4bf;
  --portal-yellow: #effb53;
  color: var(--portal-text);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard)::before { display: none; }

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  min-height: 0;
  padding: 36px clamp(30px, 4vw, 72px) 52px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--portal-text);
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(
  .resources-header,
  .document-summary-grid,
  .document-library-panel,
  .document-detail-header,
  .document-status-banner,
  .document-detail-layout,
  .services-layout,
  .service-summary-grid,
  .service-detail-header,
  .service-detail-panel,
  .service-detail-actions,
  .support-summary-grid,
  .support-landing-panel,
  .support-detail-header,
  .support-detail-grid,
  .new-case-layout,
  .account-layout,
  .team-panel,
  .resource-detail-shell,
  .privacy-guide-app
) {
  width: min(100%, var(--portal-content-wide));
  max-width: var(--portal-content-wide);
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .portal-panel {
  position: relative;
  border: 0;
  border-radius: var(--portal-radius-region);
  color: var(--portal-text);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
  transform: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .portal-panel::before {
  content: "";
  position: absolute;
  inset: 13px auto 13px 0;
  width: 1px;
  background: linear-gradient(transparent, var(--portal-reflection), transparent);
  pointer-events: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .portal-panel:hover {
  border: 0;
  box-shadow: var(--portal-shadow-ambient);
  transform: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) h1,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) h2,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) h3,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) strong,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) dt,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) dd { color: var(--portal-text); }

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) p,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) small,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) label { color: var(--portal-muted); }

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-header {
  flex: 0 0 auto;
  align-items: flex-start;
  max-width: var(--portal-content-max);
  width: 100%;
  margin: 0 auto 2px;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-header h1,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .document-detail-header h1,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .service-detail-header h1,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .support-detail-header h1,
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resource-detail-header h1 {
  margin: 0 0 8px;
  color: var(--portal-text);
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-header p { margin: 0; font-size: 0.82rem; }

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(
  .document-request-button,
  .service-request-button,
  .support-request-button,
  .team-invite-btn,
  .resource-primary-action,
  .account-save-btn,
  .account-password-save,
  .new-case-actions button[type="submit"]
) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #0d1114;
  background: var(--portal-accent);
  box-shadow: none;
  font-weight: 750;
  text-decoration: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(input, select, textarea) {
  border: 1px solid var(--portal-control-border);
  color: var(--portal-text);
  background: var(--portal-surface-control-strong);
  box-shadow: none;
  outline: none;
}

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(input, select) { border-radius: 999px; }
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) textarea { border-radius: 16px; }
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(input, textarea)::placeholder { color: #7e8d8b; }
.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #75fafa; outline-offset: 3px; }

.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;
}

/* Documents list */

.portal-shell-frame .documents-main { max-width: none; }
.portal-shell-frame .document-summary-grid,
.portal-shell-frame .document-library-panel { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .document-summary-grid { gap: 14px; }
.portal-shell-frame .document-summary-card { min-height: 112px; padding: 20px 22px; }
.portal-shell-frame .document-summary-card i { color: var(--portal-text-success); }
.portal-shell-frame .document-summary-card strong { justify-self: start; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -0.05em; }
.portal-shell-frame .document-summary-card.action::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 4px;
  border-radius: 0 4px 0 0;
  background: var(--portal-status-attention);
}

.portal-shell-frame .document-library-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.portal-shell-frame .document-library-panel::before { display: none; }
.portal-shell-frame .document-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(150px, auto) minmax(150px, auto);
  gap: 10px;
  margin-bottom: 16px;
  border-radius: var(--portal-radius-region);
  padding: 12px;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
}
.portal-shell-frame .document-search { min-width: 0; border: 0; border-radius: 999px; background: var(--portal-surface-control); }
.portal-shell-frame .document-search input { border: 0; background: transparent; }
.portal-shell-frame .document-search > i { color: var(--portal-muted); }
.portal-shell-frame .document-type-filters { padding: 3px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.38); }
.portal-shell-frame .document-type-filters button { min-height: 42px; border: 0; color: var(--portal-muted); background: transparent; }
.portal-shell-frame .document-type-filters button.selected { color: var(--portal-text); background: var(--portal-surface-selected-strong); }
.portal-shell-frame .document-select-filter { position: relative; min-width: 0; }
.portal-shell-frame .document-select-filter select { width: 100%; min-height: 42px; appearance: none; padding: 0 34px 0 14px; font: inherit; font-size: 0.72rem; }
.portal-shell-frame .document-select-filter > i { position: absolute; top: 50%; right: 14px; color: var(--portal-muted); font-size: 0.62rem; transform: translateY(-50%); pointer-events: none; }
.portal-shell-frame .document-table { display: grid; gap: 9px; }
.portal-shell-frame .document-table-head {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(100px, 0.65fr) minmax(150px, 0.85fr) minmax(130px, 0.75fr) 42px;
  gap: 18px;
  padding: 0 22px 4px;
  border: 0;
  color: var(--portal-muted);
  font-size: 0.6875rem;
}
.portal-shell-frame .document-row {
  position: relative;
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(100px, 0.65fr) minmax(150px, 0.85fr) minmax(130px, 0.75fr) 42px;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 0;
  border-radius: var(--portal-radius-row);
  padding: 18px 22px 38px;
  color: var(--portal-text);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
}
.portal-shell-frame .document-row::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #75fafa, #21e4bf);
}
.portal-shell-frame .document-row--action::before { background: linear-gradient(180deg, #effb53, #fb923c); }
.portal-shell-frame .document-row:hover { border: 0; background: rgba(255, 255, 255, 0.48); transform: none; }
.portal-shell-frame .document-title-cell { min-width: 0; }
.portal-shell-frame .document-title-cell > i { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.1); }
.portal-shell-frame .document-title-cell h2 { color: var(--portal-text); overflow-wrap: anywhere; }
.portal-shell-frame .document-title-cell p,
.portal-shell-frame .document-service-cell small,
.portal-shell-frame .document-date-cell small { color: var(--portal-muted); }
.portal-shell-frame .document-service-cell > span { color: var(--portal-text); }
.portal-shell-frame .document-status {
  position: absolute;
  bottom: 0;
  left: 0;
  min-width: 150px;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0 8px 0 0;
  padding: 0 15px;
  color: #0d1114;
  background: var(--portal-status-neutral);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.portal-shell-frame .document-status:is(.signed, .active) { background: var(--portal-status-complete); }
.portal-shell-frame .document-status:is(.sent, .awaiting-client-signature) { background: var(--portal-status-attention); }
.portal-shell-frame .document-status:is(.voided, .expired) { color: #fff; background: var(--portal-status-negative); }
.portal-shell-frame .document-action-badge { border: 0; color: var(--portal-text-attention); background: rgba(239, 251, 83, 0.2); }
.portal-shell-frame .document-actions :is(a, button) { border: 0; color: var(--portal-text-neutral); background: var(--portal-surface-control); }
.portal-shell-frame .document-empty-state { border: 0; border-radius: var(--portal-radius-region); color: var(--portal-muted); background: rgba(255, 255, 255, 0.3); }

/* Document detail */

.portal-shell-frame .document-detail-main { gap: 18px; }
.portal-shell-frame .document-detail-header,
.portal-shell-frame .document-status-banner,
.portal-shell-frame .document-detail-layout { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .document-detail-header > a,
.portal-shell-frame .service-detail-header > a,
.portal-shell-frame .support-detail-header > a { color: #3f5451; }
.portal-shell-frame .document-detail-title-row > div > span { color: var(--portal-muted); }
.portal-shell-frame .document-detail-title-row > .document-status { position: static; min-width: 0; border-radius: 8px; }
.portal-shell-frame .document-status-banner {
  border: 0;
  border-radius: var(--portal-radius-row);
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: var(--portal-shadow-ambient);
}
.portal-shell-frame .document-status-banner--action { background: linear-gradient(105deg, rgba(239, 251, 83, 0.2), rgba(255, 255, 255, 0.4)); }
.portal-shell-frame .document-status-banner--signed { background: linear-gradient(105deg, rgba(33, 228, 191, 0.16), rgba(255, 255, 255, 0.4)); }
.portal-shell-frame .document-status-banner--voided { background: linear-gradient(105deg, rgba(225, 29, 72, 0.12), rgba(255, 255, 255, 0.38)); }
.portal-shell-frame .document-detail-layout { grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.72fr); gap: 14px; }
.portal-shell-frame .document-preview-panel { min-height: 610px; padding: 0; }
.portal-shell-frame .document-preview-toolbar { border: 0; padding: 16px 18px; background: rgba(255, 255, 255, 0.2); }
.portal-shell-frame .document-preview-toolbar > span { color: var(--portal-text); }
.portal-shell-frame .document-preview-actions { align-items: center; }
.portal-shell-frame .document-preview-btn {
  min-height: 42px;
  border: 1px solid var(--portal-control-border);
  border-radius: 999px;
  color: var(--portal-text);
  background: var(--portal-surface-control-strong);
}
.portal-shell-frame .document-preview-btn:hover { border-color: transparent; color: var(--portal-text); background: rgba(255, 255, 255, 0.68); }
.portal-shell-frame .document-preview-btn--sign { border: 0; color: #0d1114; background: var(--portal-accent); }
.portal-shell-frame .document-preview-frame { margin: 18px; border: 0; border-radius: 12px; color: var(--portal-muted); background: rgba(255, 255, 255, 0.58); box-shadow: inset 1px 0 rgba(255, 255, 255, 0.8); }
.portal-shell-frame .document-preview-frame > i { color: var(--portal-text-success); }
.portal-shell-frame .document-action-menu { position: relative; }
.portal-shell-frame .document-action-menu > summary { list-style: none; cursor: pointer; }
.portal-shell-frame .document-action-menu > summary::-webkit-details-marker { display: none; }
.portal-shell-frame .document-action-menu[open] > summary { background: var(--portal-surface-selected-strong); }
.portal-shell-frame .document-action-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 224px;
  max-width: calc(100vw - 32px);
  display: grid;
  gap: 5px;
  border-radius: 14px;
  padding: 8px;
  background: rgba(244, 247, 246, 0.92);
  box-shadow: var(--portal-shadow-float);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
}
.portal-shell-frame .document-action-menu__panel .document-preview-btn { width: 100%; justify-content: flex-start; border: 0; border-radius: 9px; }
.portal-shell-frame .document-action-menu__panel .document-preview-btn--void { color: var(--portal-text-negative); background: rgba(225, 29, 72, 0.07); }
.portal-shell-frame .document-detail-side { min-width: 0; gap: 14px; }
.portal-shell-frame .document-detail-card { padding: 21px 23px; }
.portal-shell-frame .document-detail-fields { gap: 0; }
.portal-shell-frame .document-detail-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--portal-divider);
  border-radius: 0;
  padding: 14px 0;
  background: transparent;
}
.portal-shell-frame .document-detail-fields > div:first-child { padding-top: 0; }
.portal-shell-frame .document-detail-fields > div:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-shell-frame .document-sig-event { border-color: var(--portal-divider); }
.portal-shell-frame .document-detail-fields dt { color: var(--portal-muted); }
.portal-shell-frame .document-detail-fields dd {
  margin: 0;
  color: var(--portal-text);
  line-height: 1.45;
  text-align: right;
}
.portal-shell-frame .document-detail-fields dd + dd { grid-column: 2; margin-top: -8px; }
.portal-shell-frame .document-hash-value { color: var(--portal-text-neutral); background: var(--portal-surface-control); overflow-wrap: anywhere; }
.portal-shell-frame .document-sig-event-icon { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame .document-pdf-toast { border: 0; }

/* Signature and void workflows */

.portal-shell-frame :is(.sigmodal-overlay, .voidmodal-overlay) {
  background: rgba(45, 58, 56, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.portal-shell-frame :is(.sigmodal, .voidmodal) {
  border: 0;
  color: var(--portal-text);
  background: rgba(244, 247, 246, 0.84);
  box-shadow: var(--portal-shadow-float);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
}
.portal-shell-frame :is(.sigmodal-header, .voidmodal-header, .sigmodal-footer, .voidmodal-footer) { border-color: var(--portal-divider); }
.portal-shell-frame :is(.sigmodal-header h2, .voidmodal-header h2) { color: var(--portal-text); }
.portal-shell-frame :is(.sigmodal-header p, .voidmodal-header p, .sigmodal-consent span, .voidmodal-reason label) { color: var(--portal-muted); }
.portal-shell-frame :is(.sigmodal-close, .voidmodal-close) { border: 0; color: var(--portal-text); background: rgba(255, 255, 255, 0.42); }
.portal-shell-frame .sigmodal-party { border: 0; color: var(--portal-text); background: rgba(33, 228, 191, 0.11); }
.portal-shell-frame .sigmodal-party i { color: var(--portal-text-success); }
.portal-shell-frame .sigmodal-tabs { border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.36); }
.portal-shell-frame .sigmodal-tabs button { border: 0; border-radius: 999px; color: var(--portal-muted); background: transparent; }
.portal-shell-frame .sigmodal-tabs button.active { color: var(--portal-text); background: rgba(255, 255, 255, 0.78); }
.portal-shell-frame .sigmodal-canvas-wrap,
.portal-shell-frame .sigmodal-type-preview { border: 1px solid var(--portal-control-border); color: var(--portal-text); background: rgba(255, 255, 255, 0.58); }
.portal-shell-frame .sigmodal-type-input,
.portal-shell-frame .voidmodal-textarea { border: 1px solid var(--portal-control-border); color: var(--portal-text); background: rgba(255, 255, 255, 0.52); }
.portal-shell-frame .sigmodal-clear,
.portal-shell-frame :is(.sigmodal-btn--cancel, .voidmodal-btn--cancel) { border: 1px solid var(--portal-control-border); color: var(--portal-text); background: rgba(255, 255, 255, 0.42); }
.portal-shell-frame .sigmodal-btn--confirm { border: 0; color: #0d1114; background: var(--portal-accent); }
.portal-shell-frame .voidmodal-header-icon { border: 0; color: var(--portal-text-negative); background: rgba(225, 29, 72, 0.1); }
.portal-shell-frame .voidmodal-warning { border: 0; color: #7f1d36; background: rgba(225, 29, 72, 0.08); }
.portal-shell-frame .voidmodal-btn--confirm { border: 0; color: #fff; background: var(--portal-status-negative); }

/* Shared client lists and editorial regions */

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(
  .resource-card,
  .featured-resource-card,
  .resource-request-card,
  .service-card,
  .support-case-row,
  .team-panel,
  .account-panel,
  .account-card,
  .privacy-guide-panel,
  .resource-content-panel,
  .resource-overview-panel,
  .lesson-list-panel,
  .article-content-panel,
  .article-reader-panel
) {
  border: 0;
  color: var(--portal-text);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
}

.portal-shell-frame .resource-filters,
.portal-shell-frame .service-filters,
.portal-shell-frame .support-filter-row { border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.34); }
.portal-shell-frame :is(.resource-filters, .service-filters, .support-filter-row) button { min-height: 42px; border: 0; color: var(--portal-muted); background: transparent; }
.portal-shell-frame :is(.resource-filters, .service-filters, .support-filter-row) button.selected { color: var(--portal-text); background: var(--portal-surface-selected); }
.portal-shell-frame .resources-search { min-height: 44px; border: 0; background: var(--portal-surface-control); }
.portal-shell-frame .resources-search input { border: 0; background: transparent; }
.portal-shell-frame .resource-card { overflow: hidden; }
.portal-shell-frame .resource-card h2,
.portal-shell-frame .resource-card p { overflow-wrap: anywhere; }
.portal-shell-frame .resource-card .resource-button { margin-top: auto; }
.portal-shell-frame .resource-card:hover { border: 0; background: rgba(255, 255, 255, 0.48); transform: translateY(-1px); }
.portal-shell-frame .resource-kind,
.portal-shell-frame .resource-access { border: 0; color: var(--portal-text-neutral); background: var(--portal-surface-control); }
.portal-shell-frame .resource-button { min-height: 40px; border: 0; color: var(--portal-text-accent); background: rgba(33, 228, 191, 0.13); }
.portal-shell-frame .featured-resource { background: linear-gradient(115deg, rgba(117, 250, 250, 0.16), rgba(255, 255, 255, 0.34)); }

/* Services */

.portal-shell-frame .services-layout,
.portal-shell-frame .service-summary-grid,
.portal-shell-frame .service-detail-header,
.portal-shell-frame .service-detail-panel,
.portal-shell-frame .service-detail-actions { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .service-summary-grid { gap: 14px; }
.portal-shell-frame .service-summary-card { min-height: 112px; }
.portal-shell-frame .service-summary-card > i { color: var(--portal-text-success); }
.portal-shell-frame .service-card-grid { gap: 10px; }
.portal-shell-frame .service-card { overflow: hidden; border-radius: var(--portal-radius-row); }
.portal-shell-frame .service-accordion-trigger { min-height: 82px; border: 0; color: var(--portal-text); background: transparent; }
.portal-shell-frame .service-trigger-copy { min-width: 0; }
.portal-shell-frame .service-trigger-copy h2 { overflow-wrap: anywhere; }
.portal-shell-frame .service-accordion-trigger:hover { background: rgba(255, 255, 255, 0.2); }
.portal-shell-frame .service-category { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.11); }
.portal-shell-frame .service-status { border: 0; color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame .service-accordion-panel { border-color: var(--portal-divider); background: rgba(255, 255, 255, 0.12); }
.portal-shell-frame .service-meta-grid dt,
.portal-shell-frame .service-field-list dt { color: var(--portal-muted); }
.portal-shell-frame .service-meta-grid dd,
.portal-shell-frame .service-field-list dd { color: var(--portal-text); }
.portal-shell-frame .service-included-list li,
.portal-shell-frame .service-scope-list li { color: var(--portal-text); background: rgba(255, 255, 255, 0.32); }
.portal-shell-frame .service-included-list i,
.portal-shell-frame .service-scope-list i { color: var(--portal-text-success); }
.portal-shell-frame .service-detail-hero { border: 0; background: linear-gradient(115deg, rgba(117, 250, 250, 0.13), rgba(255, 255, 255, 0.38)); }

/* Support */

.portal-shell-frame .support-summary-grid,
.portal-shell-frame .support-landing-panel,
.portal-shell-frame .support-detail-header,
.portal-shell-frame .support-detail-grid,
.portal-shell-frame .new-case-layout { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .support-summary-card { min-height: 110px; }
.portal-shell-frame .support-summary-card > i { color: var(--portal-text-success); }
.portal-shell-frame .support-case-panel { padding: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.portal-shell-frame .support-case-panel::before { display: none; }
.portal-shell-frame .support-case-list { display: grid; gap: 9px; }
.portal-shell-frame .support-case-row { min-height: 76px; border: 0; border-radius: var(--portal-radius-row); padding: 18px 20px; }
.portal-shell-frame .support-case-row > div { min-width: 0; }
.portal-shell-frame .support-case-row h2,
.portal-shell-frame .support-case-row p { overflow-wrap: anywhere; }
.portal-shell-frame .support-case-row:hover { border: 0; background: rgba(255, 255, 255, 0.48); }
.portal-shell-frame .case-status { border: 0; }
.portal-shell-frame .case-status:is(.new, .open, .working) { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.13); }
.portal-shell-frame .support-reply-panel { border: 0; background: var(--portal-surface); box-shadow: var(--portal-shadow-ambient); }
.portal-shell-frame .new-case-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
}
.portal-shell-frame .new-case-form { gap: 22px; padding: 24px; }
.portal-shell-frame .new-case-section { border: 0; background: transparent; box-shadow: none; }
.portal-shell-frame .new-case-side { gap: 14px; }
.portal-shell-frame .new-case-side .support-case-panel {
  padding: 20px;
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
}
.portal-shell-frame .new-case-side .case-context-summary {
  border: 0;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.78);
}
.portal-shell-frame .new-case-side .case-context-summary > i {
  color: var(--portal-text-success);
  background: rgba(33, 228, 191, 0.12);
}
.portal-shell-frame .new-case-side .case-context-summary strong { color: var(--portal-text); }
.portal-shell-frame .new-case-side .case-context-summary :is(span, p) { color: var(--portal-muted); }
.portal-shell-frame .new-case-side .support-case-fields { gap: 0; margin-top: 14px; }
.portal-shell-frame .new-case-side .support-case-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--portal-divider);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
}
.portal-shell-frame .new-case-side .support-case-fields > div:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-shell-frame .new-case-side .support-case-fields dd { margin: 0; color: var(--portal-text); text-align: right; }
.portal-shell-frame .new-case-field input,
.portal-shell-frame .new-case-field select { min-height: 44px; }
.portal-shell-frame .support-activity-item { border-color: var(--portal-divider); }

/* Account and team */

.portal-shell-frame .account-layout,
.portal-shell-frame .team-panel { width: min(100%, var(--portal-content-wide)); max-width: var(--portal-content-wide); margin-inline: auto; }
.portal-shell-frame .account-layout { grid-template-columns: minmax(0, 1fr) 380px; }
.portal-shell-frame .account-security-header { align-items: center; }
.portal-shell-frame .account-security-header > button,
.portal-shell-frame .account-side button { flex: 0 0 auto; width: auto; min-width: max-content; white-space: nowrap; }
.portal-shell-frame .account-side { min-width: 0; }
.portal-shell-frame .account-panel,
.portal-shell-frame .account-card { padding: 22px; }
.portal-shell-frame .account-panel-heading { border-color: var(--portal-divider); }
.portal-shell-frame .account-panel-heading h2 i { color: var(--portal-text-success); }
.portal-shell-frame .account-edit-btn,
.portal-shell-frame .account-cancel-btn,
.portal-shell-frame .account-change-password,
.portal-shell-frame .account-password-cancel,
.portal-shell-frame .account-password-change,
.portal-shell-frame .mfa-remove-btn,
.portal-shell-frame .team-role-btn,
.portal-shell-frame .team-load-contacts-btn {
  border: 1px solid var(--portal-control-border);
  border-radius: 999px;
  color: var(--portal-text);
  background: var(--portal-surface-control);
}
.portal-shell-frame .account-avatar { color: #0d1114; background: var(--portal-accent); }
.portal-shell-frame .account-toggle-row,
.portal-shell-frame .mfa-factor-row,
.portal-shell-frame .account-security-section { border-color: var(--portal-divider); }
.portal-shell-frame .account-field-grid input,
.portal-shell-frame .account-select,
.portal-shell-frame .account-password-form input,
.portal-shell-frame .mfa-code-input { min-height: 44px; }
.portal-shell-frame .account-status-active,
.portal-shell-frame .mfa-factor-active { color: var(--portal-text-success); }
.portal-shell-frame .team-table,
.portal-shell-frame .team-contacts-table { color: var(--portal-text); }
.portal-shell-frame :is(.team-table, .team-contacts-table) th { color: var(--portal-muted); border-color: var(--portal-divider); }
.portal-shell-frame :is(.team-table, .team-contacts-table) td { color: var(--portal-text); border-color: var(--portal-divider); }
.portal-shell-frame .team-panel { overflow-x: auto; }
.portal-shell-frame :is(.team-table, .team-contacts-table) { min-width: 680px; }
.portal-shell-frame .team-role-badge { border: 0; color: var(--portal-text-neutral); background: var(--portal-surface-control); }
.portal-shell-frame .team-role-badge--admin,
.portal-shell-frame .team-role-badge--simpsec_admin { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.13); }

/* Guide and resource detail reading surfaces */

.portal-shell-frame .resource-detail-shell,
.portal-shell-frame .privacy-guide-app { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .resource-detail-header,
.portal-shell-frame .privacy-guide-header { border: 0; background: transparent; }
.portal-shell-frame .guide-back-button { color: #3f5451; }
.portal-shell-frame .privacy-guide-tabs { border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.34); }
.portal-shell-frame .privacy-guide-tabs button { border: 0; color: var(--portal-muted); background: transparent; }
.portal-shell-frame .privacy-guide-tabs button { min-height: 42px; }
.portal-shell-frame .privacy-guide-tabs button.active { color: var(--portal-text); background: var(--portal-surface-selected); }
.portal-shell-frame .guide-accordion-header,
.portal-shell-frame .lesson-row,
.portal-shell-frame .guide-step { border-color: var(--portal-divider); color: var(--portal-text); background: transparent; }
.portal-shell-frame .guide-accordion-header:hover,
.portal-shell-frame .lesson-row:hover { background: rgba(255, 255, 255, 0.22); }
.portal-shell-frame .lesson-number { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame .entitlement-gate-card { color: var(--portal-text); }
.portal-shell-frame .entitlement-gate-icon { border: 0; color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame :is(.article-content-panel, .article-reader-panel, .resource-content-panel) :is(p, li) {
  max-width: 76ch;
  line-height: 1.65;
}
.portal-shell-frame .entitlement-gate-card h2 { color: var(--portal-text); }
.portal-shell-frame .entitlement-gate-card p { color: var(--portal-muted); }

/* Shared loading treatment */

.portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(.sk-line, .sk-circle, .sk-panel) {
  border: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.26) 20%, rgba(255, 255, 255, 0.58) 40%, rgba(255, 255, 255, 0.26) 60%);
  background-size: 220% 100%;
}

@media (max-width: 1100px) {
  .portal-shell-frame .document-toolbar { grid-template-columns: minmax(220px, 1fr) auto; }
  .portal-shell-frame .document-select-filter { min-width: 180px; }
  .portal-shell-frame .document-detail-layout { grid-template-columns: 1fr; }
  .portal-shell-frame .document-detail-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 900px) {
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-main { padding: 92px 18px 30px; }
  .portal-shell-frame .document-table-head { display: none; }
  .portal-shell-frame .document-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .portal-shell-frame .document-service-cell,
  .portal-shell-frame .document-date-cell { display: none; }
  .portal-shell-frame .document-row > .document-status { position: absolute; }
  .portal-shell-frame .document-actions { grid-column: 2; grid-row: 1; }
  .portal-shell-frame .document-preview-toolbar { align-items: flex-start; }
  .portal-shell-frame .document-preview-actions { justify-content: flex-end; }
  .portal-shell-frame :is(.resource-filters, .service-filters, .support-filter-row) {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .portal-shell-frame :is(.resource-filters, .service-filters, .support-filter-row)::-webkit-scrollbar { display: none; }
}

@media (max-width: 680px) {
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-header { display: grid; }
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) .resources-header > :is(a, button) { width: 100%; }
  .portal-shell-frame .document-summary-grid,
  .portal-shell-frame .service-summary-grid,
  .portal-shell-frame .support-summary-grid { grid-template-columns: 1fr; }
  .portal-shell-frame .document-toolbar { grid-template-columns: 1fr; border-radius: 18px; }
  .portal-shell-frame .document-type-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
  .portal-shell-frame .document-select-filter { min-width: 0; }
  .portal-shell-frame .document-preview-toolbar { display: grid; }
  .portal-shell-frame .document-preview-actions { justify-content: flex-start; }
  .portal-shell-frame .document-detail-side { grid-template-columns: 1fr; }
  .portal-shell-frame .account-layout,
  .portal-shell-frame .new-case-layout,
  .portal-shell-frame .support-detail-grid { grid-template-columns: 1fr; }
  .portal-shell-frame .document-row {
    min-height: 136px;
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 18px 18px 40px;
  }
  .portal-shell-frame .document-actions { align-self: start; }
  .portal-shell-frame .service-accordion-trigger { align-items: flex-start; }
  .portal-shell-frame .support-case-row { padding: 16px; }
  .portal-shell-frame .account-security-header { align-items: flex-start; gap: 12px; }
  .portal-shell-frame .account-security-header > button { min-width: 0; white-space: normal; }
}

@media (max-width: 520px) {
  .portal-shell-frame .document-detail-fields > div { grid-template-columns: 1fr; gap: 5px; }
  .portal-shell-frame .document-detail-fields dd { text-align: left; }
  .portal-shell-frame .document-detail-fields dd + dd { grid-column: auto; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) *,
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) *::before,
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) *::after { scroll-behavior: auto; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) .portal-panel,
  .portal-shell-frame .resources-dashboard:not(.admin-dashboard) :is(.resource-card, .service-card, .support-case-row, .document-row) { background: rgba(246, 248, 248, 0.95); }
}
/* Phase 6: authenticated admin surfaces. Preserves dense operational layouts. */

.portal-shell-frame .admin-dashboard {
  --portal-text: #0d1114;
  --portal-muted: #687977;
  --portal-soft: #7e8d8b;
  --portal-card: rgba(255, 255, 255, 0.38);
  --portal-card-soft: rgba(255, 255, 255, 0.3);
  --portal-line: rgba(13, 17, 20, 0.07);
  --portal-line-strong: rgba(33, 228, 191, 0.28);
  --portal-cyan: #21e4bf;
  --portal-mint: #21e4bf;
  --portal-yellow: #effb53;

  /* Compatibility aliases for legacy Admin.css. */
  --portal-border: var(--portal-divider);
  --portal-input-bg: var(--portal-surface-control-strong);
  --portal-surface-2: rgba(255, 255, 255, 0.48);
  --portal-text-muted: var(--portal-muted);
  --portal-warning: #fb923c;
  --text-primary: var(--portal-text);
  --text-secondary: var(--portal-text-neutral);
  --text-muted: var(--portal-muted);
  --color-cyan: #21e4bf;
  --theme: #21e4bf;
  --theme-rgb: 33, 228, 191;

  color: var(--portal-text);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-shell-frame .admin-dashboard::before { display: none; }

.portal-shell-frame .admin-dashboard .admin-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  min-height: 0;
  padding: 34px clamp(24px, 3vw, 48px) 48px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--portal-text);
}

.portal-shell-frame .admin-dashboard .resources-header {
  flex: 0 0 auto;
  align-items: flex-start;
  width: min(100%, var(--portal-content-max));
  margin: 0 auto;
}

.portal-shell-frame .admin-dashboard .resources-header h1 {
  margin: 0 0 8px;
  color: var(--portal-text);
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1;
}
.portal-shell-frame .admin-dashboard .resources-header p { margin: 0; color: var(--portal-muted); font-size: 0.82rem; }

.portal-shell-frame .admin-dashboard .portal-panel {
  position: relative;
  border: 0;
  border-radius: var(--portal-radius-region);
  color: var(--portal-text);
  background: var(--portal-surface);
  box-shadow: var(--portal-shadow-ambient);
  backdrop-filter: blur(var(--portal-blur-surface));
  -webkit-backdrop-filter: blur(var(--portal-blur-surface));
  transform: none;
}
.portal-shell-frame .admin-dashboard .portal-panel::before {
  content: "";
  position: absolute;
  inset: 13px auto 13px 0;
  width: 1px;
  background: linear-gradient(transparent, var(--portal-reflection), transparent);
  pointer-events: none;
}
.portal-shell-frame .admin-dashboard .portal-panel:hover { border: 0; box-shadow: var(--portal-shadow-ambient); transform: none; }

.portal-shell-frame .admin-dashboard :is(h1, h2, h3, h4, strong, dt, dd) { color: var(--portal-text); }
.portal-shell-frame .admin-dashboard :is(p, small, label) { color: var(--portal-muted); }
.portal-shell-frame .admin-dashboard :is(a, button, input, select, textarea):focus-visible { outline: 2px solid #75fafa; outline-offset: 3px; }

.portal-shell-frame .admin-dashboard :is(input, select, textarea, .admin-search-input, .admin-users-search, .admin-settings-input, .admin-settings-textarea, .guide-form-input, .guide-form-textarea, .admin-detail-notes) {
  border: 1px solid var(--portal-control-border);
  color: var(--portal-text);
  background: var(--portal-surface-control-strong);
  box-shadow: none;
  outline: none;
}
.portal-shell-frame .admin-dashboard :is(input, select, .admin-search-input, .admin-users-search, .admin-settings-input, .guide-form-input) { border-radius: 999px; }
.portal-shell-frame .admin-dashboard :is(textarea, .admin-settings-textarea, .guide-form-textarea, .admin-detail-notes) { border-radius: 14px; }
.portal-shell-frame .admin-dashboard :is(input, textarea)::placeholder { color: #7e8d8b; }
.portal-shell-frame .admin-dashboard .admin-settings-input--disabled:disabled {
  cursor: not-allowed;
  color: #687977;
  background: rgba(104, 121, 119, 0.12);
  opacity: 0.72;
}

.portal-shell-frame .admin-dashboard :is(.support-request-button, .admin-settings-save, .guide-form-save, .admin-invite-button) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 17px;
  color: #0d1114;
  background: var(--portal-accent);
  box-shadow: none;
  font-weight: 750;
}

.portal-shell-frame .admin-loading,
.portal-shell-frame .admin-error,
.portal-shell-frame .admin-detail-success,
.portal-shell-frame .admin-settings-conflict {
  width: min(100%, var(--portal-content-max));
  margin-inline: auto;
  border: 0;
  border-radius: var(--portal-radius-row);
  padding: 14px 16px;
}
.portal-shell-frame .admin-loading { color: var(--portal-muted); background: rgba(255, 255, 255, 0.3); }
.portal-shell-frame .admin-error { color: #9f2746; background: rgba(225, 29, 72, 0.09); }
.portal-shell-frame .admin-detail-success { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.11); }

/* Admin overview */

.portal-shell-frame .admin-dash-stats,
.portal-shell-frame .admin-dash-row { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .admin-dash-stats { gap: 12px; }
.portal-shell-frame .admin-dash-stat { min-height: 118px; padding: 20px 22px; }
.portal-shell-frame .admin-dash-stat-value { color: var(--portal-text); font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -0.05em; }
.portal-shell-frame .admin-dash-stat-label,
.portal-shell-frame .admin-dash-stat-pct { color: var(--portal-muted); }
.portal-shell-frame .admin-dash-row { gap: 14px; }
.portal-shell-frame .admin-dash-panel { padding: 22px; }
.portal-shell-frame .admin-dash-panel-title { border-color: var(--portal-divider); color: var(--portal-text); }
.portal-shell-frame .admin-dash-panel-title i { color: var(--portal-text-success); }
.portal-shell-frame .admin-dash-signal-group + .admin-dash-signal-group { border-color: var(--portal-divider); }
.portal-shell-frame .admin-dash-signal-heading { color: var(--portal-muted); }
.portal-shell-frame .admin-dash-signal-row {
  border: 0;
  border-radius: 10px;
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.24);
}
.portal-shell-frame .admin-dash-signal-row:hover { background: rgba(255, 255, 255, 0.48); }
.portal-shell-frame .admin-dash-signal-danger { box-shadow: inset 3px 0 #e11d48; }
.portal-shell-frame .admin-dash-signal-meta,
.portal-shell-frame .admin-dash-event-actor,
.portal-shell-frame .admin-audit-meta { color: var(--portal-muted); }
.portal-shell-frame .admin-dash-all-clear { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.09); }
.portal-shell-frame .admin-dash-event { border-color: var(--portal-divider); }
.portal-shell-frame .admin-dash-adoption-row { border-color: var(--portal-divider); }
.portal-shell-frame .admin-dash-adoption-bar-wrap { background: rgba(104, 121, 119, 0.12); }
.portal-shell-frame .admin-dash-adoption-bar { background: var(--portal-accent); }

/* Users, invitations, and dense tables */

.portal-shell-frame :is(.admin-invite-panel, .admin-users-panel, .admin-detail-grid) { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .admin-invite-panel { padding: 22px; }
.portal-shell-frame .admin-search-row,
.portal-shell-frame .admin-create-contact-row { gap: 10px; }
.portal-shell-frame .admin-search-input { min-height: 42px; }
.portal-shell-frame .admin-create-contact-section { border-color: var(--portal-divider); }
.portal-shell-frame .admin-create-hint,
.portal-shell-frame .admin-empty-search { color: var(--portal-muted); }
.portal-shell-frame .admin-users-panel { overflow: hidden; padding: 0; }
.portal-shell-frame .admin-users-toolbar { border-color: var(--portal-divider); padding: 14px 18px; background: rgba(255, 255, 255, 0.16); }
.portal-shell-frame .admin-users-tabs,
.portal-shell-frame .admin-segment-control { border: 0; border-radius: 999px; padding: 3px; background: rgba(255, 255, 255, 0.38); }
.portal-shell-frame :is(.admin-users-tab, .admin-segment-btn) { border: 0; border-radius: 999px; color: var(--portal-muted); background: transparent; }
.portal-shell-frame :is(.admin-users-tab.active, .admin-segment-btn.active) { color: var(--portal-text); background: var(--portal-surface-selected-strong); }
.portal-shell-frame .admin-users-tab-count { color: var(--portal-text-neutral); background: rgba(104, 121, 119, 0.1); }
.portal-shell-frame .admin-users-search { min-height: 40px; }
.portal-shell-frame .admin-users-table-wrap { overflow: auto; }
.portal-shell-frame .admin-table { color: var(--portal-text); }
.portal-shell-frame .admin-table th { border-color: var(--portal-divider); color: var(--portal-muted); background: rgba(255, 255, 255, 0.2); }
.portal-shell-frame .admin-table td { border-color: var(--portal-divider); color: var(--portal-text); }
.portal-shell-frame .admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.28); }
.portal-shell-frame .admin-users-view-btn,
.portal-shell-frame .admin-back-btn,
.portal-shell-frame .admin-guide-back-btn,
.portal-shell-frame .admin-clear-filter {
  border: 1px solid var(--portal-control-border);
  border-radius: 999px;
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.42);
}
.portal-shell-frame :is(.admin-role-badge, .admin-status, .admin-users-status, .admin-mfa-badge, .admin-guide-status-pill) { border: 0; }
.portal-shell-frame :is(.admin-role-badge, .admin-status.none, .admin-users-status.inactive, .admin-mfa-badge.none, .admin-guide-status-pill.draft) { color: #4b5c5a; background: rgba(255, 255, 255, 0.46); }
.portal-shell-frame :is(.admin-role-badge.admin, .admin-role-badge.simpsec_admin, .admin-status.linked, .admin-users-status.active, .admin-mfa-badge.enrolled, .admin-guide-status-pill.published) { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.13); }
.portal-shell-frame .admin-status.pending { color: #8b5b0d; background: rgba(239, 251, 83, 0.18); }

/* User detail and privileged actions */

.portal-shell-frame .admin-detail-grid { gap: 14px; }
.portal-shell-frame .admin-detail-card { padding: 21px; }
.portal-shell-frame .admin-detail-card-title { border-color: var(--portal-divider); }
.portal-shell-frame .admin-detail-dl > div,
.portal-shell-frame .admin-audit-event { border-color: var(--portal-divider); }
.portal-shell-frame .admin-detail-dl dt,
.portal-shell-frame .admin-detail-muted { color: var(--portal-muted); }
.portal-shell-frame .admin-detail-code { color: var(--portal-text-neutral); background: var(--portal-surface-control); overflow-wrap: anywhere; }
.portal-shell-frame .admin-detail-role-toggle { min-height: 40px; border: 1px solid var(--portal-control-border); color: var(--portal-text); background: var(--portal-surface-control); }
.portal-shell-frame .admin-activity-strip { border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.3); }
.portal-shell-frame .admin-activity-stat + .admin-activity-stat { border-color: var(--portal-divider); }
.portal-shell-frame .admin-activity-label { color: var(--portal-muted); }
.portal-shell-frame .admin-audit-badge { border: 0; color: var(--portal-text-neutral); background: var(--portal-surface-control); }
.portal-shell-frame .audit-event-success { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame .audit-event-fail { color: var(--portal-text-negative); background: rgba(225, 29, 72, 0.09); }
.portal-shell-frame .audit-event-mfa { color: #286d68; background: rgba(117, 250, 250, 0.13); }
.portal-shell-frame .admin-detail-actions { gap: 7px; }
.portal-shell-frame .admin-detail-action-btn {
  border: 1px solid var(--portal-control-border);
  border-radius: 10px;
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.38);
}
.portal-shell-frame .admin-detail-action-btn:hover { border-color: transparent; color: var(--portal-text); background: rgba(255, 255, 255, 0.62); }
.portal-shell-frame .admin-detail-action-danger { border: 0; color: var(--portal-text-negative); background: rgba(225, 29, 72, 0.08); }
.portal-shell-frame .admin-detail-notes { min-height: 110px; }

/* Settings */

.portal-shell-frame .admin-settings-form { width: min(100%, 1120px); margin-inline: auto; }
.portal-shell-frame .admin-settings-panel { padding: 22px; }
.portal-shell-frame .admin-settings-panel h2 { border-color: var(--portal-divider); }
.portal-shell-frame .admin-settings-panel h2 i { color: var(--portal-text-success); }
.portal-shell-frame .admin-settings-description { color: var(--portal-muted); }
.portal-shell-frame .admin-settings-row { border-color: var(--portal-divider); }
.portal-shell-frame .admin-duration-control { border: 1px solid var(--portal-control-border); border-radius: 999px; background: rgba(255, 255, 255, 0.44); }
.portal-shell-frame .admin-duration-input { border: 0; background: transparent; }
.portal-shell-frame .admin-duration-unit { color: var(--portal-muted); }
.portal-shell-frame .admin-toggle-track { border: 0; background: rgba(104, 121, 119, 0.2); }
.portal-shell-frame .admin-toggle input:checked + .admin-toggle-track { background: var(--portal-accent); }
.portal-shell-frame .admin-toggle-thumb { background: rgba(255, 255, 255, 0.96); box-shadow: 0 4px 12px rgba(61, 79, 76, 0.16); }
.portal-shell-frame .admin-settings-saved { color: var(--portal-text-success); }

/* Guide list and editor */

.portal-shell-frame :is(.admin-guide-list, .admin-guide-detail-layout) { width: min(100%, var(--portal-content-max)); margin-inline: auto; }
.portal-shell-frame .admin-guide-card-grid { gap: 12px; }
.portal-shell-frame .admin-guide-card { border: 0; color: var(--portal-text); background: var(--portal-surface); box-shadow: var(--portal-shadow-ambient); }
.portal-shell-frame .admin-guide-card:hover { border: 0; background: rgba(255, 255, 255, 0.48); transform: translateY(-1px); }
.portal-shell-frame .admin-guide-card-icon,
.portal-shell-frame .admin-guide-settings-icon { border: 0; color: var(--portal-text-success); background: rgba(33, 228, 191, 0.11); }
.portal-shell-frame .admin-guide-card-meta,
.portal-shell-frame .admin-guide-settings-meta,
.portal-shell-frame .guide-settings-hint { color: var(--portal-muted); }
.portal-shell-frame .admin-guide-settings-card { padding: 22px; }
.portal-shell-frame .admin-guide-settings-stats { border-color: var(--portal-divider); }
.portal-shell-frame .admin-guide-layout { gap: 14px; }
.portal-shell-frame :is(.admin-guide-sections, .guide-topic-panel, .guide-subsection-panel, .guide-broker-panel) { padding: 18px; }
.portal-shell-frame .guide-panel-header { border-color: var(--portal-divider); }
.portal-shell-frame :is(.guide-section-row, .guide-topic-row, .guide-sub-block, .guide-step-row, .guide-broker-row) { border-color: var(--portal-divider); color: var(--portal-text); background: transparent; }
.portal-shell-frame :is(.guide-section-row, .guide-topic-row).selected { border: 0; color: var(--portal-text-accent); background: rgba(33, 228, 191, 0.12); box-shadow: inset 2px 0 rgba(33, 228, 191, 0.5); }
.portal-shell-frame :is(.guide-section-row, .guide-topic-row, .guide-step-row, .guide-broker-row):hover { background: rgba(255, 255, 255, 0.28); }
.portal-shell-frame .guide-section-name,
.portal-shell-frame .guide-topic-name,
.portal-shell-frame .guide-sub-toggle { color: var(--portal-text); }
.portal-shell-frame .guide-draft-badge { border: 0; color: #795210; background: rgba(239, 251, 83, 0.18); }
.portal-shell-frame .guide-row-actions button,
.portal-shell-frame .guide-sub-reorder button,
.portal-shell-frame .guide-add-btn,
.portal-shell-frame .guide-add-step-btn,
.portal-shell-frame .guide-form-cancel {
  border: 1px solid var(--portal-control-border);
  color: var(--portal-text);
  background: rgba(255, 255, 255, 0.4);
}
.portal-shell-frame .guide-row-actions button:hover,
.portal-shell-frame .guide-sub-reorder button:hover:not(:disabled) { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.1); }
.portal-shell-frame .guide-row-actions button:last-child:hover { color: var(--portal-text-negative); background: rgba(225, 29, 72, 0.08); }
.portal-shell-frame .guide-step-num { color: var(--portal-text-success); background: rgba(33, 228, 191, 0.11); }
.portal-shell-frame .guide-empty-state,
.portal-shell-frame .guide-empty { color: var(--portal-muted); }

/* Role and impersonation clarity */

.portal-shell-frame .impersonation-banner {
  border: 0;
  color: #5f4309;
  background: linear-gradient(105deg, rgba(239, 251, 83, 0.32), rgba(255, 255, 255, 0.52));
  box-shadow: 0 16px 60px rgba(61, 79, 76, 0.08);
}
.portal-shell-frame .impersonation-banner button { border: 1px solid rgba(95, 67, 9, 0.14); color: #5f4309; background: rgba(255, 255, 255, 0.45); }

/* Shared admin loading treatment */

.portal-shell-frame .admin-dashboard :is(.sk-line, .sk-circle, .sk-panel) {
  border: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.26) 20%, rgba(255, 255, 255, 0.58) 40%, rgba(255, 255, 255, 0.26) 60%);
  background-size: 220% 100%;
}

@media (max-width: 1180px) {
  .portal-shell-frame .admin-dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-shell-frame .admin-dash-row { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-detail-grid { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-detail-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .portal-shell-frame .admin-guide-layout { grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr); }
}

@media (max-width: 900px) {
  .portal-shell-frame .admin-dashboard .admin-main { padding: 92px 18px 30px; }
  .portal-shell-frame .admin-users-toolbar { align-items: stretch; flex-direction: column; }
  .portal-shell-frame .admin-users-search { width: 100%; }
  .portal-shell-frame .admin-guide-layout,
  .portal-shell-frame .guide-topics-layout,
  .portal-shell-frame .guide-brokers-layout { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-settings-row--slider { align-items: stretch; }
  .portal-shell-frame .admin-range-control { width: 100%; }
}

@media (max-width: 680px) {
  .portal-shell-frame .admin-dashboard .resources-header { display: grid; }
  .portal-shell-frame .admin-dashboard .resources-header > :is(button, a) { width: 100%; }
  .portal-shell-frame .admin-dash-stats { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-users-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .portal-shell-frame .admin-detail-side { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-search-row,
  .portal-shell-frame .admin-create-contact-row,
  .portal-shell-frame .admin-guide-settings-grid { grid-template-columns: 1fr; }
  .portal-shell-frame .admin-users-tabs { overflow-x: auto; }
  .portal-shell-frame .admin-detail-actions { align-items: stretch; }
  .portal-shell-frame .admin-detail-actions > button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell-frame .admin-dashboard *,
  .portal-shell-frame .admin-dashboard *::before,
  .portal-shell-frame .admin-dashboard *::after { scroll-behavior: auto; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .portal-shell-frame .admin-dashboard .portal-panel,
  .portal-shell-frame .admin-dashboard :is(.admin-guide-card, .admin-dash-signal-row) { background: rgba(246, 248, 248, 0.95); }
}
/* Phases 7–8: shared authenticated system states and platform safeguards. */

.portal-shell-frame {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
}

/* All authenticated surfaces have migrated; the legacy dark diffusion layer
   must never sit above the shared plasma atmosphere. */
.portal-shell-frame .dashboard-revamp,
.portal-shell-frame .resources-dashboard,
.portal-shell-frame .admin-dashboard {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dialogs */

.portal-shell-frame :is(.idle-overlay, .sigmodal-overlay, .voidmodal-overlay) {
  overscroll-behavior: contain;
  padding: 18px;
  background: rgba(45, 58, 56, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.portal-shell-frame :is(.idle-modal, .sigmodal, .voidmodal) {
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  border: 0;
  color: var(--portal-text);
  background: rgba(244, 247, 246, 0.88);
  box-shadow: var(--portal-shadow-float);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 17, 20, 0.18) transparent;
}
.portal-shell-frame .idle-modal { border-radius: 22px; }
.portal-shell-frame .idle-icon { border: 0; color: #087a68; background: rgba(33, 228, 191, 0.12); }
.portal-shell-frame .idle-modal h2 { color: var(--portal-text); }
.portal-shell-frame .idle-modal p { color: var(--portal-muted); }
.portal-shell-frame .idle-stay-btn { border: 0; color: #0d1114; background: var(--portal-accent); }
.portal-shell-frame .idle-leave-btn { border: 1px solid var(--portal-control-border); color: var(--portal-text); background: rgba(255, 255, 255, 0.42); }

/* Banners */

.portal-shell-frame > :is(.announcement-banner, .impersonation-banner) {
  min-height: 44px;
  border: 0;
  color: var(--portal-text);
  box-shadow: 0 14px 54px rgba(61, 79, 76, 0.07);
  backdrop-filter: blur(var(--portal-blur-shell));
  -webkit-backdrop-filter: blur(var(--portal-blur-shell));
}
.portal-shell-frame > .announcement-banner--info { background: linear-gradient(105deg, rgba(117, 250, 250, 0.28), rgba(255, 255, 255, 0.5)); }
.portal-shell-frame > .announcement-banner--warning,
.portal-shell-frame > .impersonation-banner { background: linear-gradient(105deg, rgba(239, 251, 83, 0.3), rgba(255, 255, 255, 0.5)); }
.portal-shell-frame .impersonation-banner strong { color: #3e3108; }
.portal-shell-frame :is(.announcement-dismiss, .impersonation-exit) { border: 1px solid var(--portal-control-border); color: var(--portal-text); background: rgba(255, 255, 255, 0.4); }

/* Loading, empty, success, warning, and error states */

.portal-shell-frame .portal-loading {
  color: var(--portal-text);
  background: transparent;
}
.portal-shell-frame .portal-loading::after { border-color: rgba(104, 121, 119, 0.18); border-top-color: #21e4bf; }
.portal-shell-frame :is(
  .document-empty-state,
  .service-empty-state,
  .support-case-empty,
  .support-activity-empty,
  .resource-empty,
  .team-empty,
  .team-empty-contacts,
  .guide-empty,
  .guide-empty-state,
  .admin-empty,
  .admin-empty-search
) {
  border: 0;
  border-radius: var(--portal-radius-region);
  color: var(--portal-muted);
  background: rgba(255, 255, 255, 0.3);
}
.portal-shell-frame :is(
  .document-pdf-toast--success,
  .new-case-success,
  .account-password-success,
  .support-reply-sent,
  .admin-detail-success,
  .admin-settings-saved,
  .admin-invite-result.ok
) {
  border: 0;
  border-radius: 10px;
  color: #087a68;
  background: rgba(33, 228, 191, 0.12);
}
.portal-shell-frame :is(
  .document-pdf-toast--error,
  .new-case-error,
  .account-form-error,
  .account-password-error,
  .mfa-verify-error,
  .support-case-error,
  .support-reply-error,
  .team-error,
  .admin-error,
  .admin-settings-error,
  .guide-form-error,
  .admin-invite-result.err
) {
  border: 0;
  border-radius: 10px;
  color: #9f2746;
  background: rgba(225, 29, 72, 0.09);
}
.portal-shell-frame :is(.document-pdf-toast, .new-case-success, .new-case-error, .support-case-error, .support-reply-error) { padding: 11px 13px; }

/* Skeletons remain quiet and readable over every atmosphere frame. */

.portal-shell-frame :is(.sk-line, .sk-circle, .sk-panel, .revamp-skeleton) {
  border: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.26) 20%, rgba(255, 255, 255, 0.62) 40%, rgba(255, 255, 255, 0.26) 60%);
  background-size: 220% 100%;
}

/* Universal authenticated focus visibility. */

.portal-shell-frame :is(a, button, summary, [role="button"]) {
  transition:
    color var(--portal-motion-fast) var(--portal-ease-standard),
    background-color var(--portal-motion-standard) var(--portal-ease-standard),
    border-color var(--portal-motion-fast) var(--portal-ease-standard),
    box-shadow var(--portal-motion-standard) var(--portal-ease-standard),
    opacity var(--portal-motion-fast) var(--portal-ease-standard),
    transform var(--portal-motion-fast) var(--portal-ease-standard);
}

.portal-shell-frame :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  border-color: #0bbfa2;
  box-shadow: 0 0 0 3px rgba(11, 191, 162, 0.3);
}
.portal-shell-frame :is(button, input, select, textarea):disabled,
.portal-shell-frame [aria-disabled="true"] { cursor: not-allowed; opacity: 0.58; }
.portal-shell-frame a[aria-disabled="true"] { pointer-events: none; }
.portal-shell-frame [aria-busy="true"] { cursor: progress; }
.portal-shell-frame :is(button, summary, a.portal-button):active:not(:disabled) { transform: translateY(1px); }

/* Safari and small viewport resilience. */

@supports (-webkit-touch-callout: none) {
  .portal-shell-frame :is(input, select, textarea) { font-size: max(16px, 1rem); }
  .portal-shell-frame :is(.portal-glass, .portal-panel) { -webkit-transform: translateZ(0); }
}

@media (max-width: 900px) {
  .portal-shell-frame > :is(.announcement-banner, .impersonation-banner) { margin: 76px 12px 0; width: auto; border-radius: 14px; }
  .portal-shell-frame .impersonation-banner { flex-wrap: wrap; }
  .portal-shell-frame .impersonation-exit { margin-left: 0; }
}

@media (max-width: 480px) {
  .portal-shell-frame :is(.idle-overlay, .sigmodal-overlay, .voidmodal-overlay) { place-items: end center; padding: 8px; }
  .portal-shell-frame :is(.idle-modal, .sigmodal, .voidmodal) { width: 100%; max-height: calc(100dvh - 16px); border-radius: 20px; }
  .portal-shell-frame :is(.sigmodal-footer, .voidmodal-footer) { display: grid; grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .portal-shell-frame :is(button, [role="button"], summary, a.portal-button, .portal-nav a) { min-height: 44px; }
}

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

@media (forced-colors: active) {
  .portal-shell-frame :is(.portal-glass, .portal-panel, .document-row, .resource-card, .service-card, .sigmodal, .voidmodal, .idle-modal) {
    border: 1px solid CanvasText;
    background: Canvas;
    forced-color-adjust: auto;
  }
  .portal-shell-frame :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid Highlight; }
  .portal-atmosphere,
  .portal-custom-background { display: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .portal-shell-frame :is(.idle-modal, .sigmodal, .voidmodal) { background: rgba(246, 248, 248, 0.98); }
  .portal-shell-frame > :is(.announcement-banner, .impersonation-banner) { background: rgba(244, 247, 246, 0.97); }
}

@supports not (height: 100dvh) {
  .portal-shell-frame { height: 100vh; min-height: 100vh; }
}
