/* variables */
:root {
  --navy-950: #15273A;
  --navy-700: #2C5F87;
  --blue-500: #5C88B1;
  --blue-200: #AFC7DB;
  --bg: #F6F9FC;
  --bg-alt: #EDF3F8;
  --border: #DCE7F0;
  --text: #243444;
  --muted: #64758B;
  --surface: #FFFFFF;
  --overlay-dot: rgba(21,39,58,0.05);
  --shadow-sm: rgba(21,39,58,0.06);
  --shadow-md: rgba(21,39,58,0.1);
  --shadow-lg: rgba(21,39,58,0.16);
  --heading: #15273A;
  --heading-accent: #2C5F87;
  --badge-dashboard-bg: #E4EDF5; --badge-dashboard-text: #2C5F87;
  --badge-command-bg: #EAF6EE; --badge-command-text: #2E8B57;
  --badge-moderation-bg: #FDEDED; --badge-moderation-text: #C0392B;
  --badge-report-bg: #FFF6E0; --badge-report-text: #B7791F;
  --badge-appeal-bg: #F1EAFB; --badge-appeal-text: #6B4EA6;
  --badge-panel-bg: #E3F6F5; --badge-panel-text: #1B7A75;
  --badge-muted-bg: #F2F4F7;
  --plus-accent: #2C5F87;
  --plus-accent-strong: #15273A;
  --plus-bg: linear-gradient(135deg, #E4EDF5, #D3E3F0);
  --plus-border: #AFC7DB;
}

.required-asterisk {
  color: #C0392B;
  font-weight: 700;
}

[data-theme="elbify"] {
  --bg: #EAF1F8;
  --bg-alt: #DCEAF5;
  --border: #C4DAEC;
  --text: #16283C;
  --muted: #4F6C87;
  --overlay-dot: rgba(21,57,94,0.07);
  --shadow-sm: rgba(21,57,94,0.08);
  --shadow-md: rgba(21,57,94,0.14);
  --shadow-lg: rgba(21,57,94,0.2);
}

[data-theme="dark"] {
  --bg: #0C1620;
  --bg-alt: #101D2B;
  --border: #24384D;
  --text: #E7EEF5;
  --muted: #8CA0B3;
  --surface: #15273A;
  --overlay-dot: rgba(255,255,255,0.04);
  --shadow-sm: rgba(0,0,0,0.35);
  --shadow-md: rgba(0,0,0,0.45);
  --shadow-lg: rgba(0,0,0,0.55);
  --heading: #F2F6FA;
  --heading-accent: #8FB8DA;
  --badge-dashboard-bg: rgba(92,136,177,0.18); --badge-dashboard-text: #AFC7DB;
  --badge-command-bg: rgba(46,139,87,0.2); --badge-command-text: #6FCB9F;
  --badge-moderation-bg: rgba(192,57,43,0.2); --badge-moderation-text: #F19C93;
  --badge-report-bg: rgba(183,121,31,0.2); --badge-report-text: #E3B463;
  --badge-appeal-bg: rgba(107,78,166,0.22); --badge-appeal-text: #C7B3EA;
  --badge-panel-bg: rgba(27,122,117,0.22); --badge-panel-text: #6FD9D3;
  --badge-muted-bg: rgba(255,255,255,0.08);
  --plus-accent: #8FB8DA;
  --plus-accent-strong: #AFC7DB;
  --plus-bg: linear-gradient(135deg, rgba(92,136,177,0.18), rgba(92,136,177,0.06));
  --plus-border: rgba(143,184,218,0.4);
}

/* reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(circle, var(--overlay-dot) 1px, transparent 1px) 0 0/22px 22px, var(--bg);
  color: var(--text);
  font-feature-settings: "tnum" 1;
}
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: inherit; }
::selection { background: var(--navy-700); color: #fff; }
:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

html.theme-transitioning,
html.theme-transitioning * {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

/* accessibility */
html.a11y-reduce-motion, html.a11y-reduce-motion * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-large-text { font-size: 112.5%; }
html.a11y-underline-links a:not(.brand):not(.cta):not(.sign-in):not(button):not(.btn-row-action) { text-decoration: underline; text-underline-offset: 2px; }
html.a11y-dyslexia-font, html.a11y-dyslexia-font * { font-family: 'Atkinson Hyperlegible', 'Inter', sans-serif !important; letter-spacing: 0.01em; }
html.a11y-high-contrast { --border: #64758B; --muted: #3B4A5C; }
html.a11y-high-contrast input, html.a11y-high-contrast select, html.a11y-high-contrast button { outline: 1px solid var(--border); }
html.a11y-high-contrast :focus-visible { outline: 3px solid var(--navy-700); outline-offset: 2px; }

/* navbar */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  background: var(--navy-950);
  border-bottom: 1px solid #1F3650;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 0 rgba(92,136,177,0.15);
}
.navbar-left { display: flex; align-items: center; gap: 30px; }
.navbar-left .brand {
  color: #FFFFFF; font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.navbar-left .brand img { width: 22px; height: 22px; border-radius: 6px; }
.navbar-left a:not(.brand) {
  color: var(--blue-200); text-decoration: none; font-weight: 600; font-size: 12px;
  letter-spacing: 0.01em;
  position: relative; padding-bottom: 2px;
}
.navbar-left a:not(.brand)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px;
  background: var(--blue-200); transition: right 0.18s ease;
}
.navbar-left a:not(.brand):hover { color: #FFFFFF; }
.navbar-left a:not(.brand):hover::after { right: 0; }
.navbar-left a.active { color: #FFFFFF; }
.navbar-left a.active::after { right: 0; }
.avatar { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; margin-right: 8px; border: 2px solid var(--blue-500); }
.navbar-right { display: flex; align-items: center; gap: 18px; }
.navbar-right a { color: var(--blue-200); text-decoration: none; font-weight: 600; font-size: 13px; }
.navbar-right a.sign-in {
  background: var(--navy-700); color: #fff; padding: 9px 18px; border-radius: 7px;
  font-weight: 700; letter-spacing: 0.02em; box-shadow: 0 4px 14px rgba(44,95,135,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.navbar-right a.sign-in:hover { background: #34719f; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(44,95,135,0.4); }
.navbar-right a.staff-shield-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(92,136,177,0.18); color: var(--blue-200);
  transition: background 0.15s ease, color 0.15s ease;
}
.navbar-right a.staff-shield-link:hover { background: rgba(92,136,177,0.32); color: #fff; }
.navbar-right a.admin-link {
  height: 30px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  background: #EDF3F8; color: #2C5F87; padding: 0 14px; border-radius: 6px;
  font-weight: 600; font-size: 12px; letter-spacing: 0.01em;
  border: 1px solid #DCE7F0; transition: background 0.15s ease, border-color 0.15s ease;
}
.navbar-right a.admin-link:hover { background: #DCE7F0; color: #15273A; }

/* site search */
.site-search {
  position: relative;
  --ss-bg: #ffffff;
  --ss-text: #111827;
  --ss-muted: #6b7280;
  --ss-border: #d1d5db;
  --ss-hover: #f3f4f6;
  --ss-accent: #2c5f87;
}

:root[data-theme="dark"] .site-search,
:root[data-theme="elbify"] .site-search {
  --ss-bg: #1c1f26;
  --ss-text: #f3f4f6;
  --ss-muted: #9ca3af;
  --ss-border: #374151;
  --ss-hover: #2a2f3a;
  --ss-accent: #5b9bd5;
}

.site-search .site-search-input {
  box-sizing: border-box;
  width: 220px;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--ss-border);
  border-radius: 8px;
  background: var(--ss-bg);
  color: var(--ss-text);
  font: inherit;
  font-size: 14px;
}

.site-search .site-search-input::placeholder {
  color: var(--ss-muted);
}

.site-search .site-search-input:focus-visible {
  outline: 2px solid var(--ss-accent);
  outline-offset: 1px;
}

.site-search .site-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 19px;
  color: var(--ss-muted);
  pointer-events: none;
}

.site-search .site-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--ss-border);
  border-radius: 10px;
  background: var(--ss-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  z-index: 1000;
}

.site-search .site-search-panel[hidden] {
  display: none;
}

.site-search .site-search-group {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ss-muted);
}

.site-search .site-search-item {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ss-text);
  text-decoration: none;
}

.site-search .site-search-item:hover,
.site-search .site-search-item.is-active {
  background: var(--ss-hover);
}

.site-search .site-search-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.site-search .site-search-desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ss-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-search .site-search-empty {
  padding: 14px 10px;
  font-size: 14px;
  color: var(--ss-muted);
}

@media (max-width: 720px) {
  .site-search .site-search-input {
    width: 140px;
  }
}

/* profile dropdown */
.profile-dropdown { position: relative; }
.profile-trigger {
  display: flex; align-items: center; gap: 8px; background: transparent; border: none;
  cursor: pointer; padding: 4px 6px; border-radius: 8px; box-shadow: none; transition: background 0.15s ease;
}
.profile-trigger:hover { background: rgba(255,255,255,0.06); transform: none; box-shadow: none; }
.profile-name { color: var(--blue-200); font-weight: 600; font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-arrow { color: var(--blue-200); font-size: 10px; }
.profile-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 32px var(--shadow-lg); padding: 8px; overflow: hidden;
}
.profile-menu-header { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; }
.profile-menu-header .avatar { margin: 0; }
.profile-menu-name { display: block; font-weight: 600; color: var(--heading); font-size: 13px; }
.profile-menu-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.profile-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.profile-menu a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 600; transition: background 0.12s ease;
}
.profile-menu a:hover { background: var(--bg-alt); }
.profile-menu a.profile-menu-signout { color: #C0392B; }
.profile-menu a .material-symbols-outlined { color: var(--muted); }
.profile-menu a.profile-menu-signout .material-symbols-outlined { color: #C0392B; }

.notif-dropdown { position: relative; }
.notif-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: rgba(92,136,177,0.14); color: var(--blue-200); border: none; cursor: pointer; box-shadow: none; transition: background 0.15s ease, color 0.15s ease; }
.notif-bell:hover { background: rgba(92,136,177,0.26); color: #fff; transform: none; box-shadow: none; }
.notif-bell-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #C0392B; color: #fff; font-size: 9px; font-weight: 800; display: none; align-items: center; justify-content: center; border: 2px solid var(--navy-950); }
.notif-bell-badge.visible { display: flex; }
.notif-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: 340px; max-height: 440px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 32px var(--shadow-lg); }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-panel-head h4 { font-size: 14px; font-weight: 700; color: var(--heading); }
.notif-mark-all { font-size: 12px; font-weight: 600; color: var(--navy-700); background: transparent; border: none; box-shadow: none; padding: 0; cursor: pointer; }
.notif-mark-all:hover { text-decoration: underline; background: transparent; transform: none; box-shadow: none; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; text-align: center; }
.notif-empty-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(46,139,87,0.15); color: #2E8B57; display: flex; align-items: center; justify-content: center; }
.notif-empty h5 { font-size: 14px; font-weight: 700; color: var(--heading); }
.notif-empty p { font-size: 12.5px; color: var(--muted); }
.notif-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-alt); }
.notif-item.unread { background: rgba(92,136,177,0.06); }
.notif-item-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy-700); margin-top: 6px; flex-shrink: 0; visibility: hidden; }
.notif-item.unread .notif-item-dot { visibility: visible; }
.notif-item-body { min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.notif-item-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-panel-foot { padding: 10px 16px; text-align: center; border-top: 1px solid var(--border); }
.notif-panel-foot a { font-size: 12.5px; font-weight: 600; color: var(--navy-700); text-decoration: none; }
.notifications-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

/* hero */
.hero {
  text-align: center; padding: 110px 20px 40px;
  background: radial-gradient(ellipse at top, var(--bg-alt) 0%, var(--bg) 65%);
  position: relative;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); color: var(--navy-700);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 24px; box-shadow: 0 1px 3px var(--shadow-sm);
}
.hero-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #5CE0A0; box-shadow: 0 0 6px #5CE0A0; }
.hero h1 {
  font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: var(--heading);
  letter-spacing: -0.03em; max-width: 800px; margin: 0 auto; line-height: 1.1;
}
.hero p { color: var(--muted); margin-top: 18px; font-size: 17px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.hero .cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 14px 30px; background: var(--navy-700); color: #fff; border-radius: 8px; text-decoration: none; font-weight: 500; letter-spacing: 0.01em; border: 1px solid transparent; box-shadow: none; transition: background 0.15s ease; }
.hero .cta.no-arrow::after { content: none; }
.hero .cta::after { content: '→'; transition: transform 0.15s ease; }
.hero .cta:hover { background: #34719f; transform: none; box-shadow: none; }
.hero .cta:hover::after { transform: translateX(3px); }
.hero-actions { display: flex; justify-content: center; gap: 8px; margin-top: 15px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 38px; }
.hero-stat span { display: block; font-size: 26px; font-weight: 700; color: var(--heading-accent); font-variant-numeric: tabular-nums; }
.hero-stat p { color: var(--muted); font-size: 12px; letter-spacing: 0.02em; font-weight: 600; margin-top: 4px; }
.cta-ghost { background: var(--surface); color: var(--navy-700); border-color: var(--border); box-shadow: none; }
.cta-ghost:hover { background: var(--bg-alt); box-shadow: none; }

/* section heading */
.section-heading {
  color: var(--heading);
  font-size: 18px;
  font-weight: 600;
  margin: 8px 32px 4px;
}
.panel-head h3.section-heading {
  margin: 8px 0 4px;
}

/* features */
.features { max-width: 1120px; margin: 25px auto 0; padding: 0 32px; text-align: center; }
.features h2 { font-size: 34px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.section-sub { color: var(--muted); margin-top: 12px; font-size: 15px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 48px; text-align: left; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 26px;
  position: relative; overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.feature-card::before, .feature-card::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-color: var(--blue-500);
  opacity: 0; transition: opacity 0.18s ease; pointer-events: none;
}
.feature-card::before { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; }
.feature-card::after { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; }
.feature-card:hover { box-shadow: 0 14px 32px var(--shadow-md); transform: translateY(-3px); border-color: var(--blue-500); }
.feature-card:hover::before, .feature-card:hover::after { opacity: 1; }
.feature-code {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em; color: var(--blue-500);
}
.feature-code span {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--navy-700), var(--blue-500));
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  letter-spacing: normal; text-transform: none;
}
.feature-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.feature-card h3 { margin-bottom: 8px; }

/* showcases */
.showcase-section { max-width: 1120px; margin: 0 auto; padding: 40px 32px 20px; }
.showcase-section h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.showcase-row { display: flex; align-items: center; gap: 60px; padding: 60px 0; border-bottom: 1px solid var(--border); }
.showcase-row:last-child { border-bottom: none; }
.showcase-row.reverse { flex-direction: row-reverse; }
.showcase-media { flex: 1 1 440px; }
.showcase-media img { width: 100%; display: block; border-radius: 14px; box-shadow: 0 14px 32px var(--shadow-md); }
.showcase-copy { flex: 1 1 380px; }
.showcase-copy h3 { font-size: 26px; font-weight: 800; color: var(--heading); letter-spacing: -0.01em; margin-bottom: 14px; }
.showcase-copy p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 18px; }
.showcase-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.showcase-points li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); font-weight: 500; }
.showcase-points li::before { content: '✓'; color: var(--navy-700); font-weight: 700; flex-shrink: 0; }

