:root {
  --preview-tint: #ff7a24;
  --preview-surface: #161616;
  --preview-stroke: rgba(255, 255, 255, .14);
  --preview-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
body, button, input, select, textarea { font-family: var(--preview-font); }
#project-entry[hidden], .preview-access[hidden], .preview-welcome[hidden] { display: none !important; }
#project-entry {
  color: #f7f7f5;
  min-height: 100dvh;
  place-items: start center;
  padding: clamp(28px, 6vh, 72px) 28px 54px;
  background:
    radial-gradient(ellipse at 82% -15%, #271b14 0%, transparent 53%),
    radial-gradient(ellipse at 4% 85%, #171514 0%, transparent 45%),
    linear-gradient(150deg, #161514, #080808 70%);
}
#project-entry .project-entry-inner { width: min(100%, 1520px); }
#project-entry .project-entry-inner > header {
  gap: 12px;
  margin: 0 0 clamp(28px, 6vh, 66px);
  padding: 10px 12px;
  min-height: 56px;
  border: 1px solid var(--preview-stroke);
  border-radius: 17px;
  background: rgba(28, 27, 26, .66);
  backdrop-filter: blur(20px) saturate(125%);
}
#project-entry .project-entry-inner > header > .logo-mark { flex-shrink: 0; }
#project-entry [data-entry-logout] { margin-left: auto; }
.preview-badge {
  color: #e8d5c6;
  background: rgba(241, 101, 19, .10);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
#project-entry h1 { margin: 0 0 22px; font-size: clamp(33px, 5vw, 58px); letter-spacing: -.045em; line-height: 1.08; }
#entry-greeting, #day-greeting, .project-entry-note,
#project-entry h1 + .ri-muted, .ri-page-head .kicker,
#account-dialog .account-head .kicker, .ri-dialog-note, .wb-lifetime { display: none; }
#project-entry .project-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; }
#project-entry .project-entry-grid > button:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-content: start;
  min-width: 0;
  min-height: clamp(152px, 14vw, 202px);
  padding: clamp(18px, 2vw, 32px);
  text-align: left;
  border: 1px solid var(--preview-stroke);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(75, 63, 54, .19), rgba(28, 27, 26, .52));
  box-shadow: 0 4px 12px #0000001e;
}
#project-entry .project-entry-grid > button:hover { background-color: rgba(241, 101, 19, .12); border-color: #ff7a2470;  }
#project-entry .project-entry-grid > button:focus-visible { outline: 2px solid var(--preview-tint); outline-offset: 3px; }
#project-entry .project-entry-grid > button > .logo-mark { grid-column: 1; grid-row: 1; margin: 0 0 4px; }
#project-entry .project-entry-grid > button > strong { grid-column: 1 / -1; font-size: clamp(18px, 1.65vw, 25px); line-height: 1.2; letter-spacing: -.015em; }
#project-entry .project-entry-grid > button > span:not(.logo-mark) { grid-column: 1 / -1; color: #ababa5; line-height: 1.45; font-size: 14px; }
#project-entry .project-entry-grid > button > small { display: none; }
#project-entry .project-entry-grid > button > b { grid-column: 2; grid-row: 1; justify-self: end; color: var(--preview-tint); margin: 0; padding: 0; background: none; }
.preview-access { margin-top: 30px; }
.preview-access h2 { margin: 0 0 11px; font-size: 16px; font-weight: 650; color: #d4d0cc; }
#project-entry .preview-access .project-entry-grid > button:not([hidden]) { min-height: 108px; }
#project-entry .preview-access button > b { display: none; }
#account-dialog, .ri-project-dialog, .ri-detail-dialog {
  background: var(--preview-surface);
  border-color: var(--preview-stroke);
  box-shadow: 0 25px 95px #080808aa;
}
#account-dialog {
  max-width: min(580px, calc(100% - 28px));
  scrollbar-gutter: stable;
  border-radius: 21px;
  overscroll-behavior: contain;
}
#account-dialog .account-head { background: var(--preview-surface); gap: 16px; }
#account-dialog .account-head h2 { font-size: 23px; letter-spacing: -.03em; }
#account-dialog::backdrop, .ri-project-dialog::backdrop, .ri-detail-dialog::backdrop { background: #080808a0; backdrop-filter: blur(7px); }
#account-dialog[open] { animation: preview-dialog-in 200ms ease-out both; }
#account-dialog #account-content form button[type=submit] { display: none; }
.preview-welcome {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: radial-gradient(ellipse at 55% 20%, #2b2018, #101010 72%);
  color: #f7f7f5;
  pointer-events: none;
  animation: preview-welcome 2400ms ease both;
}
.preview-welcome p { margin: 0; font-size: clamp(29px, 6vw, 53px); font-weight: 680; letter-spacing: -.025em; text-align: center; }
@keyframes preview-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes preview-welcome { 0% { opacity: 0; } 12%, 78% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 760px) {
  body:has(#project-entry:not([hidden])) { padding-bottom: 0; }
  #project-entry { padding: max(16px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom)); }
  #project-entry .project-entry-inner > header { gap: 7px; padding: 8px; margin-bottom: 28px; flex-wrap: wrap; font-size: 13px; }
  #project-entry .project-entry-inner > header > .logo-mark { width: 32px; height: 32px; }
  #project-entry .project-entry-inner > header > span:first-of-type { display: none; }
  #project-entry .project-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #project-entry .project-entry-grid > button:not([hidden]) { padding: 12px; border-radius: 16px; min-height: 126px; }
  #project-entry .project-entry-grid > button > strong { font-size: 15px; }
  #project-entry .project-entry-grid > button > span:not(.logo-mark) { font-size: 12px; }
  #project-entry .preview-access .project-entry-grid { grid-template-columns: 1fr; }
  .preview-access { margin-top: 22px; }
  #account-dialog {
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    max-height: min(85dvh, 690px);
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  #account-dialog .account-head { top: -16px; }
  .bottom-nav:not([hidden]) { backdrop-filter: blur(20px) saturate(130%); }
  .wb-head-actions > button, .wb-person .icon-btn, #account-dialog .icon-btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .preview-welcome, #account-dialog[open], #project-entry .project-entry-grid > button { animation: none; transition: none; }
}
#project-entry header .account-trigger { order: 3; margin-left: auto; min-height: 36px; }
#project-entry header [data-entry-logout] { order: 4; margin-left: 0; min-height: 36px; }
#project-entry header .text-btn { color: #efeeeb; }
#dashboard .overview-head h1, #dashboard .ri-page-head h1 { letter-spacing: -.04em; }
#dashboard .metric-card, #dashboard .ri-metric, #dashboard .ri-panel, #dashboard .attention-panel {
  border-color: rgba(255, 255, 255, .12);
}
#dashboard .utility-bar { backdrop-filter: blur(18px) saturate(125%); }
@media (max-width: 760px) {
  #project-entry header .account-trigger span { display: none; }
  #project-entry header .account-trigger, #project-entry header [data-entry-logout] { min-height: 44px; }
  #project-entry header .account-trigger { display: grid; place-items: center; min-width: 44px; }
  #dashboard .workspace { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  #dashboard .overview-head h1, #dashboard .ri-page-head h1 { font-size: clamp(27px, 8vw, 36px); overflow-wrap: anywhere; }
  #dashboard .mobile-head .account-trigger { min-width: 44px; min-height: 44px; }
  #dashboard .bottom-nav button { min-height: 44px; }
  dialog.ri-detail-dialog.wb-person { max-height: calc(100dvh - 24px); }
  .wb-person .ri-dialog-head, .wb-person-body { padding-inline: 16px; }
}

#project-entry .preview-pult-link {
  order: 2;
  color: #ddd8d3;
  font-size: 13px;
  text-underline-offset: 4px;
}
#project-entry .preview-pult-link:hover { color: var(--preview-tint); }
#account-dialog .account-row-actions,
#account-dialog .account-group > p,
#account-dialog .pult-account-heading p { display: none; }
@media (max-width: 760px) {
  #project-entry .preview-pult-link { font-size: 12px; }
  #project-entry header [data-entry-logout] { padding-inline: 4px; }
}

