:root {
  color-scheme: dark;
  --bg: #111419;
  --bg-soft: #171b21;
  --panel: #0b0d10;
  --panel-2: #10141a;
  --line: #242b35;
  --line-strong: #334155;
  --text: #f8fafc;
  --muted: #93a4b8;
  --accent: #7000ff;
  --danger: #fb7185;
  --ok: #22c55e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(103, 232, 249, 0.11), transparent 30rem),
    linear-gradient(180deg, #151a20 0%, #111419 38%, #0e1116 100%);
}

body.public-page,
body.panel-page,
body.panel-login {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

body.public-page {
  background: #0e1116;
}

body.panel-page,
body.panel-login {
  background:
    radial-gradient(circle at 10% 0%, rgba(112, 0, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(103, 232, 249, 0.1), transparent 26rem),
    linear-gradient(180deg, #111419 0%, #0e1116 100%);
}

body.public-page::before,
body.public-page::after,
body.panel-page::before,
body.panel-login::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body.public-page::before,
body.panel-page::before,
body.panel-login::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.12), rgba(5, 7, 10, 0.88) 82%, rgba(5, 7, 10, 0.96)),
    radial-gradient(circle at 48% 42%, rgba(5, 7, 10, 0.24), rgba(5, 7, 10, 0.66) 48%, rgba(5, 7, 10, 0.92)),
    url("/staff-list/assets/images/v0yd-summit-scroll-background.png") center / cover no-repeat;
}

.summit-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(5, 7, 10, 0.55), rgba(5, 7, 10, 0.55)),
    radial-gradient(circle at 18% 0%, rgba(103, 232, 249, 0.08), transparent 30rem),
    url("/staff-list/assets/images/v0yd-summit-scroll-background.png") center / cover no-repeat;
}

.summit-background::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.22), transparent 28%, transparent 72%, rgba(5, 7, 10, 0.22));
  content: "";
}

body.public-page::before,
body.public-page::after {
  display: none;
}

body.panel-page::before,
body.panel-login::before {
  display: none;
}

body.public-page .site-header,
body.public-page .public-shell,
body.panel-page .panel-header,
body.panel-page .panel-shell,
body.panel-login .login-shell {
  position: relative;
  z-index: 2;
}

body.panel-page:not(.is-ready) .panel-actions,
body.panel-page:not(.is-ready) .panel-shell {
  visibility: hidden;
}

body.panel-page:not(.is-ready) .panel-shell {
  display: none;
}

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

a {
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

[hidden] {
  display: none !important;
}

.site-header,
.panel-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(1560px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.site-header {
  min-height: 8rem;
}

.panel-header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand-cluster,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 8px;
  color: #0b0d10;
  background: linear-gradient(135deg, #7000ff, #7000ff);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.staff-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  margin: 0.65rem 0 0;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #dffbff;
  background: rgba(15, 23, 42, 0.58);
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

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

.site-header .social-links {
  margin-left: auto;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.social-button {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.58);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transform-origin: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  border-color: rgba(103, 232, 249, 0.68);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.1), 0 18px 38px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px) scale(1.08);
}

.social-button:active {
  transform: translateY(0) scale(0.98);
}

.social-button.is-main {
  width: 2.9rem;
  height: 2.9rem;
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.1), 0 16px 34px rgba(0, 0, 0, 0.26);
}

.social-button img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  display: block;
}

.social-button.is-main img {
  width: 72%;
  height: 72%;
}

.social-discord {
  background: rgba(88, 101, 242, 0.72);
}

.social-roblox {
  color: #071014;
  background: rgba(248, 250, 252, 0.92);
}

.social-x {
  background: rgba(2, 6, 23, 0.86);
}

.social-instagram {
  background: rgba(15, 23, 42, 0.58);
}

.social-tiktok {
  background: rgba(2, 6, 23, 0.84);
}

.panel-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(103, 232, 249, 0.42);
  border-radius: 8px;
  color: #071014;
  background: rgba(103, 232, 249, 0.9);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  transform-origin: center;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.panel-shortcut:hover,
.panel-shortcut:focus-visible {
  border-color: rgba(248, 250, 252, 0.72);
  background: #8ff3ff;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.12), 0 18px 38px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px) scale(1.06);
}