/* cta band */
.cta-band {
  text-align: center; margin: 120px auto 0; padding: 84px 32px;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-700));
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px) 0 0/26px 26px;
}
.cta-band h2 { color: #FFFFFF; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; position: relative; }
.cta-band p { color: var(--blue-200); margin-top: 12px; font-size: 15px; position: relative; }
.cta-band .cta {
  display: inline-block; margin-top: 26px; padding: 14px 30px; background: #FFFFFF; color: var(--navy-950);
  border-radius: 8px; text-decoration: none; font-weight: 700; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-band .cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }

/* footer */
.site-footer { background: var(--navy-950); padding: 64px 32px 24px; margin-top: 0; }
.footer-top { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand { color: #FFFFFF; font-weight: 800; font-size: 19px; }
.footer-brand p { color: #64758B; font-size: 13px; margin-top: 12px; max-width: 260px; line-height: 1.7; }
.footer-col h4 { color: #FFFFFF; font-size: 12px; margin-bottom: 16px; letter-spacing: 0.01em; font-weight: 600; }
.footer-col a { display: block; color: var(--blue-200); text-decoration: none; font-size: 14px; margin-bottom: 11px; transition: color 0.15s ease; }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom { max-width: 1120px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid #1F3650; color: #64758B; font-size: 13px; }

/* server select */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; padding: 32px; }
.server-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center;
  text-decoration: none; color: var(--text); position: relative; overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow-sm); transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  display: flex; flex-direction: column; align-items: center;
}
.server-card::before, .server-card::after {
  content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--blue-500); opacity: 0;
  transition: opacity 0.18s ease; pointer-events: none;
}
.server-card::before { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.server-card::after { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }
.server-card:hover { border-color: var(--blue-500); box-shadow: 0 10px 26px var(--shadow-md); transform: translateY(-2px); }
.server-card:hover::before, .server-card:hover::after { opacity: 1; }
.server-card img { width: 58px; height: 58px; border-radius: 50%; margin-bottom: 10px; border: 2px solid var(--border); }
.server-card span { font-weight: 500; font-size: 14px; }
.server-card.inactive { opacity: 0.55; }
.server-card.inactive:hover { border-color: var(--border); box-shadow: 0 1px 3px var(--shadow-sm); transform: none; }
.server-card.inactive:hover::before, .server-card.inactive:hover::after { opacity: 0; }
.server-card-skeleton { cursor: default; pointer-events: none; }
.server-card-skeleton:hover { transform: none; box-shadow: 0 1px 3px var(--shadow-sm); border-color: var(--border); }
.server-card-split { cursor: default; }
.server-card-split:hover { border-color: var(--border); box-shadow: 0 1px 3px var(--shadow-sm); transform: none; }
.server-card-split:hover::before, .server-card-split:hover::after { opacity: 0; }
.server-card-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 14px; }
.server-card-actions .btn-row-action { width: 100%; text-align: center; text-decoration: none; box-sizing: border-box; }
.btn-row-action-disabled { background: var(--bg-alt); color: var(--muted); cursor: not-allowed; pointer-events: none; border: 1px solid var(--border); }
.department-type-icon{width:58px;height:58px;border-radius:50%;margin:0 auto 10px;display:flex;align-items:center;justify-content:center;background:var(--bg-alt);color:var(--navy-700);}
.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:6px;}
.panel-head p{margin-top:4px;}
.view-toggle{display:flex;gap:6px;flex-shrink:0;}
.icon-btn.active{background:var(--navy-700);color:#fff;border-color:var(--navy-700);}
.subsection-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 14px;}
.subsection-head:first-of-type{margin-top:24px;}
.subsection-head h4{color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;}
.form-card .server-grid{padding:0;}
.view-hidden{display:none!important;}
.empty-state-icon-box{width:48px;height:48px;border-radius:12px;background:var(--bg-alt);color:var(--navy-700);display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-size:22px;}
.entity-actions-inline{display:flex;gap:8px;flex-shrink:0;}
.entity-actions-inline .btn-row-action,.entity-actions-inline .btn-row-action-secondary{padding:7px 14px;font-size:12px;}
.log-list.spread-rows li{justify-content:space-between;}
.identity-avatar-icon{width:28px;height:28px;border-radius:50%;flex-shrink:0;background:var(--bg-alt);color:var(--navy-700);display:flex;align-items:center;justify-content:center;font-size:16px;}
.department-type-icon{width:58px;height:58px;border-radius:50%;margin:0 auto 10px;display:flex;align-items:center;justify-content:center;background:var(--bg-alt);color:var(--navy-700);}
.dept-parent-row{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border);}
.dept-parent-row span{display:inline-flex;align-items:center;height:22px;line-height:normal;}
.dept-parent-row img{width:22px;height:22px;border-radius:50%;flex-shrink:0;object-fit:cover;margin:0;border:none;}

/* guild picker (forms) */
.forms-landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 700px; margin: 20px auto 80px; padding: 0 32px; }
.forms-landing-card { text-align: center; text-decoration: none; }
.guild-picker-grid { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 32px 20px; max-width: 900px; margin: 0 auto; }
.guild-picker-icon { display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); transition: transform 0.15s ease, border-color 0.15s ease; }
.guild-picker-icon:hover { transform: translateY(-2px); border-color: var(--blue-500); }
.guild-picker-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-picker-icon-disabled { opacity: 0.4; cursor: not-allowed; }
.guild-picker-icon-disabled:hover { transform: none; border-color: var(--border); }