#project-entry .preview-short-label { display: none; }
@media (max-width: 760px) {
  #project-entry .preview-wide-label { display: none; }
  #project-entry .preview-short-label { display: inline-flex; }
  #project-entry .project-entry-inner > header { flex-wrap: nowrap; }
  #project-entry header [data-entry-logout] { display: grid; place-items: center; min-width: 44px; }
  #project-entry header [data-entry-logout] svg { width: 19px; height: 19px; }
}
@media (max-width: 355px) {
  #project-entry .project-entry-inner > header > .logo-mark { display: none; }
}

/* Keep decorative fills inside their rounded surfaces, including in Safari. */
#project-entry .project-entry-grid > button,
.ri-project-options > button,
#dashboard .metric-card,
#dashboard .ri-metric,
#dashboard .wb-hero,
#dashboard .bottom-nav > button {
  background-clip: padding-box;
  overflow: hidden;
}

#account-dialog {
  width: min(880px, calc(100vw - 48px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 48px));
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
}
#account-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#account-dialog .account-head {
  position: static;
  margin: 0;
  padding: 14px 22px;
  border-bottom: 1px solid var(--preview-stroke);
}
#account-dialog .account-head h2 { font-size: 19px; font-weight: 650; outline: none; }
#account-dialog .account-head .icon-btn { font-size: 24px; }
#account-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #414141 transparent;
  padding: 20px 22px 22px;
  gap: 18px;
}
#account-status:not(:empty) { margin: 0; padding: 8px 22px 12px; }
#account-content .account-summary {
  gap: 12px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--preview-stroke);
}
#account-content .account-summary small { display: none; }
#account-content .account-group { align-content: start; gap: 0; }
#account-content .account-group > h3 { margin: 0 0 8px; font-size: 14px; color: #cbc8c4; }
#account-content .account-group > .account-card {
  padding: 12px 14px;
  border-radius: 0;
  border-color: var(--line);
  background: #1a1a1a;
}
#account-content .account-group > .account-card:first-of-type { border-radius: 12px 12px 0 0; }
#account-content .account-group > .account-card:last-of-type { border-radius: 0 0 12px 12px; }
#account-content .account-group > .account-card:only-of-type { border-radius: 12px; }
#account-content .account-group > .account-card + .account-card { border-top: 0; }
#account-content .account-card > p { margin: 5px 0 0; }
#account-content .account-card > p + p { display: none; }
#account-content #pult-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
}
#pult-account .pult-account-heading { align-items: center; min-width: 0; }
#pult-account .pult-account-mark { width: 34px; height: 34px; font-size: 19px; border-radius: 10px; }
#pult-account .pult-account-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  text-decoration: none;
}