.panel-shortcut:active {
  transform: translateY(0) scale(0.98);
}

.group-link,
.primary-button,
.ghost-button,
.as-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  color: #071014;
  background: var(--accent);
  box-shadow: 0 10px 25px rgba(103, 232, 249, 0.14);
}

.ghost-button,
.group-link {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.48);
}

.danger {
  color: var(--danger);
}

.public-shell {
  width: min(1560px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.board-toolbar,
.tool-band,
.panel-column {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.78);
  box-shadow: var(--shadow);
}

.board-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1.35fr) minmax(11rem, 0.8fr) minmax(11rem, 0.8fr) auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: var(--text);
  background: #080b0f;
  padding: 0.52rem 0.65rem;
  outline: none;
}

textarea {
  resize: vertical;
}

textarea.resizable-field {
  min-width: 6rem;
  min-height: 2.35rem;
  resize: both;
  line-height: 1.25;
  overflow: auto;
}

textarea.compact-field {
  min-width: 4.25rem;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(103, 232, 249, 0.75);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.1);
}

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

.filter-field {
  min-width: 0;
}

.compact-button {
  min-height: 2.35rem;
  white-space: nowrap;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
}

.filter-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.64);
  padding: 0.35rem 0.65rem;
  font-weight: 800;
}

.chip.active {
  color: #071014;
  background: var(--accent);
}

.filter-chip {
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--dot);
}

.dot.large {
  width: 1rem;
  height: 1rem;
}

.staff-board {
  display: grid;
  gap: 2rem;
}

.rank-section {
  display: grid;
  gap: 1rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 32rem;
}

.rank-header,
.lane-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rank-header {
  justify-content: center;
  text-align: center;
}

.rank-header h2,
.lane-header h3 {
  margin-bottom: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.55rem);
  line-height: 1.2;
}

.rank-code {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid color-mix(in srgb, var(--rank), #ffffff 20%);
  border-radius: 999px;
  color: var(--text);
  background: #05070a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 0 24px color-mix(in srgb, var(--rank), transparent 78%);
  font-weight: 900;
  font-size: 0.82rem;
}

.member-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
}

.member-card,
.editor-member-card,
.lookup-card,
.admin-item {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 15, 19, 0.96), rgba(5, 7, 10, 0.96));
}