/* guild header (staff) */
.guild-header { display: flex; align-items: center; gap: 16px; justify-content: center; }
.guild-header-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.guild-header-icon-fallback { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--muted); font-size: 24px; font-weight: 600; }
.guild-header-id { color: var(--muted); font-size: 13px; margin-top: 2px; }
.guild-header-description-wrap { margin-top: 18px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; max-width: 620px; }
.guild-header-description-label { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; }
.guild-header-description { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.guild-stats-grid { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 18px; justify-content: center; }
.guild-stat { display: flex; flex-direction: column; }
.guild-stat-value { font-size: 18px; font-weight: 600; }
.guild-stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* dashboard layout */
.dashboard-layout { display: flex; min-height: calc(100vh - 61px); }
.sidebar {
  width: 216px; flex-shrink: 0; align-self: flex-start;
  position: sticky; top: 61px; height: calc(100vh - 61px);
  overflow-x: hidden; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 8px 0 20px;
  scrollbar-width: thin; scrollbar-color: var(--blue-500) transparent;
  transition: width 0.2s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background-color: var(--blue-500); border-radius: 999px; }
.sidebar-head { margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sidebar-toggle, .sidebar-action {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 18px;
  background: transparent; color: var(--muted); border: none; border-radius: 0; box-shadow: none;
  font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.sidebar-toggle:hover, .sidebar-action:hover { background: var(--bg); color: var(--navy-700); transform: none; box-shadow: none; }
.sidebar-toggle .material-symbols-outlined, .sidebar-action .material-symbols-outlined { font-size: 19px; flex-shrink: 0; }
.sidebar-toggle .material-symbols-outlined { transition: transform 0.2s ease; }
.sidebar-action:disabled { background: transparent; color: var(--muted); opacity: 0.7; transform: none; box-shadow: none; }
.sidebar-action.is-cooling:disabled { cursor: not-allowed; }
.sidebar-action.is-refreshing:disabled { cursor: progress; color: var(--navy-700); opacity: 1; }
.sidebar-action.is-refreshing .material-symbols-outlined { animation: sidebar-spin 0.8s linear infinite; }
.sidebar-action-timer {
  display: none; position: absolute; top: 2px; left: 32px; min-width: 15px; height: 15px; padding: 0 4px;
  align-items: center; justify-content: center; border-radius: 999px;
  background: var(--navy-700); color: #fff; font-size: 9px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
@keyframes sidebar-spin { to { transform: rotate(360deg); } }
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 8px 18px; color: var(--muted); text-decoration: none;
  font-weight: 600; font-size: 13px; white-space: nowrap; border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sidebar a .material-symbols-outlined {
  font-size: 18px; flex-shrink: 0;
  color: var(--blue-200);
  transition: color 0.15s ease;
}
.sidebar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar a:hover { background: var(--bg); color: var(--navy-700); border-left-color: var(--blue-200); }
.sidebar a.active { background: var(--bg-alt); color: var(--navy-700); border-left-color: var(--navy-700); font-weight: 600; }
.sidebar a.active .material-symbols-outlined { color: var(--navy-700); }
.sidebar-section { margin-bottom: 10px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-section-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 5px 18px; background: transparent; color: var(--muted); border: none; border-radius: 0; box-shadow: none;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-section-label:hover { background: var(--bg); color: var(--navy-700); transform: none; box-shadow: none; }
.sidebar-section-label .material-symbols-outlined { font-size: 16px; transition: transform 0.2s ease; }
.sidebar-section.is-collapsed .sidebar-section-label .material-symbols-outlined { transform: rotate(-90deg); }
.sidebar-section-items { display: block; }
.sidebar-section.is-collapsed .sidebar-section-items { display: none; }
@media (min-width: 721px) {
  html.sidebar-collapsed .sidebar { width: 60px; }
  html.sidebar-collapsed .save-bar:not(.full-width) { left: 60px; }
  html.sidebar-collapsed .sidebar-label,
  html.sidebar-collapsed .sidebar a .count-badge { display: none; }
  html.sidebar-collapsed .sidebar a { justify-content: center; padding-left: 0; padding-right: 3px; }
  html.sidebar-collapsed .sidebar-toggle,
  html.sidebar-collapsed .sidebar-action { justify-content: center; padding-left: 0; padding-right: 0; }
  html.sidebar-collapsed .sidebar-toggle .material-symbols-outlined { transform: rotate(180deg); }
  html.sidebar-collapsed .sidebar-action.is-cooling .sidebar-action-timer { display: inline-flex; }
  html.sidebar-collapsed .sidebar-section-label { width: auto; height: 1px; margin: 6px 14px 8px; padding: 0; font-size: 0; background: var(--border); pointer-events: none; }
  html.sidebar-collapsed .sidebar-section-label .material-symbols-outlined { display: none; }
  html.sidebar-collapsed .sidebar-section.is-collapsed .sidebar-section-items { display: block; }
  html.sidebar-collapsed .sidebar-section:first-of-type .sidebar-section-label { display: none; }
}
.danger-zone {
  border: 1px solid #C0392B;
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.danger-zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.danger-zone-row:last-child { border-bottom: none; }
.danger-zone-row strong { display: block; color: var(--heading); font-size: 14px; margin-bottom: 4px; }
.danger-zone-row p { color: var(--muted); font-size: 12px; max-width: 420px; margin: 0; }
.dashboard-content { flex: 1; padding: 36px 40px 110px; }
.dashboard-content h2 { color: var(--heading); margin-bottom: 24px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.dashboard-content h3 { color: var(--heading); margin: 28px 0 14px; font-size: 16px; font-weight: 600; }
.permission-role-row { display: flex; align-items: center; gap: 10px; max-width: 620px; margin-bottom: 12px; }
.permission-role-row-select { flex: 1 1 260px; }
.permission-role-row-select .searchable-select { max-width: none; margin-bottom: 0; }
.permission-role-row select { max-width: 220px; margin-bottom: 0; }

/* ux: page intro pattern */
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page-intro-text h2 { margin-bottom: 4px; }
.page-intro-text p { color: var(--muted); font-size: 14px; margin: 0; }
.page-intro-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ux: sidebar/tab count badges */
.sidebar a .count-badge, .tabs a .count-badge, .admin-tabs a .count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--badge-muted-bg); color: var(--muted);
  font-size: 10px; font-weight: 700; margin-left: auto;
}
.tabs a.active .count-badge, .admin-tabs a.active .count-badge { background: rgba(255,255,255,0.25); color: #fff; }
.sidebar a.active .count-badge { background: var(--navy-700); color: #fff; }

/* stat cards */
.stat-grid { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; min-width: 150px;
  box-shadow: 0 1px 3px var(--shadow-sm); position: relative;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--shadow-md); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy-700), var(--blue-500)); border-radius: 12px 12px 0 0;
}
.stat-card span { font-size: 30px; font-weight: 700; color: var(--heading-accent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-card p { color: var(--muted); margin-top: 6px; font-size: 12px; letter-spacing: 0.02em; font-weight: 600; }

/* logs and badges */
.log-list { list-style: none; }
.log-list li {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; font-size: 14px; color: var(--text);
}
.log-list li strong { color: var(--heading); }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.badge-dashboard { background: var(--badge-dashboard-bg); color: var(--badge-dashboard-text); }
.badge-command { background: var(--badge-command-bg); color: var(--badge-command-text); }
.badge-moderation { background: var(--badge-moderation-bg); color: var(--badge-moderation-text); }
.badge-report { background: var(--badge-report-bg); color: var(--badge-report-text); }
.badge-appeal { background: var(--badge-appeal-bg); color: var(--badge-appeal-text); }
.badge-panel { background: var(--badge-panel-bg); color: var(--badge-panel-text); }
.audit-danger-icon { font-size: 16px; color: var(--badge-moderation-text); vertical-align: -3px; margin-right: 4px; }
.badge-muted { background: var(--badge-muted-bg); color: var(--muted); }
.badge-open, .badge-pending { background: var(--badge-report-bg); color: var(--badge-report-text); }
.badge-resolved, .badge-accepted { background: var(--badge-command-bg); color: var(--badge-command-text); }
.badge-dismissed, .badge-denied { background: var(--badge-muted-bg); color: var(--muted); }
.badge-shift-passed { background: var(--badge-command-bg); color: var(--badge-command-text); }
.badge-shift-failed { background: var(--badge-moderation-bg); color: var(--badge-moderation-text); }
.badge-shift-excused { background: var(--badge-appeal-bg); color: var(--badge-appeal-text); }

/* legacy toggle row */
.toggle-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text); font-weight: 500;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; max-width: 320px;
}
.toggle-row input { width: auto; margin: 0; }

/* tables */
table { width: 100%; border-collapse: collapse; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px var(--shadow-sm); }
th { text-align: left; padding: 12px 16px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); vertical-align: middle; }
td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr { transition: background 0.1s ease; }
tr:hover td { background: var(--bg); }
table .row-clickable { cursor: pointer; }
.dashboard-content table form { display: inline-flex; gap: 8px; }
.report-row-actions { display: inline-flex; gap: 8px; }

/* ux: empty states */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); grid-column: 1 / -1; }
.empty-state-icon { width: 40px; height: 40px; margin: 0 auto 14px; opacity: 0.5; }
.empty-state h4 { color: var(--heading); font-size: 15px; margin-bottom: 6px; }
.empty-state p { font-size: 13px; max-width: 320px; margin: 0 auto; }

/* ux: skeleton loading */
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.skeleton { background: var(--bg-alt); border-radius: 6px; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton-row { height: 44px; margin-bottom: 8px; border-radius: 8px; }

/* identity */
.identity-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.identity-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--bg-alt); }
.identity-avatar-fallback { display: inline-block; background: var(--border); }
.identity-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.identity-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.identity-id { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.muted-text { color: var(--muted); font-size: 13px; }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
  color: var(--muted); text-decoration: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface); transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  display: inline-flex; align-items: center;
}
.tabs a:hover { background: var(--bg-alt); color: var(--navy-700); border-color: var(--blue-200); }
.tabs a.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

/* forms and buttons */
input, button, select { font-family: 'Inter', sans-serif; }
input[type="text"], input[type="number"], input[type="color"], select, textarea {
  display: block; width: 100%; max-width: 340px; margin-bottom: 16px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px;
  line-height: 1.4; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(92,136,177,0.15); }