@media (min-width: 761px) {
  #project-entry { padding-inline: clamp(26px, 3vw, 58px); }
  #project-entry .project-entry-inner > header { padding-inline: 16px; }
  #project-entry header .account-trigger { padding-inline: 12px; }
  #project-entry header [data-entry-logout] {
    margin-left: 10px;
    padding: 0 12px 0 22px;
    border-radius: 0;
    border-left: 1px solid var(--preview-stroke);
  }
  #account-content:has(.account-summary) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "summary summary" "profile access" "profile recovery" "pult pult";
    align-content: start;
  }
  #account-content > .account-summary { grid-area: summary; }
  #account-content > .account-group:has(#account-details-form) { grid-area: profile; }
  #account-content > .account-group:has(#account-credentials-form) { grid-area: access; }
  #account-content > .account-group:has(#account-email-form) { grid-area: recovery; }
  #account-content > #pult-account { grid-area: pult; }
}
@media (max-width: 760px) {
  #account-dialog { width: 100%; height: auto; max-height: 86dvh; border-radius: 22px 22px 0 0; }
  #account-dialog .account-head { padding: 8px 16px; }
  #account-content { padding: 15px 16px max(18px, env(safe-area-inset-bottom)); gap: 14px; }
  #project-entry header [data-entry-logout] { margin-left: 4px; border-left: 1px solid var(--preview-stroke); border-radius: 0; }
}