.member-card {
  position: relative;
  display: grid;
  flex: 0 1 21rem;
  width: min(100%, 21rem);
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  min-height: 9.5rem;
  padding: 1rem;
  overflow: hidden;
  transform-origin: center;
  content-visibility: auto;
  contain-intrinsic-size: auto 9.5rem;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body.public-page .board-toolbar {
  background: rgba(13, 17, 23, 0.94);
}

body.public-page .member-card {
  background: linear-gradient(180deg, rgba(12, 15, 19, 0.98), rgba(5, 7, 10, 0.98));
}

body.panel-page .panel-column,
body.panel-page .tool-band,
body.panel-login .login-card {
  background: rgba(13, 17, 23, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.member-card::before {
  position: absolute;
  inset: 0;
  height: 0.22rem;
  background: linear-gradient(90deg, var(--accent), transparent);
  content: "";
}

.member-card::after {
  content: none;
}

.member-card > * {
  position: relative;
  z-index: 1;
}

.member-card:hover,
.member-card:focus-within {
  border-color: rgba(103, 232, 249, 0.34);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.08), 0 14px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px) scale(1.01);
}

.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: #071014;
  background: linear-gradient(135deg, #7000ff, #7000ff);
  font-weight: 900;
  overflow: hidden;
  text-decoration: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-main {
  min-width: 0;
}

.member-name {
  display: inline-block;
  max-width: 100%;
  color: #e8fbff;
  font-size: 1rem;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.display-name,
.editor-member-main p {
  margin: 0.1rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.department-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  border: 1px solid color-mix(in srgb, var(--department), #ffffff 15%);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--department), transparent 78%);
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.department-badge.more-badge {
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.58);
}

.member-notes {
  margin: 0.6rem 0 0;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.member-meta {
  grid-column: 1 / -1;
  align-self: end;
  margin: 0;
  color: #7890a6;
  font-size: 0.72rem;
}

.empty-state,
.loading-row {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.45);
  padding: 1.5rem;
  text-align: center;
  font-weight: 800;
}

.panel-login {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-shell {
  width: min(27rem, 100%);
}

.login-card {
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.92);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.login-card .brand-mark {
  width: 3.25rem;
  height: 3.25rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.form-error {
  min-height: 1.2rem;
  margin: 0;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 800;
}

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

.panel-shell {
  width: min(1740px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.accounts-shell {
  width: min(980px, calc(100% - 2rem));
}

.tool-band {
  display: grid;
  grid-template-columns: minmax(16rem, 32rem) 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.lookup-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.7rem;
}

.lookup-result {
  min-height: 3rem;
}

.lookup-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
}

.lookup-card h3,
.lookup-card p {
  margin-bottom: 0.15rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(24rem, 34rem);
  gap: 1rem;
}

.panel-column {
  padding: 1rem;
}

.panel-column.wide {
  min-width: 0;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title-row h2,
.admin-tools h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.editor-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 0.9rem;
}

.lane {
  min-height: 14rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  padding: 0.75rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 22rem;
}

.lane.is-over {
  border-color: rgba(103, 232, 249, 0.78);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08);
}

.lane-header {
  margin-bottom: 0.75rem;
}

.lane-header .rank-code {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.72rem;
}

.count-badge {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.lane-dropzone {
  display: grid;
  gap: 0.65rem;
  min-height: 8rem;
}

.lane-empty {
  display: grid;
  place-items: center;
  min-height: 7rem;
  margin: 0;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: #718096;
  font-size: 0.85rem;
  font-weight: 800;
}

.editor-member-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.65rem;
  padding: 0.65rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 6rem;
}

.editor-member-card.is-expanded {
  border-color: rgba(103, 232, 249, 0.32);
}

.editor-member-card.is-dragging {
  opacity: 0.55;
}

.drag-handle {
  color: var(--muted);
  font-weight: 900;
  padding-top: 0.8rem;
  cursor: grab;
}

.editor-member-card .avatar,
.lookup-card .avatar {
  width: 3rem;
  height: 3rem;
}

.editor-member-main {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.editor-member-summary {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.editor-member-main textarea {
  min-height: 2rem;
  font-size: 0.82rem;
}

.summary-rank {
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.compact-badges {
  gap: 0.25rem;
}

.compact-badge {
  min-height: 1.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
}

.mini-text {
  font-size: 0.74rem;
  font-weight: 800;
}

.editor-member-details {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding-top: 0.55rem;
}

.rank-select {
  width: 100%;
  min-height: 2rem;
  font-size: 0.82rem;
}

.department-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.department-toggle {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.58);
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.department-toggle input {
  width: 0.9rem;
  min-height: 0.9rem;
  accent-color: var(--accent);
}

.compact-note {
  margin: 0;
  font-size: 0.8rem;
}

.card-actions {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
}

.edit-toggle-button {
  width: auto;
  min-width: 3.4rem;
  padding: 0 0.55rem;
}

.admin-tools {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.admin-tools section {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.admin-tools section:last-child {
  border-bottom: 0;
}

.admin-form {
  display: grid;
  gap: 0.5rem;
}

.compact-grid {
  grid-template-columns: minmax(0, 1fr) 4.5rem 3rem 5rem auto;
}

.role-form-grid {
  grid-template-columns: minmax(0, 1fr) 3rem auto;
}

.department-form-grid {
  grid-template-columns: minmax(0, 1fr) 3rem auto;
}

.account-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 7rem auto;
}

.admin-list {
  display: grid;
  gap: 0.5rem;
}

.admin-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 4.5rem 3rem 5rem auto auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem;
}

.account-item,
.activity-item,
.log-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 5rem;
}

.catalog-item {
  grid-template-columns: auto minmax(0, 1fr) 3rem auto;
  align-items: start;
}

.catalog-item[draggable="true"] {
  cursor: grab;
}

.catalog-item.is-over {
  border-color: rgba(103, 232, 249, 0.78);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08);
}

.catalog-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.catalog-drag-handle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  min-height: 2.35rem;
  color: var(--muted);
  cursor: grab;
  font-weight: 900;
  user-select: none;
  touch-action: none;
}

.catalog-drag-handle:active {
  cursor: grabbing;
}

.catalog-item textarea,
.catalog-item input,
.catalog-item button {
  cursor: auto;
}

.catalog-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  min-width: 0;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.admin-item .rank-code {
  width: 2rem;
  height: 2rem;
  font-size: 0.68rem;
}

.account-item {
  grid-template-columns: 1fr;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) 7rem auto;
  align-items: center;
  gap: 0.55rem;
}

.account-options {
  display: grid;
  grid-template-columns: auto auto minmax(10rem, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: max-content;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  min-width: 0;
}

.inline-check input {
  width: 1rem;
  min-height: 1rem;
}

.signed-in {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.storage-meter {
  --storage-color: var(--ok);
  display: grid;
  gap: 0.22rem;
  min-width: 10.5rem;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.48);
  padding: 0.42rem 0.55rem;
}

.storage-meter span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.storage-meter strong {
  color: #e8fbff;
  font-size: 0.74rem;
  line-height: 1.1;
  white-space: nowrap;
}

.storage-meter i {
  display: block;
  height: 0.3rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.storage-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--storage-color);
}

.storage-meter.is-ok {
  --storage-color: #22c55e;
  border-color: rgba(34, 197, 94, 0.34);
}

.storage-meter.is-warning {
  --storage-color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.42);
}

.storage-meter.is-danger {
  --storage-color: var(--danger);
  border-color: rgba(251, 113, 133, 0.52);
}

.role-label {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.45);
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
}

.permission-group {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  padding: 0.55rem;
}

.permission-group legend {
  color: var(--muted);
  padding: 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #d8e3ed;
  font-size: 0.76rem;
  font-weight: 800;
}

.permission-check input {
  width: 0.95rem;
  min-height: 0.95rem;
  accent-color: var(--accent);
}

.activity-list {
  display: grid;
  gap: 0.5rem;
  max-height: 28rem;
  overflow: auto;
}

.activity-item {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  padding: 0.55rem;
}

.activity-item div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.activity-item strong {
  color: #e8fbff;
}

.activity-item span,
.activity-item time,
.activity-item p {
  color: var(--muted);
  font-size: 0.76rem;
}

.activity-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 10, 0.82);
  padding: 1rem;
}

.password-gate[hidden] {
  display: none;
}

.password-card {
  display: grid;
  gap: 0.9rem;
  width: min(28rem, 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #0b0d10;
  box-shadow: var(--shadow);
  padding: 1.15rem;
}

.password-card h2,
.password-card p {
  margin-bottom: 0;
}

.logs-shell {
  display: grid;
  gap: 1rem;
}

.log-filters {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(13rem, 1.4fr) 6rem auto auto;
  align-items: end;
  gap: 0.65rem;
}

.logs-table {
  display: grid;
  gap: 0.4rem;
}

.logs-head,
.log-row {
  display: grid;
  grid-template-columns: 12rem 9rem 8rem 9rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.logs-head {
  color: var(--muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0 0.65rem 0.45rem;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.log-row {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  padding: 0.65rem;
}

.log-row time,
.log-row span,
.log-row p {
  color: var(--muted);
  font-size: 0.82rem;
}

.log-row strong {
  color: #e8fbff;
  overflow-wrap: anywhere;
}

.log-row p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.security-shell {
  display: grid;
  gap: 1rem;
}

.security-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.security-summary div {
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.74);
  padding: 1rem;
}

.security-summary span,
.security-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.security-summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #e8fbff;
  font-size: 1.85rem;
  line-height: 1;
}

.security-section {
  display: grid;
  gap: 0.75rem;
}

.security-list {
  display: grid;
  gap: 0.55rem;
}

.security-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  padding: 0.85rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 6rem;
}

.security-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.security-title-row strong {
  color: #e8fbff;
  overflow-wrap: anywhere;
}

.security-title-row span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.82rem;
}

.security-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.security-meta dd {
  margin: 0.12rem 0 0;
  color: #dcefff;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.security-user-agent {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.countdown-value {
  display: inline-flex;
  align-items: center;
  min-width: 4.7rem;
  color: #bbf7d0;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.countdown-value.is-expiring {
  color: #fbbf24;
}

.countdown-value.is-expired {
  color: var(--danger);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.status-pill.is-ok {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(20, 83, 45, 0.32);
}

.status-pill.is-danger {
  color: #ffe4e6;
  border-color: rgba(251, 113, 133, 0.42);
  background: rgba(127, 29, 29, 0.34);
}

.status-pill.is-current {
  color: #cffafe;
  border-color: rgba(103, 232, 249, 0.42);
  background: rgba(14, 116, 144, 0.28);
}

.backups-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(18rem, 1fr));
  gap: 1rem;
}

