:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  background: #0c1017;
  color: #dce3ed;
  --accent: #63ddba;
  --muted: #8793a6;
  --line: #252e3c;
  --panel: #131923;
  --sidebar: #10151d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 1px solid #344252;
  border-radius: 8px;
  background: #202b3a;
  color: #e5edf7;
  padding: 10px 15px;
  font-weight: 600;
  transition: background 0.15s;
}
button:hover:not(:disabled) {
  background: #2c3b4e;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #10251f;
}
button.primary:hover:not(:disabled) {
  background: #8cebd0;
}
button.danger {
  color: #ffb5b5;
  border-color: #653539;
  background: #38252d;
}
button.ghost {
  background: transparent;
  border-color: var(--line);
}
input,
textarea,
select {
  border: 1px solid #303b4b;
  border-radius: 8px;
  background: #0e141e;
  color: #e4eaf2;
  padding: 11px 13px;
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #aebacc;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 10px;
  color: #f2f5fa;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.25px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 31px 18px 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 35px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 41px;
  background: #18332f;
  border: 1px solid #386b5b;
  color: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
  font-size: 17px;
  font-weight: 800;
}
.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: white;
}
.brand-sub {
  font-size: 10px;
  color: #8a97aa;
  letter-spacing: 1.4px;
  margin-top: 4px;
}
.nav-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #687589;
  margin: 9px 15px 15px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 7px;
  color: #9ba8ba;
  font-size: 13px;
  font-weight: 550;
}
.nav a:hover {
  background: #1a2330;
  color: white;
}
.nav a.active {
  color: var(--accent);
  background: #19312c;
  box-shadow: inset 2px 0 var(--accent);
}
.nav a .chevron {
  margin-left: auto;
}
.sidebar-foot {
  margin-top: auto;
}
.side-note {
  margin: 24px 7px;
  padding: 17px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #141d28;
  line-height: 1.7;
  font-size: 11px;
  color: #7e8da2;
}
.side-note strong {
  color: #b5c1d1;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}
.viewer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 7px 5px;
  border-top: 1px solid var(--line);
}
.viewer button {
  margin-left: auto;
  padding: 6px;
  border: none;
  color: #8b99aa;
}
.avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #293b45;
  color: #91d8c4;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid #3a505a;
}
.avatar.large {
  width: 74px;
  height: 74px;
  border-radius: 19px;
  font-size: 24px;
}
.main {
  margin-left: 236px;
  min-height: 100vh;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 20px;
}
.breadcrumb {
  font-size: 12px;
  color: #6f7c8e;
  display: flex;
  gap: 13px;
  align-items: center;
}
.breadcrumb strong {
  color: #b7c3d3;
  font-weight: 500;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 21px;
}
.connection {
  font-size: 11px;
  color: #abb7c7;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.top-search {
  font-size: 11px;
  padding: 9px 13px;
  background: #141c27;
  color: #96a5b8;
}
.preview-banner {
  padding: 9px 40px;
  border-bottom: 1px solid #4a3e24;
  color: #d4bd85;
  font-size: 11px;
  letter-spacing: 0.25px;
  background: #262217;
}
.preview-banner strong {
  letter-spacing: 1px;
  font-size: 9px;
  margin-right: 14px;
}
.content {
  padding: 35px 40px 40px;
  max-width: 1650px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.page-heading .eyebrow {
  margin-bottom: 12px;
  display: block;
}
.date {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 7px;
  color: #97a5b7;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #2d514b;
  border-radius: 12px;
  background: linear-gradient(110deg, #18312d, #142028 70%);
  padding: 27px 30px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}
.hero h2 {
  font-size: 24px;
  line-height: 1.35;
  color: #ecf5f0;
  letter-spacing: -0.7px;
  max-width: 390px;
  margin: 9px 0;
}
.hero p {
  color: #9bb5ae;
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  max-width: 450px;
}
.hero em {
  font-style: normal;
  color: var(--accent);
}
.hero-symbol {
  width: 125px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 36px;
  flex-shrink: 0;
}
.orbit {
  position: absolute;
  width: 135px;
  height: 135px;
  border: 1px solid #3d6b5f;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.orbit:before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px dashed #3d6b5f;
  border-radius: 50%;
}
.hero-symbol .brand-mark {
  width: 57px;
  height: 65px;
  font-size: 25px;
  background: #21473c;
}
.orbit:after {
  content: "";
  position: absolute;
  top: 8px;
  right: 18px;
  width: 8px;
  height: 8px;
  border: 3px solid #18312d;
  background: var(--accent);
  border-radius: 50%;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 27px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #96a5b8;
  font-size: 11px;
}
.stat-top .icon {
  color: #6abca9;
  width: 17px;
}
.stat-number {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -1.3px;
  font-weight: 650;
  color: #eff4fa;
  display: block;
  margin: 11px 0;
}
.stat-foot {
  font-size: 10px;
  color: #8190a2;
}
.stat-foot span {
  color: var(--accent);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 22px;
}
.card-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.card-title {
  display: flex;
  gap: 9px;
  align-items: center;
}
.card-title .icon {
  color: #8fa5bc;
  width: 17px;
}
.count {
  border-radius: 5px;
  background: #263442;
  font-size: 10px;
  padding: 3px 6px;
  color: #b4c6da;
  margin-left: 4px;
}
.text-link {
  font-size: 11px;
  color: #a5b4c6;
  white-space: nowrap;
}
.text-link:hover {
  color: var(--accent);
}
.ticket-row {
  padding: 17px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #222c39;
}
.ticket-row:last-child {
  border: 0;
}
.ticket-row:hover {
  background: #18222f;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-main strong {
  display: block;
  font-size: 12px;
  color: #d1dbe9;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
}
.row-main small {
  font-size: 10px;
  color: #788a9f;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #1e3a31;
  color: #91d5b7;
  border: 1px solid #2d5143;
  text-transform: capitalize;
}
.badge.amber {
  background: #3b3020;
  border-color: #5c482b;
  color: #d7b77c;
}
.badge.gray {
  background: #26303d;
  border-color: #384555;
  color: #a2afc2;
}
.badge.cyan {
  background: #20363d;
  border-color: #31515c;
  color: #89cadb;
}
.empty {
  padding: 35px 25px;
  text-align: center;
  color: #8595a9;
  font-size: 12px;
  line-height: 1.9;
}
.empty .icon {
  width: 29px;
  height: 29px;
  color: #526379;
  margin-bottom: 10px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 13px 22px;
  color: #738399;
  background: #111822;
}
td {
  padding: 15px 22px;
  border-top: 1px solid #232c39;
  font-size: 11px;
  color: #adbbcc;
}
td a {
  color: #d8e2ef;
}
tr:hover td {
  background: #18212d;
}
td .person {
  display: flex;
  gap: 10px;
  align-items: center;
}
td .avatar {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  font-size: 9px;
}
.person strong {
  font-size: 11px;
  display: block;
  margin-bottom: 3px;
  color: #dce4f0;
}
.person small {
  font-size: 9px;
  color: #6f8298;
}
.reason {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source {
  font-size: 9px;
  color: #7588a0;
}
.toolbar {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: center;
}
.searchbox {
  position: relative;
  max-width: 340px;
  flex: 1;
}
.searchbox .icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: #6e8098;
  width: 16px;
}
.searchbox input {
  padding-left: 37px;
  font-size: 12px;
}
.toolbar select {
  width: auto;
  font-size: 12px;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #6f8197;
}
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
}
.tabs a,
.tabs button {
  font-size: 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 12px 2px;
  background: none;
  color: #8192a8;
}
.tabs .active {
  border-color: var(--accent);
  color: var(--accent);
}
.profile-head {
  padding: 27px;
  display: flex;
  gap: 20px;
  align-items: center;
}
.profile-head h1 {
  font-size: 25px;
  margin-bottom: 7px;
}
.profile-id {
  font-size: 11px;
  color: #8ba1b5;
  letter-spacing: 0.5px;
}
.profile-meta {
  display: flex;
  gap: 25px;
  margin-left: auto;
}
.profile-meta strong {
  font-size: 20px;
  display: block;
  color: #e9f0f8;
  margin-bottom: 6px;
}
.profile-meta small {
  font-size: 10px;
  color: #7e91a7;
}
.identity-list {
  display: flex;
  gap: 12px;
  padding: 0 27px 24px;
  flex-wrap: wrap;
}
.identity {
  padding: 12px 15px;
  background: #0f1721;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.9;
}
.identity strong {
  display: block;
  font-size: 10px;
  color: #91b9ab;
}
.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
}
.ticket-details {
  padding: 21px;
  font-size: 12px;
  line-height: 1.9;
}
.ticket-details dt {
  color: #7f91a8;
  font-size: 10px;
  margin-top: 17px;
}
.ticket-details dd {
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.ticket-details button {
  width: 100%;
  margin-top: 12px;
}
.conversation {
  padding: 22px;
  max-height: 550px;
  overflow: auto;
  min-height: 230px;
}
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}
.message-head {
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 7px;
}
.message-head time {
  font-size: 9px;
  color: #728298;
  font-weight: 400;
  margin-left: 10px;
}
.message-content {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b1c0d2;
}
.message-embed {
  padding: 13px;
  border-left: 3px solid #68d3b4;
  border-radius: 4px;
  background: #1b2431;
  margin-top: 8px;
  font-size: 12px;
}
.reply-box {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #101823;
}
.reply-box textarea {
  min-height: 88px;
}
.reply-bottom {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.reply-bottom p {
  font-size: 10px;
  color: #7f92a9;
  margin: 0;
}
.transcript {
  font-size: 11px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 23px;
}
.form-body {
  padding: 23px;
  display: grid;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 15px;
}
.mode-picker {
  display: flex;
  padding: 4px;
  background: #0b121c;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 5px;
}
.mode-picker button {
  flex: 1;
  border-color: transparent;
  font-size: 11px;
  background: none;
  color: #8497ac;
}
.mode-picker button.active {
  background: #223a34;
  border-color: #396353;
  color: #99e3ca;
}
.helper {
  font-size: 10px;
  color: #7c91a8;
  line-height: 1.9;
  margin: 0;
}
.checks {
  display: grid;
  gap: 9px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #101722;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 7px;
  font-size: 12px;
}
.checks input {
  width: 14px;
  accent-color: var(--accent);
}
.preview-wrap {
  padding: 27px 22px;
  background: #1d2430;
}
.discord-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.bot-avatar {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #364d48;
  color: #93e1c6;
  font-size: 12px;
  font-weight: 750;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.bot-name {
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 10px;
}
.bot-label {
  font-size: 8px;
  letter-spacing: 0.4px;
  background: #5865f2;
  border-radius: 3px;
  padding: 2px 4px;
  margin-left: 6px;
}
.embed-preview {
  border: 1px solid #30394a;
  border-left: 4px solid var(--accent);
  border-radius: 5px;
  background: #141b26;
  padding: 18px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.embed-preview h3 {
  font-size: 14px;
  line-height: 1.5;
  color: #f1f4fa;
  margin-bottom: 10px;
}
.embed-preview p {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 0;
  color: #bac6d6;
}
.preview-caption {
  font-size: 10px;
  color: #8799af;
  text-align: center;
  margin: 18px 0 0;
}
.saved-list {
  padding: 10px 20px;
}
.saved-item {
  padding: 14px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.saved-item:last-child {
  border: 0;
}
.saved-item button {
  margin-left: auto;
  font-size: 10px;
  padding: 7px 11px;
}
.notice {
  padding: 16px 20px;
  border: 1px solid #4d452e;
  background: #26251d;
  border-radius: 8px;
  color: #c7b681;
  font-size: 11px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.receipt {
  padding: 14px;
  border: 1px solid #365848;
  border-radius: 7px;
  background: #162a23;
  font-size: 11px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.receipt.bad {
  border-color: #65483a;
  background: #31251f;
}
.footer {
  display: flex;
  justify-content: space-between;
  color: #526278;
  font-size: 9px;
  padding-top: 12px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 30px;
  background: radial-gradient(ellipse at 50% 0, #1b3c32, #0c1017 65%);
}
.login-card {
  width: 440px;
  max-width: 100%;
  padding: 42px;
  border: 1px solid #2e443c;
  border-radius: 17px;
  background: #111b21;
  box-shadow: 0 30px 100px #0005;
}
.login-card .brand {
  padding: 0;
  margin-bottom: 45px;
}
.login-card h1 {
  font-size: 31px;
  line-height: 1.25;
  margin-bottom: 17px;
}
.login-card p {
  font-size: 12px;
  line-height: 1.9;
  color: #9bafbf;
  margin-bottom: 25px;
}
.login-card button,
.login-card .login-link {
  display: block;
  text-align: center;
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 12px;
  background: var(--accent);
  color: #152c24;
  border: 0;
}
.login-footer {
  padding-top: 22px;
  text-align: center;
  font-size: 9px;
  color: #647c8b;
}
.loading {
  padding: 80px;
  color: #8094a8;
  text-align: center;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 20px;
  border: 1px solid #466b5b;
  border-radius: 9px;
  background: #20372e;
  color: #c7eedb;
  z-index: 100;
  box-shadow: 0 6px 30px #0006;
  font-size: 12px;
  display: none;
  max-width: 90%;
}
#toast.visible {
  display: block;
}
#toast.error {
  border-color: #895054;
  background: #3c292c;
  color: #f2bcc0;
}
dialog {
  width: 440px;
  max-width: 90vw;
  border: 1px solid #3e4e62;
  border-radius: 12px;
  background: #151e2a;
  color: #dfe8f4;
  padding: 28px;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin-bottom: 13px;
}
dialog p {
  font-size: 12px;
  line-height: 1.8;
  color: #95a6ba;
}
dialog form {
  display: grid;
  gap: 16px;
}
.button-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.inline-error {
  color: #ffb8ba;
  font-size: 11px;
  line-height: 1.8;
}
.hidden {
  display: none !important;
}
@media (min-width: 1600px) {
  .content {
    padding-top: 42px;
  }
  .hero {
    padding: 33px;
  }
  .stat {
    padding: 25px;
  }
  .ticket-row {
    padding: 20px 24px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 205px;
  }
  .main {
    margin-left: 205px;
  }
  .content {
    padding: 27px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .preview-banner {
    padding-left: 24px;
  }
  .stat {
    padding: 15px;
  }
  .card-header {
    padding: 17px;
  }
  .ticket-row {
    padding: 16px;
  }
  .grid-2 {
    gap: 17px;
  }
  .ticket-layout {
    grid-template-columns: 1fr 240px;
  }
  .hero-symbol {
    margin-right: 10px;
  }
}
@media (max-width: 800px) {
  .sidebar {
    position: relative;
    width: 100%;
    padding: 16px;
  }
  .brand {
    padding-bottom: 18px;
  }
  .sidebar .nav-label,
  .sidebar-foot {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
  }
  .nav a {
    white-space: nowrap;
    padding: 10px;
    font-size: 11px;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    height: 58px;
  }
  .top-tools .connection {
    display: none;
  }
  .content {
    padding: 25px 17px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grid-2,
  .composer-grid,
  .ticket-layout {
    grid-template-columns: 1fr;
  }
  .hero-symbol {
    display: none;
  }
  .hero {
    padding: 20px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .date {
    display: none;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .profile-meta {
    display: none;
  }
  .top-search {
    font-size: 10px;
  }
  .footer {
    gap: 20px;
  }
  .preview-banner {
    font-size: 10px;
    padding: 9px 17px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .card-header {
    gap: 9px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .profile-head {
    padding: 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-body {
    padding: 18px;
  }
}

.brand-name,
.brand-sub {
  display: block;
}
@media (max-width: 800px) {
  .login {
    padding: 24px;
  }
  .login-card {
    padding: 28px;
  }
  .nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
  }
  .nav a {
    padding: 11px;
  }
  .brand {
    padding-bottom: 18px;
  }
}
/* Community workspace update */
:root {
  --accent: #0057e1;
}
.brand-mark {
  background: #102a50;
  border-color: #315f9e;
  color: #89b7ff;
}
.nav a.active {
  background: #102b53;
  color: #c5dcff;
}
.hero {
  background: linear-gradient(110deg, #102c54, #141e30);
  border-color: #2c4d7b;
}
.hero em {
  color: #89b7ff;
}
button.primary,
.login-card .login-link,
.login-card button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent), white 13%);
}
.eyebrow {
  color: #80b2ff;
}
.login {
  background: radial-gradient(ellipse at 50% 0, #142d53, #0c1017 65%);
}
.login-card {
  background: #121b29;
  border-color: #2c4263;
}
.avatar {
  position: relative;
  background: #1a2b45;
  border-color: #314b70;
  color: #99b6dd;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-fallback {
  width: 22px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.avatar.large .avatar-fallback {
  width: 44px;
  height: 48px;
}
.avatar img + .avatar-fallback {
  display: none;
}
.brand-name,
.brand-sub {
  display: block;
}
.sidebar-foot {
  margin-top: auto;
}
.top-search {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
}
.top-search input {
  width: 210px;
  border: 0;
  padding: 4px;
  background: transparent;
  font-size: 11px;
  outline: none;
}
.top-search input:focus {
  outline: none;
}
.global-search {
  position: relative;
}
.global-results {
  position: absolute;
  right: 0;
  top: 43px;
  width: 360px;
  background: #151f2f;
  border: 1px solid #344867;
  border-radius: 10px;
  box-shadow: 0 15px 45px #0008;
  z-index: 50;
  max-height: 400px;
  overflow: auto;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #26364d;
  border-radius: 0;
  padding: 12px;
  background: none;
  text-align: left;
}
.search-result:hover,
.search-result[aria-selected="true"] {
  background: #203659;
}
.search-result > span:nth-child(2) {
  flex: 1;
}
.search-result strong {
  display: block;
  font-size: 12px;
}
.search-result small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #93a8c2;
  margin-top: 5px;
}
.search-empty {
  padding: 23px;
  color: #93a4b9;
  font-size: 12px;
}
.workspace-stats .stat {
  text-align: left;
  font-weight: 400;
}
.stat.clickable-stat:hover {
  background: #19263a;
  border-color: #416ca6;
}
.stat-foot {
  line-height: 1.65;
  display: block;
}
.stat-top {
  gap: 8px;
}
.stats .stat-number {
  font-size: 29px;
}
.card-header .helper {
  margin: 6px 0 0;
}
.community-chart {
  padding: 26px 22px 15px;
}
.community-chart svg {
  display: block;
  width: 100%;
  height: 175px;
}
.chart-grid {
  stroke: #2a3545;
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 3 4;
}
.chart-column {
  fill: var(--accent);
}
.community-chart text {
  font-size: 10px;
  fill: #8fa2b9;
}
.action-chart {
  padding: 22px;
  display: grid;
  gap: 14px;
}
.action-bar {
  display: grid;
  grid-template-columns: 70px 1fr 35px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}
.action-bar > span {
  color: #a4b5ca;
}
.action-bar strong {
  text-align: right;
}
.bar-track {
  height: 7px;
  background: #26354b;
  border-radius: 5px;
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
  min-width: 0;
}
.activity-table {
  white-space: normal;
}
.activity-table td {
  vertical-align: top;
  line-height: 1.65;
  padding-top: 17px;
  padding-bottom: 17px;
}
.activity-table td small {
  display: block;
  font-size: 10px;
  color: #879bb6;
  margin-top: 3px;
}
.activity-when {
  white-space: nowrap;
}
.activity-reason {
  min-width: 130px;
  max-width: 280px;
}
.activity-reason details summary {
  cursor: pointer;
  color: #9fb2ca;
  list-style: none;
}
.activity-reason details[open] summary {
  display: none;
}
.activity-reason p {
  white-space: pre-wrap;
  margin: 0;
  overflow-wrap: anywhere;
}
.activity-outcome {
  color: #a0b1c6;
  font-size: 10px;
  max-width: 220px;
}
.trust-score {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border: 1px solid;
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
  font-weight: 650;
}
.trust-score .icon {
  width: 13px;
  height: 13px;
}
.trust-score.good {
  background: #15352c;
  color: #8bddb7;
  border-color: #315e4c;
}
.trust-score.watch {
  background: #3b301d;
  color: #ebc984;
  border-color: #6a5028;
}
.trust-score.low {
  background: #3f232c;
  color: #ffa7b4;
  border-color: #7b3a4e;
}
.trust-score.large {
  font-size: 28px;
  border-radius: 12px;
  padding: 13px 16px;
  position: relative;
  min-width: 135px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-score.large .icon {
  width: 23px;
  height: 23px;
}
.trust-score.large small {
  width: 100%;
  font-size: 8px;
  letter-spacing: 1.4px;
  text-align: center;
  margin-top: 4px;
}
.trust-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.trust-meta > span:last-child {
  max-width: 190px;
  line-height: 1.9;
}
.quick-actions {
  padding: 21px 23px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 25px;
}
.action-platform {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #8fa6c4;
  font-size: 11px;
  margin-bottom: 13px;
}
.action-platform .icon {
  width: 16px;
  height: 16px;
}
.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.action-buttons button {
  font-size: 11px;
  padding: 9px 14px;
}
.staff-note {
  display: flex;
  gap: 12px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.staff-note > div {
  min-width: 0;
  flex: 1;
}
.staff-note strong {
  font-size: 12px;
}
.staff-note time {
  font-size: 10px;
  color: #8498b3;
  margin-left: 12px;
}
.staff-note p {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
}
.note-form {
  padding: 21px 23px;
  background: #101823;
}
.note-form .button-row {
  margin-top: 13px;
}
.request-row {
  padding: 17px 23px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
}
.request-row p {
  margin: 7px 0;
  color: #b4c0d2;
}
.request-row small {
  color: #bba583;
}
.error-panel {
  display: flex;
  gap: 13px;
  padding: 17px;
  border-radius: 8px;
  background: #34232c;
  border: 1px solid #68404c;
  margin: 18px 0;
}
.error-panel .icon {
  color: #e29baa;
  flex-shrink: 0;
}
.error-panel p {
  margin: 0;
  color: #e5b3bd;
  font-size: 12px;
}
.confirmation {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  line-height: 1.7;
}
.confirmation input {
  width: 16px;
}
.denial-symbol {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid #365c96;
  border-radius: 14px;
  background: #18325a;
  color: #9ac0ff;
  margin-bottom: 25px;
}
.denial-symbol .icon {
  width: 28px;
  height: 28px;
}
.denial-card .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.denial-card .denial-message {
  font-size: 15px;
  color: #e2eafa;
  line-height: 1.6;
  margin-bottom: 12px;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
}
.admin-body {
  padding: 21px 23px;
}
.role-row {
  border: 1px solid #2a3a51;
  border-radius: 8px;
  padding: 13px;
  margin-bottom: 12px;
  background: #101925;
}
.role-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.role-heading code {
  font-size: 11px;
  color: #bccce2;
}
.role-heading > button {
  margin-left: auto;
  font-size: 10px;
  padding: 6px 9px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  line-height: 1.5;
}
.check-label input {
  width: 14px;
  accent-color: var(--accent);
}
.role-row details {
  margin-top: 12px;
  font-size: 11px;
  color: #95aac5;
}
.role-row summary {
  cursor: pointer;
}
.grant-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.add-role {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 14px;
}
.add-role input {
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
.add-role button {
  font-size: 11px;
  white-space: nowrap;
}
.trust-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.integration-note {
  font-size: 11px;
  line-height: 1.9;
  color: #91a6c3;
  border-top: 1px solid var(--line);
}
.branding-fields {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 160px;
}
.branding-fields > label:nth-child(3),
.branding-fields > .helper {
  grid-column: 1/-1;
}
.admin-body input[type="file"] {
  padding: 10px;
  font-size: 10px;
}
.favicon-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid #314966;
  padding: 9px;
  border-radius: 11px;
  background: #0c1524;
  margin-bottom: 19px;
}
#favicon-form {
  display: grid;
  gap: 16px;
}
#favicon-form .favicon-preview {
  margin-bottom: 0;
}
#favicon-form .helper {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1150px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-layout > aside {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
  }
  .grant-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
  .trust-meta > span:last-child {
    display: none;
  }
}
@media (max-width: 800px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .global-search {
    max-width: 220px;
  }
  .top-search input {
    width: 145px;
  }
  .global-results {
    width: min(350px, 90vw);
  }
  .connection {
    display: none;
  }
  .trust-meta {
    display: flex;
    margin-left: auto;
  }
  .trust-score.large {
    min-width: 80px;
    padding: 10px;
    font-size: 22px;
  }
  .trust-score.large small {
    font-size: 7px;
  }
  .profile-head {
    gap: 12px;
  }
  .profile-head h1 {
    font-size: 20px;
  }
  .profile-head .avatar.large {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }
  .profile-id {
    font-size: 9px;
    word-break: break-word;
  }
  .trust-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .branding-fields {
    grid-template-columns: 1fr;
  }
  .admin-layout > aside {
    display: block;
  }
  .role-heading {
    gap: 10px;
  }
  .role-heading code {
    width: 100%;
  }
  .grant-grid {
    grid-template-columns: 1fr 1fr;
  }
  .staff-note time {
    display: block;
    margin-left: 0;
    margin-top: 5px;
  }
  .action-buttons button {
    flex: 1;
    white-space: nowrap;
  }
  .activity-table {
    min-width: 800px;
  }
  .stats .stat-number {
    font-size: 27px;
  }
  .stat-top {
    font-size: 10px;
  }
  .stat-foot {
    font-size: 9px;
  }
  .topbar {
    padding-left: 17px;
    padding-right: 17px;
  }
}
/* Member and staff profiles */
.page-heading {
  min-height: 42px;
  align-items: center;
}
.page-heading > h1 {
  margin: 0;
  font-size: 28px;
  color: #f0f3f8;
  letter-spacing: -0.8px;
}
.sidebar .brand {
  margin-bottom: 18px;
}
.profile-head h2 {
  font-size: 28px;
  color: #eff3f8;
  margin: 0 0 8px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.profile-stats .stat {
  min-width: 0;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 13px;
}
.profile-stats .stat > span {
  color: #9eafc4;
  font-size: 12px;
}
.profile-stats .stat > strong {
  font-size: 26px;
  color: #e9eef7;
  font-weight: 650;
}
.profile-stats .stat .icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-left: 6px;
}
.staff-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.staff-total {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
  color: #97a8be;
}
.staff-total strong {
  font-size: 36px;
  color: #e8f0ff;
}
.identifier-grid {
  padding: 8px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.identifier {
  padding: 19px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.identifier:last-child {
  border-bottom: 0;
}
.identifier > div {
  min-width: 0;
}
.identifier span {
  display: block;
  font-size: 11px;
  color: #97a8bd;
  margin-bottom: 9px;
}
.identifier code {
  display: block;
  font-size: 13px;
  line-height: 1.7;
  color: #e0e8f5;
  overflow-wrap: anywhere;
}
.copy-id {
  border: 1px solid #354154;
  background: #222c3a;
  padding: 7px;
  border-radius: 6px;
  color: #9cafc8;
  flex-shrink: 0;
}
.copy-id .icon {
  width: 15px;
  height: 15px;
}
.admin-tag {
  font-size: 9px;
  padding: 3px 6px;
  margin-left: 8px;
  color: #c0d2ef;
  background: #243c5e;
  border-radius: 4px;
}
.quick-card .card-header {
  background: #1e2938;
  border-radius: 10px 10px 0 0;
  padding: 20px 24px;
}
.quick-card .quick-actions {
  background: #1b2533;
  border-radius: 0 0 10px 10px;
  padding: 22px 24px;
  gap: 28px;
}
.quick-card .quick-actions {
  grid-template-columns: 1fr;
}
.quick-card .action-platform {
  color: #a4b2c5;
  font-size: 11px;
  margin-bottom: 13px;
}
.action-buttons {
  gap: 9px;
}
.quick-button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #35404f;
  border: 1px solid #485365;
  border-radius: 6px;
  padding: 13px 17px;
  font-size: 13px;
  color: #c2cfdf;
  font-weight: 600;
  min-height: 45px;
}
.quick-button .icon {
  width: 22px;
  height: 22px;
}
.quick-button:hover {
  background: #414e60;
  border-color: #63748d;
}
.quick-button.type-warn .icon {
  color: #f4c300;
}
.quick-button.type-commend .icon {
  color: #1bd466;
}
.quick-button.type-kick .icon {
  color: #ff843c;
}
.quick-button.type-temp_ban .icon {
  color: #ff6168;
}
.quick-button.type-ban .icon {
  color: #ff3f4d;
}
.action-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  color: #d0dcf0;
  background: #374a63;
  white-space: nowrap;
}
.action-badge.type-warn {
  color: #201a03;
  background: #f1c40f;
}
.action-badge.type-kick {
  color: #291105;
  background: #fb923c;
}
.action-badge.type-ban {
  color: #fff;
  background: #db3547;
}
.action-badge.type-commend {
  color: #062814;
  background: #36d37d;
}
.action-badge.type-unban {
  color: #fff;
  background: #9151d2;
}
.action-badge.type-warning_void {
  color: #dce6f7;
  background: #51627c;
}
.action-badge.type-ticket {
  color: #072532;
  background: #22c4dd;
}
.moderation-entry {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid #536784;
}
.moderation-entry:last-child {
  border-bottom: 0;
}
.moderation-entry.type-warn {
  border-left-color: #f1c40f;
}
.moderation-entry.type-kick {
  border-left-color: #fb923c;
}
.moderation-entry.type-ban {
  border-left-color: #db3547;
}
.moderation-entry.type-commend {
  border-left-color: #36d37d;
}
.moderation-entry.type-unban {
  border-left-color: #9151d2;
}
.moderation-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.moderation-heading time {
  font-size: 11px;
  color: #899bb2;
  margin-left: 5px;
}
.moderation-heading .history-controls {
  margin-left: auto;
}
.moderation-reason {
  margin: 15px 0;
  color: #d4dfef;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.moderation-attribution {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 10px;
  color: #8d9eb4;
}
.moderation-attribution .avatar {
  width: 27px;
  height: 27px;
}
.moderation-attribution .person {
  font-size: 11px;
}
.history-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.history-controls button {
  font-size: 10px;
  padding: 6px 8px;
  margin-top: 6px;
}
.remove-record {
  color: #f5acb5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.remove-record .icon {
  width: 12px;
  height: 12px;
}
.lift-detail {
  margin-top: 14px;
  padding: 11px 13px;
  background: #202d42;
  border-radius: 5px;
  font-size: 11px;
  color: #aec5e6;
  line-height: 1.8;
  white-space: pre-wrap;
}
.associated-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.associated-account:last-child {
  border-bottom: 0;
}
.associated-account > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.associated-account strong {
  display: block;
  font-size: 13px;
  color: #d9e4f5;
  margin-bottom: 5px;
}
.associated-account small {
  color: #8fa4bf;
  font-size: 10px;
}
.associated-account:hover {
  background: #19263a;
}
.join-dates {
  margin: 18px 0;
}
.join-dates > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #314056;
  font-size: 12px;
}
.join-dates small {
  width: 100%;
  color: #91a2bc;
}
.selected-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid #354c6c;
  border-radius: 6px;
  background: #172c49;
  color: #c2d7f4;
  font-size: 11px;
}
.channel-chip button {
  border: 0;
  color: #aebfd6;
  background: none;
  font-size: 18px;
  padding: 0 2px;
  line-height: 1;
}
/* Human-readable role permissions */
.role-row {
  padding: 0;
  margin-bottom: 20px;
  background: #121b29;
  overflow: hidden;
}
.role-heading {
  padding: 18px;
  background: #172334;
  flex-wrap: nowrap;
  gap: 12px;
  border-bottom: 1px solid #2a394f;
}
.role-symbol {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #203a5d;
  color: #8fb9f9;
  flex-shrink: 0;
}
.role-name {
  min-width: 0;
  flex: 1;
}
.role-name h3 {
  margin: 0 0 7px;
  font-size: 14px;
  color: #e4edfb;
}
.role-heading .role-name code {
  font-size: 10px;
  color: #8296b3;
  overflow-wrap: anywhere;
}
.role-heading button {
  margin: 0;
}
.role-access {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 17px 18px;
  gap: 17px;
}
.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  padding: 10px;
  border-radius: 7px;
}
.permission-option:hover {
  background: #1b2b41;
}
.permission-option input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.permission-option strong {
  display: block;
  color: #d8e4f5;
  font-size: 12px;
  margin-bottom: 7px;
  font-weight: 600;
}
.permission-option small {
  display: block;
  font-size: 10px;
  color: #90a3bd;
  line-height: 1.7;
}
.role-tools {
  border-top: 1px solid #26354b;
}
.role-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
  color: #bed1ee;
  padding: 17px 26px;
}
.role-tools > summary span {
  font-size: 10px;
  background: #233550;
  padding: 4px 8px;
  border-radius: 5px;
}
.permission-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 8px 17px 22px;
}
.permission-groups fieldset {
  border: 1px solid #2a3a52;
  border-radius: 9px;
  min-width: 0;
  padding: 9px;
}
.permission-groups legend {
  color: #b9ceec;
  font-size: 11px;
  padding: 0 6px;
}
.role-picker {
  margin: 16px 0 12px;
}
@media (max-width: 800px) {
  .profile-stats,
  .staff-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-stats .stat {
    min-height: 100px;
    padding: 17px;
  }
  .profile-stats .stat strong {
    font-size: 21px;
  }
  .identifier-grid,
  .role-access,
  .permission-groups {
    grid-template-columns: 1fr;
  }
  .profile-head {
    flex-wrap: wrap;
  }
  .profile-head h2 {
    font-size: 21px;
  }
  .quick-card .quick-actions,
  .quick-card .card-header {
    padding: 18px;
  }
  .quick-button {
    flex: 0 1 auto;
    padding: 11px 12px;
    font-size: 11px;
  }
  .quick-button .icon {
    width: 20px;
    height: 20px;
  }
  .moderation-entry {
    padding: 18px;
  }
  .moderation-heading .history-controls {
    width: 100%;
    margin-left: 0;
  }
  .moderation-attribution {
    gap: 10px;
  }
  .role-heading {
    padding: 14px;
  }
  .role-heading .role-name code {
    width: auto;
  }
  .staff-total strong {
    font-size: 28px;
  }
}
.moderation-attribution .person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
/* Granular workspace navigation and controls */
[hidden] {
  display: none !important;
}
.sidebar {
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  flex-shrink: 0;
}
.sidebar .nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 18px;
}
.sidebar-foot {
  flex-shrink: 0;
  position: static;
  margin-top: auto;
}
.viewer > span {
  min-width: 0;
}
.access-role {
  display: inline-block;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.nav-section {
  margin-top: 18px;
}
.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 12px 13px;
  text-align: left;
  color: #8fa4c0;
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.nav-section-toggle .icon {
  width: 13px;
  height: 13px;
  transition: transform 0.15s;
}
.nav-section-toggle[aria-expanded="false"] .icon {
  transform: rotate(-90deg);
}
.nav-section-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-section-items a {
  margin: 0;
  padding-left: 14px;
}
.nav-section-toggle:hover {
  color: #e0e8f5;
  background: #1b283b;
}
.top-tools {
  min-width: 0;
  gap: 16px;
}
.notification-wrap {
  position: relative;
  flex-shrink: 0;
}
.notification-bell {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #29394f;
  border-radius: 9px;
  background: #172131;
  color: #b2c3dc;
}
.notification-bell .icon {
  width: 20px;
  height: 20px;
}
#notification-count {
  position: absolute;
  right: -5px;
  top: -5px;
  padding: 2px 4px;
  min-width: 17px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: 2px solid #0c1017;
  font-size: 9px;
}
.notification-menu {
  position: absolute;
  right: 0;
  top: 48px;
  width: min(390px, 90vw);
  z-index: 80;
  background: #162133;
  border: 1px solid #34465f;
  border-radius: 12px;
  box-shadow: 0 20px 60px #0009;
  overflow: hidden;
}
.notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid #304157;
  gap: 15px;
}
.notification-heading button {
  border: 0;
  background: none;
  color: #9dbef1;
  padding: 0;
  font-size: 10px;
}
#notification-list {
  max-height: 430px;
  overflow-y: auto;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #27364b;
  padding: 17px;
  color: #becce0;
}
.notification-item:hover {
  background: #20314b;
}
.notification-item.unread {
  background: #182b47;
}
.notification-item strong {
  display: block;
  font-size: 12px;
  color: #e0e9f8;
}
.notification-item p {
  font-size: 10px;
  line-height: 1.7;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.notification-item small {
  color: #8a9fbd;
  font-size: 9px;
}
.notification-item .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 4px;
}
.notification-item > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.notification-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #56657b;
}
.unread .notification-dot {
  background: #5e9cf2;
}
/* Styled accessible select menus */
.select-wrap {
  position: relative;
  min-width: 0;
}
.native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none;
}
.select-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  background: #111b29;
  border: 1px solid #35455d;
  border-radius: 9px;
  color: #d4e0f0;
  text-align: left;
  font-size: 12px;
  min-height: 43px;
}
.select-button:hover {
  border-color: #5a7397;
  background: #162438;
}
.select-button[aria-expanded="true"] {
  border-color: #6398ed;
  box-shadow: 0 0 0 2px #0057e126;
}
.select-button > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.selected-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.selected-option > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-button img,
.select-menu img {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}
.select-wrap[aria-invalid="true"] .select-button {
  border-color: #f06b7b;
}
.select-menu {
  position: fixed;
  z-index: 250;
  border: 1px solid #3a4d69;
  background: #172336;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 45px #000a;
  overflow: auto;
}
.select-menu > button {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 9px 11px;
  text-align: left;
  color: #c7d4e8;
  font-size: 12px;
}
.select-menu > button:hover,
.select-menu > button.highlighted {
  color: #fff;
  background: #2a4164;
}
.select-menu > button[aria-selected="true"] {
  color: #a9cdff;
  background: #1d3454;
}
/* Directory and moderation browsing */
.directory-sort {
  min-width: 205px;
}
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid #283548;
}
.filter-tabs button {
  padding: 9px 13px;
  border-radius: 7px;
  border: 1px solid #304159;
  background: #192334;
  color: #98abc6;
  font-size: 11px;
}
.filter-tabs button.active {
  border-color: #3478e5;
  color: #d1e4ff;
  background: #153663;
}
.filter-tabs button:hover {
  color: #e4eeff;
  border-color: #6384b4;
}
.load-more {
  text-align: center;
  padding: 15px;
}
.section-helper {
  margin: 0;
  padding: 18px 23px;
  color: #95a9c4;
  line-height: 1.8;
  font-size: 11px;
}
.embed-scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 18px 20px;
}
.embed-scope-grid fieldset {
  border: 1px solid #34465f;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.embed-scope-grid legend {
  color: #bdd1ec;
  font-size: 11px;
  padding: 0 5px;
}
.embed-scope-grid .check-label {
  font-size: 11px;
}
.favicon-card {
  max-width: 540px;
  margin-top: 26px;
}
/* Rich Discord message composer */
.rich-embed-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}
.rich-embed-layout > aside {
  position: sticky;
  top: 24px;
  min-width: 0;
}
.rich-embed-layout .card-header {
  flex-wrap: wrap;
  gap: 12px;
}
.rich-composer {
  display: grid;
  padding: 24px;
  gap: 20px;
}
.rich-composer > label,
.rich-composer .grid-2 > label {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rich-composer .grid-2 {
  gap: 14px;
}
.rich-composer .helper {
  margin: 0;
}
.rich-composer #message-content {
  min-height: 90px;
}
.mode-switch {
  display: flex;
  gap: 4px;
}
.mode-switch button {
  padding: 8px 10px;
  font-size: 11px;
}
.mode-switch button.active {
  background: #17365f;
  border-color: #4074b4;
  color: #d5e6ff;
}
.discord-body {
  flex: 1;
  min-width: 0;
}
.composer-section {
  border-top: 1px solid #2b3a50;
  padding-top: 19px;
}
.composer-section h3 {
  font-size: 13px;
  margin: 0 0 12px;
  color: #d4e1f5;
}
.composer-section > summary {
  color: #c3d3ed;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 15px;
}
.composer-section > label {
  margin-top: 13px;
}
.composer-section label {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.composer-section label.check-label {
  flex-direction: row;
  align-items: center;
}
.format-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid #34445d;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #202c3e;
}
.format-toolbar button {
  min-width: 28px;
  height: 27px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  color: #bcd0eb;
  background: transparent;
  font-size: 12px;
}
.format-toolbar button:hover {
  color: #fff;
  background: #37527a;
}
.format-toolbar + textarea {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.fields-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.fields-heading button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  padding: 7px 9px;
}
.fields-heading .icon {
  width: 14px;
  height: 14px;
}
.embed-field-editor {
  padding: 15px;
  border: 1px solid #30425e;
  border-radius: 8px;
  background: #172234;
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.embed-field-editor strong {
  font-size: 11px;
  color: #c5d5ed;
}
.embed-field-editor textarea {
  min-height: 75px;
}
.timestamp-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.timestamp-row > label {
  flex: 1;
  min-width: 0;
}
.timestamp-row button {
  font-size: 10px;
  min-height: 42px;
}
.rich-preview {
  padding: 15px 16px;
  overflow: hidden;
  min-height: 75px;
}
.rich-preview h3 {
  margin: 0 0 8px;
  color: #9fc4ff;
  font-size: 15px;
  line-height: 1.5;
}
.embed-author {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #edf2fa;
  margin-bottom: 11px;
}
.embed-author img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.embed-description,
.discord-content {
  line-height: 1.7;
  font-size: 12px;
  color: #d2dae7;
  overflow-wrap: anywhere;
}
.discord-content {
  margin: 7px 0;
}
.embed-thumbnail {
  float: right;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 5px;
  margin: 0 0 12px 15px;
}
.embed-main-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  margin-top: 14px;
  border-radius: 5px;
}
.embed-field-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 15px;
}
.embed-field-preview > div {
  grid-column: 1/-1;
  font-size: 11px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.embed-field-preview > div.inline {
  grid-column: auto;
}
.embed-field-preview strong {
  color: #edf2fb;
  line-height: 1.7;
}
.embed-field-preview p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: #c1cfdf;
}
.embed-footer {
  clear: both;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #aebed1;
  margin-top: 15px;
  line-height: 1.6;
}
.embed-footer img {
  width: 17px;
  height: 17px;
  border-radius: 50%;
}
.rich-preview pre,
.discord-content pre {
  padding: 8px;
  background: #101722;
  border: 1px solid #2e3d53;
  border-radius: 5px;
  white-space: pre-wrap;
  font-size: 11px;
}
.rich-preview code,
.discord-content code {
  background: #151d2a;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
}
.rich-preview a,
.discord-content a {
  color: #8dbdff;
  text-decoration: underline;
}
.md-heading {
  display: block;
  font-size: 14px;
  color: #eff4fc;
}
.md-heading.large {
  font-size: 17px;
}
.md-quote {
  display: block;
  border-left: 3px solid #8497b0;
  padding-left: 10px;
}
.spoiler {
  background: #15191f;
  color: transparent;
  border-radius: 3px;
  cursor: pointer;
}
.spoiler:hover,
.spoiler:focus {
  background: #354154;
  color: inherit;
}
#embed-character-count.invalid {
  color: #ff8b9b;
}
#saved-list {
  max-height: 410px;
  overflow-y: auto;
}
.saved-item > span {
  min-width: 0;
  flex: 1;
}
.saved-item small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
  color: #8b9fba;
}
/* Community line and donut charts */
.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 22px;
}
.chart-range {
  min-width: 135px;
  font-size: 10px;
}
.chart-range .select-button {
  min-height: 35px;
  font-size: 10px;
  padding: 8px 10px;
}
.activity-line-chart {
  padding: 17px 18px 10px;
  background: #1b2636;
  border-radius: 0 0 10px 10px;
}
.activity-line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
}
.activity-line-chart text {
  fill: #96a8c0;
  font-size: 10px;
}
.chart-grid-line {
  stroke: #354357;
  stroke-width: 1;
}
.chart-grid-line.vertical {
  opacity: 0.6;
}
.chart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #bccce0;
  margin: 5px 0 9px;
}
.chart-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-legend .unavailable {
  color: #8295ae;
}
.chart-legend i,
.donut-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.legend-staff,
.legend-commend {
  background: #29c795;
}
.legend-players,
.legend-freeze {
  background: #5da5f5;
}
.legend-unban {
  background: #20bf64;
}
.legend-warn {
  background: #f0cf18;
}
.legend-kick {
  background: #ff861c;
}
.legend-ban {
  background: #f04b4f;
}
.legend-spectate {
  background: #8b84f6;
}
.donut-chart {
  background: #1b2636;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 12px 14px 20px;
}
.donut-plot {
  width: min(100%, 220px);
}
.donut-plot svg {
  display: block;
  width: 100%;
  height: auto;
}
.donut-total {
  fill: #e2ecfa;
  font-size: 26px;
  font-weight: 650;
}
.donut-caption {
  fill: #8da1bd;
  font-size: 9px;
}
.donut-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px 10px;
}
.donut-legend button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: #bacce4;
  background: none;
  border: 0;
  border-radius: 5px;
  padding: 5px;
}
.donut-legend button:hover {
  background: #2b3e59;
}
.donut-legend button[aria-pressed="false"] {
  opacity: 0.35;
}
.donut-legend strong {
  font-size: 8px;
  color: #8297b2;
}
/* Leave management */
.loa-summary .stat small {
  font-size: 10px;
  color: #8396b0;
}
.loa-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 23px;
}
.loa-form .full-width {
  grid-column: 1/-1;
}
.loa-form textarea {
  min-height: 85px;
}
.loa-form input[type="date"] {
  min-width: 0;
  width: 100%;
}
.loa-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #3a6ab0;
  background: linear-gradient(115deg, #163865, #14243d);
  border-radius: 11px;
  padding: 27px;
  margin-bottom: 24px;
}
.loa-banner > .icon {
  width: 38px;
  height: 38px;
  color: #90baff;
  flex-shrink: 0;
}
.loa-banner > div {
  flex: 1;
  min-width: 0;
}
.loa-banner div > span {
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #90baff;
  font-weight: 650;
}
.loa-banner h2 {
  font-size: 20px;
  margin: 8px 0;
  color: #edf4ff;
}
.loa-banner p {
  margin: 0;
  font-size: 12px;
  color: #b1c7e8;
  line-height: 1.8;
}
.loa-banner p span {
  color: #8ca9cf;
}
.loa-review-table {
  min-width: 950px;
}
.loa-review-table td {
  vertical-align: top;
}
.loa-reason {
  max-width: 270px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.loa-review-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.loa-review-controls input {
  width: 150px;
  min-width: 130px;
}
.loa-review-controls button {
  font-size: 10px;
  padding: 11px 12px;
}
.leave-record {
  padding: 22px 24px;
  border-bottom: 1px solid #2b394c;
}
.leave-record:last-child {
  border-bottom: 0;
}
.leave-record-title {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}
.leave-record-title > span:last-child {
  margin-left: auto;
  font-size: 10px;
  color: #8da4c2;
}
.leave-record-title .person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.leave-record p {
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #b9cbe3;
}
.leave-record .leave-range {
  color: #829bbd;
  margin-bottom: 3px;
}
.leave-record .review-note {
  padding: 10px 12px;
  border-radius: 6px;
  background: #1b2b42;
  color: #aec5e7;
}
.leave-extensions > div {
  padding: 13px;
  background: #18243a;
  border: 1px solid #2b405e;
  border-radius: 7px;
  margin: 13px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.leave-extensions strong,
.leave-extensions span {
  font-size: 10px;
}
.leave-extensions p {
  flex-basis: 100%;
  margin: 0;
}
.source-highlight {
  outline: 2px solid #598cdb;
  outline-offset: -2px;
  background: #182c47;
}
@media (min-width: 1600px) {
  .charts-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}
@media (max-width: 1150px) {
  .rich-embed-layout {
    grid-template-columns: 1fr;
  }
  .rich-embed-layout > aside {
    position: static;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .donut-chart {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
  .donut-legend {
    max-width: 300px;
  }
  .donut-plot {
    width: 200px;
    flex-shrink: 0;
  }
}
@media (max-width: 800px) {
  .sidebar {
    display: block;
  }
  .sidebar .nav {
    overflow: visible;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sidebar .nav > a {
    margin: 0;
  }
  .nav-section {
    grid-column: 1/-1;
    margin-top: 6px;
  }
  .nav-section-toggle {
    padding: 10px 12px;
  }
  .nav-section-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .nav-section-items a {
    padding-left: 12px;
  }
  .top-tools {
    gap: 10px;
  }
  .breadcrumb {
    min-width: 0;
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar {
    gap: 9px;
  }
  .notification-bell {
    width: 33px;
    height: 33px;
  }
  .global-search {
    max-width: 190px;
  }
  .top-search input {
    width: 135px;
  }
  .notification-menu {
    position: fixed;
    right: 12px;
    top: 100px;
    width: calc(100vw - 24px);
  }
  .directory-sort {
    min-width: 170px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar .searchbox {
    flex-basis: 100%;
  }
  .filter-tabs {
    padding: 13px;
    gap: 6px;
  }
  .filter-tabs button {
    font-size: 10px;
    padding: 8px 11px;
  }
  .embed-scope-grid,
  .permission-groups,
  .loa-form {
    grid-template-columns: 1fr;
  }
  .embed-scope-grid {
    padding: 0 12px 15px;
  }
  .loa-form {
    padding: 18px;
  }
  .section-helper {
    padding: 17px 18px;
  }
  .donut-chart {
    flex-direction: column;
    gap: 4px;
  }
  .activity-line-chart {
    padding: 13px 8px 6px;
  }
  .activity-line-chart svg {
    min-height: 160px;
  }
  .chart-legend {
    gap: 8px;
    font-size: 8px;
  }
  .chart-range {
    min-width: 115px;
  }
  .chart-range .select-button {
    font-size: 9px;
  }
  .loa-banner {
    padding: 19px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .loa-banner h2 {
    font-size: 17px;
  }
  .loa-banner > .badge {
    margin-left: 50px;
  }
  .leave-record {
    padding: 18px;
  }
  .leave-record-title > span:last-child {
    margin-left: 0;
    flex-basis: 100%;
  }
  .timestamp-row {
    flex-wrap: wrap;
  }
  .timestamp-row button {
    min-height: 36px;
  }
  .mode-switch button {
    font-size: 9px;
  }
  .rich-composer {
    padding: 18px;
  }
  .embed-field-preview {
    gap: 10px;
  }
}
/* Shared controls and the editable production community setup. */
.top-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #27354a;
  border-radius: 9px;
  min-height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
}
.top-search input {
  margin: 0;
  height: 38px;
  min-width: 0;
  padding: 0;
  line-height: normal;
}
.top-search > .icon {
  flex-shrink: 0;
  display: block;
}
.notification-bell {
  padding: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  line-height: 1;
}
.notification-bell > .icon {
  display: block;
  margin: 0;
}
#directory-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  align-items: end;
  gap: 18px;
}
#directory-search .searchbox {
  min-height: 43px;
  height: 43px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#directory-search .searchbox input {
  margin: 0;
  height: 41px;
  min-width: 0;
}
#directory-search .directory-sort {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
#directory-search .directory-sort .select-button {
  height: 43px;
}
[data-profile-href] {
  cursor: pointer;
}
[data-profile-href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.member-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.custom-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.charts-grid {
  align-items: start;
  margin-bottom: 22px;
}
.charts-grid > .card {
  margin-bottom: 0;
}
.action-category-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 20px 0;
  background: #1b2636;
}
.action-category-tabs button {
  background: transparent;
  border: 1px solid #35455c;
  padding: 7px 11px;
  color: #a9bad1;
  border-radius: 6px;
  font-size: 10px;
}
.action-category-tabs button[aria-pressed="true"] {
  background: #1b3c69;
  border-color: #497ebd;
  color: #dcecff;
}
.action-category-content .donut-chart {
  min-height: 0;
  padding-bottom: 22px;
}
.legend-teleport {
  background: #b378f5;
}
.legend-summoned {
  background: #32c7d8;
}
.moderation-target {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  border: 1px solid #3b5273;
  border-radius: 9px;
  background: #182a43;
  margin: 16px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.setup-fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.setup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}
.setup-fields label,
.server-inspect label,
#badge-form > label,
#rule-form > label:not(.check-label),
.rule-target label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.setup-fields input {
  min-width: 0;
}
.setup-fields .full-width {
  grid-column: 1/-1;
}
.setup-switches {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 23px 0;
}
.setup-switches input,
.setup-fieldset input[type="checkbox"],
#rule-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.server-inspect {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.server-inspect label {
  flex: 1;
}
.server-inspect button {
  min-height: 43px;
}
.setup-server .admin-body {
  padding: 24px;
}
#ticket-configuration .setup-fields {
  margin-top: 20px;
}
.add-department {
  margin-bottom: 24px;
}
.setup-buttons {
  margin-bottom: 25px;
  flex-wrap: wrap;
}
.setup-validation {
  padding: 23px;
}
.protection-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #a8c9fb;
  font-size: 12px;
  line-height: 1.7;
}
.protection-notice .icon {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 2px;
}
.save-status {
  margin: 15px 0 0;
  padding: 12px 15px;
  background: #17283d;
  border: 1px solid #2c4566;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.validation-issue {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px;
  border: 1px solid #38465a;
  background: #152030;
  border-radius: 8px;
  margin: 13px 0;
}
.validation-issue.error {
  border-color: #6f3a47;
}
.validation-issue > div {
  min-width: 0;
}
.validation-issue strong {
  font-size: 12px;
}
.validation-issue p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.positive {
  color: #69d7a9;
}
.invalid {
  color: #ff9da9;
}
.permission-status-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
}
.validation-details {
  margin: 22px 0;
}
.validation-details summary {
  cursor: pointer;
}
.validation-details section {
  margin: 15px 0;
  padding: 15px;
  background: #101a29;
  border-radius: 8px;
}
.validation-details h3 {
  font-size: 13px;
  margin: 0 0 12px;
}
.server-inspection {
  margin-top: 18px;
}
.inspection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.inspection-grid > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 12px;
  background: #101a29;
  border: 1px solid #2a3b54;
  border-radius: 7px;
  font-size: 11px;
  min-width: 0;
}
.inspection-grid > div > span {
  flex-basis: 100%;
  color: #c4d3e8;
}
.inspection-grid button {
  margin-left: auto;
  padding: 5px;
}
.inspection-grid code,
.badge-setting code {
  overflow-wrap: anywhere;
}
.badge-setting,
.role-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.badge-setting > div:not(.button-row) {
  flex: 1;
  min-width: 150px;
}
.badge-setting strong {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
#badge-form,
#rule-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#badge-form input[type="color"] {
  height: 43px;
  padding: 5px;
  width: 100%;
}
.role-rule {
  align-items: flex-start;
}
.role-rule h3 {
  margin: 0 0 12px;
}
.role-rule p,
.role-rule li {
  font-size: 12px;
  line-height: 1.9;
  color: #9fb3ce;
  overflow-wrap: anywhere;
}
.rule-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  background: #101a29;
  border: 1px solid #31425e;
  border-radius: 8px;
  margin-bottom: 14px;
}
.target-role-choice {
  grid-column: 1/-1;
}
.target-role-choice:empty {
  display: none;
}
.role-audit-list article {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.role-audit-list p {
  color: #91a8c7;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  .setup-fields,
  .inspection-grid {
    grid-template-columns: 1fr;
  }
  .server-inspect {
    flex-direction: column;
    align-items: stretch;
  }
  .rule-target {
    grid-template-columns: 1fr 1fr;
  }
  .rule-target label {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  #directory-search {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .setup-buttons {
    align-items: stretch;
    flex-direction: column;
  }
  .setup-server .card-header {
    flex-wrap: wrap;
    gap: 15px;
  }
  .setup-server .admin-body {
    padding: 18px;
  }
  .validation-issue {
    flex-wrap: wrap;
  }
  .badge-setting .button-row {
    width: 100%;
  }
  .custom-badge {
    max-width: 100%;
  }
}
/* Consistent scrollbars, account controls, and saved day/night appearance. */
:root {
  --scroll-thumb: #40516a;
  --scroll-hover: #667d9f;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 12px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-hover);
}
.nav {
  padding-right: 8px;
  scrollbar-gutter: stable;
}
.sidebar-foot {
  position: relative;
}
button.viewer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 9px 5px;
  text-align: left;
  color: inherit;
  border-radius: 8px;
}
.viewer-text {
  min-width: 0;
  flex: 1;
}
.viewer-text strong,
.viewer-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewer-text strong {
  font-size: 12px;
}
.viewer-text small {
  font-size: 11px;
  margin-top: 5px;
}
.viewer > .icon {
  flex-shrink: 0;
  transform: rotate(180deg);
  width: 15px;
}
button.viewer:hover {
  background: var(--panel);
}
.account-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #1a2230;
  border: 1px solid #344258;
  border-radius: 13px;
  padding: 12px;
  z-index: 50;
  box-shadow: 0 16px 38px #0006;
}
.account-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.account-identity > div {
  min-width: 0;
}
.account-identity strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.account-identity span:not(.avatar) {
  display: block;
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.account-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  font-size: 12px;
}
.account-theme > div {
  display: flex;
  gap: 6px;
}
.account-theme button {
  border: 0;
  border-radius: 7px;
  padding: 7px;
  background: transparent;
  color: var(--muted);
  display: flex;
}
.account-theme button[aria-pressed="true"] {
  background: #34445b;
  color: #fff;
}
.account-menu #logout {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 10px 3px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  font-size: 12px;
}
.account-menu #logout:hover {
  color: #f07178;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pagination button {
  padding: 8px 12px;
}
.fixed-server-id {
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 12px;
  color: var(--muted);
}
.fixed-server-id code {
  color: inherit;
  font-size: 13px;
}
.settings-tabs {
  margin-bottom: 24px;
}
.validation-refreshed {
  animation: validation-refresh 1.5s ease-out;
}
@keyframes validation-refresh {
  from {
    outline: 2px solid var(--accent);
  }
  to {
    outline: 2px solid transparent;
  }
}
#setup-validation[aria-busy="true"] {
  opacity: 0.65;
}
#validate-setup:disabled {
  cursor: progress;
}
.native-rule-form {
  display: grid;
  gap: 22px;
}
.native-rule-form textarea {
  min-height: 100px;
}
.native-rule-form .check-label {
  display: flex;
  align-items: center;
}
.native-rule-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.native-rule-form [data-native-fields] {
  display: grid;
  gap: 14px;
}
.native-rule-form [hidden] {
  display: none;
}
.native-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 16px;
}
.native-rule,
.native-audit {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.native-rule:last-child,
.native-audit:last-child {
  border-bottom: 0;
}
.native-rule-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.native-rule-heading h3 {
  margin: 0;
}
.native-rule p,
.native-audit p,
.native-coordination {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.native-effects {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.native-rule details {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.native-rule pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.native-owned-count {
  font-size: 12px;
  text-align: right;
}
.charts-grid {
  align-items: stretch;
}
.charts-grid > .card {
  display: flex;
  flex-direction: column;
}
.charts-grid #activity-plot,
.charts-grid .chart-with-tabs {
  flex: 1;
  background: #1b2636;
}
.charts-grid .activity-line-chart svg {
  width: 100%;
  height: 210px;
}
.charts-grid .card-header {
  min-height: 95px;
}
html[data-theme="light"] {
  color-scheme: light;
  background: #f4f6fa;
  color: #253349;
  --muted: #56667d;
  --line: #d7dfeb;
  --panel: #f5f7fa;
  --sidebar: #edf1f7;
  --scroll-thumb: #afbed2;
  --scroll-hover: #7b92b2;
}
html[data-theme="light"]
  :is(
    h1,
    h2,
    h3,
    .brand-name,
    .viewer-text strong,
    .stat-number,
    .card-title,
    .person strong,
    th,
    .profile-head h2,
    .section-title,
    .breadcrumb strong
  ) {
  color: #172a44;
}
html[data-theme="light"] :is(.topbar, .sidebar, .login-page, .denied-page) {
  background: var(--sidebar);
}
html[data-theme="light"]
  :is(
    input,
    textarea,
    .select-button,
    select,
    .global-results,
    .notification-menu,
    .account-menu,
    dialog,
    .toolbar,
    .table-footer,
    .request-row,
    .note-item,
    .notes-list,
    .role-heading,
    .composer-section,
    .rule-target,
    .setup-validation,
    .admin-body,
    .member-badges
  ) {
  background: var(--panel);
  color: #263951;
  border-color: var(--line);
}
html[data-theme="light"]
  :is(
    .select-options,
    .select-option,
    .notification-heading,
    .dropdown,
    .card,
    .stat,
    .profile-stat,
    .quick-card,
    .message,
    .note,
    .reply-box,
    .message-embed,
    .embed-preview,
    .empty,
    .action-category-tabs,
    .role-editor-row,
    .role-row
  ) {
  background: var(--panel);
  color: #263951;
}
html[data-theme="light"]
  :is(
    .activity-line-chart,
    .donut-chart,
    .action-category-content,
    .charts-grid #activity-plot,
    .charts-grid .chart-with-tabs,
    .native-effects,
    .moderation-target,
    .profile-meta,
    .modal-target
  ) {
  background: #edf3fc;
  color: #263951;
}
html[data-theme="light"]
  :is(
    .ghost,
    .quick-button,
    .text-link,
    .nav a,
    .nav-section-toggle,
    .select-button,
    label,
    .check-label,
    .breadcrumb,
    .muted,
    .helper,
    .small,
    .permission-label,
    .legend-item,
    .table-footer
  ) {
  color: #425b7c;
}
html[data-theme="light"]
  :is(
    .nav a.active,
    .nav a:hover,
    .select-option:hover,
    .select-option[aria-selected="true"]
  ) {
  background: #dce9ff;
  color: #064fae;
}
html[data-theme="light"] .preview-banner {
  background: #fff6de;
  color: #70531c;
}
html[data-theme="light"] :is(td, tr, .card-header, .account-identity) {
  border-color: var(--line);
}
html[data-theme="light"]
  :is(
    .searchbox,
    .top-search,
    .notification-bell,
    .directory-sort,
    .saved-template,
    .filter-tabs
  ) {
  background: transparent;
}
html[data-theme="light"] .chart-grid-line {
  stroke: #cdd9e9;
}
html[data-theme="light"]
  :is(.chart-tick, .donut-label, .chart-legend, .donut-legend) {
  color: #506886;
  fill: #506886;
}
html[data-theme="light"] .primary {
  color: #fff;
}
@media (max-width: 700px) {
  .pagination {
    justify-content: space-between;
    width: 100%;
  }
  .native-rule-heading {
    align-items: flex-start;
  }
  .native-owned-count {
    max-width: 150px;
  }
  .charts-grid .activity-line-chart svg {
    height: 180px;
  }
}
html[data-theme="light"]
  :is(
    strong,
    .stat-top,
    .stat-foot,
    .ticket-row,
    .ticket-title,
    .ticket-item,
    .ticket-subject,
    .activity-reason,
    .profile-id,
    .person small,
    .table-footer,
    td,
    small
  ) {
  color: #425b7c;
}
html[data-theme="light"] :is(thead, th) {
  background: #eaf0f8;
  color: #405876;
}
html[data-theme="light"]
  :is(.donut-legend button, .chart-legend, .chart-legend span, .chart-range) {
  color: #425b7c;
}
html[data-theme="light"] .charts-grid svg text {
  fill: #425b7c;
}
html[data-theme="light"] .donut-total {
  fill: #172a44;
}
html[data-theme="light"] .account-theme button[aria-pressed="true"] {
  background: #dbe8fb;
  color: #164b91;
}
html[data-theme="light"] .positive {
  color: #13704b;
}
html[data-theme="light"] .invalid {
  color: #ad3346;
}
html[data-theme="light"] td a {
  color: #2d527f;
}
html[data-theme="light"] .action-category-tabs button {
  color: #425b7c;
}
html[data-theme="light"] .action-category-tabs button[aria-pressed="true"] {
  color: #fff;
}
@media (max-width: 800px) {
  .sidebar-foot {
    display: block;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .account-menu {
    max-width: 100%;
  }
}
/* Ticket systems and community notices share the panel's surfaces in both themes. */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding: 8px 0;
}
.workspace-tabs :is(a, button) {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 8px;
}
.workspace-tabs .active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.ticket-stats {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.ticket-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px;
  margin: 16px 0;
}
.ticket-section > summary,
.multi-picker > summary {
  cursor: pointer;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ticket-section > summary > span,
.multi-picker > summary > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.ticket-section[open] > summary {
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.ticket-section label {
  margin-bottom: 14px;
}
.message-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.ticket-message-preview {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ticket-message-preview .message-embed {
  margin: 0;
}
.preview-thumbnail {
  float: right;
  border: 1px dashed var(--line);
  padding: 12px;
  font-size: 12px;
}
.preview-image {
  padding: 32px;
  margin: 12px 0;
  border: 1px dashed var(--line);
  text-align: center;
}
.multi-picker {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
}
.multi-options {
  margin-top: 12px;
  max-height: 220px;
  overflow: auto;
}
.multi-options label {
  padding: 6px;
  margin: 0;
}
.form-field-editor {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 16px 0;
}
.save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.ticket-button-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.ticket-button-preview span {
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
}
.ticket-button-preview .disabled {
  opacity: 0.5;
}
.emoji-picker {
  padding: 10px 0;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin: 10px 0;
}
.emoji-grid button {
  padding: 8px;
  font-size: 23px;
}
.emoji-grid button[hidden] {
  display: none;
}
.ticket-trend {
  height: 210px;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 24px 20px 0;
  overflow-x: auto;
}
.ticket-period {
  flex: 1;
  min-width: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
}
.ticket-bars {
  display: flex;
  align-items: end;
  gap: 2px;
  width: 100%;
  height: 155px;
  border-bottom: 1px solid var(--line);
}
.ticket-bars i {
  flex: 1;
  border-radius: 3px 3px 0 0;
}
.ticket-bars .opened {
  background: #4a90f8;
}
.ticket-bars .closed {
  background: #20b98c;
}
.ticket-bars .backlog {
  background: #f49b37;
}
.ticket-period small {
  font-size: 9px;
  margin-top: 8px;
  color: var(--muted);
  white-space: nowrap;
  transform: rotate(-35deg);
}
.arrival-heatmap {
  display: grid;
  grid-template-columns: 32px repeat(24, minmax(17px, 1fr));
  gap: 4px;
  overflow: auto;
  padding: 20px;
}
.arrival-heatmap small {
  font-size: 10px;
  color: var(--muted);
}
.heat-cell {
  height: 20px;
  border-radius: 4px;
  background: rgba(0, 100, 235, var(--heat));
}
.directory-page-options {
  display: flex;
  justify-content: end;
  padding: 8px 20px 16px;
}
.directory-page-options label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.directory-page-options .select-wrap {
  width: 78px;
}
.directory-page-options .select-button {
  padding: 6px 9px;
  min-height: 30px;
  font-size: 12px;
}
button.small,
.setup-server button[data-remove-department] {
  font-size: 12px;
  padding: 6px 10px;
}
.loa-directory-icon {
  margin: 6px 0 0 48px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.loa-directory-icon .icon {
  width: 13px;
  height: 13px;
}
.notification-bell {
  color: #ff6577;
  border-color: #78374a;
}
.notification-bell:hover:not(:disabled) {
  color: #ffa2ad;
  background: #442534;
}
.preference-option {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.preference-option span {
  display: grid;
  gap: 6px;
}
.preference-option small {
  color: var(--muted);
}
.field-error {
  display: block;
  color: #ffa5b0;
  background: #67223733;
  padding: 9px 12px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #b94a6455;
  font-size: 12px;
  width: 100%;
}
.check-label:has(.field-error),
.confirmation:has(.field-error) {
  flex-wrap: wrap;
}
[aria-invalid="true"] {
  border-color: #d64c67;
}
html[data-theme="light"] :is(button, .ghost, .select-button) {
  color: #304766;
  border-color: var(--line);
  background: #eef3fa;
}
html[data-theme="light"]
  :is(button, .ghost, .select-button):hover:not(:disabled) {
  background: #dce8f7;
  color: #173f75;
}
html[data-theme="light"] :is(button.primary, .primary) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html[data-theme="light"] button.primary:hover:not(:disabled) {
  background: #064aa9;
  color: #fff;
}
html[data-theme="light"] :is(button.danger, .danger) {
  background: #fff0f2;
  color: #a02641;
  border-color: #edc0ca;
}
html[data-theme="light"] button.danger:hover:not(:disabled) {
  background: #ffe0e7;
  color: #8b1e35;
}
html[data-theme="light"]
  :is(
    .select-menu,
    .select-option,
    .global-result,
    .notification-item,
    .account-menu,
    .multi-picker,
    .ticket-section,
    .form-field-editor,
    .ticket-message-preview
  ) {
  background: var(--panel);
  color: #253d5b;
  border-color: var(--line);
}
html[data-theme="light"]
  :is(
    .select-option:hover,
    .select-option[aria-selected="true"],
    .global-result:hover,
    .notification-item:hover,
    .account-menu button:hover,
    .multi-options label:hover,
    tr[data-profile-href]:hover
  ) {
  background: #e7effb;
  color: #174776;
}
html[data-theme="light"]
  :is(
    .notice,
    .protection-notice,
    .leave-record,
    .staff-note,
    .form-field-editor,
    .native-rule-card,
    .native-rule-body,
    .template-preview,
    .template-form,
    .setup-switches,
    .pending-request,
    .saved-template
  ) {
  background: #f1f5fb;
  color: #324e70;
  border-color: var(--line);
}
html[data-theme="light"]
  :is(
    .notice,
    .helper,
    .muted,
    .permission-description,
    .staff-note time,
    .activity-row small
  ) {
  color: #536a87;
}
html[data-theme="light"] .field-error {
  background: #fff0f3;
  color: #a02641;
  border-color: #e7b9c3;
}
html[data-theme="light"] .notification-bell {
  color: #c12a46;
  border-color: #e6a6b4;
  background: #fff0f3;
}
html[data-theme="light"] .notification-bell:hover:not(:disabled) {
  background: #ffe0e7;
  color: #9e1d37;
}
html[data-theme="light"] .nav-section-toggle {
  background: transparent;
}
html[data-theme="light"] .workspace-tabs :is(a, button) {
  background: transparent;
  color: #526985;
}
html[data-theme="light"] .workspace-tabs .active {
  background: #dfebff;
  color: #074fac;
}
@media (max-width: 800px) {
  .message-editor-grid {
    grid-template-columns: 1fr;
  }
  .emoji-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .ticket-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .ticket-trend {
    gap: 4px;
  }
  .save-bar {
    align-items: stretch;
  }
  .ticket-section {
    padding: 14px;
  }
}
.setup-fields .check-label {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  min-height: 54px;
  gap: 10px;
}
.setup-fields .check-label input[type="checkbox"] {
  width: auto;
  flex: none;
}
html[data-theme="light"]
  :is(
    .quick-actions,
    .note-form,
    .preview-wrap,
    .format-toolbar,
    .quick-actions-card .card-header,
    .card:has(.quick-actions) > .card-header
  ) {
  background: #f2f6fc;
  color: #2e4868;
  border-color: var(--line);
}
html[data-theme="light"]
  :is(.save-status, .protection-notice, .count, .role-symbol) {
  background: #eaf1fc;
  color: #345475;
  border-color: #cbdaf0;
}
html[data-theme="light"] .avatar {
  background: #dfe9f7;
  color: #507197;
  border-color: #bfd0e8;
}
html[data-theme="light"] :is(.badge, .trust-score.good) {
  background: #e3f6ee;
  color: #22674e;
  border-color: #a7d7c0;
}
html[data-theme="light"] :is(.badge.amber, .trust-score.watch) {
  background: #fff3dc;
  color: #855d14;
  border-color: #e4ca95;
}
html[data-theme="light"] :is(.badge.red, .trust-score.low) {
  background: #fff0f3;
  color: #a32b49;
  border-color: #e2aaba;
}
html[data-theme="light"] :is(.badge.blue, .badge.gray) {
  background: #e7effc;
  color: #3b5d89;
  border-color: #bacdea;
}
html[data-theme="light"] .action-category-tabs button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html[data-theme="light"]
  :is(
    .ticket-row,
    .ticket-item,
    .ticket-subject,
    .staff-note,
    .leave-record,
    .notification-item,
    .profile-overview,
    .identifier-list,
    .format-toolbar
  ) {
  border-color: var(--line);
}
html[data-theme="light"] :is(.top-search input, .searchbox input) {
  background: transparent;
}
html[data-theme="light"] #toast {
  background: #e2f4ec;
  color: #205e48;
  border-color: #aacdbd;
  box-shadow: 0 8px 25px #25476622;
}
html[data-theme="light"] #toast.error {
  background: #fff0f3;
  color: #a32b49;
  border-color: #e2aaba;
}
html[data-theme="light"]
  :is(.quick-actions, .note-form, .preview-wrap, .format-toolbar)
  :is(p, small, strong, label) {
  color: inherit;
}
html[data-theme="light"]
  :is(
    .text-link,
    .ticket-title,
    .activity-reason,
    .action-platform,
    .role-name,
    .permission-label,
    .permission-description
  ) {
  color: #365c89;
}
html[data-theme="light"]
  :is(
    .quick-button:hover,
    .ticket-item:hover,
    .ticket-row:hover,
    .format-toolbar button:hover
  ) {
  background: #e0eafa;
  color: #234b80;
}

/* Shared scheduling/workspace components. */
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  vertical-align: middle;
  line-height: 1.35;
}
button .icon,
.button-link .icon,
.card-title .icon {
  flex: 0 0 auto;
}
button:not(.viewer) .icon {
  width: 17px;
  height: 17px;
}
.button-link {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 12px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  flex: 0 0 17px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
input[type="checkbox"]:focus {
  box-shadow: none;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.workspace-tabs {
  border-bottom: 1px solid var(--line);
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}
.workspace-tabs :is(a, button) {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 13px;
  background: transparent;
  text-decoration: none;
}
.workspace-tabs :is(a, button):hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.workspace-tabs .active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
.settings-tabs .active {
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.section-title {
  margin: 22px 0 16px;
  font-size: 17px;
}
.toolbar {
  align-items: flex-end;
  flex-wrap: wrap;
}
.toolbar > label {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 12px;
}
.toolbar :is(input, .select-button, button[type="submit"]) {
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
}
.toolbar > button {
  min-height: 42px;
}
.toolbar .searchbox {
  align-self: flex-end;
  min-width: 180px;
}
.toolbar .searchbox .icon {
  top: 13px;
}
.toolbar .select-wrap {
  margin: 0;
}
.account-menu :is(#notification-preferences, #logout) {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 9px;
  padding: 10px 5px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  border: 0;
  border-radius: 7px;
}
.account-menu :is(#notification-preferences, #logout):hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.account-menu :is(#notification-preferences, #logout) .icon {
  width: 17px;
  height: 17px;
}
.preference-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
}
.preference-option input {
  justify-self: start;
}
.preference-option span {
  line-height: 1.45;
}
.preference-option strong {
  font-size: 13px;
}
.preference-option small {
  font-size: 12px;
}
.preference-bulk {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 4px;
}
[hidden] {
  display: none !important;
}
.directory-footer {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.directory-page-options {
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.pagination {
  gap: 8px;
}
.page-jump {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.page-jump label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  margin: 0;
}
.page-jump input {
  width: 58px;
  padding: 6px 7px;
  min-height: 30px;
  height: 30px;
  font-size: 12px;
}
.page-jump button {
  padding: 6px 9px;
}
.member-flag {
  display: inline-flex;
  color: #edb82c;
  vertical-align: middle;
  margin-left: 7px;
}
.member-flag .icon {
  width: 17px;
  height: 17px;
}
.flag-reason {
  border-left: 3px solid #edb82c;
  padding: 5px 0 5px 14px;
  margin: 8px 0 16px;
}
.flag-reason strong {
  font-size: 13px;
}
.flag-reason p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.name-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.name-history-list li {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.name-history-list strong {
  font-size: 13px;
}
.name-history-list span {
  color: var(--muted);
  font-size: 11px;
}
.name-history .admin-body p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.authority-level {
  margin-left: 10px;
  font-size: 10px;
  padding: 3px 6px;
}
.role-level {
  max-width: 420px;
  font-size: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.role-access {
  display: block;
}
.log-routing {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.log-routing summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.log-routing .setup-fields {
  margin-top: 15px;
}
.unavailable-state {
  padding: 22px;
  font-size: 13px;
}
.unavailable-state p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.login-title {
  font-size: clamp(25px, 3vw, 36px) !important;
  line-height: 1.22 !important;
  letter-spacing: -0.7px;
  margin: 32px 0 12px;
}
.login-title span {
  display: block;
  color: var(--accent);
  margin-top: 8px;
}
.login-subtitle {
  font-size: 13px !important;
  color: var(--muted);
}
.login-footer a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.login-footer .icon {
  width: 14px;
  height: 14px;
}
.stats.workspace-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.profile-stats:not(.staff-stats):not(.loa-summary) {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}
.navigation-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}
.loading-dot,
button[aria-busy="true"]::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pending-spin 0.8s linear infinite;
  flex: 0 0 13px;
}
@keyframes pending-spin {
  to {
    transform: rotate(360deg);
  }
}
.charts-grid .activity-line-chart {
  padding: 16px 20px 14px;
  width: 100%;
}
.charts-grid .activity-line-chart svg {
  display: block;
  width: 100%;
  height: 230px;
  max-height: none;
}
.activity-line-chart text {
  font-size: 11px;
}
.calendar-zone {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 16px 0;
}
.calendar-zone .icon {
  height: 15px;
  width: 15px;
}
.calendar-grid,
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.calendar-weekdays span {
  padding: 12px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.calendar-day {
  min-height: 118px;
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.calendar-day.outside {
  background: color-mix(in srgb, var(--muted) 4%, transparent);
}
.calendar-day > time {
  display: block;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 9px;
}
.calendar-day.today > time {
  color: var(--accent);
  font-weight: 700;
}
.calendar-day.today {
  box-shadow: inset 0 2px var(--accent);
}
.calendar-event {
  display: block;
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 6px;
  margin-bottom: 5px;
  overflow: hidden;
}
.calendar-event:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.calendar-event-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.calendar-event.response-pending {
  border-color: #e5ad29;
}
.calendar-event.cancelled {
  opacity: 0.65;
  text-decoration: line-through;
}
.calendar-busy {
  display: block;
  font-size: 9px;
  color: var(--muted);
  padding: 3px;
}
.calendar-agenda-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}
.calendar-agenda-row:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.calendar-agenda-row > div {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 7px;
}
.calendar-agenda-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.calendar-agenda-row span:not(.badge) {
  color: var(--muted);
  font-size: 11px;
}
.calendar-sync p,
.calendar-sync small {
  color: var(--muted);
  line-height: 1.6;
  font-size: 12px;
}
.calendar-modal {
  width: min(720px, calc(100vw - 28px));
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid label {
  min-width: 0;
}
.calendar-modal label:not(.check-label) {
  display: grid;
  gap: 7px;
  font-size: 12px;
  margin: 14px 0;
}
.calendar-modal .form-grid label {
  margin: 5px 0;
}
.calendar-modal h3 {
  margin: 20px 0 12px;
  font-size: 13px;
}
.invitee-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.invitee-options .check-label {
  margin: 0;
  padding: 5px;
  font-size: 12px;
  align-items: start;
}
.weekday-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  margin-top: 12px;
}
.weekday-choices .check-label {
  margin: 0;
  font-size: 12px;
}
.weekday-choices legend {
  color: var(--muted);
  font-size: 12px;
}
.availability-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.availability-record strong {
  font-size: 13px;
}
.availability-record p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.conflict-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.conflict-list li {
  display: grid;
  gap: 7px;
  padding: 12px;
  margin: 8px 0;
  border-left: 2px solid #e5ad29;
  background: color-mix(in srgb, #e5ad29 5%, transparent);
  font-size: 12px;
}
.conflict-list span {
  color: var(--muted);
  line-height: 1.5;
}
.event-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  flex-wrap: wrap;
}
.event-description {
  font-size: 13px;
  line-height: 1.7;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.event-response {
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.event-response > strong {
  display: block;
  margin-bottom: 15px;
  font-size: 12px;
}
.calendar-proposal {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.calendar-proposal .badge {
  margin-left: 10px;
}
.calendar-proposal p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
html[data-theme="light"] .workspace-tabs .active {
  color: #0057c9;
  background: #e5eeff;
}
html[data-theme="light"] .member-flag {
  color: #9d6b00;
}
html[data-theme="light"] :is(.calendar-event, .navigation-loading) {
  color: #172b45;
}
html[data-theme="light"] .calendar-event {
  background: #e7efff;
}
html[data-theme="light"] .calendar-event:hover {
  background: #d7e4ff;
}
@media (max-width: 1200px) {
  .stats.workspace-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .stats.workspace-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .directory-footer {
    padding: 12px;
  }
  .directory-page-options {
    justify-content: flex-start;
    gap: 12px;
  }
  .directory-page-options .pagination {
    gap: 6px;
  }
  .calendar-scroll {
    overflow-x: auto;
  }
  .calendar-grid,
  .calendar-weekdays {
    min-width: 680px;
  }
  .calendar-agenda-row {
    padding: 15px;
    gap: 8px;
  }
  .form-grid,
  .invitee-options {
    grid-template-columns: minmax(0, 1fr);
  }
  .charts-grid .activity-line-chart {
    padding: 14px 12px;
  }
  .charts-grid .activity-line-chart svg {
    height: 230px;
  }
  .toolbar .searchbox {
    max-width: none;
    flex-basis: 100%;
  }
  .name-history {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-dot,
  button[aria-busy="true"]::after {
    animation: none;
  }
}

button.stat {
  display: block;
  text-align: left;
}
:root {
  --text: #dce3ed;
}
html[data-theme="light"] {
  --text: #253349;
}

/* Personal calendars and follow-up controls. */
.notification-bell {
  color: var(--muted);
  border-color: var(--line);
}
.notification-bell:hover:not(:disabled) {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
#notification-count {
  background: #e34b59;
  color: #fff;
  border-radius: 50%;
  min-width: 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 9px;
}
.notification-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.notification-row .notification-item {
  flex: 1;
  min-width: 0;
  border: 0;
}
.notification-dismiss {
  margin: 0 9px 0 0;
  flex: 0 0 28px;
}
.trash-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  min-height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #ed7581;
}
.trash-icon:hover:not(:disabled) {
  color: #ff9daa;
  background: #b5394b1f;
  border-color: #b5394b55;
}
.trash-icon .icon {
  width: 15px !important;
  height: 15px !important;
}
html[data-theme="light"] .trash-icon {
  color: #b32439;
  background: transparent;
  border-color: transparent;
}
html[data-theme="light"] .trash-icon:hover:not(:disabled) {
  color: #971628;
  background: #fff0f2;
  border-color: #f2bcc5;
}
.directory-table {
  table-layout: auto;
  width: 100%;
  min-width: 690px;
}
.directory-table td:first-child {
  position: relative;
}
.directory-name-cell {
  display: block;
  position: relative;
}
.directory-name-cell .person {
  flex: 1;
  min-width: 0;
  width: auto;
}
.directory-name-cell .person > span:last-child {
  min-width: 0;
}
.directory-name-cell:has(.member-flag) .person > span:last-child {
  max-width: calc(100% - 75px);
}
.directory-name-cell .person strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.directory-name-cell .member-flag {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  margin: 0;
  width: 25px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 5px;
  background: #e9b12f12;
  border: 1px solid #b98f354f;
  border-radius: 6px;
  color: #edbb42;
}
.directory-name-cell .member-flag .icon {
  width: 14px;
  height: 14px;
}
.flag-reason time {
  display: block;
  color: var(--muted);
  margin-top: 10px;
  font-size: 11px;
}
.evidence-editor {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.evidence-editor summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.evidence-editor label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  font-size: 12px;
}
.evidence-editor input[type="file"] {
  font-size: 11px;
  width: 100%;
}
.evidence-draft {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 12px;
}
.evidence-draft small {
  color: var(--muted);
}
.evidence-records article {
  display: grid;
  gap: 9px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.evidence-records small,
.evidence-records time {
  font-size: 11px;
  color: var(--muted);
}
.voice-role-mentions {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
}
.voice-message-preview {
  padding: 12px;
  background: var(--panel);
  border-radius: 7px;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.holiday-edit-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 2fr) 28px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}
.holiday-edit-row label {
  margin: 0;
}
.calendar-heading-tools {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}
.calendar-owner-label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  min-width: 220px;
  max-width: 300px;
}
.calendar-heading-tools .select-button {
  min-height: 39px;
}
.calendar-heading-tools .primary {
  min-height: 39px;
}
.calendar-day-number {
  display: flex;
  margin: 0 0 8px auto;
  padding: 3px 5px;
  min-height: 20px;
  width: auto;
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
}
.calendar-day-number:hover {
  color: var(--accent);
}
.calendar-event {
  --event-color: #6695ff;
  color: var(--text);
  border-color: var(--event-color);
  background: color-mix(in srgb, var(--event-color) 10%, transparent);
}
.type-meeting {
  --event-color: #6695ff;
}
.type-training {
  --event-color: #27bd9a;
}
.type-other {
  --event-color: #aa88eb;
}
.type-community {
  --event-color: #d3a347;
}
.calendar-event time {
  font-size: 10px;
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
  color: var(--event-color);
}
.calendar-event-title {
  font-weight: 500;
}
.calendar-holiday {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  padding: 3px 0;
  opacity: 0.8;
}
.calendar-holiday::before {
  content: "· ";
  color: #d3a347;
}
.calendar-year {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 24px;
}
.mini-month-title {
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  padding: 5px;
}
.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.mini-month-grid > span {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  padding: 4px 0;
}
.mini-month-grid > button {
  background: transparent;
  border: 0;
  padding: 6px 2px;
  font-size: 11px;
  border-radius: 6px;
  position: relative;
}
.mini-month-grid .has-events {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.mini-month-grid .has-busy {
  box-shadow: inset 0 -2px #8a96a77a;
}
.mini-month-grid .has-holiday::after {
  content: "";
  width: 3px;
  height: 3px;
  background: #c7a15b;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  right: 3px;
}
.calendar-time-scroll {
  overflow: auto;
  height: min(650px, 70vh);
  min-height: 380px;
}
.calendar-time-grid,
.time-grid-head {
  display: grid;
  grid-template-columns: 62px repeat(var(--calendar-days), minmax(0, 1fr));
  min-width: 750px;
}
.calendar-time-grid[data-calendar-days="1"],
.time-grid-head[data-calendar-days="1"] {
  min-width: 0;
}
.time-grid-head {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 5;
  border-bottom: 1px solid var(--line);
}
.time-grid-head > span {
  font-size: 8px;
  color: var(--muted);
  padding: 10px 5px;
  overflow-wrap: anywhere;
}
.time-grid-head > button {
  border: 0;
  background: transparent;
  display: block;
  padding: 11px 5px;
  font-size: 11px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.time-axis {
  position: relative;
  height: 1152px;
  font-size: 9px;
  color: var(--muted);
}
.time-axis span {
  position: absolute;
  right: 10px;
}
.time-day {
  position: relative;
  height: 1152px;
  border-left: 1px solid var(--line);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 23px,
    color-mix(in srgb, var(--line) 45%, transparent) 23px,
    color-mix(in srgb, var(--line) 45%, transparent) 24px,
    transparent 24px,
    transparent 47px,
    var(--line) 47px,
    var(--line) 48px
  );
}
.time-entry {
  position: absolute;
  left: 3px;
  right: 3px;
  min-height: 26px;
  padding: 5px;
  overflow: hidden;
  border-radius: 5px;
  border-left: 2px solid var(--event-color, #8d97a5);
  background: color-mix(in srgb, var(--event-color, #8d97a5) 15%, var(--panel));
  font-size: 11px;
}
.time-entry a {
  display: block;
  height: 100%;
  color: inherit;
}
.time-entry time,
.time-entry strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.time-entry time {
  font-size: 9px;
  margin-bottom: 3px;
}
.time-busy {
  background: color-mix(in srgb, var(--muted) 12%, var(--panel));
  color: var(--muted);
}
.scheduling-time-grid {
  display: grid;
  grid-template-columns: minmax(170px, 2fr) minmax(110px, 1fr) 12px minmax(
      110px,
      1fr
    );
  gap: 12px;
  align-items: end;
}
.scheduling-time-grid label {
  margin: 8px 0 !important;
}
.time-dash {
  align-self: center;
  padding-top: 22px;
  color: var(--muted);
}
.timezone-label {
  display: flex;
  gap: 5px;
  align-items: center;
}
.timezone-label .icon {
  width: 13px;
  height: 13px;
}
.participant-picker {
  position: relative;
  margin: 17px 0;
}
.participant-results {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px #0004;
  max-height: 270px;
  overflow-y: auto;
  z-index: 15;
  padding: 5px;
}
.participant-results > button {
  display: flex;
  justify-content: space-between;
  border: 0;
  background: transparent;
  width: 100%;
  padding: 10px;
  text-align: left;
  gap: 15px;
}
.participant-results > button:hover,
.participant-results .highlighted {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.participant-results small {
  color: var(--muted);
  font-size: 10px;
}
.participant-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.participant-chip {
  display: inline-flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px;
}
.participant-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.participant-chip .icon {
  width: 12px;
  height: 12px;
}
.participant-chip button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
}
.participant-chip small {
  color: var(--muted);
  font-size: 10px;
}
.participant-chip [data-participant-warning]:not(:empty) {
  flex-basis: 100%;
  color: #d7aa43;
}
.conflict-warning {
  background: #d7aa4310;
  border: 1px solid #d7aa4340;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.event-datetime {
  display: grid;
  gap: 9px;
  margin-bottom: 22px;
}
.event-datetime > strong {
  font-size: 20px;
  font-weight: 600;
}
.event-datetime > span {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.event-datetime > small {
  font-size: 11px;
  color: var(--muted);
}
.participant-response {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  font-size: 12px;
}
.participant-response > strong {
  flex: 1;
}
.participant-response time {
  font-size: 10px;
  color: var(--muted);
}
.compact-participants .card-header {
  padding-top: 15px;
  padding-bottom: 15px;
}
.agenda-date {
  max-width: 185px;
}
.community-attendance {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
html[data-theme="light"] .calendar-event {
  color: #23384e;
  background: color-mix(in srgb, var(--event-color) 10%, #fff);
}
html[data-theme="light"] .directory-name-cell .member-flag {
  color: #966600;
  background: #fff7df;
  border-color: #d9bf74;
}
html[data-theme="light"] .notification-bell {
  color: var(--muted);
  border-color: var(--line);
}
@media (max-width: 1000px) {
  .calendar-year {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .calendar-heading-tools {
    width: 100%;
    align-items: end;
  }
  .calendar-heading-tools .calendar-owner-label {
    flex: 1;
    min-width: 180px;
    max-width: none;
  }
  .calendar-year {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }
  .scheduling-time-grid {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 8px;
  }
  .schedule-date {
    grid-column: 1/-1;
  }
  .scheduling-time-grid .time-dash {
    padding-top: 18px;
  }
  .holiday-edit-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px;
    gap: 8px;
  }
  .community-attendance {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .calendar-agenda-row {
    flex-wrap: wrap;
  }
  .agenda-date {
    min-width: 100%;
  }
  .event-datetime > strong {
    font-size: 17px;
  }
  .event-datetime > span {
    font-size: 21px;
  }
  .participant-response time {
    flex-basis: 100%;
  }
}
.audit-list {
  padding: 6px 20px;
}
.audit-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.audit-entry:last-child {
  border-bottom: 0;
}
.audit-entry p,
.audit-entry time {
  color: var(--muted);
  font-size: 11px;
  margin: 6px 0 0;
}
.audit-entry > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.audit-entry .trash-icon {
  flex-shrink: 0;
}
.message-head .trash-icon {
  margin-left: 8px;
}
.transcript-tools {
  display: flex;
  justify-content: flex-end;
}

.voice-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.voice-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 11px;
}
.voice-role-chip button {
  border: 0;
  background: transparent;
  padding: 2px 5px;
  color: var(--muted);
}
/* Follow-up controls retain stable label positions and compact, visible hit areas. */
.select-menu [role="option"] {
  position: relative;
  justify-content: flex-start;
  text-align: left;
}
.select-menu .option-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  text-align: left;
}
.select-menu .select-check {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  text-align: center;
}
label:has(> :is(input[type="checkbox"], .native-check)):not(
    .permission-option,
    .preference-option,
    .selection-card
  ) {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: 9px;
}
label:has(> :is(input[type="checkbox"], .native-check))
  > :is(input[type="checkbox"], .native-check) {
  flex: 0 0 auto;
}
.log-entry-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.log-entry-layout > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.log-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.native-audit,
.role-audit-list > article,
.request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
}
:is(.native-audit, .role-audit-list > article, .request-row)
  > :not(.trash-icon) {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
:is(.native-audit, .role-audit-list > article, .request-row) > .trash-icon {
  grid-column: 2;
  grid-row: 1 / span 8;
  align-self: center;
}
.message-head {
  gap: 10px;
  flex-wrap: wrap;
}
.message-head .trash-icon {
  margin-left: auto;
  flex-shrink: 0;
}
.staff-note > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
}
.staff-note > div > :not(.trash-icon) {
  grid-column: 1;
  min-width: 0;
}
.staff-note > div > .trash-icon {
  grid-column: 2;
  grid-row: 1 / span 8;
  align-self: start;
}
.time-picker {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  min-width: 0;
}
.time-picker .select-button {
  padding: 10px 8px;
  min-width: 0;
  gap: 3px;
}
.time-picker .select-button svg {
  width: 12px;
}
.scheduling-time-grid {
  grid-template-columns: minmax(165px, 1.15fr) minmax(210px, 1fr) 12px minmax(
      210px,
      1fr
    );
}
.date-picker-field {
  position: relative;
  display: flex;
  align-items: center;
}
.date-picker-field input {
  padding-right: 38px;
  width: 100%;
}
.polished-date::-webkit-calendar-picker-indicator {
  display: none;
}
.date-picker-button {
  position: absolute;
  right: 5px;
  border: 0;
  background: transparent;
  padding: 6px;
  display: flex;
  color: var(--muted);
}
.date-picker-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.date-picker-popover {
  position: fixed;
  z-index: 100;
  width: 288px;
  max-width: calc(100vw - 16px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 16px 40px #0005;
  color: var(--text);
}
.date-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}
.date-picker-heading button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 21px;
  padding: 2px 10px;
}
.date-week-labels,
.date-picker-grid > [role="row"] {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.date-week-labels span {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.date-picker-grid button {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 7px;
  font-size: 12px;
  padding: 9px 0;
}
.date-picker-grid button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.date-picker-grid button[aria-selected="true"] {
  background: var(--accent);
  color: white;
}
@media (max-width: 900px) {
  .scheduling-time-grid {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  }
  .scheduling-time-grid .schedule-date {
    grid-column: 1/-1;
  }
  .time-picker .select-button {
    padding: 10px 5px;
    font-size: 11px;
  }
}
@media (max-width: 560px) {
  .log-entry-layout {
    gap: 12px;
    align-items: start;
  }
  .log-actions {
    gap: 6px;
  }
  .time-picker {
    gap: 3px;
  }
  .time-picker .select-button {
    font-size: 10px;
    padding: 10px 4px;
  }
  .time-picker .select-button svg {
    display: none;
  }
}
.workspace-tabs {
  position: relative;
  isolation: isolate;
}
.section-loading-content {
  min-height: 220px;
  margin-top: 18px;
}
.dashboard-actions {
  padding: 0 20px;
}
.dashboard-action {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.dashboard-action:last-child {
  border-bottom: 0;
}
.dashboard-action-main {
  min-width: 0;
}
.affected-member {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
}
.action-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 8px;
}
.action-meta time,
.action-staff {
  font-size: 11px;
  color: var(--muted);
}
.action-staff span {
  display: block;
  margin-top: 6px;
}
.dashboard-action p {
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.action-code {
  display: inline-block;
  font:
    11px ui-monospace,
    monospace;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin: 0 7px;
}
.action-code:hover {
  color: var(--accent);
}
.action-detail-fields dt {
  color: var(--muted);
  font-size: 11px;
  margin-top: 14px;
}
.action-detail-fields dd {
  margin: 5px 0;
  font-size: 13px;
  white-space: pre-wrap;
}
@media (max-width: 650px) {
  .dashboard-action {
    align-items: start;
    gap: 14px;
    flex-wrap: wrap;
  }
  .dashboard-action .log-actions {
    margin-left: auto;
  }
  .action-meta {
    gap: 8px;
  }
}

.datetime-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.datetime-picker .time-picker {
  min-width: 0;
}

/* Shared table rows keep member, metadata and controls aligned. */
.member-actions-table {
  min-width: 1080px;
  table-layout: fixed;
}
.member-actions-table .member-action-person {
  width: 19%;
}
.member-actions-table .member-action-type {
  width: 11%;
}
.member-actions-table .member-action-id {
  width: 9%;
}
.member-actions-table .member-action-date {
  width: 12%;
}
.member-actions-table .member-action-reason {
  width: 22%;
}
.member-actions-table .member-action-staff {
  width: 15%;
}
.member-actions-table .member-action-controls {
  width: 12%;
}
.member-actions-table td {
  vertical-align: top;
  padding: 16px 18px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.member-actions-table .affected-member {
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
}
.member-actions-table .affected-member strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.member-actions-table .avatar {
  flex: 0 0 29px;
  width: 29px;
  height: 29px;
}
.member-actions-table .action-code {
  margin: 0;
  font-size: 11px;
}
.member-actions-table small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.member-actions-table .action-reason {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}
.member-actions-table .action-staff {
  font-size: 11px;
}
.member-actions-table .history-controls {
  margin: 0;
}
.member-actions-table .log-actions {
  gap: 7px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.member-actions-table .history-controls button {
  margin-top: 0;
}
.member-actions-table.dashboard-actions {
  padding: 0;
}
.member-actions-table .dashboard-action {
  display: table-row;
  padding: 0;
}
.member-actions-table .action-status {
  line-height: 1.4;
}
.charts-grid:has(> .card:only-child) {
  grid-template-columns: minmax(0, 1fr);
}
.stats.workspace-stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.time-select-menu {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.time-select-menu [role="option"] {
  box-sizing: border-box;
  min-width: 0;
  padding: 9px 10px;
  gap: 0;
  white-space: nowrap;
}
.time-select-menu [role="option"] > span {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
}
.settings-field {
  display: grid;
  gap: 8px;
  margin-bottom: 23px;
}
.settings-field:last-child {
  margin-bottom: 0;
}
.settings-field > label {
  margin: 0;
  gap: 8px;
}
.settings-field > .helper {
  margin: 0;
  line-height: 1.5;
}
#section-settings-form .admin-body > .helper {
  margin: 8px 0 20px;
}
#section-settings-form #custom-holidays {
  margin-top: 18px;
}
#section-settings-form #add-holiday {
  margin-top: 4px;
}
#section-settings-form .card > .card-header {
  padding-bottom: 20px;
}
#section-settings-form > .button-row {
  margin-top: 24px;
}
.staff-since {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 9px;
}

#section-settings-form .admin-body label {
  gap: 8px;
}
#section-settings-form .branding-fields,
#section-settings-form .trust-fields {
  gap: 22px;
}
.setup-server .setup-fields {
  row-gap: 22px;
}
.setup-server .log-routing > .helper {
  margin: 12px 0 18px;
}
.setup-server .setup-fields label {
  gap: 8px;
}

/* Staff identity stays secondary, aligned and independent of name length. */
.profile-head .staff-identity {
  min-width: 0;
  flex: 1;
}
.staff-identity h2 {
  overflow-wrap: anywhere;
}
.staff-identity .profile-id {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.staff-identity-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.staff-identity-details .staff-since {
  margin: 0;
  line-height: 1.5;
}
.staff-identity-details .authority-level {
  margin: 0;
  flex-shrink: 0;
}
.staff-identity-details > .small {
  font-size: 10px;
}
.content[data-page="dashboard"] .stat-top .icon,
.content[data-page="dashboard"] .card-title > .icon:not([data-icon="flag"]),
.content[data-page="dashboard"] .card-header > .icon {
  color: #548eff;
}
html[data-theme="light"] .content[data-page="dashboard"] .stat-top .icon,
html[data-theme="light"]
  .content[data-page="dashboard"]
  .card-title
  > .icon:not([data-icon="flag"]),
html[data-theme="light"] .content[data-page="dashboard"] .card-header > .icon {
  color: #0057e1;
}
/* Stationary section navigation; only content fades, without a timing gate. */
.workspace-tabs > a {
  transition: none;
}
.content:not([aria-busy="true"])
  > :not(.page-heading):not(.workspace-tabs):not(.footer) {
  animation: section-content-fade 0.12s ease-out;
}
@keyframes section-content-fade {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
  }
}
.navigation-loading.skeleton-loading {
  display: block;
  padding: 0;
  min-height: 240px;
}
.skeleton-card,
.skeleton-profile,
.skeleton-table,
.skeleton-calendar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  margin-top: 20px;
  overflow: hidden;
}
.skeleton-card {
  padding: 24px;
  min-height: 180px;
}
.skeleton-line {
  display: block;
  border-radius: 5px;
  background: var(--line);
  height: 12px;
  max-width: 100%;
  margin: 12px 0;
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}
.skeleton-line:nth-child(2) {
  width: 72%;
}
.skeleton-line:nth-child(3) {
  width: 47%;
}
.skeleton-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  min-height: 62px;
}
.skeleton-row:last-child {
  border: 0;
}
.skeleton-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.skeleton-stats .skeleton-card {
  min-height: 150px;
}
.skeleton-profile {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  min-height: 130px;
}
.skeleton-profile > div {
  flex: 1;
}
.skeleton-avatar {
  background: var(--line);
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 18px;
}
.skeleton-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.skeleton-day {
  height: 96px;
  border: 1px solid var(--line);
}
.skeleton-day:nth-child(3n) {
  background: color-mix(in srgb, var(--line) 22%, transparent);
}
.event-invitation-option {
  max-width: 580px;
}
.event-invitation-option small {
  line-height: 1.5;
}
@keyframes skeleton-pulse {
  50% {
    opacity: 0.45;
  }
}
@media (max-width: 560px) {
  .skeleton-row {
    gap: 10px;
    padding: 12px;
  }
  .skeleton-day {
    height: 65px;
  }
  .staff-identity-details {
    gap: 8px 12px;
  }
  .profile-head:has(.staff-identity) {
    align-items: flex-start;
  }
  .staff-identity h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .content:not([aria-busy="true"])
    > :not(.page-heading):not(.workspace-tabs):not(.footer) {
    animation: none;
  }
}

/* Reveal only when a read actually takes time; no request/render is delayed. */
.skeleton-loading {
  animation: skeleton-reveal 0s 0.08s both;
}
@keyframes skeleton-reveal {
  from {
    visibility: hidden;
  }
  to {
    visibility: visible;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-loading {
    animation: none;
    visibility: visible;
  }
}