body:has(#login:not([hidden])) { padding-bottom: 0; }
#login {
  padding: clamp(16px, 4vw, 48px);
  background: radial-gradient(ellipse at 16% 18%, #2a1b13 0%, transparent 54%), #0b0b0b;
}
#login .login-card {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  width: min(100%, 940px);
  padding: 0;
  overflow: hidden;
  border-color: var(--preview-stroke);
  border-radius: 22px;
}
.preview-login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: clamp(26px, 4vw, 56px);
  background: linear-gradient(145deg, #251a14, #151413 74%);
}
#login .preview-login-brand .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  margin: 0 0 17px;
}
#login .preview-login-brand .kicker {
  color: #b1aaa4;
  margin: 0;
  font-size: 11px;
}
#login .preview-login-brand h1 {
  font-size: clamp(30px, 3.45vw, 48px);
  letter-spacing: -.035em;
  line-height: 1.1;
}
.preview-login-controls { min-width: 0; padding: clamp(26px, 4vw, 48px); border-left: 1px solid var(--preview-stroke); }
.preview-login-controls > h2 { margin: 0 0 22px; font-size: 24px; font-weight: 650; }
#login .tg-login-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#login .tg-login-actions .btn { min-width: 0; margin: 0; padding-inline: 9px; text-align: center; min-height: 44px; }
#login .tg-login-divider { margin-block: 20px 12px; }
#login #login-error:empty { display: none; }
@media (max-width: 760px) {
  #login .login-card { max-width: 460px; grid-template-columns: 1fr; }
  .preview-login-brand { padding: 18px 20px; }
  #login .preview-login-brand .logo-mark { width: 38px; height: 38px; margin: 0; }
  #login .preview-login-brand .kicker { display: none; }
  #login .preview-login-brand h1 { font-size: 25px; }
  .preview-login-controls { padding: 20px; border-left: 0; border-top: 1px solid var(--preview-stroke); }
  .preview-login-controls > h2 { font-size: 19px; margin-bottom: 15px; }
}

#login .preview-login-brand h1 { font-size: clamp(25px, 2.7vw, 39px); white-space: nowrap; }
#login .tg-login-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#login .tg-login-actions .btn { font-size: 13px; padding-inline: 5px; }
#account-content .account-group > .account-card > small,
#account-content .account-group > .account-card > button { display: none; }
@media (min-width: 761px) and (max-width: 1000px) {
  #login .preview-login-brand { padding-inline: 22px; }
}

.preview-login-controls:has(> .tg-login-panel:not([hidden])) > :is(h2, .tg-login-divider) { display: none; }
#tg-login-panel { padding: 0; border: 0; background: none; }
#tg-login-panel h2 { margin: 0 0 9px; font-size: clamp(20px, 2vw, 25px); }
#tg-login-help { margin: 0 0 20px; }
#tg-login-status:empty { display: none; }
#tg-login-cancel { margin-top: 13px; color: var(--muted); }
#tg-login-cancel:hover { color: var(--text); }