.backups-list-section {
  grid-column: 1 / -1;
}

.backup-settings-form,
.manual-backup-form {
  display: grid;
  gap: 0.75rem;
}

.backup-settings-form label,
.manual-backup-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.backup-settings-form .inline-check,
.manual-backup-form .inline-check {
  display: flex;
  color: var(--text);
}

.interval-control {
  display: grid;
  grid-template-columns: minmax(5rem, 8rem) minmax(8rem, 1fr);
  gap: 0.5rem;
}

.backup-list {
  display: grid;
  gap: 0.65rem;
}

.backup-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  padding: 0.8rem;
}

.backup-title-row,
.backup-actions,
.backup-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.backup-title-row {
  margin-bottom: 0.55rem;
}

.backup-title-row h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.backup-actions {
  justify-content: flex-end;
}

.backup-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.backup-meta div {
  min-width: 0;
}

.backup-meta dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.backup-meta dd {
  margin: 0.1rem 0 0;
  color: #e8fbff;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.backup-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.backup-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #d8e3ed;
  background: rgba(15, 23, 42, 0.62);
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.backup-badge.is-locked {
  color: #fef3c7;
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(113, 63, 18, 0.35);
}

.ghost-button.warning {
  color: #fef3c7;
  border-color: rgba(250, 204, 21, 0.36);
  background: rgba(113, 63, 18, 0.22);
}

@media (max-width: 1100px) {
  .workspace-grid,
  .tool-band,
  .backups-shell {
    grid-template-columns: 1fr;
  }

  .admin-tools {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .site-header,
  .panel-header,
  .board-toolbar,
  .lookup-form,
  .lookup-card,
  .panel-actions,
  .log-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    min-height: 0;
  }

  .site-header .social-links {
    margin-left: 0;
  }

  .social-links {
    justify-content: flex-start;
    width: 100%;
  }

  .storage-meter {
    width: 100%;
  }

  .board-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .active-filter-row,
  .chip-row {
    justify-content: flex-start;
  }

  .compact-button {
    width: 100%;
  }

  .lookup-form,
  .lookup-card,
  .compact-grid,
  .account-form,
  .account-row,
  .account-options,
  .security-summary,
  .security-row,
  .security-meta,
  .backup-item,
  .backup-meta,
  .interval-control,
  .logs-head,
  .log-row,
  .admin-item,
  .account-item {
    grid-template-columns: 1fr;
  }

  .account-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .account-actions .ghost-button {
    flex: 1 1 0;
  }

  .role-catalog-item .catalog-fields {
    grid-template-columns: 1fr;
  }

  .catalog-actions {
    justify-content: stretch;
  }

  .catalog-actions .ghost-button {
    flex: 1 1 0;
  }

  .logs-head {
    display: none;
  }

  .editor-member-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .editor-member-card .avatar {
    display: none;
  }
}

@media (max-width: 1180px) {
  .log-filters,
  .logs-head,
  .log-row {
    grid-template-columns: 1fr;
  }

  .logs-head {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-button,
  .panel-shortcut,
  .member-card,
  .member-card::after {
    transition: none;
  }

  .social-button:hover,
  .social-button:focus-visible,
  .social-button:active,
  .panel-shortcut:hover,
  .panel-shortcut:focus-visible,
  .panel-shortcut:active,
  .member-card:hover,
  .member-card:focus-within {
    transform: none;
  }
}