input:disabled, select:disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
textarea { resize: vertical; min-height: 70px; }
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  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 fill='%2364758B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
input[type="checkbox"]:checked {
  background: var(--navy-700);
  border-color: var(--navy-700);
}
input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
}
button {
  padding: 10px 20px; background: var(--navy-700); color: #fff; border: 1px solid transparent;
  border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 14px; letter-spacing: 0.01em; line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
button:hover { background: #34719f; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(44,95,135,0.3); }
button:active { transform: translateY(0); box-shadow: none; }
button:disabled { background: var(--blue-200); cursor: not-allowed; transform: none; box-shadow: none; }

/* ux: button loading state */
button.is-loading { color: transparent; position: relative; pointer-events: none; }
button.is-loading::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px;
  margin: -7px 0 0 -7px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  border-radius: 50%; animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ux: field grouping */
.field-group { margin-bottom: 24px; }
.field-group-title { color: var(--heading); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.field-hint { color: var(--muted); font-size: 12px; margin-top: -10px; margin-bottom: 16px; }

/* ux: info tooltip */
.info-tooltip { position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.info-tooltip:hover, .info-tooltip:focus-visible { color: var(--navy-700); }
.info-tooltip-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: 220px; background: var(--navy-950); color: #fff; font-size: 12px; font-weight: 500;
  line-height: 1.5; padding: 10px 12px; border-radius: 8px; box-shadow: 0 10px 24px var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20; text-transform: none; letter-spacing: normal;
}
.info-tooltip-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--navy-950);
}
.info-tooltip:hover .info-tooltip-bubble, .info-tooltip:focus-visible .info-tooltip-bubble {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

/* public form question rows */
.public-form label { margin-top: 4px; }
.question-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  max-width: 620px;
}
.question-row-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.question-row-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.question-row-fields select, .question-row-fields input[type="text"] { flex: 1 1 150px; margin-bottom: 0; max-width: none; }
.question-row-main input[type="text"] { margin-bottom: 0; max-width: none; }
.question-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.question-row input[type="text"], .question-row select { margin-bottom: 0; max-width: 200px; }
.q-required-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-transform: none; font-weight: 500; }

/* searchable select */
.permissions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 620px; margin-bottom: 24px; }
.searchable-select { position: relative; max-width: 320px; margin-bottom: 16px; }
.select-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px;
  color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; text-align: left; cursor: pointer;
  box-shadow: none; transition: border-color 0.15s ease;
}
.select-trigger:hover { border-color: var(--blue-500); transform: none; box-shadow: none; }
.select-trigger-arrow { color: var(--muted); font-size: 11px; }
.select-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 15;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 28px var(--shadow-lg); padding: 10px; max-width: 320px;
}
.select-search {
  width: 100%; margin-bottom: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--text);
}
.select-options { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.select-option {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: transparent;
  border: none; border-radius: 6px; color: var(--text); font-size: 13px; font-weight: 500; text-align: left;
  cursor: pointer; box-shadow: none; transition: background 0.12s ease;
}
.select-option:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.select-option.selected { background: var(--bg-alt); color: var(--navy-700); }
.select-option span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-check { color: var(--navy-700); font-weight: 700; }
.select-role-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.select-channel-hash { color: var(--muted); font-weight: 700; flex-shrink: 0; }
.select-empty { color: var(--muted); font-size: 13px; padding: 10px; text-align: center; }

/* owner transfer + regenerate action */
.btn-owner-transfer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-regenerate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #B7791F;
  border: 1px solid #B7791F;
  box-shadow: none;
}
.btn-regenerate:hover {
  background: var(--badge-report-bg);
  box-shadow: none;
  transform: none;
}
.btn-regenerate .material-symbols-outlined { font-size: 16px; }

/* setup card */
.setup-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 44px;
  box-shadow: 0 1px 3px var(--shadow-sm);
}
.setup-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--navy-700);
  font-size: 24px;
}
.setup-card h2 { color: var(--heading); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.setup-card p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 6px; max-width: 360px; margin-left: auto; margin-right: auto; }
.setup-card .cta { margin-top: 20px; }
.setup-card-note { margin-top: 18px; font-size: 13px; }

/* auth */
.auth-page-body { min-height: 100vh; margin: 0; }
.auth-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; padding: 40px 20px; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; max-width: 420px; text-align: center; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--heading); text-decoration: none; margin-bottom: 48px; }
.auth-logo img { width: 26px; height: 26px; border-radius: 7px; }
.auth-panel h1 { font-size: 28px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.auth-panel p.auth-sub { color: var(--muted); margin-top: 10px; font-size: 14px; }
.auth-discord-btn { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 20px; background: #5865F2; color: #fff; border-radius: 9px; font-weight: 600; font-size: 15px; text-decoration: none; transition: background 0.15s ease, transform 0.15s ease; }
.auth-discord-btn img { display: block; flex-shrink: 0; width: 24px; height: 18px; }
.auth-discord-btn:hover { background: #4a55d6; transform: translateY(-1px); }
.auth-legal { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.auth-legal a { color: var(--navy-700); font-weight: 600; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }
.auth-toggle-row { margin-top: 22px; margin-bottom: 0; display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth-toggle-label { font-size: 13px; font-weight: 500; color: var(--text); }
.auth-learn-more { margin-top: 30px; font-size: 13px; color: var(--muted); }
.auth-learn-more a { color: var(--navy-700); font-weight: 600; text-decoration: none; }
.plus-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--plus-bg); border: 1px solid var(--plus-border); text-decoration: none; color: var(--plus-accent-strong); font-size: 12.5px; font-weight: 600; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.plus-chip:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(150,105,30,0.22); border-color: var(--plus-accent); }
.plus-chip-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--plus-accent), var(--plus-accent-strong)); color: #fff; flex-shrink: 0; }
.plus-chip-icon .material-symbols-outlined { font-size: 14px; }
.auth-plus-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--navy-700); font-size: 13px; font-weight: 600; text-decoration: none; }
.auth-plus-link .material-symbols-outlined { font-size: 16px; color: var(--blue-500); }
.auth-plus-link:hover { text-decoration: underline; }
.auth-discord-btn img { display: block; }
@media (max-width: 480px) {
  .auth-shell { padding: 24px 16px; }
}

/* plus page */
.hero-tag-plus { color: var(--plus-accent-strong); border-color: var(--plus-border); background: var(--plus-bg); }
.hero-tag-plus::before { background: var(--plus-accent); box-shadow: 0 0 6px var(--plus-accent); }
.hero .cta.cta-plus { background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); }
.hero .cta.cta-plus:hover { background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); filter: brightness(1.08); box-shadow: 0 6px 18px rgba(44,95,135,0.35); }
.feature-code-plus span { background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); }
.plus-early-banner { display: flex; align-items: center; gap: 14px; max-width: 640px; margin: 0 auto 36px; padding: 16px 20px; background: var(--plus-bg); border: 1px solid var(--plus-border); border-radius: 12px; text-align: left; }
.plus-early-banner-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--plus-accent-strong); flex-shrink: 0; }
.plus-early-banner p { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.6; }
.plus-early-banner p strong { color: var(--heading); }
.plus-early-banner a { color: var(--navy-700); font-weight: 700; text-decoration: none; }
.plus-early-banner a:hover { text-decoration: underline; }
.plus-pricing { max-width: 920px; margin: 0 auto; padding: 40px 32px 10px; }
.plus-pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 30px; display: flex; flex-direction: column; position: relative; box-shadow: 0 1px 3px var(--shadow-sm); }
.pricing-card-plus { border-color: var(--plus-accent); box-shadow: 0 14px 32px var(--shadow-md); background: var(--plus-bg); }
.pricing-card-badge { position: absolute; top: -12px; right: 28px; background: var(--plus-accent-strong); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; box-shadow: 0 4px 12px var(--shadow-md); }
.pricing-card-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pricing-card-plus .pricing-card-label { color: var(--plus-accent-strong); }
.pricing-card-price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.pricing-card-amount { font-size: 28px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.pricing-card-period { color: var(--muted); font-size: 13px; font-weight: 600; }
.pricing-card-desc { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 22px; }
.pricing-feature-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; flex: 1; }
.pricing-feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text); font-weight: 500; line-height: 1.5; }
.pricing-feature-list li .material-symbols-outlined { font-size: 17px; color: var(--navy-700); flex-shrink: 0; margin-top: 1px; }
.pricing-card-plus .pricing-feature-list li .material-symbols-outlined { color: var(--plus-accent-strong); }
.plus-compare-wrap { max-width: 760px; margin: 0 auto; }
.plus-compare th, .plus-compare td { text-align: center; }
.plus-compare th:first-child, .plus-compare td:first-child { text-align: left; color: var(--muted); font-weight: 600; }
.plus-compare th.plus-col { border-top: 3px solid var(--plus-accent); color: var(--plus-accent-strong); }
.plus-compare td.plus-col { background: var(--plus-bg); }
.plus-compare-check { color: var(--navy-700); font-size: 18px; }
.plus-compare-dash { color: var(--muted); opacity: 0.4; font-size: 18px; }
.plus-compare-limit { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.plus-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 48px; text-align: left; }
.plus-feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; position: relative; overflow: hidden; transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease; }
.plus-feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--plus-accent), var(--plus-accent-strong)); }
.plus-feature-card:hover { box-shadow: 0 14px 32px var(--shadow-md); transform: translateY(-3px); border-color: var(--plus-accent); }
.plus-feature-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--plus-bg); border: 1px solid var(--plus-border); color: var(--plus-accent-strong); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.plus-feature-card h3 { font-size: 16px; font-weight: 700; color: var(--heading); margin-bottom: 8px; letter-spacing: -0.005em; }
.plus-feature-card p { color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.pricing-card-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 12px 20px; border-radius: 8px; font-weight: 700; font-size: 14px; letter-spacing: 0.01em; text-decoration: none; transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.pricing-card-btn-free { background: var(--bg-alt); color: var(--navy-700); border: 1px solid var(--border); }
.pricing-card-btn-free:hover { background: var(--border); }
.pricing-card-btn-plus { background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); color: #fff; border: 1px solid transparent; box-shadow: 0 4px 14px rgba(44,95,135,0.35); }
.pricing-card-btn-plus:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(44,95,135,0.4); }
.cta-band-plus { background: linear-gradient(135deg, var(--navy-950), var(--navy-700)); }
.cta-band-plus p { color: var(--blue-200); }
@media (max-width: 700px) {
  .plus-pricing-grid { grid-template-columns: 1fr; }
}