.preview-welcome { animation-duration: var(--splash-duration, 2400ms); }
#project-entry .project-entry-inner > header { min-width: 0; }
#project-entry header .account-trigger,
#project-entry header [data-entry-logout] { flex-shrink: 0; }
#project-entry header [data-entry-logout] { max-width: 112px; }
.ri-project-dialog, .ri-detail-dialog, .recovery-dialog { max-width: calc(100vw - 28px); }

#account-dialog { width: min(930px, calc(100vw - 48px)); }
#account-content .account-summary {
  padding: 12px 15px;
  border: 1px solid var(--preview-stroke);
  border-radius: 15px;
  background: linear-gradient(145deg, #241b16, #191919 75%);
}
#account-content .account-avatar { width: 44px; height: 44px; border-radius: 50%; }
#account-content .account-group {
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  background: #1a1a1a;
}
#account-content .account-group > h3 { margin-bottom: 5px; color: var(--text); font-size: 15px; }
#account-content .account-group > .account-card {
  padding: 6px 0;
  border: 0;
  background: transparent;
}
#account-content .account-group > .account-card h3 { font-size: 13px; font-weight: 550; color: #d3d0cb; }
#account-content .account-group > .account-card p { margin-top: 3px; }
#account-content #pult-account { border-color: var(--preview-stroke) !important; }
#account-content .account-badge { max-width: 100%; }

#dashboard .command-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #141414;
}
#dashboard .command-bar:focus-within { border-color: #a05a30; }
#dashboard .command-bar input { min-width: 0; height: 40px; outline: 0; }
#dashboard .command-bar input::-webkit-search-cancel-button { display: none; }
#dashboard .command-bar > [data-icon] { width: 16px; height: 16px; flex: 0 0 16px; color: #aaa5a0; }
#dashboard .command-bar kbd { color: #b9b4ae; white-space: nowrap; }
#dashboard .command-bar .preview-search-clear { width: 32px; height: 32px; flex: 0 0 32px; background: transparent; border: 0; }
#dashboard .global-results { max-height: min(48dvh, 390px); overflow: auto; overscroll-behavior: contain; }

dialog .icon-btn, .preview-close {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
dialog .icon-btn svg, .preview-close svg { display: block; margin: auto; }
button.icon-btn.preview-close:not(:has(svg)) { position: relative; font-size: 0 !important; }
button.icon-btn.preview-close:not(:has(svg))::before,
button.icon-btn.preview-close:not(:has(svg))::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  inset: 50% auto auto 50%;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
button.icon-btn.preview-close:not(:has(svg))::after { transform: translate(-50%, -50%) rotate(-45deg); }

#admin-management-workspace .am-feedback:empty { display: none; }
#admin-management-workspace .am-head { margin-bottom: 18px; }
.preview-am-record { display: grid; gap: 14px; }
.preview-am-record-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-am-record .am-editor { max-width: none; }
.preview-am-access .am-row-actions { margin-top: 12px; }
@media (min-width: 761px) {
  body[data-project="admin-management"] .sidebar > .nav.preview-admin-nav:not([hidden]) { display: grid !important; }
  #admin-management-workspace .am-tabs, #admin-management-workspace .am-head [data-am="back"] { display: none; }
}
@media (max-width: 760px) {
  #account-dialog { width: 100%; }
  #project-entry header .account-trigger, #project-entry header [data-entry-logout] { min-width: 40px; padding-inline: 4px; }
  #dashboard .command-bar input { min-height: 44px; }
}

.ri-nav-note { display: none; }
@media (min-width: 761px) {
  #dashboard .mobile-head + .panel-shortcuts,
  body[data-project="admin-management"] .sidebar > .panel-shortcuts { display: none; }
}

.ri-project-dialog button.panel-chooser-home {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; min-height: 44px; margin: 12px 20px 18px;
  padding: 8px 16px; border-radius: 12px;
}

@media (min-width: 760px) {
  dialog.ri-project-dialog { width: min(960px, calc(100vw - 64px)); }
  .ri-project-dialog .ri-dialog-head { padding: 18px 24px; }
  .ri-project-dialog .ri-project-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px 24px 8px; gap: 10px;
  }
  .ri-project-dialog .ri-project-options > button { min-height: 76px; padding: 12px 16px; }
  .ri-project-dialog button.panel-chooser-home { margin-left: 24px; }
}
.ri-project-options > button[hidden] { display: none; }
dialog.shared-project { width: min(900px, calc(100vw - 28px)); }
.shared-project section { padding: clamp(14px,3vw,28px); }
.shared-project input { display:block; width:100%; margin:8px 0 14px; }
.shared-totals { display:flex; flex-wrap:wrap; gap:6px 16px; color:var(--ri-muted); font-size:.85rem; }
.shared-results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr)); gap:8px; }
.shared-results button { display:grid; gap:5px; text-align:left; padding:12px; color:inherit; background:var(--ri-surface); border:1px solid var(--ri-line); border-radius:10px; }
.shared-results small { overflow-wrap:anywhere; color:var(--ri-muted); }
.project-permissions { padding:18px; }
.project-permissions fieldset { border:0; padding:12px 0; border-bottom:1px solid var(--ri-line); }
.project-permissions label { display:inline-flex; align-items:center; gap:5px; margin:4px 12px 4px 0; }
.project-permissions input { width:auto; }
.access-hidden { display:none !important; }
@media (max-width: 760px) {
  #users-cards .person-row { grid-template-columns: 36px minmax(0,1fr) auto; padding: 12px; gap: 10px; }
  #users-cards .person-row strong, #users-cards .person-row small { overflow-wrap: anywhere; }
  .am-admin-row .am-row-actions { display:flex; flex-wrap:wrap; gap:8px; }
}
body[data-project="shared-data"] .workspace>.page,
body[data-project="shared-data"] .workspace>.utility-bar,
body[data-project="shared-data"] .sidebar>.nav,
body[data-project="shared-data"] #dashboard>.bottom-nav,
.shared-project[hidden] {display:none!important;}
.workspace>.shared-project {width:100%; max-width:1280px; padding-block:clamp(18px,3vw,40px); margin-inline:auto;}
.shared-project>section {padding:clamp(16px,2.4vw,32px);background:var(--ri-surface);border:1px solid var(--ri-line);border-radius:18px;}
.shared-project input {padding:12px 14px;}
.shared-project .shared-totals {display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:8px;}
.shared-project .shared-totals span {padding:8px 10px;border-left:2px solid var(--ri-line);}
.shared-project [role=status] {margin-block:14px;}