/* error */
.error-page { min-height: calc(100vh - 61px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(ellipse at top, var(--bg-alt) 0%, var(--bg) 65%); }
.error-card { max-width: 560px; width: 100%; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 48px 44px; box-shadow: 0 1px 3px var(--shadow-sm); }
.error-card-icon { width: 56px; height: 56px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--badge-moderation-bg); color: var(--badge-moderation-text); font-size: 24px; }
.error-card h1 { color: var(--heading); font-size: 22px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.01em; }
.error-card p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 6px; max-width: 400px; margin-left: auto; margin-right: auto; }
.error-card-code { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 5px 12px; border-radius: 999px; background: var(--badge-muted-bg); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.error-card-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.error-details { text-align: left; margin-top: 28px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.error-details summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; font-weight: 600; font-size: 13px; color: var(--text); user-select: none; }
.error-details summary::-webkit-details-marker { display: none; }
.error-details summary::after { content: '▾'; color: var(--muted); font-size: 11px; transition: transform 0.15s ease; }
.error-details[open] summary::after { transform: rotate(180deg); }
.error-details summary:hover { background: var(--border); }
.error-details-body { padding: 0 16px 16px; }
.error-details-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.error-details-row:last-of-type { border-bottom: none; }
.error-details-row span:first-child { color: var(--muted); font-weight: 600; }
.error-details-row span:last-child { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; word-break: break-all; }
.error-traceback { margin-top: 12px; background: var(--navy-950); color: #E7EEF5; border-radius: 8px; padding: 14px 16px; font-size: 12px; line-height: 1.6; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-family: 'SFMono-Regular', Consolas, monospace; }
.error-copy-btn { font-size: 12px; padding: 7px 14px; margin-top: 12px; }
.error-copy-btn.copied { color: #2E8B57; border-color: #2E8B57; }

/* legal and changelog */
.page-header {
  text-align: center; padding: 90px 20px 50px;
  background: radial-gradient(ellipse at top, var(--bg-alt) 0%, var(--bg) 65%);
}
.page-header h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; color: var(--heading); letter-spacing: -0.02em; margin-top: 18px; }
.page-header p { color: var(--muted); margin-top: 14px; font-size: 16px; }
.legal-wrap { max-width: 760px; margin: 56px auto 110px; padding: 0 32px; }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 44px 48px; box-shadow: 0 1px 3px var(--shadow-sm); }
.legal-updated { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.02em; font-weight: 600; margin-bottom: 28px; }
.legal-card h2 { color: var(--heading); font-size: 19px; font-weight: 700; margin: 30px 0 12px; }
.legal-card h2:first-of-type { margin-top: 0; }
.legal-card p { color: var(--text); font-size: 15px; line-height: 1.75; margin-bottom: 14px; }
.legal-card ul { margin: 0 0 14px 20px; color: var(--text); font-size: 15px; line-height: 1.75; }
.changelog-entry { position: relative; padding: 0 0 36px 28px; border-left: 2px solid var(--border); font-size: 15px; color: var(--text); line-height: 1.7; }
.changelog-entry:last-child { border-left-color: transparent; padding-bottom: 0; }
.changelog-entry::before { content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy-700); box-shadow: 0 0 0 4px var(--bg-alt); }
.changelog-version { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.changelog-version .v { font-weight: 700; color: var(--heading); font-size: 16px; font-variant-numeric: tabular-nums; }
.changelog-version .date { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.changelog-tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 8px; }
.changelog-tag-added { background: #EAF6EE; color: #2E8B57; }
.changelog-tag-fixed { background: #FFF6E0; color: #B7791F; }
.changelog-tag-changed { background: #E4EDF5; color: var(--navy-700); }
.changelog-entry ul { margin: 10px 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.9; }

/* settings page */
.settings-card { margin-bottom: 24px; }
.settings-card h2 { color: var(--heading); font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.settings-card h3 {
  color: var(--heading);
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 12px;
}
.theme-option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 18px; }
.theme-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 14px;
  background: var(--bg-alt); border: 2px solid var(--border); border-radius: 12px; cursor: pointer;
  font-weight: 600; color: var(--text); font-size: 13px; position: relative; box-shadow: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-card:hover { transform: translateY(-2px); box-shadow: none; }
.theme-card.active { border-color: var(--navy-700); }
.theme-card .theme-check { position: absolute; top: 8px; right: 10px; color: var(--navy-700); opacity: 0; font-size: 13px; }
.theme-card.active .theme-check { opacity: 1; }
.theme-card-swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); }
.theme-swatch-light { background: #F6F9FC; }
.theme-swatch-elbify { background: linear-gradient(135deg, #EAF1F8, #5C88B1); }
.theme-swatch-dark { background: #0C1620; }

.settings-toggle { max-width: 100%; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.settings-toggle .switch { margin-top: 2px; }
.settings-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.settings-toggle-text strong { color: var(--text); font-size: 14px; }
.settings-toggle-text small { color: var(--muted); font-size: 12px; }

.settings-layout { display: flex; gap: 28px; max-width: 980px; margin: 40px auto 100px; padding: 0 32px; align-items: flex-start; }
.settings-sidebar { width: 220px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; position: sticky; top: 80px; transition: width 0.2s ease; }
.settings-sidebar.collapsed { width: 56px; padding: 14px 8px; }
.settings-sidebar-collapse { display: flex; align-items: center; justify-content: center; width: 100%; padding: 6px; margin-bottom: 8px; background: transparent; color: var(--muted); border: none; box-shadow: none; }
.settings-sidebar-collapse:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.settings-sidebar.collapsed .settings-sidebar-collapse .material-symbols-outlined { transform: rotate(180deg); }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: transparent; border: none; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: left; cursor: pointer; box-shadow: none; transition: background 0.15s ease, color 0.15s ease; }
.settings-nav-item .material-symbols-outlined { font-size: 19px; flex-shrink: 0; }
.settings-nav-item:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.settings-nav-item.active { background: var(--bg-alt); color: var(--navy-700); }
.settings-sidebar.collapsed .settings-nav-label { display: none; }
.settings-sidebar.collapsed .settings-nav-item { justify-content: center; }
.settings-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-panel .settings-card { margin-bottom: 20px; }
.settings-panel .settings-card:last-child { margin-bottom: 0; }
.linked-account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
.linked-account-row:last-child { margin-bottom: 0; }
.linked-account-actions { display: flex; gap: 8px; flex-shrink: 0; }
.linked-account-empty { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px; background: var(--bg-alt); border: 1px dashed var(--border); border-radius: 8px; }
.select-trigger-guild { display: flex; align-items: center; gap: 10px; min-width: 0; }
.select-guild-icon { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-alt); }
.select-guild-icon-fallback { display: inline-block; background: var(--border); }
.select-option-guild { display: flex; align-items: center; gap: 10px; }
.select-option-guild-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.select-option-member { display: flex; align-items: center; gap: 10px; }
.select-member-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-alt); }
.select-trigger-member { display: flex; align-items: center; gap: 10px; min-width: 0; }

.datetime-picker { position: relative; max-width: 340px; margin-bottom: 16px; }
.datetime-trigger { width: 100%; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; box-shadow: none; transition: border-color 0.15s ease; }
.datetime-trigger:hover { border-color: var(--blue-500); transform: none; box-shadow: none; }
.datetime-trigger .material-symbols-outlined { font-size: 18px; color: var(--muted); }
.datetime-trigger-label { flex: 1; }
.datetime-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 32px var(--shadow-lg); overflow: hidden; }
.datetime-panel-body { display: flex; }
.datetime-calendar { flex: 1 1 190px; padding: 14px; border-right: 1px solid var(--border); position: relative; }
.datetime-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.datetime-month-toggle { display: flex; align-items: center; gap: 6px; background: transparent; color: var(--heading); font-weight: 700; font-size: 13px; border: none; padding: 4px 6px; box-shadow: none; }
.datetime-month-toggle:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.datetime-month-arrow { font-size: 10px; color: var(--muted); }
.datetime-nav { display: flex; gap: 4px; }
.datetime-nav-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; box-shadow: none; }
.datetime-nav-btn:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.datetime-nav-btn .material-symbols-outlined { font-size: 16px; }
.datetime-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.datetime-weekdays span { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.datetime-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.datetime-day { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: transparent; border: none; border-radius: 6px; color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; box-shadow: none; }
.datetime-day:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.datetime-day.outside { color: var(--muted); opacity: 0.5; }
.datetime-day.today { color: var(--navy-700); font-weight: 700; }
.datetime-day.selected { background: var(--navy-700); color: #fff; }
.datetime-day.selected:hover { background: var(--navy-700); }
.datetime-time { flex: 0 0 90px; display: flex; border-left: 1px solid var(--border); }
.datetime-time-col { flex: 1; max-height: 232px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--blue-500) transparent; }
.datetime-time-col::-webkit-scrollbar { width: 6px; }
.datetime-time-col::-webkit-scrollbar-track { background: transparent; }
.datetime-time-col::-webkit-scrollbar-thumb { background-color: var(--blue-500); border-radius: 999px; }
.datetime-time-option { display: flex; align-items: center; justify-content: center; width: 100%; padding: 8px 0; background: transparent; border: none; color: var(--text); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; box-shadow: none; }
.datetime-time-option:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.datetime-time-option.selected { background: var(--navy-700); color: #fff; border-radius: 6px; }
.datetime-panel-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border); }
.datetime-clear, .datetime-today { background: transparent; color: var(--navy-700); font-size: 12.5px; font-weight: 600; border: none; padding: 4px 6px; box-shadow: none; }
.datetime-clear { color: var(--muted); }
.datetime-clear:hover, .datetime-today:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.datetime-month-panel { position: absolute; inset: 14px; background: var(--surface); border-radius: 8px; z-index: 5; }
.datetime-month-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.datetime-month-panel-head button { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; box-shadow: none; }
.datetime-month-panel-head button:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.datetime-year-label { font-size: 13px; font-weight: 700; color: var(--heading); }
.datetime-month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.datetime-month-option { padding: 8px 0; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: none; }
.datetime-month-option:hover { border-color: var(--blue-500); transform: none; box-shadow: none; }
.datetime-month-option.selected { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
@media (max-width: 760px) {
  .settings-layout { flex-direction: column; padding: 0 20px; }
  .settings-sidebar { width: 100%; position: static; }
  .settings-sidebar.collapsed { width: 100%; }
  .settings-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .settings-nav-item { flex-shrink: 0; }
  .datetime-panel { width: 280px; }
  .datetime-panel-body { flex-direction: column; }
  .datetime-calendar { border-right: none; border-bottom: 1px solid var(--border); }
  .datetime-time { border-left: none; flex-direction: row; }
}

/* profiles */
.profile-menu, .notif-panel {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(.2,.8,.2,1);
}
.profile-menu.open, .notif-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.wizard-wrap { max-width: 780px; margin: 40px auto 100px; padding: 0 32px; }
.wizard-progress { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 32px; flex-wrap: wrap; }
.wizard-dot {
  flex: 1 1 0; min-width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; color: var(--muted); border: none; box-shadow: none; font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 4px 2px;
}
.wizard-dot span {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); border: 2px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.wizard-dot.completed span { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.wizard-dot.active span { border-color: var(--navy-700); color: var(--navy-700); background: var(--surface); }
.wizard-dot.active { color: var(--navy-700); }
.wizard-panels { position: relative; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
@keyframes wizard-in-forward { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes wizard-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }
.wizard-step.anim-forward { animation: wizard-in-forward 0.3s cubic-bezier(.2,.8,.2,1); }
.wizard-step.anim-back { animation: wizard-in-back 0.3s cubic-bezier(.2,.8,.2,1); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 28px; }
.wizard-back { background: transparent; color: var(--navy-700); border: 1px solid var(--border); box-shadow: none; }
.wizard-back:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.wizard-back:disabled { opacity: 0.4; cursor: not-allowed; }

.upload-row { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.upload-dropzone {
  position: relative; width: 220px; height: 100px; border-radius: 10px; border: 2px dashed var(--border);
  background: var(--bg-alt); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; overflow: hidden;
  transition: border-color 0.15s ease;
}
.upload-dropzone:hover { border-color: var(--blue-500); }
.upload-dropzone img { width: 100%; height: 100%; object-fit: cover; }
.upload-dropzone-round { width: 100px; height: 100px; border-radius: 50%; }
.upload-dropzone.is-loading { opacity: 0.6; pointer-events: none; }

.profiles-wrap { max-width: 1120px; margin: 40px auto 100px; padding: 0 32px; }
.profiles-search { display: flex; gap: 10px; max-width: 420px; margin: 0 auto 32px; }
.profiles-search input { margin-bottom: 0; max-width: none; }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.profile-card {
  display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.profile-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px var(--shadow-md); border-color: var(--blue-500); }
.profile-card-banner { height: 70px; background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); background-size: cover; background-position: center; }
.profile-card-avatar-wrap { margin-top: -28px; padding-left: 16px; }
.profile-card-avatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--surface); object-fit: cover; background: var(--bg-alt); }
.profile-card-avatar-fallback { display: inline-block; background: var(--border); }
.profile-card-body { padding: 10px 16px 16px; }
.profile-card-name { display: block; font-weight: 700; color: var(--heading); font-size: 15px; }
.profile-card-handle { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; margin-bottom: 8px; }
.profile-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.profile-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; background: var(--badge-dashboard-bg); color: var(--badge-dashboard-text);
}
.profile-tag-staff { background: var(--badge-appeal-bg); color: var(--badge-appeal-text); }
.profile-tag-staff .material-symbols-outlined { font-size: 12px; }
.profile-card-stats { display: flex; gap: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.profile-card-stats span { display: flex; align-items: center; gap: 4px; }
.profile-card-stats .material-symbols-outlined { font-size: 15px; }
.profiles-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; }

.profile-page { max-width: 940px; margin: 0 auto 100px; }
.profile-banner { height: 220px; background: linear-gradient(135deg, var(--navy-950), var(--navy-700)); background-size: cover; background-position: center; border-radius: 0 0 18px 18px; }
.profile-header { display: flex; align-items: flex-end; gap: 20px; padding: 0 32px; margin-top: -48px; flex-wrap: wrap; }
.profile-header-avatar-wrap { flex-shrink: 0; }
.profile-header-avatar { width: 108px; height: 108px; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; background: var(--bg-alt); }
.profile-header-avatar-fallback { display: inline-block; background: var(--border); }
.profile-header-info { flex: 1; min-width: 200px; padding-bottom: 8px; }
.profile-header-info h1 { font-size: 24px; font-weight: 800; color: var(--heading); letter-spacing: -0.01em; }
.profile-header-handle { color: var(--muted); font-size: 13px; font-weight: 600; }
.profile-tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.profile-header-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.profile-like-btn {
  display: flex; align-items: center; gap: 6px; background: var(--surface); color: var(--muted); border: 1px solid var(--border);
  box-shadow: none; font-weight: 700;
}
.profile-like-btn:hover { background: var(--bg-alt); transform: none; box-shadow: none; }
.profile-like-btn.liked { color: #C0392B; border-color: #C0392B; background: var(--badge-moderation-bg); }
.profile-like-btn .material-symbols-outlined { font-size: 18px; }
.profile-like-static { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13px; }
.profile-like-static .material-symbols-outlined { font-size: 18px; }
.profile-body { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding: 32px; align-items: start; }
.profile-side { position: sticky; top: 90px; }
@media (max-width: 800px) {
  .profile-body { grid-template-columns: 1fr; }
  .profile-side { position: static; }
}

/* portal */
.portal-shell { display: flex; min-height: calc(100vh - 61px); }
.portal-sidebar { width: 240px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 0; display: flex; flex-direction: column; }
.portal-sidebar-dept { display: flex; align-items: center; gap: 12px; padding: 0 20px 22px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.portal-dept-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 16px; flex-shrink: 0; background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); }
.portal-dept-name { display: block; font-weight: 700; color: var(--heading); font-size: 14px; }
.portal-dept-type { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.portal-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.portal-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 24px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-left: 3px solid transparent; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.portal-nav-item .material-symbols-outlined { font-size: 19px; color: var(--blue-200); transition: color 0.15s ease; }
.portal-nav-item:hover { background: var(--bg); color: var(--navy-700); border-left-color: var(--blue-200); }
.portal-nav-item.active { background: var(--bg-alt); color: var(--navy-700); border-left-color: var(--navy-700); }
.portal-nav-item.active .material-symbols-outlined { color: var(--navy-700); }
.portal-nav-back { display: flex; align-items: center; gap: 10px; padding: 12px 24px; margin-top: auto; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; border-top: 1px solid var(--border); padding-top: 18px; }
.portal-nav-back:hover { color: var(--navy-700); }
.portal-content { flex: 1; padding: 36px 40px 80px; }

.shout-composer { display: flex; flex-direction: column; gap: 12px; }
.shout-composer-head input { max-width: none; margin-bottom: 0; font-weight: 600; }
.shout-composer textarea { max-width: none; min-height: 90px; margin-bottom: 0; }
.shout-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.shout-composer-options { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shout-composer-options .searchable-select { margin-bottom: 0; max-width: 200px; }
.btn-apply-all-active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

.shout-feed { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.shout-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px var(--shadow-sm); }
.shout-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.shout-card-title { color: var(--heading); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.shout-card-body { color: var(--text); font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.shout-card-pings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.roster-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; }
.roster-column { flex: 0 0 260px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.roster-column-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 3px solid var(--navy-700); border-radius: 12px 12px 0 0; background: var(--surface); }
.roster-column-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.roster-column-title { font-weight: 700; color: var(--heading); font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-column-count { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--badge-muted-bg); padding: 2px 8px; border-radius: 999px; }
.roster-column-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; transition: background 0.15s ease; }
.roster-column-body.drag-over { background: rgba(92,136,177,0.12); border-radius: 0 0 10px 10px; }
.roster-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: grab; transition: box-shadow 0.15s ease, opacity 0.15s ease; }
.roster-card:active { cursor: grabbing; }
.roster-card.dragging { opacity: 0.4; }
.roster-card:hover { box-shadow: 0 4px 12px var(--shadow-sm); }
.roster-card { transition: box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease; }
.roster-card-draggable { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; }
.roster-card-draggable:active { cursor: grabbing; }
.roster-card.drag-source { opacity: 0.35; }
.roster-card.drop-in { animation: roster-drop-in 0.28s cubic-bezier(.2,.8,.2,1); }
@keyframes roster-drop-in {
  from { opacity: 0; transform: scale(0.92) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.roster-column-body.drag-over { box-shadow: inset 0 0 0 2px var(--blue-500); border-radius: 0 0 10px 10px; }
.roster-card-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 16px 32px var(--shadow-lg);
  will-change: transform;
  opacity: 0.97;
}
@media (prefers-reduced-motion: reduce) {
  .roster-card.drop-in { animation: none; }
}
.roster-card .identity-text { flex: 1; min-width: 0; }
.roster-card .roster-remove-btn { flex-shrink: 0; }

.rank-list-card { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: grab; background: var(--surface); transition: opacity 0.15s ease; user-select: none; -webkit-user-drag: none; touch-action: none }
.rank-row:last-child { border-bottom: none; }
.rank-row.dragging { opacity: 0.4; }
.rank-drag-handle { color: var(--muted); font-size: 18px; cursor: grab; }
.rank-row-name { font-weight: 600; color: var(--text); flex: 1; }
.rank-row-actions { display: flex; gap: 6px; cursor: default }
.rank-color-grid { display: flex; gap: 8px; margin-bottom: 16px; }
.rank-color-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: none; }
.rank-color-swatch:hover { transform: scale(1.1); box-shadow: none; }
.rank-color-swatch.selected { border-color: var(--heading); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy-700); }
.rank-row-source { opacity: 0.35; }
.rank-row-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 16px 32px var(--shadow-lg);
  will-change: transform;
  opacity: 0.97;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.rank-drag-handle:active { cursor: grabbing; }

.department-owner-select { max-width: 340px; }

/* admin panel */
.admin-panel { padding: 36px 40px 60px; max-width: 1000px; margin: 0 auto; }
.admin-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-panel-header h2 { color: var(--heading); font-size: 24px; font-weight: 700; }
.admin-panel-header-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.admin-panel-header .badge { flex-shrink: 0; white-space: nowrap; }
.admin-back-link { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; transition: color 0.15s ease; }
.admin-back-link:hover { color: var(--navy-700); }
.admin-tabs a.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.admin-tabpanel .log-list .native-time { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.admin-panel-section h3 { color: var(--heading); margin: 20px 0 14px; font-size: 16px; font-weight: 600; }
.admin-locked { color: var(--muted); font-size: 14px; padding: 20px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.section-note { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.session-alert-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.roblox-search { position: relative; max-width: 340px; margin-bottom: 16px; }
.roblox-search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 28px var(--shadow-lg); max-height: 200px; overflow-y: auto; z-index: 10; }
.roblox-search-results:empty { display: none; }
.roblox-result-option { gap: 10px; }
.roblox-result-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--bg-alt); }
.roblox-result-avatar-fallback { display: inline-block; background: var(--border); }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 20px 0 14px; position: sticky; top: 61px; background: var(--bg); z-index: 5; padding-top: 4px; }
.section-toolbar h3 { margin: 0; }
.section-toolbar .table-search { max-width: 240px; margin-bottom: 0; }
.admin-block, .stat-card { scroll-margin-top: 90px; }
.admin-quicknav { margin-bottom: 22px; }
.admin-quicknav a .count-badge { background: var(--badge-muted-bg); color: var(--muted); }
.admin-quicknav a.has-alert .count-badge { background: var(--badge-moderation-bg); color: var(--badge-moderation-text); }
.stat-card.stat-card-alert::before { background: linear-gradient(90deg, #C0392B, #E3B463); }
.stat-card.stat-card-alert span { color: #C0392B; }
@keyframes panel-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: panel-fade-in 0.2s ease; }
.admin-callouts-urgent { border-color: #C0392B; box-shadow: 0 0 0 1px rgba(192,57,43,0.15); }

/* admin callouts */
.admin-callout-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.admin-callout-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* guild lookup (staff) */
.guild-lookup-center { text-align: center; }
.guild-lookup-center .roblox-search { margin: 0 auto; text-align: left; }
.roblox-search-results a.roblox-result-option { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.roblox-search-results:not(:empty) { display: block; }

/* custom scrollbars */
.select-options, .roblox-search-results, .modal-box {
  scrollbar-width: thin;
  scrollbar-color: var(--blue-500) transparent;
}
.select-options::-webkit-scrollbar, .roblox-search-results::-webkit-scrollbar, .modal-box::-webkit-scrollbar {
  width: 8px;
}
.select-options::-webkit-scrollbar-track, .roblox-search-results::-webkit-scrollbar-track, .modal-box::-webkit-scrollbar-track {
  background: transparent;
}
.select-options::-webkit-scrollbar-thumb, .roblox-search-results::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb {
  background-color: var(--blue-500);
  border-radius: 999px;
  border: 2px solid var(--surface);
}
.select-options::-webkit-scrollbar-thumb:hover, .roblox-search-results::-webkit-scrollbar-thumb:hover, .modal-box::-webkit-scrollbar-thumb:hover {
  background-color: var(--navy-700);
}

/* custom number stepper */
.number-stepper { position: relative; max-width: 340px; margin-bottom: 16px; }
.number-stepper input[type="number"] { margin-bottom: 0; padding-right: 36px; }
.number-stepper input[type="number"]::-webkit-outer-spin-button,
.number-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.number-stepper input[type="number"] { -moz-appearance: textfield; }
.number-stepper-controls {
  position: absolute; top: 1px; right: 1px; bottom: 1px;
  display: flex; flex-direction: column; width: 28px;
  border-left: 1px solid var(--border); border-radius: 0 7px 7px 0; overflow: hidden;
}
.number-stepper-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0; background: var(--bg); color: var(--muted); border: none;
  box-shadow: none; border-radius: 0; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.number-stepper-btn:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.number-stepper-btn:active { transform: none; box-shadow: none; }
.number-stepper-up { border-bottom: 1px solid var(--border); }

/* shifts */
.shift-status-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin-bottom: 24px; box-shadow: 0 1px 3px var(--shadow-sm); }
.shift-status-left { display: flex; align-items: center; gap: 14px; }
.shift-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.shift-status-dot.active { background: #2E8B57; box-shadow: 0 0 0 4px rgba(46,139,87,0.18); }
.shift-status-dot.break { background: #B7791F; box-shadow: 0 0 0 4px rgba(183,121,31,0.18); }
.shift-status-title { color: var(--heading); font-weight: 600; font-size: 15px; }
.shift-status-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.shift-status-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.shift-progress-bar { height: 8px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; margin: 10px 0 6px; }
.shift-progress-fill { height: 100%; background: linear-gradient(90deg, var(--navy-700), var(--blue-500)); border-radius: 999px; transition: width 0.3s ease; }
.shift-progress-fill.behind { background: linear-gradient(90deg, #C0392B, #E3B463); }
.shift-leaderboard-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-alt); color: var(--muted); font-weight: 700; font-size: 11px; flex-shrink: 0; }
.shift-leaderboard-rank.gold { background: #F6D06B; color: #6B4E00; }
.shift-leaderboard-rank.silver { background: #D8DEE6; color: #3B4450; }
.shift-leaderboard-rank.bronze { background: #E3B463; color: #5A3A0E; }
.shift-types-section { margin-top: 2rem; }
.shift-types-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shift-types-header h3 { margin: 0; }
.shift-types-count { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--badge-muted-bg); padding: 3px 10px; border-radius: 999px; }
.shift-types-hint { color: var(--muted); font-size: 12px; margin: 4px 0 14px; }
.shift-types-card { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px var(--shadow-sm); overflow: hidden; }
#shift-types-list { display: flex; flex-direction: column; }
.shift-type-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.shift-type-row:last-child { border-bottom: none; }
.shift-type-name { font-size: 14px; font-weight: 600; color: var(--text); }
.shift-type-actions { display: flex; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; box-shadow: none; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.icon-btn:hover { background: var(--bg-alt); color: var(--navy-700); transform: none; box-shadow: none; }
.icon-btn-delete:hover { color: #C0392B; border-color: #C0392B; background: var(--badge-moderation-bg); }
.shift-types-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.add-shift-type-btn { margin-top: 10px; background: transparent; color: var(--navy-700); border: 1px dashed var(--blue-500); box-shadow: none; }
.add-shift-type-btn:hover { background: var(--bg-alt); box-shadow: none; transform: none; }
.add-shift-type-btn:disabled { border-style: solid; color: var(--muted); border-color: var(--border); }
.perm-role-top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 20px; }
.perm-role-top-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--surface); }
.perm-role-top-label { display: block; font-weight: 600; margin-bottom: 4px; }
.perm-role-top-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.perm-role-preset-select { width: 100%; }
.permission-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.permission-card { position: relative; display: block; border: 1px solid var(--border); border-radius: 10px; padding: 14px 32px 14px 16px; cursor: pointer; background: var(--surface); transition: border-color .15s ease; }
.permission-card:hover { border-color: var(--navy-700); }
.permission-card:has(input:checked) { border-color: var(--navy-700); }
.permission-card input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.permission-card-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: transparent;
  background: transparent;
  transition: all .15s ease;
}
.permission-card input:checked ~ .permission-card-check {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}
.permission-card-title { display: block; font-weight: 600; margin-bottom: 4px; }
.permission-card-desc { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.perm-groups{display:flex;flex-direction:column;gap:22px;max-height:55vh;overflow-y:auto;padding-right:6px;margin:16px 0 4px;}
.perm-group{border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow:hidden;flex-shrink:0;}
.perm-group-title{padding:12px 16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);background:var(--bg-alt);border-bottom:1px solid var(--border);}
.perm-group-list{display:flex;flex-direction:column;}
.perm-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);}
.perm-row:last-child{border-bottom:none;}
.perm-row-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.perm-row-title{font-weight:600;color:var(--text);font-size:13.5px;}
.perm-row-desc{color:var(--muted);font-size:12px;line-height:1.4;}
.perm-row .switch{flex-shrink:0;}

/* form cards */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 30px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px var(--shadow-sm);
}
.form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.form-card-head h3 { margin: 0 0 4px; }
.form-live-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.form-options-grid { margin-bottom: 6px; }
.type-pill-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.type-pill:hover { border-color: var(--blue-500); }
.type-pill input[type="checkbox"] { width: 15px; height: 15px; }

/* config toggle cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 32px; }
.toggle-card { display: block; cursor: pointer; }
.toggle-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.toggle-card-head h4 { font-size: 15px; color: var(--heading); font-weight: 600; }
.toggle-card p { color: var(--muted); font-size: 13px; line-height: 1.6; font-weight: 400; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 999px; transition: background 0.2s ease; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s ease; box-shadow: 0 1px 3px rgba(21,39,58,0.3); }
.switch input:checked + .slider { background: var(--navy-700); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.switch input:disabled + .slider {
  cursor: not-allowed;
  opacity: 0.65;
}

/* save bar and toast */
.save-bar { position: fixed; left: 216px; right: 0; bottom: -80px; background: var(--navy-950); padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 -4px 18px rgba(21,39,58,0.25); transition: bottom 0.25s ease, left 0.2s ease; z-index: 20; }
.save-bar.visible { bottom: 0; }
.save-bar.full-width { left: 0; }
.save-bar span { color: #fff; font-weight: 600; font-size: 14px; }
.save-bar-actions { display: flex; gap: 12px; }
.save-bar button { padding: 10px 22px; }
.save-bar .btn-secondary { background: transparent; border: 1px solid var(--blue-500); color: var(--blue-200); box-shadow: none; }
.save-bar .btn-secondary:hover { background: rgba(255,255,255,0.06); box-shadow: none; transform: none; }
.toast { position: fixed; bottom: 90px; right: 40px; background: var(--navy-950); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 20px rgba(21,39,58,0.3); opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; z-index: 30; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--navy-950); }
.toast-error { background: #c0392b; }

/* compact row-action buttons */
.btn-row-action { display: inline-block; padding: 9px 18px; background: var(--navy-700); color: #fff; border: none; border-radius: 4px; font-weight: 600; font-size: 13px; letter-spacing: normal; cursor: pointer; box-shadow: none; transition: background 0.15s ease; text-decoration: none; text-align: center; }
.btn-row-action:hover { background: #34719f; transform: none; box-shadow: none; }
.btn-row-action:active { transform: none; box-shadow: none; }
.btn-row-action-secondary {
  background: transparent;
  color: var(--navy-700);
  border: 1px solid var(--border);
}
.btn-row-action-secondary:hover { background: var(--bg-alt); color: var(--navy-950); }
.btn-row-action-danger {
  background: transparent;
  color: #C0392B;
  border: 1px solid var(--border);
}
.btn-row-action-danger:hover {
  background: var(--badge-moderation-bg);
  border-color: #C0392B;
}

/* modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 32, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 30px 28px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px var(--shadow-lg);
}
.modal-box h3 {
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.modal-actions #shift-type-cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: none;
}
.modal-actions #shift-type-cancel:hover {
  background: var(--bg-alt);
  box-shadow: none;
  transform: none;
}

/* confirm dialog */
.confirm-overlay {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.confirm-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.confirm-box {
  text-align: center;
  max-width: 380px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1);
}
.confirm-overlay.open .confirm-box {
  transform: translateY(0) scale(1);
}
.confirm-box-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--badge-dashboard-bg);
  color: var(--navy-700);
  font-size: 22px;
}
.confirm-box-icon-danger {
  background: var(--badge-moderation-bg);
  color: #C0392B;
}
.confirm-box h3 {
  margin-bottom: 8px;
}
.confirm-dialog-message {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}
.confirm-box .modal-actions {
  justify-content: center;
  margin-top: 18px;
}

/* moderation */
.mod-type-row { display: flex; gap: 10px; align-items: center; max-width: 340px; margin-bottom: 12px; }
.mod-type-row input { margin-bottom: 0; }
.btn-remove-type { background: transparent; color: #C0392B; border: 1px solid var(--border); box-shadow: none; padding: 10px 12px; }
.btn-remove-type:hover { background: #FDEDED; box-shadow: none; transform: none; }
.btn-add-type { background: transparent; color: var(--navy-700); border: 1px dashed var(--blue-500); box-shadow: none; }
.btn-add-type:hover { background: var(--bg-alt); box-shadow: none; transform: none; }
.btn-add-type:disabled { border-style: solid; color: var(--muted); border-color: var(--border); }

/* channel field row and apply all */
.field-row { display: flex; align-items: flex-end; gap: 12px; max-width: 500px; }
.field-row input { margin-bottom: 16px; }
.field-row button { margin-bottom: 16px; }
.btn-apply-all { background: var(--bg-alt); color: var(--navy-700); border: 1px solid var(--border); box-shadow: none; margin-bottom: 16px; white-space: nowrap; }
.btn-apply-all:hover { background: var(--border); box-shadow: none; transform: none; }

/* audit logs */
.audit-section { margin-bottom: 32px; }
.audit-section h3 { display: flex; align-items: center; gap: 10px; }

/* sessions embed preview */
.session-layout { display: flex; gap: 32px; align-items: flex-start; }
.session-form { flex: 1 1 380px; min-width: 0; }
.session-preview-pane { flex: 1 1 340px; max-width: 380px; position: sticky; top: 90px; }
.session-preview-pane h3 { margin-top: 0; }
.discord-preview { max-width: 100%; margin-bottom: 0; }
.discord-preview-bot { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.discord-preview-avatar { width: 34px; height: 34px; border-radius: 50%; }
.discord-preview-botname { font-weight: 700; color: var(--heading); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.discord-preview-bot-tag { background: var(--navy-700); color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.03em; }
.discord-preview-time { color: var(--muted); font-size: 11px; margin-left: 4px; }
.discord-container { --embed-color: #2c5f87; border-left: 4px solid var(--embed-color); background: var(--bg-alt); border-radius: 4px; padding: 14px 16px; max-width: 100%; }
.discord-container-heading { font-weight: 700; color: var(--heading); font-size: 15px; line-height: 1.4; margin-bottom: 4px; word-break: break-word; }
.discord-container-desc { color: var(--text); font-size: 13px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.discord-container-image { width: 100%; border-radius: 6px; margin-top: 10px; display: block; }
.discord-container-divider { height: 1px; background: var(--border); margin: 12px 0; }
.discord-container-host { color: var(--muted); font-size: 12px; line-height: 1.6; }
.discord-container-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; border-radius: 6px; font-weight: 600; font-size: 12.5px; transition: background 0.15s ease; }
.discord-container-btn:hover { background: var(--border); }
.discord-join-btn { display: inline-block; margin: 12px 0 0 0; padding: 9px 18px; background: var(--navy-700); color: #fff; text-decoration: none; border-radius: 4px; font-weight: 600; font-size: 13px; transition: background 0.15s ease; }
.discord-join-btn:hover { background: #34719f; }

/* session type cards */
.session-type-list { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 24px; max-width: 620px; }
.session-type-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.session-type-card:hover { border-color: var(--blue-500); box-shadow: 0 4px 14px var(--shadow-sm); }
.session-type-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.session-type-card-head h4 { color: var(--heading); font-size: 15px; font-weight: 600; }
.session-type-card-main p { color: var(--muted); font-size: 13px; margin: 0; }

/* wide two-column session modal */
.modal-box-wide { max-width: 760px; }
.session-modal-layout { display: flex; gap: 28px; align-items: flex-start; }
.session-modal-fields { flex: 1 1 380px; min-width: 0; }
.session-panel .session-preview-pane { flex: 1 1 300px; max-width: 320px; position: static; }
.session-panel .session-preview-pane h3 { margin-top: 0; font-size: 14px; }

@media (max-width: 760px) {
  .session-modal-layout { flex-direction: column; }
  .session-panel .session-preview-pane { max-width: 100%; }
}

/* department page */
.dept-page { max-width: 1080px; }
.dept-page input[type="text"], .dept-page textarea { max-width: 560px; }
.wizard-step input[type="text"], .wizard-step textarea { max-width: none; }
.btn-row-action .material-symbols-outlined { font-size: 16px; vertical-align: -3px; margin-right: 6px; }
.empty-state .btn-row-action { display: inline-block; margin-top: 18px; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.field-grid .searchable-select { max-width: none; }
.field-error { color: #C0392B; font-size: 12px; font-weight: 600; margin-top: -10px; margin-bottom: 16px; }
input[aria-invalid="true"] { border-color: #C0392B; }
input[aria-invalid="true"]:focus { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,0.15); }

.type-card-grid { max-height: none; overflow: visible; padding-right: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.type-card-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; background: var(--bg-alt); color: var(--navy-700); transition: background 0.15s ease, color 0.15s ease; }
.permission-card:has(input:checked) { box-shadow: 0 0 0 1px var(--navy-700); }
.permission-card:has(input:checked) .type-card-icon { background: var(--navy-700); color: #fff; }
.permission-card:has(input:focus-visible) { outline: 2px solid var(--navy-700); outline-offset: 2px; }

.review-list { margin: 16px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.review-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.review-row:last-child { border-bottom: none; }
.review-row[hidden] { display: none; }
.review-row dt { flex-shrink: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.review-row dd { color: var(--heading); font-size: 14px; font-weight: 600; text-align: right; word-break: break-word; }
.callout { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--badge-dashboard-bg); color: var(--text); font-size: 13px; line-height: 1.55; }
.callout[hidden] { display: none; }
.callout .material-symbols-outlined { flex-shrink: 0; margin-top: 1px; font-size: 18px; color: var(--navy-700); }

.dept-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dept-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.dept-search .material-symbols-outlined { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--muted); pointer-events: none; }
.dept-search input[type="text"] { max-width: none; margin: 0; padding-left: 38px; }
.dept-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.dept-filter { padding: 7px 14px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; box-shadow: none; font-size: 12.5px; font-weight: 600; }
.dept-filter:hover { background: var(--bg-alt); color: var(--navy-700); border-color: var(--blue-200); transform: none; box-shadow: none; }
.dept-filter.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.dept-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; box-shadow: 0 1px 3px var(--shadow-sm); transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }
.dept-card[hidden] { display: none; }
.dept-card:hover { border-color: var(--blue-500); box-shadow: 0 10px 26px var(--shadow-md); transform: translateY(-2px); }
.dept-card-top { display: flex; align-items: center; gap: 12px; }
.dept-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dept-card-title h4 { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 15px; font-weight: 700; }
.dept-card-arrow { color: var(--muted); transition: transform 0.18s ease, color 0.18s ease; }
.dept-card:hover .dept-card-arrow { color: var(--navy-700); transform: translateX(3px); }
.dept-card-desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dept-card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 600; }
.dept-card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.dept-card-meta .material-symbols-outlined { font-size: 16px; }

.dept-avatar { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, var(--navy-700), var(--blue-500)); color: #fff; }
.dept-avatar .material-symbols-outlined { font-size: 22px; }
.dept-avatar-lg { width: 56px; height: 56px; border-radius: 14px; }
.dept-avatar-lg .material-symbols-outlined { font-size: 28px; }

.dept-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px var(--shadow-sm); }
.dept-summary-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dept-summary-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dept-summary-desc { color: var(--muted); font-size: 14px; line-height: 1.6; }
.dept-owner { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.dept-owner .identity-avatar { width: 22px; height: 22px; }

.tab-panel:not([hidden]) { animation: panel-fade-in 0.2s ease; }
.copy-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-field input[type="text"] { flex: 1 1 300px; max-width: 520px; margin-bottom: 0; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; }
.chip-icon { font-size: 15px; color: var(--muted); }
.dept-position-title { display: inline-flex; align-items: center; gap: 10px; }

.member-select { position: relative; max-width: 320px; margin-bottom: 16px; }

/* section divider */
.section-divider { height: 1px; background: var(--border); margin: 28px 0; border: none; }

/* responsive */
.page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--navy-700), var(--blue-500));
  box-shadow: 0 0 8px rgba(92,136,177,0.5);
  opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
  pointer-events: none;
}
.page-loading-bar.is-loading {
  opacity: 1;
}
.page-loading-bar.is-done {
  width: 100%;
  transition: width 0.2s ease, opacity 0.3s ease 0.15s;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .page-loading-bar {
    transition: none;
  }
}
html.a11y-reduce-motion .page-loading-bar {
  transition: none;
}
@media (max-width: 960px) {
  .session-layout { flex-direction: column; }
  .session-preview-pane { position: static; max-width: 100%; width: 100%; }
}
@media (max-width: 760px) {
  .hero-split { flex-direction: column; text-align: center; padding-top: 80px; }
  .hero-split-text p { margin-left: auto; margin-right: auto; }
  .hero-split-actions { justify-content: center; }
  .hero-stats { flex-wrap: wrap; gap: 32px; }
}
@media (max-width: 720px) {
  .dashboard-layout { flex-direction: column; }
  .sidebar { position: static; align-self: stretch; width: 100%; height: auto; display: flex; overflow-x: auto; overflow-y: hidden; padding: 8px 12px; gap: 4px; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-section { display: flex; flex-shrink: 0; gap: 4px; margin-bottom: 0; }
  .sidebar-section-label, .sidebar-toggle { display: none; }
  .sidebar-head { display: flex; flex-shrink: 0; margin: 0; padding: 0; border-bottom: none; }
  .sidebar-action { width: auto; padding: 8px 12px; }
  .sidebar-section-items, .sidebar-section.is-collapsed .sidebar-section-items { display: flex; gap: 4px; }
  .sidebar a { padding: 8px 12px; border-left: none; border-bottom: 3px solid transparent; }
  .sidebar a.active { border-left: none; border-bottom-color: var(--navy-700); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .save-bar { left: 0; padding: 14px 20px; flex-direction: column; gap: 10px; }
  .section-toolbar { position: static; }
}
@media (max-width: 760px) {
  .showcase-row, .showcase-row.reverse { flex-direction: column; text-align: center; gap: 28px; padding: 40px 0; }
  .showcase-points li { justify-content: center; }
}