/* Match the account and project surfaces to the warm panel palette. */
#admin-management-workspace {--am-bg:#161513;--am-raised:#211f1c;--am-line:#39342f;--am-muted:#b4aaa0;--am-accent:#ffc291;font-family:var(--preview-font);}
.am-root .am-feedback:empty {min-height:0;margin-bottom:16px;}
.am-root .am-stats {gap:0;border:1px solid var(--am-line);border-radius:16px;background:var(--am-bg);overflow:hidden;}
.am-root .am-stats article {border:0;border-radius:0;background:none;padding:14px clamp(10px,2vw,24px);}
.am-root .am-stats article+article {border-left:1px solid var(--am-line);}
.am-root .am-stats strong {font-variant-numeric:tabular-nums;font-weight:620;color:var(--am-text);}
.am-root .am-admin-row {align-items:start;gap:16px;}
.admin-person {display:flex;gap:12px;min-width:0;}
.admin-avatar {display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:#30271f;color:#f4c6a0;font-weight:650;}
.am-root .am-row-actions details .am-button {text-align:left;}
.am-root input:not([type=checkbox]),.am-root select {background:#141310;border-color:#4a433c;}
.am-root .am-primary {background:#edb183;color:#211911;}
.project-permissions .access-matrix {width:100%;min-width:0;border-collapse:collapse;}
.access-matrix th,.access-matrix td {padding:8px 4px;white-space:normal;text-align:center;}
.access-matrix th:first-child {text-align:left;font-weight:580;}
.access-matrix thead th {color:var(--am-muted);font-size:12px;font-weight:500;}
.access-matrix label.permission-toggle {display:inline-flex;min-height:44px;min-width:44px;align-items:center;justify-content:center;cursor:pointer;margin:0;}
.access-matrix .permission-toggle span {display:none;}
.am-root .permission-toggle input {appearance:none;width:34px;height:20px;min-height:0;padding:0;margin:0;border-radius:99px;background:#36332f;border:1px solid #615950;cursor:pointer;}
.am-root .permission-toggle input::before {content:'';display:block;width:14px;height:14px;margin:2px;border-radius:50%;background:#d1c9c0;}
.am-root .permission-toggle input:checked {background:#d99765;border-color:#eba571;}
.am-root .permission-toggle input:checked::before {transform:translateX(14px);background:#241910;}
.permission-footer {display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:16px;}
.permission-footer p {margin:0;}
.shared-query-box {display:flex;align-items:center;gap:10px;border:1px solid #575047;border-radius:12px;background:#131210;padding:0 12px;margin:8px 0 16px;}
.shared-query-box:focus-within {outline:2px solid #c48a5e;outline-offset:2px;}
.shared-query-box [data-icon] {display:inline-flex;width:20px;color:#d6af91;}
.shared-query-box svg {width:20px;height:20px;}
.shared-query-box input {flex:1;min-width:0;padding:14px 0;margin:0;border:0;background:none;color:inherit;outline:0;}
.shared-query-box input:focus {outline:none;box-shadow:none;}
.shared-query-box input::-webkit-search-cancel-button {display:none;}
.shared-query-box button[hidden]{display:none!important;}
.shared-project .shared-totals {display:flex;gap:6px;}
.shared-totals button {padding:7px 10px;border-radius:9px;border:1px solid #3e3933;background:#201d1a;color:#d4c9bf;text-align:left;}
.shared-totals button[aria-pressed=true] {color:#ffca9f;border-color:#a57654;background:#30251c;}
.shared-results button {min-height:60px;background:#1d1b19;}
.shared-results button:hover,.shared-results button:focus-visible {border-color:#9b7152;}
.logo-mark.pi-mark[data-identity="admin-management"],.am-project-mark {background:#30271f!important;border-color:#705741!important;color:#e4b791!important;box-shadow:none!important;}
.logo-mark.pi-mark[data-identity="shared-data"] {--pi-ink:#d2c3a2;--pi-edge:#655a47;--pi-surface:#28241e;}
@media(max-width:650px){
  .access-matrix thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
  .access-matrix tbody {display:grid;gap:10px;}
  .access-matrix tbody tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--am-line);border-radius:12px;padding:10px;}
  .access-matrix tbody th {grid-column:1/-1;}
  .access-matrix tbody th,.access-matrix td {border:0;padding:2px;}
  .access-matrix label.permission-toggle {width:100%;justify-content:start;gap:6px;}
  .access-matrix .permission-toggle span {display:inline;font-size:12px;}
  .access-matrix input {flex:none;}
  .am-root .am-row-actions {gap:6px;}
}
.permission-presets {display:flex;flex-wrap:wrap;gap:8px;margin:16px 0;}
.permission-presets .am-button {font-size:13px;padding:8px 12px;}
.access-matrix tbody th[scope=row] {font-size:14px;letter-spacing:0;text-transform:none;color:#f1e9e2;}
.am-root .permission-row-preset {display:block;border:0;background:transparent;color:#e9b38c;font-size:12px;min-height:32px;padding:3px 0;}
@media(max-width:650px){.am-root .permission-row-preset{display:inline-block;float:right;min-height:30px;padding:0 6px;}.access-matrix tbody th[scope=row]{line-height:30px;}}
