/*
Copyright (c) 2026 Duckie Technologies. All Rights Reserved. Proprietary and confidential. Unauthorized copying, distribution, modification, or reuse is strictly prohibited.
*/
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f1ea;
  --surface: #fffdfa;
  --surface-soft: #fff7ec;
  --text: #171b24;
  --muted: #5b6678;
  --border: #e4dccf;
  --primary: #d24f2f;
  --primary-strong: #b23f23;
  --accent: #178a81;
  --accent-strong: #0f6a63;
  --radius: 16px;
  --shadow: 0 18px 36px rgba(23, 26, 34, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% -20%, #ffd8b8 0, #ffd8b800 40%),
    radial-gradient(circle at -18% 22%, #c2e5e0 0, #c2e5e000 44%),
    var(--bg);
}

html.kyra-page-loading,
html.kyra-page-loading body {
  overflow: hidden;
}

.kyra-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(1.5px);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.kyra-page-loader.is-exit {
  opacity: 0;
  pointer-events: none;
}

.kyra-loader-stage {
  position: relative;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kyra-loader-spinner {
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  animation: kyraLoaderSpin 0.8s linear infinite;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.kyra-loader-complete {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, #27b765, #1f9f57);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow:
    0 8px 20px rgba(39, 183, 101, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.76);
}

.kyra-loader-check {
  width: 16px;
  height: 9px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(-45deg) scale(0.72);
  transform-origin: center;
  opacity: 0;
}

.kyra-page-loader.is-complete .kyra-loader-spinner {
  opacity: 0;
  transform: scale(0.72);
}

.kyra-page-loader.is-complete .kyra-loader-complete {
  animation: kyraLoaderCompleteIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.kyra-page-loader.is-complete .kyra-loader-check {
  animation: kyraLoaderCheckPop 0.24s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s forwards;
}

.kyra-page-loader.is-exit .kyra-loader-stage {
  transform: scale(0.93);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

@keyframes kyraLoaderSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes kyraLoaderCompleteIn {
  0% {
    opacity: 0;
    transform: scale(0.76);
  }
  70% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kyraLoaderCheckPop {
  0% {
    opacity: 0;
    transform: rotate(-45deg) scale(0.2);
  }
  75% {
    opacity: 1;
    transform: rotate(-45deg) scale(1.12);
  }
  100% {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 0 0.5rem;
  gap: 1rem;
}

.brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand span {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--primary), #ff9f4d);
  transform: rotate(-14deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.nav-link:hover {
  background: #ffffffa3;
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  margin-top: 0.8rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(148deg, #fff0db 0%, #fff8ef 46%, #edf8f7 100%);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr);
  gap: 1.15rem;
  align-items: stretch;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  width: fit-content;
  border: 1px solid #f0d8bd;
  background: #fff5e9;
  color: #9f4a2b;
  border-radius: 999px;
  padding: 0.3rem 0.64rem;
  font-size: 0.79rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
}

.hero-metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.hero-metric {
  border: 1px solid #eadac6;
  border-radius: 12px;
  background: #fffdf8;
  padding: 0.62rem 0.72rem;
  display: grid;
  gap: 0.12rem;
}

.hero-metric strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.12rem;
}

.hero-metric span {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 600;
}

.home-showcase {
  margin-top: 0.92rem;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.home-showcase-main {
  background: linear-gradient(170deg, #fffefb, #fff8f1 55%, #fff);
}

.home-showcase-side {
  background: linear-gradient(170deg, #fffefb, #f5fbfa 60%, #fff);
  align-content: start;
}

.home-pill-grid {
  margin-top: 0.58rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.home-pill {
  border: 1px solid #e9ddcd;
  border-radius: 12px;
  padding: 0.54rem 0.62rem;
  background: #fffefb;
  display: grid;
  gap: 0.14rem;
}

.home-pill strong {
  font-size: 0.94rem;
}

.home-pill span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.home-step-list {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.14rem;
  display: grid;
  gap: 0.35rem;
  color: var(--text);
}

.landing-info {
  margin-top: 0.92rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.landing-info-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  background: linear-gradient(180deg, #fffefc, #fff8f0 45%, #fff);
}

.landing-list {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
  line-height: 1.45;
}

.landing-list li + li {
  margin-top: 0.2rem;
}

.hero-copy h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-account {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefc, #fff9f1 58%, #fff);
  padding: 1rem;
  display: grid;
  gap: 0.74rem;
  align-content: center;
}

.user-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(22, 25, 34, 0.12);
  background: #f0f0f0;
}

.hero-account-text {
  display: grid;
  gap: 0.2rem;
}

.hero-account-text strong {
  font-size: 1rem;
}

.hero-account-text span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.hero-account-cell {
  border: 1px solid #e6dccf;
  border-radius: 10px;
  padding: 0.45rem 0.52rem;
  background: #fff;
  display: grid;
  gap: 0.14rem;
}

.hero-account-cell span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-account-cell strong {
  font-size: 0.88rem;
}

.hero-login {
  display: grid;
  gap: 0.45rem;
}

.muted-link {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.muted-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

#dashboard {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: #d7c8b3;
  box-shadow: 0 20px 34px rgba(23, 26, 34, 0.1);
}

.centered-card {
  width: min(980px, 100%);
  margin: 0 auto;
}

h2,
h3 {
  margin: 0 0 0.55rem;
  font-family: 'Space Grotesk', sans-serif;
}

p {
  margin: 0.4rem 0;
}

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

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-row {
  grid-column: 1 / -1;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.87rem;
  margin-bottom: 0.35rem;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button,
.button {
  border: none;
  border-radius: 10px;
  padding: 0.62rem 0.96rem;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 27, 36, 0.12);
}

button:active,
.button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(23, 27, 36, 0.14);
}

button:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-strong);
}

.button-secondary {
  background: var(--accent);
  color: #fff;
}

.button-secondary:hover {
  background: var(--accent-strong);
}

.button-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.admin-user-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.admin-user-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  border: 1px solid var(--badge-color, #178a81);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  box-shadow: inset 0 0 0 1px var(--badge-color, #178a81);
  color: #163d58;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.32rem 0.2rem 0.5rem;
}

.admin-user-badge-chip > span {
  white-space: nowrap;
}

.admin-user-badge-detail {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.admin-user-badge-detail:hover {
  border-color: #8db7df;
  background: linear-gradient(180deg, #ffffff, #eef7ff);
}

.admin-user-badge-detail:focus-visible {
  outline: 2px solid #2b8dff;
  outline-offset: 2px;
}

.admin-user-badge-remove {
  width: 1.2rem;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #4a596d;
  font-size: 0.8rem;
  line-height: 1;
}

.admin-user-badge-remove:hover {
  border-color: #ccb88f;
  background: #fff7eb;
  color: #8f2f1c;
}

.admin-user-badge-create {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 90px 58px auto;
  gap: 0.35rem;
  align-items: center;
}

.admin-user-badge-create input {
  min-width: 0;
}

.admin-user-badge-create input[type='color'] {
  padding: 0.08rem;
  min-height: 2.1rem;
  border-radius: 10px;
}

.admin-user-notify-create {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 0.35rem;
}

.admin-user-notify-create .button {
  width: 100%;
}

.admin-badge-studio {
  margin: 0.75rem 0 0.9rem;
  border: 1px solid #d6e2f1;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
  padding: 0.75rem;
}

.admin-badge-studio-grid {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(300px, 1.2fr) minmax(260px, 1fr);
}

.admin-badge-studio-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.admin-badge-studio-form-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 1fr) 120px;
}

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

.admin-badge-preset-row .button {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
}

.admin-badge-preview-card {
  border: 1px dashed #b9d5ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fdff 0%, #ffffff 100%);
  padding: 0.55rem;
  display: grid;
  gap: 0.35rem;
}

.admin-badge-preview-card .admin-user-badge-chip {
  width: fit-content;
}

.admin-badge-studio-current {
  display: grid;
  gap: 0.45rem;
}

.admin-badge-studio-row {
  border: 1px solid #d7e3f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.admin-badge-studio-row .actions {
  margin-top: 0;
}

.admin-badge-details-modal {
  width: min(620px, 100%);
}

.admin-badge-details-head {
  margin-top: 0.3rem;
}

.admin-badge-details-grid {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-badge-details-item {
  border: 1px solid #d7e2f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.2rem;
}

.workspace-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.blog-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.blog-card {
  padding: 0;
  overflow: hidden;
}

.blog-card-link {
  color: inherit;
  text-decoration: none;
  display: grid;
}

.blog-card-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: #f2eadf;
}

.blog-card-thumb-empty {
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #684c2f;
  background: linear-gradient(135deg, #ffe4c4, #fff2df 45%, #e7f6f2);
}

.blog-card-body {
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.blog-card-body h3 {
  margin: 0;
  font-size: 1.03rem;
}

.blog-card-meta {
  font-size: 0.8rem;
}

.blog-card-excerpt {
  margin: 0.1rem 0 0;
  line-height: 1.45;
}

.blog-post-card {
  overflow: hidden;
}

.blog-post-hero {
  margin-top: 0.45rem;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f2eadf;
}

.blog-post-content {
  margin-top: 0.55rem;
  line-height: 1.65;
}

.blog-post-content p {
  margin: 0.5rem 0;
}

.blog-attachment-list {
  display: grid;
  gap: 0.45rem;
}

.blog-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0.52rem 0.62rem;
}

.blog-attachment-row:hover {
  border-color: #d6c6ad;
  background: #fffcf7;
}

.blog-empty {
  grid-column: 1 / -1;
}

.blog-card-reactions {
  border-top: 1px solid var(--border);
  background: #fffef9;
  padding: 0.55rem 0.68rem 0.62rem;
}

.blog-reactions-card {
  margin-top: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefc, #fff9f2 64%, #fff);
  padding: 0.55rem 0.62rem;
}

.blog-reactions-row {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-reactions-row.compact {
  margin-top: 0;
}

.blog-reaction-btn {
  border: 1px solid #d6ccbc;
  border-radius: 999px;
  background: #fff;
  color: #374a63;
  padding: 0.24rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.blog-reaction-btn strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: #182133;
}

.blog-reaction-btn:hover {
  border-color: #9ec7f8;
  background: #f5fbff;
}

.blog-reaction-btn.active {
  border-color: #7daff0;
  background: linear-gradient(160deg, #edf6ff, #f8fbff);
  color: #19467c;
}

.blog-reaction-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.blog-reaction-total {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
}

.workspace-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--border);
  background: #fffefb;
  border-radius: 12px;
  padding: 0.82rem;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workspace-item-clickable {
  cursor: pointer;
}

.workspace-item:hover {
  transform: translateY(-1px);
  border-color: #d8cdbb;
  box-shadow: 0 10px 20px rgba(23, 27, 36, 0.09);
}

.workspace-item-clickable:focus-visible {
  outline: 2px solid #95cfc8;
  outline-offset: 2px;
}

.workspace-item-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.workspace-item-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
  flex: 0 0 auto;
}

.workspace-item .meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--border);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.18rem 0.58rem 0.18rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid #8ebdfd;
  background: linear-gradient(145deg, #f3f8ff 0%, #e2efff 55%, #f8fbff 100%);
  color: #1f4f90;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 5px 12px rgba(37, 109, 220, 0.14);
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.verified-badge:hover {
  transform: translateY(-1px);
  border-color: #79adf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 16px rgba(37, 109, 220, 0.2);
}

.verified-badge::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 52% 52% no-repeat,
    linear-gradient(160deg, #2f78ff, #3aa0ff 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 5px rgba(25, 82, 175, 0.35);
}

.verified-badge-mini {
  margin-left: 0.32rem;
  padding: 0;
  width: 1.04rem;
  height: 1.04rem;
  border-radius: 999px;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  letter-spacing: 0;
  overflow: hidden;
  text-indent: -9999px;
  box-shadow: 0 3px 9px rgba(37, 109, 220, 0.18);
}

.verified-badge-mini::before {
  width: 0.8rem;
  height: 0.8rem;
  font-size: 0.54rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.analytics-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.analytics-grid {
  align-items: stretch;
}

.analytics-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.analytics-chart-title {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.analytics-event-mix {
  display: grid;
  gap: 0.46rem;
}

.analytics-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 0.65rem;
  align-items: center;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 0.45rem 0.52rem;
}

.analytics-event-row-label {
  font-size: 0.78rem;
  font-weight: 700;
}

.analytics-event-row-values {
  font-size: 0.74rem;
  color: var(--muted);
}

.analytics-event-row-track {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: #ecf4f2;
  overflow: hidden;
}

.analytics-event-row-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #117e75, #1f9f93);
}

.overview-hero {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

.overview-stat-grid {
  margin-top: 0;
}

.stat-grid .stat,
.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.72rem;
}

.stat strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin-top: 0.18rem;
}

.module-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.tab-split-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.assignments-create-pane {
  background: linear-gradient(180deg, #fffef9, #fff8ee 58%, #fff);
}

.shift-split-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
}

.loa-tabs-rail {
  margin: 0.75rem 0 0.8rem;
}

.loa-panel-stack {
  display: grid;
  gap: 0.8rem;
}

.loa-panel {
  min-width: 0;
}

.loa-my-panel {
  background: linear-gradient(180deg, #fffefb, #fff8ef 58%, #fff);
}

.loa-review-panel {
  align-content: start;
  background: linear-gradient(180deg, #fffefb, #f7fbff 60%, #fff);
}

.shift-list-panel .shift-card-grid {
  margin-top: 0.55rem;
}

.module-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.85rem;
}

.overview-pulse-card {
  background: linear-gradient(160deg, #fffef8, #fff5e7 52%, #eef9f5);
}

.overview-pill-list {
  display: grid;
  gap: 0.45rem;
}

.overview-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #dbcdb8;
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem 0.6rem;
}

.overview-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.overview-pill strong {
  font-family: 'Space Grotesk', sans-serif;
}

.overview-trend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid #eadfce;
  padding: 0.35rem 0;
}

.overview-trend-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.overview-trend-up,
.overview-trend-down,
.overview-trend-flat {
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.overview-trend-up {
  color: #0f6a63;
}

.overview-trend-down {
  color: #a54a3c;
}

.overview-trend-flat {
  color: var(--muted);
}

.module-card-wide {
  grid-column: span 1;
}

.tables-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.table-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem;
}

.table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.shift-stat-grid {
  margin-top: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shift-stat-card {
  background: linear-gradient(180deg, #fffef9, #fff7eb);
  display: grid;
  gap: 0.2rem;
}

.shift-filter-grid {
  margin-top: 0.75rem;
  margin-bottom: 0.2rem;
}

.shift-create-box {
  margin-top: 0;
  border: 1px solid #dcccc1;
  background: linear-gradient(180deg, #fffefb, #fff8ef 58%, #fff);
  box-shadow: 0 12px 24px rgba(23, 27, 36, 0.07);
}

.shift-create-box-header {
  margin-bottom: 0.55rem;
}

.shift-create-box-header p {
  margin: 0;
}

.shift-required-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.shift-required-check {
  display: inline-flex;
  width: 1.12rem;
  height: 1.12rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6c7b3;
  background: #fff9ef;
  color: #8f7e69;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.4;
  transform: scale(0.92);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.shift-required-field.is-complete .shift-required-check {
  opacity: 1;
  transform: scale(1);
  border-color: #2f8e62;
  background: #e8f9ef;
  color: #1f7b52;
  box-shadow: 0 0 0 2px rgba(47, 142, 98, 0.14);
}

.shift-meta-row {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.shift-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddcfbb;
  border-radius: 999px;
  padding: 0.16rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #554a39;
  background: #fff8ee;
}

.shift-window-note {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.shift-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.shift-status-active {
  border-color: #b7ddd7;
  background: #e6f6f3;
  color: #0f6a63;
}

.shift-status-upcoming {
  border-color: #f0d7aa;
  background: #fff4df;
  color: #8a5c0a;
}

.shift-status-delayed {
  border-color: #f6c9a6;
  background: #fff1e4;
  color: #9a4f17;
}

.shift-status-completed {
  border-color: #d8d1c4;
  background: #f7f4ee;
  color: #5d5a53;
}

.shift-status-concluded {
  border-color: #d8d1c4;
  background: #f7f4ee;
  color: #5d5a53;
}

.shift-status-archived {
  border-color: #d6dfed;
  background: #f2f6fc;
  color: #4f6280;
}

.shift-status-disabled {
  border-color: #efc5cc;
  background: #fff1f3;
  color: #8a2c35;
}

.shift-status-cancelled {
  border-color: #efc5cc;
  background: #fff1f3;
  color: #8a2c35;
}

.shift-card-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.7rem;
}

.shift-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefb, #fff8ef 54%, #fff);
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
  box-shadow: 0 10px 24px rgba(23, 27, 36, 0.06);
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shift-card:hover {
  transform: translateY(-1px);
  border-color: #d9c9b0;
  box-shadow: 0 14px 26px rgba(23, 27, 36, 0.1);
}

.shift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.shift-card-header strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}

.shift-card-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.shift-card-cell {
  border: 1px solid #eadfce;
  border-radius: 11px;
  background: #fff;
  padding: 0.46rem 0.52rem;
  display: grid;
  gap: 0.14rem;
  align-content: start;
}

.shift-card-cell strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.shift-card-actions {
  margin-top: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shift-chip-rsvp-summary {
  border-color: #d3def0;
  background: #f3f7fe;
  color: #2b4f80;
}

.shift-rsvp-row {
  border: 1px solid #e2d8c9;
  border-radius: 11px;
  background: #fffdf9;
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.42rem;
}

.shift-rsvp-your-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #d7ddcb;
  background: #f4f8ee;
  color: #37502e;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
}

.shift-rsvp-status-attending {
  border-color: #b9ddca;
  background: #e9f7f1;
  color: #0f6a63;
}

.shift-rsvp-status-late {
  border-color: #e6d3a8;
  background: #fff6e6;
  color: #8a5c0a;
}

.shift-rsvp-status-cant {
  border-color: #e7bfc5;
  background: #fff0f2;
  color: #8b2f3a;
}

.shift-rsvp-status-none {
  border-color: #d7dbe2;
  background: #f3f5f8;
  color: #55667f;
}

.shift-rsvp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.shift-rsvp-actions .button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 106, 99, 0.23);
}

.assignment-progress-cell {
  display: grid;
  gap: 0.28rem;
  min-width: 180px;
}

.assignment-progress-meter {
  width: 100%;
  height: 0.48rem;
  border: 1px solid #dfd2c1;
  background: #fff4e7;
  border-radius: 999px;
  overflow: hidden;
}

.assignment-progress-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #178a81, #24a799);
  border-radius: 999px;
}

.shift-empty-card {
  border: 1px dashed #dbc9ad;
  border-radius: 12px;
  background: #fffaf2;
  padding: 0.95rem;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #f0e7da;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: #fff7eb;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff8ee;
  font-size: 0.79rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: 'Space Grotesk', sans-serif;
}

.table-empty-row td {
  background: transparent !important;
}

.table-empty-cell {
  padding: 0.85rem 0.65rem !important;
}

.table-empty-state {
  border: 1px dashed #cfdbec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  min-height: 98px;
  padding: 0.75rem 0.7rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.24rem;
  text-align: center;
}

.table-empty-state strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
}

.table-empty-state::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid #cbd9ec;
  background: #f0f7ff;
  color: #2f5d8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.banner {
  padding: 0.72rem 0.8rem;
  border-radius: 10px;
  border: 1px solid transparent;
}

.banner.banner-floating {
  position: fixed;
  top: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 1.2rem));
  z-index: 1800;
  box-shadow: 0 16px 34px rgba(20, 28, 44, 0.2);
  backdrop-filter: blur(5px);
  animation: bannerFloatIn 0.2s ease;
}

.banner.info {
  background: #e8f7f5;
  border-color: #c9ebe7;
  color: #0b5a53;
}

.banner.error {
  background: #ffe9e7;
  border-color: #ffc8bf;
  color: #832216;
}

@keyframes bannerFloatIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.island-toast {
  position: sticky;
  top: 0.35rem;
  margin: 0 auto;
  width: fit-content;
  max-width: min(520px, 94%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 35, 60, 0.12);
  background: rgba(17, 28, 45, 0.86);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 34px rgba(11, 32, 61, 0.18);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
}

.island-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.island-toast-icon {
  width: 1.12rem;
  height: 1.12rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.island-toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(202, 255, 245, 0.95));
  transform-origin: left center;
}

@keyframes island-toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.island-toast.error {
  background: rgba(120, 25, 25, 0.9);
  border-color: rgba(255, 180, 180, 0.3);
}

.island-toast.success {
  background: rgba(14, 84, 72, 0.9);
  border-color: rgba(120, 255, 226, 0.3);
}

.island-toast.info {
  background: rgba(23, 64, 107, 0.9);
  border-color: rgba(158, 202, 255, 0.35);
}

.permission-preview-bar {
  position: sticky;
  top: 0.25rem;
  z-index: 35;
  margin: 0.4rem 0 0.7rem;
  border: 1px solid #b9d6fb;
  border-radius: 14px;
  background: linear-gradient(120deg, #edf5ff 0%, #f6fbff 55%, #ecfff8 100%);
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  box-shadow: 0 10px 24px rgba(19, 53, 96, 0.08);
}

.permission-preview-bar-main {
  display: grid;
  gap: 0.18rem;
}

.permission-preview-bar strong {
  font-family: 'Space Grotesk', sans-serif;
}

.setup-wizard-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.62rem;
}

.setup-wizard-list li {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.6rem;
}

#webhookTable code {
  display: block;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#webhookTable .actions {
  flex-wrap: wrap;
  gap: 0.36rem;
}

#webhookDeliveryTable td:last-child {
  max-width: 320px;
}

#webhookManagerCard {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefb 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(11, 32, 61, 0.06);
}

#webhookManagerCard .webhook-filter-grid {
  padding: 0.55rem 0.6rem;
  border: 1px dashed #d9d0bf;
  border-radius: 12px;
  background: #fffdf7;
}

#webhookManagerCard .table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: min(56vh, 560px);
  overflow: auto;
  background: #fff;
}

#webhookManagerCard table th,
#webhookManagerCard table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  vertical-align: middle;
}

.workspace-greeting {
  margin: 0.15rem 0 0.2rem;
  padding: 0.48rem 0.62rem;
  border: 1px solid #d8ccb9;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff7ea, #fffdf8 55%, #eef8f6);
  color: #4f4434;
  font-weight: 700;
  font-size: 0.9rem;
}

.workspace-sidebar #workspaceGreeting {
  margin: 0 0 0.45rem;
}

.confetti-root {
  position: fixed;
  inset: 0;
  z-index: 48;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 3px;
  opacity: 0.95;
  box-shadow: 0 2px 4px rgba(18, 28, 44, 0.12);
  animation: confetti-drop 1.25s cubic-bezier(0.15, 0.78, 0.2, 1) forwards;
}

@keyframes confetti-drop {
  0% {
    transform: translate3d(0, -8px, 0) rotate(0deg) scale(0.9);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--confetti-drift, 0px), 102vh, 0) rotate(var(--confetti-spin, 180deg)) scale(1.05);
    opacity: 0;
  }
}

.site-footer {
  margin: 1.1rem auto 1.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.workspace-shell {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  position: relative;
}

.workspace-sidebar {
  position: sticky;
  top: 0.8rem;
  display: grid;
  gap: 1rem;
}

.workspace-nickname-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(175deg, #fffefb, #fff8f0 62%, #fff);
  padding: 0.62rem;
}

.workspace-nickname-card label {
  margin-bottom: 0.28rem;
}

.workspace-nickname-card .actions {
  margin-top: 0.5rem;
}

.workspace-group-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
  display: block;
  margin-bottom: 0.55rem;
}

.workspace-tabs {
  display: grid;
  gap: 0.45rem;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: #d9cdb8;
  box-shadow: 0 6px 14px rgba(23, 27, 36, 0.1);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(15, 106, 99, 0.28);
}

.inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 0.9rem;
}

.inner-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
}

.inner-tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 106, 99, 0.24);
}

.workspace-settings-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.workspace-settings-header p {
  margin: 0.25rem 0 0;
}

.workspace-settings-subhint {
  font-size: 0.82rem;
}

.workspace-settings-header-actions {
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.workspace-settings-shell {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.72rem;
  align-items: start;
}

.settings-tabs-rail.inner-tabs {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8ee, #fffdf8);
  padding: 0.5rem;
  position: sticky;
  top: 0.55rem;
  z-index: 2;
}

.settings-tabs-rail .inner-tab-btn {
  width: auto;
  white-space: nowrap;
  min-height: 36px;
}

.settings-tab-context {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fff8ef);
  padding: 0.58rem 0.68rem;
}

.settings-tab-context strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
}

.settings-tab-context p {
  margin: 0.22rem 0 0;
  font-size: 0.82rem;
}

.assignment-tabs-rail {
  margin: 0.75rem 0 0.8rem;
}

.shift-tabs-rail {
  margin: 0.75rem 0 0.8rem;
}

.shift-panel-stack {
  display: grid;
  gap: 0.8rem;
}

.session-calendar-shell {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #fff);
  padding: 0.62rem 0.68rem;
}

.session-calendar-weekdays {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.24rem;
}

.session-calendar-weekdays span {
  text-align: center;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--muted);
}

.session-calendar-grid {
  margin-top: 0.24rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.24rem;
}

.session-calendar-day {
  border: 1px solid #e5dccd;
  border-radius: 10px;
  background: #fff;
  min-height: 94px;
  padding: 0.34rem 0.38rem;
  display: grid;
  align-content: start;
  gap: 0.28rem;
  justify-items: stretch;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.session-calendar-day:hover {
  border-color: #d8c6a7;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(23, 27, 36, 0.08);
}

.session-calendar-day.is-empty {
  border-style: dashed;
  border-color: #efe7db;
  background: #fbfaf8;
}

.session-calendar-day.is-today {
  border-color: #c8daef;
  background: #f4f9ff;
}

.session-calendar-day.is-selected {
  border-color: #5f89d3;
  box-shadow: 0 0 0 2px rgba(95, 137, 211, 0.18);
}

.session-calendar-day-active {
  border-color: #b7ddd7;
  background: #edf9f6;
}

.session-calendar-day-upcoming {
  border-color: #efd5a5;
  background: #fff7e7;
}

.session-calendar-day-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.session-calendar-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.session-calendar-day-count {
  font-size: 0.7rem;
  color: #456891;
  font-weight: 700;
  white-space: nowrap;
}

.session-calendar-day-preview {
  display: grid;
  gap: 0.16rem;
}

.session-calendar-preview-line {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-width: 0;
  font-size: 0.67rem;
  color: #445066;
}

.session-calendar-preview-line span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-calendar-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.session-calendar-dot-active {
  background: #1d9a7a;
}

.session-calendar-dot-upcoming {
  background: #ca9324;
}

.session-calendar-dot-past {
  background: #8696ad;
}

.session-calendar-preview-more {
  font-size: 0.66rem;
  color: #6c7890;
  font-weight: 700;
}

.session-calendar-preview-edited {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  color: #8a6212;
  border: 1px solid #e6cd98;
  background: #fff2d6;
  border-radius: 999px;
  padding: 0 0.3rem;
  flex-shrink: 0;
}

.session-change-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e7d1aa;
  background: #fff6e6;
  color: #7c5716;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.08rem 0.45rem;
  margin-top: 0.2rem;
}

.session-rows-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-right: 0.1rem;
}

.session-rows-label-grid {
  margin-top: 0.15rem;
  grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
}

.session-row-label {
  min-height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.session-row-label::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #f7b86e 0%, #d24f2f 100%);
  opacity: 0.82;
}

.session-row-label:hover,
.session-row-label:focus-visible {
  transform: translateY(-2px);
  border-color: #d8c5a7;
  box-shadow: 0 16px 30px rgba(23, 27, 36, 0.14);
  background: linear-gradient(180deg, #fffefb, #fff8ee 48%, #fff);
}

.session-row-label:focus-visible {
  outline: 2px solid rgba(95, 137, 211, 0.58);
  outline-offset: 2px;
}

.session-row-live {
  border-color: #b4dfcf;
  box-shadow: 0 10px 24px rgba(33, 150, 102, 0.14);
  animation: sessionLivePulse 2.2s ease-in-out infinite;
}

.session-row-animated {
  animation: sessionCardReveal 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--session-row-delay, 0ms);
}

.session-row-label-description {
  margin: 0.2rem 0 0;
}

.session-row-label-actions {
  justify-content: flex-start;
}

.session-rows-empty {
  border: 1px dashed #dbc9b0;
  border-radius: 12px;
  background: #fffaf2;
  padding: 0.9rem;
  text-align: center;
}

.session-rows-empty p {
  margin: 0.35rem 0 0;
}

.session-details-modal-card {
  width: min(860px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  animation: sessionDetailsModalIn 300ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

.session-details-hero {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
}

.session-details-grid {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-details-item {
  border: 1px solid #e8dcc9;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #fffaf2);
  padding: 0.58rem 0.65rem;
  display: grid;
  gap: 0.16rem;
}

.session-details-item strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: #6b5b44;
}

.session-details-item p {
  margin: 0;
  line-height: 1.35;
}

.session-details-item .muted {
  margin-top: 0.08rem;
}

.session-details-description-wrap {
  margin-top: 0.7rem;
  border: 1px solid #e8dcc9;
  border-radius: 12px;
  background: #fffefb;
  padding: 0.62rem 0.68rem;
}

.session-details-description-wrap p {
  margin: 0.36rem 0 0;
  white-space: pre-wrap;
  line-height: 1.4;
}

.session-details-actions {
  margin-top: 0.75rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.session-manage-wrap {
  max-height: min(48vh, 520px);
}

.session-staff-role-list {
  display: grid;
  gap: 0.42rem;
}

.session-staff-role-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(170px, 1.35fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.session-staff-role-row .button {
  white-space: nowrap;
}
.assignment-panel-stack {
  display: grid;
  gap: 0.8rem;
}

.settings-content-stack {
  min-width: 0;
}

.settings-general-map {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf2 100%);
  padding: 0.66rem 0.72rem;
  display: grid;
  gap: 0.52rem;
}

.settings-general-map-header {
  display: grid;
  gap: 0.2rem;
}

.settings-general-map-header strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
}

.settings-general-map-header p {
  margin: 0;
  font-size: 0.8rem;
}

.settings-general-map-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.settings-general-map-chips .button {
  min-height: 32px;
  padding: 0.34rem 0.56rem;
  font-size: 0.78rem;
}

.settings-category-title {
  display: grid;
  gap: 0.1rem;
  padding: 0.08rem 0.12rem;
}

.settings-category-title strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
}

.settings-category-title p {
  margin: 0;
  font-size: 0.8rem;
}

.settings-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 27, 36, 0.08);
  padding: 0.9rem;
}

.settings-panel.hidden {
  display: none;
}

.workspace-user {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fffefb;
}

.workspace-user .user-avatar {
  width: 46px;
  height: 46px;
}

.workspace-user p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

.workspace-user-clickable {
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.workspace-user-clickable:hover {
  transform: translateY(-1px);
  border-color: #d8cbb7;
  background: #fff;
  box-shadow: 0 8px 16px rgba(23, 27, 36, 0.09);
}

.workspace-user-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-music-player {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.5rem;
}

.profile-music-player iframe {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 152px;
  background: #fff;
}

.profile-music-player audio {
  width: 100%;
}

.profile-music-preview-actions {
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.profile-music-preview-note {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
}

.profile-music-preview-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefb;
  padding: 0.55rem;
}

.profile-music-cover {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d4c7b3;
  background: #ece7de;
  flex: 0 0 auto;
}

.profile-music-inline {
  margin-bottom: 0.45rem;
}

.profile-music-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  background: #fffefb;
}

.profile-music-track-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(170deg, #fffefb, #fff8ef 62%, #fff);
  padding: 0.55rem;
}

.profile-music-track-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.08rem;
}

.profile-music-track-meta strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.profile-music-track-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.profile-music-track-meta small {
  color: #6d5f4a;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.profile-music-cover-lg {
  width: 84px;
  height: 84px;
}

.profile-music-cover-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4d5d75;
  font-size: 1.2rem;
  font-weight: 700;
}

.workspace-ad-slot {
  border: 1px solid #e5ecf6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
  padding: 0.52rem;
  display: grid;
  gap: 0.3rem;
}

.workspace-inline-ad-slot {
  border: 1px solid #e5ecf6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
  padding: 0.52rem;
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.shift-inline-ad-slot {
  margin-top: 0.35rem;
}

.workspace-ad-label {
  margin: 0;
  font-size: 0.64rem;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  color: #7c8ea6;
}

.workspace-ad-body {
  border: 1px solid #e8eef8;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  min-height: 82px;
  padding: 0.42rem;
  display: grid;
  align-items: center;
}

.workspace-ad-placeholder {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.35;
}

.workspace-ad-live .workspace-ad-body {
  border-style: solid;
  border-color: #e0e8f5;
  background: #fff;
}

.workspace-adsense {
  min-height: 74px;
}

.workspace-content {
  display: grid;
  gap: 0.75rem;
}

.workspace-overview-banner {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f2f8ff 55%, #eefcf8 100%);
  padding: 0.72rem;
  align-items: center;
}

.workspace-overview-banner-image {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d3deeb;
  background: #ffffff;
}

.workspace-overview-banner-text strong {
  display: block;
  margin-bottom: 0.16rem;
}

.overview-alert-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.overview-alert-main {
  display: grid;
  gap: 0.22rem;
}

.overview-alert-main .player-chip {
  width: fit-content;
}

.overview-alert-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.overview-layout-modal-card {
  width: min(940px, 100%);
  max-height: min(92dvh, calc(100vh - 1rem));
  overflow: auto;
}

.owner-sign-modal-card {
  width: min(760px, 100%);
}

.owner-sign-canvas {
  width: 100%;
  height: 240px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%),
    repeating-linear-gradient(0deg, transparent 0, transparent 29px, rgba(99, 124, 160, 0.12) 30px);
  touch-action: none;
  cursor: crosshair;
}

.overview-layout-editor {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.5rem;
  max-height: min(72dvh, 760px);
  overflow: auto;
  padding-right: 0.15rem;
}

.overview-layout-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.56rem 0.62rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.overview-layout-row-main {
  min-width: 0;
}

.overview-layout-row-main strong {
  display: block;
}

.overview-layout-row-main span {
  display: block;
  font-size: 0.78rem;
}

.workspace-switcher-list {
  display: grid;
  gap: 0.62rem;
}

.workspace-switcher-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(170deg, #fffefb, #fff9f1 58%, #fff);
  color: inherit;
  text-decoration: none;
  padding: 0.7rem;
  display: grid;
  gap: 0.55rem;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.workspace-switcher-clickable {
  cursor: pointer;
}

.workspace-switcher-item:hover {
  transform: translateY(-1px);
  border-color: #d7c8b2;
  box-shadow: 0 12px 22px rgba(23, 27, 36, 0.09);
  background: #fff;
}

.workspace-switcher-clickable:focus-visible {
  outline: 2px solid #95cfc8;
  outline-offset: 2px;
}

.workspace-switcher-item.active {
  border-color: #95cfc8;
  background: linear-gradient(160deg, #ecfaf8, #fffdf8 65%, #fff);
  box-shadow: 0 14px 22px rgba(15, 106, 99, 0.14);
}

.workspace-switcher-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.workspace-switcher-main {
  min-width: 0;
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.workspace-switcher-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d8cbb8;
  object-fit: cover;
  background: #f4efe6;
  flex: 0 0 auto;
}

.workspace-switcher-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f5f7a;
  font-weight: 700;
  font-size: 0.8rem;
}

.workspace-switcher-meta {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.workspace-switcher-meta strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.workspace-switcher-meta span {
  font-size: 0.8rem;
  line-height: 1.35;
}

.workspace-switcher-badges {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}

.workspace-switcher-stats {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.workspace-switcher-top-actions {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: 0.12rem;
  width: min(220px, 100%);
}

.workspace-switcher-leave-btn {
  width: 100%;
  justify-content: center;
}

.workspace-switcher-leave-btn {
  min-height: 34px;
}

.workspace-switcher-empty {
  border: 1px dashed #dccaaf;
  border-radius: 10px;
  background: #fffaf2;
  padding: 0.85rem;
  text-align: center;
}

.manage-player-grid {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.7fr);
}

.manage-player-list-card {
  display: grid;
  gap: 0.55rem;
}

.manage-player-list {
  display: grid;
  gap: 0.5rem;
  max-height: 76vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.manage-player-item {
  border: 1px solid #ddd2bf;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  padding: 0.62rem;
  display: grid;
  gap: 0.4rem;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.manage-player-item:hover,
.manage-player-item:focus-visible {
  transform: translateY(-1px);
  border-color: #d0bd9f;
  box-shadow: 0 10px 18px rgba(23, 27, 36, 0.09);
  outline: none;
}

.manage-player-item.active {
  border-color: #95cfc8;
  background: linear-gradient(160deg, #ecfaf8, #fffefb 65%, #fff);
  box-shadow: 0 10px 18px rgba(15, 106, 99, 0.14);
}

.manage-player-main {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  min-width: 0;
}

.manage-player-meta {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.manage-player-meta strong {
  line-height: 1.2;
}

.manage-player-meta span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-player-subline {
  font-size: 0.76rem;
  color: var(--muted);
}

.manage-player-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.manage-player-empty {
  border: 1px dashed #dbc9b0;
  border-radius: 10px;
  background: #fffaf2;
  padding: 0.75rem;
  text-align: center;
}

.manage-player-detail-card {
  min-height: 420px;
}

.manage-player-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.manage-player-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid #d8cab6;
  object-fit: cover;
  background: #f6f0e8;
  flex: 0 0 auto;
}

.manage-player-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f5f7a;
  font-weight: 700;
  font-size: 0.92rem;
}

.manage-meta-line {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-size: 0.8rem;
}

.manage-stat-grid {
  margin-top: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manage-detail-grid {
  margin-top: 0.75rem;
}

.manage-session-cell {
  min-width: 170px;
}

.manage-session-action-line {
  margin-top: 0.38rem;
}

.manage-session-delete-label {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e6c6b4;
  border-radius: 999px;
  background: #fff4ed;
  color: #8c3f1e;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.26rem 0.5rem;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease;
}

.manage-session-delete-label:hover:not(:disabled),
.manage-session-delete-label:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(0.98);
  border-color: #d38d68;
  outline: none;
}

.manage-session-delete-label:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.workspace-content .card {
  animation: card-in 0.22s ease-out;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16px, 1fr));
  align-items: end;
  gap: 0.28rem;
  min-height: 180px;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffef9, #fff);
}

.bar-chart-item {
  display: grid;
  gap: 0.2rem;
  align-items: end;
}

.bar-chart button.bar-chart-item,
button.bar-chart-item {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
}

.bar-chart button.bar-chart-item:hover,
button.bar-chart-item:hover,
.bar-chart button.bar-chart-item:active,
button.bar-chart-item:active {
  transform: none;
  box-shadow: none;
}

.bar-chart button.bar-chart-item:focus-visible,
button.bar-chart-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.bar-chart-col {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #0f6a63, #1d9b91);
  min-height: 4px;
}

.bar-chart-col.metric-sessions {
  background: linear-gradient(180deg, #2558a8, #2f78d0);
}

.bar-chart-col.metric-chats {
  background: linear-gradient(180deg, #9a6e10, #cf8d1f);
}

.bar-chart-col.metric-commands {
  background: linear-gradient(180deg, #6f3c95, #9a58cb);
}

.bar-chart-col.metric-custom {
  background: linear-gradient(180deg, #0f6a63, #1d9b91);
}

.bar-chart-label {
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.bar-chart-value {
  font-size: 0.62rem;
  color: var(--text);
  text-align: center;
}

.notification-list {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.55rem;
}

.notification-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefb;
  padding: 0.72rem;
}

.notification-toolbar {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.notification-toolbar label {
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
}

.notification-toolbar select {
  padding: 0.48rem 0.56rem;
}

.notification-item.unread {
  border-color: #d2c09c;
  background: #fff9ef;
}

.notification-item.read {
  opacity: 0.95;
}

.notification-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.notification-message {
  margin: 0.35rem 0 0;
  line-height: 1.5;
}

.notification-meta-row {
  margin-top: 0.34rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.header-notification-wrap {
  position: relative;
  flex: 0 0 auto;
}

.header-notification-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  padding: 0 0.28rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.header-notification-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(420px, calc(100vw - 1.4rem));
  max-height: min(70vh, 560px);
  overflow: auto;
  z-index: 140;
  padding: 0.85rem;
}

.header-notification-menu.card:hover {
  transform: none;
}

.header-notification-menu .topbar {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.loa-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(248, 242, 233, 0.95);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.loa-lock-card {
  width: min(560px, 96vw);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 56px rgba(20, 24, 36, 0.2);
  padding: 1rem;
  text-align: center;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 1.08rem;
  border-left: 4px solid var(--profile-accent, var(--accent));
  background: linear-gradient(162deg, #fffefb 0%, #fff8ed 42%, #eefaf7 100%);
}

.profile-hero::after {
  content: '';
  position: absolute;
  inset: auto -84px -84px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(23, 138, 129, 0.2), rgba(23, 138, 129, 0));
  pointer-events: none;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: -18% -10%;
  border-radius: 22px;
  pointer-events: none;
  opacity: 0;
}

body[data-profile-theme="sunset"] .profile-hero {
  border-left-color: #d85f2f;
  background: linear-gradient(160deg, #fff8ee 0%, #ffe7cf 46%, #fff6e9 100%);
}

body[data-profile-theme="sunset"] .profile-main-card,
body[data-profile-theme="sunset"] .profile-side-stack .card {
  background: linear-gradient(180deg, #fffefb 0%, #fff2de 100%);
}

body[data-profile-theme="aurora"] .profile-hero {
  border-left-color: #11758f;
  background: linear-gradient(160deg, #f2fcff 0%, #e9f7ff 46%, #f3fff9 100%);
}

body[data-profile-theme="aurora"] .profile-main-card,
body[data-profile-theme="aurora"] .profile-side-stack .card {
  background: linear-gradient(180deg, #ffffff 0%, #eef9ff 100%);
}

body[data-profile-theme="midnight"] .profile-hero {
  border-left-color: #4e6dc5;
  background: linear-gradient(160deg, #141c2f 0%, #1a263f 48%, #182736 100%);
}

body[data-profile-theme="midnight"] .profile-hero h2,
body[data-profile-theme="midnight"] .profile-hero .muted,
body[data-profile-theme="midnight"] .profile-hero .profile-mini-pill,
body[data-profile-theme="midnight"] .profile-hero .profile-detail-chip {
  color: #e7eefb;
}

body[data-profile-theme="midnight"] .profile-main-card,
body[data-profile-theme="midnight"] .profile-side-stack .card {
  background: linear-gradient(180deg, #1a2338 0%, #1f2c45 100%);
  border-color: #30415f;
}

body[data-profile-theme="midnight"] .profile-main-card .muted,
body[data-profile-theme="midnight"] .profile-side-stack .muted,
body[data-profile-theme="midnight"] .profile-main-card h3,
body[data-profile-theme="midnight"] .profile-side-stack h3,
body[data-profile-theme="midnight"] .profile-main-card strong,
body[data-profile-theme="midnight"] .profile-side-stack strong {
  color: #e7eefb;
}

body[data-profile-theme="paper"] .profile-hero {
  border-left-color: #6a6155;
  background: linear-gradient(180deg, #fffefb 0%, #f5f0e6 100%);
}

body[data-profile-theme="paper"] .profile-main-card,
body[data-profile-theme="paper"] .profile-side-stack .card {
  background: linear-gradient(180deg, #fffef9 0%, #f4eee2 100%);
}

body[data-profile-flair="sparkle"] .profile-hero::before {
  opacity: 0.7;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 78% 26%, rgba(255, 231, 190, 0.75) 0, rgba(255, 231, 190, 0) 18%),
    radial-gradient(circle at 62% 72%, rgba(183, 235, 250, 0.55) 0, rgba(183, 235, 250, 0) 18%);
  animation: profileFlairPulse 3.4s ease-in-out infinite;
}

body[data-profile-flair="petals"] .profile-hero::before {
  opacity: 0.78;
  background:
    radial-gradient(circle at 18% 82%, rgba(255, 204, 219, 0.55) 0, rgba(255, 204, 219, 0) 24%),
    radial-gradient(circle at 78% 18%, rgba(255, 222, 192, 0.58) 0, rgba(255, 222, 192, 0) 24%),
    radial-gradient(circle at 62% 56%, rgba(255, 236, 209, 0.5) 0, rgba(255, 236, 209, 0) 22%);
  animation: profileFlairFloat 4.2s ease-in-out infinite;
}

body[data-profile-flair="pixel"] .profile-hero::before {
  opacity: 0.66;
  background:
    linear-gradient(90deg, rgba(119, 161, 255, 0.15) 0 20%, transparent 20% 40%, rgba(119, 161, 255, 0.15) 40% 60%, transparent 60% 80%, rgba(119, 161, 255, 0.15) 80% 100%),
    linear-gradient(180deg, rgba(255, 201, 109, 0.13) 0 20%, transparent 20% 40%, rgba(255, 201, 109, 0.13) 40% 60%, transparent 60% 80%, rgba(255, 201, 109, 0.13) 80% 100%);
  background-size: 44px 44px;
  animation: profileFlairPixel 5.2s linear infinite;
}

body[data-profile-flair="verified"] .profile-hero::before {
  opacity: 0.74;
  background: radial-gradient(circle at center, rgba(108, 177, 255, 0.35) 0, rgba(108, 177, 255, 0) 62%);
  animation: profileFlairPulse 2.6s ease-in-out infinite;
}

.profile-hero-strong {
  border-left-width: 6px;
  box-shadow: 0 20px 38px rgba(23, 27, 36, 0.1);
}

.profile-avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  border-width: 2px;
  background: #e8edf3;
  box-shadow: 0 12px 24px rgba(23, 36, 58, 0.16);
}

.profile-hero-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 0.18rem;
}

.profile-hero-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.profile-layout {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.profile-layout.centered-card {
  width: min(1120px, 100%);
}

.profile-main-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--profile-accent, var(--accent));
  background: linear-gradient(180deg, #fffefb 0%, #fffaf1 56%, #fff 100%);
}

.profile-main-card #profileBio {
  line-height: 1.68;
  font-size: 0.95rem;
}

.profile-main-card #profileStats {
  margin-top: 0.82rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.profile-main-card .stat {
  background: linear-gradient(180deg, #fff 0%, #f9fdfb 100%);
}

.profile-main-card .stat strong {
  font-size: 1.02rem;
}

.profile-side-stack {
  display: grid;
  gap: 0.75rem;
}

.profile-side-stack .card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fffaf2 100%);
}

.profile-side-stack .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #178a81, #8bc4bd 72%, transparent);
}

.profile-side-stack .card h3 {
  margin-bottom: 0.46rem;
}

.profile-layout + .card {
  margin-top: 0.75rem;
}

.profile-error-shell {
  width: min(920px, 100%);
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.win-error-window {
  border: 2px solid #111;
  border-radius: 10px;
  overflow: hidden;
  background: #c7c7c7;
  box-shadow: 0 26px 46px rgba(8, 12, 24, 0.26);
}

.win-error-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  color: #fff;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  background: linear-gradient(90deg, #052464 0%, #2e76c5 100%);
}

.win-error-close {
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid #fff;
  border-radius: 2px;
  background: linear-gradient(180deg, #e25f5f 0%, #bc3232 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.72rem;
  font-weight: 700;
}

.win-error-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.win-error-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  background: #d93636;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #8c1f1f;
  font-size: 1.15rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.win-error-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  color: #142438;
}

.win-error-copy p {
  margin: 0 0 0.4rem;
  color: #25384d;
  line-height: 1.45;
}

.win-error-code {
  display: inline-flex;
  align-items: center;
  border: 1px solid #8f8f8f;
  border-radius: 4px;
  padding: 0.22rem 0.46rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  background: #e5e5e5;
  color: #1d2c40;
}

.win-error-hints {
  margin: 0.15rem 0 0;
  padding-left: 1rem;
  color: #2e4056;
  display: grid;
  gap: 0.25rem;
}

.win-error-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.72rem 0.85rem 0.86rem;
  border-top: 1px solid #9f9f9f;
  background: linear-gradient(180deg, #d4d4d4 0%, #c7c7c7 100%);
}

.win-error-actions .button {
  min-width: 132px;
}

.win-error-actions .button-primary {
  border-color: #144675;
  background: linear-gradient(180deg, #3a90e6 0%, #286cb5 100%);
  color: #fff;
}

.profile-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.profile-title-row h2 {
  margin: 0;
  line-height: 1.15;
}

.profile-handle-line {
  margin: 0.14rem 0 0.18rem;
  font-weight: 700;
}

.profile-header-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin: 0.08rem 0 0.2rem;
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0.18rem 0 0.22rem;
}

.profile-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid #d5deeb;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 0.24rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #32465f;
}

.profile-pinned-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.45rem;
}

.profile-highlight-pill {
  border: 1px solid #d7e0ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fcff 100%);
  padding: 0.5rem 0.58rem;
  display: grid;
  gap: 0.12rem;
}

.profile-highlight-pill span {
  font-size: 0.74rem;
  color: #4f6078;
  font-weight: 700;
}

.profile-highlight-pill strong {
  font-size: 0.95rem;
  color: #1f3f65;
  line-height: 1.2;
}

.profile-achievements-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.profile-achievement-row {
  border: 1px solid color-mix(in srgb, var(--achievement-color, #178a81) 34%, #d8e3f0);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--achievement-color, #178a81) 12%, #ffffff) 100%);
  padding: 0.48rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-achievement-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--achievement-color, #178a81) 20%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--achievement-color, #178a81) 45%, #cdd8e7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.profile-achievement-meta {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.profile-achievement-meta strong {
  line-height: 1.2;
  font-size: 0.87rem;
}

.profile-achievement-meta span {
  font-size: 0.76rem;
  color: #596d89;
  line-height: 1.3;
}

.profile-sticker-badge {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid #d8c7a8;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf1, #fff5e7);
  color: #5f4d2f;
  padding: 0.22rem 0.52rem;
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.16s ease;
}

.profile-sticker-badge.interactive {
  cursor: pointer;
  user-select: none;
}

.profile-sticker-badge.interactive:hover {
  transform: translateY(-1px);
  border-color: #cfb17f;
  box-shadow: 0 8px 16px rgba(160, 118, 47, 0.18);
}

.profile-sticker-badge.interactive:focus-visible {
  outline: 2px solid #178a81;
  outline-offset: 2px;
}

.profile-sticker-badge.is-hovered .profile-sticker-badge-icon {
  animation: profileStickerWiggle 650ms ease;
}

.profile-sticker-badge.is-bursting {
  animation: profileStickerPop 320ms ease;
}

.profile-sticker-badge-icon {
  font-size: 0.88rem;
  line-height: 1;
  display: inline-flex;
}

.profile-sticker-reactions {
  margin-top: 0.24rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.profile-sticker-reaction-btn {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dcc8a9;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffef9, #fff5e6);
  font-size: 0.86rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.18s ease;
}

.profile-sticker-reaction-btn:hover {
  transform: translateY(-1px) scale(1.07);
  border-color: #cfa86c;
  box-shadow: 0 8px 14px rgba(157, 112, 43, 0.18);
}

.profile-sticker-reaction-btn:focus-visible {
  outline: 2px solid #178a81;
  outline-offset: 2px;
}

.profile-sticker-reaction-btn.is-reacting {
  animation: profileStickerReactionPop 280ms ease;
}

.profile-sticker-play-stage {
  position: relative;
  margin-top: 0.4rem;
  min-height: 138px;
  border: 1px solid #d8c4a3;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 82% 78%, rgba(255, 232, 196, 0.52) 0%, rgba(255, 232, 196, 0) 44%),
    linear-gradient(160deg, #fffdf8 0%, #fff4df 58%, #fff9ee 100%);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.profile-sticker-play-stage:focus-visible {
  outline: 2px solid #178a81;
  outline-offset: 2px;
}

.profile-sticker-toy {
  width: 3.2rem;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d2b07b;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fff5e5 100%);
  color: #5f4d2f;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 10px 18px rgba(118, 84, 28, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.profile-sticker-toy:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: #c39a5d;
  box-shadow: 0 12px 20px rgba(118, 84, 28, 0.25);
}

.profile-sticker-toy:focus-visible {
  outline: 2px solid #178a81;
  outline-offset: 2px;
}

.profile-sticker-toy.is-popping {
  animation: profileStickerToyPop 360ms ease;
}

.profile-sticker-toy.is-bouncing {
  animation: profileStickerToyBounce 680ms ease;
}

.profile-sticker-toy.is-spinning {
  animation: profileStickerToySpin 760ms ease;
}

.profile-sticker-toy.is-hyped {
  animation: profileStickerToyHype 520ms ease;
}

.profile-sticker-play-toolbar {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.profile-sticker-play-toolbar .button {
  width: 100%;
}

.profile-sticker-play-spark {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: profileStickerPlaySpark 930ms ease-out forwards;
}

.profile-sticker-play-drop {
  position: absolute;
  top: -1rem;
  z-index: 2;
  pointer-events: none;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  animation: profileStickerPlayRain 1200ms ease-in forwards;
}

.profile-sticker-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%);
  font-size: 0.88rem;
  line-height: 1;
  opacity: 0;
  animation: profileStickerSpark 760ms ease-out forwards;
}

.profile-sticker-toast {
  position: absolute;
  left: 50%;
  top: -0.92rem;
  z-index: 3;
  transform: translate(-50%, 0);
  border: 1px solid #d7c39f;
  border-radius: 999px;
  background: linear-gradient(180deg, #fffaf1, #fff3e1);
  color: #5d4725;
  padding: 0.12rem 0.42rem;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 16px rgba(130, 95, 31, 0.18);
  animation: profileStickerToast 920ms ease forwards;
}

@keyframes profileStickerWiggle {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-10deg) scale(1.07); }
  45% { transform: rotate(8deg) scale(1.05); }
  70% { transform: rotate(-4deg) scale(1.03); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes profileStickerPop {
  0% { transform: scale(1); }
  38% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes profileStickerSpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--spark-x, 0px)),
        calc(-50% + var(--spark-y, -34px))
      )
      rotate(var(--spark-r, 0deg))
      scale(1.08);
  }
}

@keyframes profileStickerToast {
  0% {
    opacity: 0;
    transform: translate(-50%, 2px) scale(0.95);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.98);
  }
}

@keyframes profileStickerReactionPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@keyframes profileStickerToyPop {
  0% { transform: scale(1); }
  44% { transform: scale(1.17); }
  100% { transform: scale(1); }
}

@keyframes profileStickerToyBounce {
  0% { transform: translateY(0); }
  28% { transform: translateY(-11px); }
  56% { transform: translateY(0); }
  78% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes profileStickerToySpin {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(360deg) scale(1.05); }
}

@keyframes profileStickerToyHype {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.08); }
  50% { transform: rotate(8deg) scale(1.1); }
  75% { transform: rotate(-6deg) scale(1.06); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes profileFlairPulse {
  0% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.02); }
  100% { opacity: 0.35; transform: scale(1); }
}

@keyframes profileFlairFloat {
  0% { transform: translateY(0px); opacity: 0.58; }
  50% { transform: translateY(-4px); opacity: 0.82; }
  100% { transform: translateY(0px); opacity: 0.58; }
}

@keyframes profileFlairPixel {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 44px 0, 0 44px; }
}

@keyframes profileStickerPlaySpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.65);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--play-x, 0px)),
        calc(-50% + var(--play-y, -48px))
      )
      rotate(var(--play-r, 0deg))
      scale(1.18);
  }
}

@keyframes profileStickerPlayRain {
  0% {
    opacity: 0;
    transform: translateY(-4px) rotate(0deg) scale(0.85);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(158px) rotate(28deg) scale(1.05);
  }
}

.profile-award-pill {
  border-color: var(--badge-color, #178a81);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: inset 0 0 0 1px var(--badge-color, #178a81);
  color: #173955;
}

.profile-settings-toggle {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-settings-toggle:hover {
  border-color: #cbb894;
  background: #fff8ed;
}

.profile-settings-toggle.active {
  border-color: var(--accent);
  background: #e8f7f5;
  color: var(--accent-strong);
}

#profileBirthdayBanner {
  margin-top: 0.28rem;
  border: 1px dashed #d5c4a9;
  border-radius: 10px;
  background: #fff8ec;
  padding: 0.28rem 0.52rem;
  width: fit-content;
  max-width: 100%;
}

.profile-link-list {
  display: grid;
  gap: 0.45rem;
}

.profile-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffefb;
  color: var(--text);
  text-decoration: none;
  padding: 0.48rem 0.58rem;
  font-size: 0.86rem;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

a.profile-link-row:hover {
  border-color: #d7c7af;
  background: #fff8ef;
  transform: translateY(-1px);
}

.profile-settings-shell {
  width: min(1040px, 100%);
}

.profile-snapshot-card {
  margin-top: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #fff9f1 60%, #fff);
  padding: 0.62rem;
}

.profile-snapshot-list {
  display: grid;
  gap: 0.42rem;
}

.profile-snapshot-item {
  border: 1px solid #d8e0ec;
  border-left: 3px solid #a8d7d0;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  padding: 0.45rem 0.52rem;
  display: grid;
  gap: 0.12rem;
}

.profile-snapshot-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-snapshot-item strong {
  font-size: 0.88rem;
}

.profile-snapshot-item small {
  color: #6f7685;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.profile-completion-meter {
  width: 100%;
  height: 0.58rem;
  border: 1px solid #d5c7b2;
  border-radius: 999px;
  overflow: hidden;
  background: #fff3e3;
  margin: 0.45rem 0 0.55rem;
}

#profileCompletionCard {
  background: linear-gradient(180deg, #fffdf8 0%, #fff7eb 100%);
}

.profile-completion-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14877e, #2cae9d);
  transition: width 0.22s ease;
}

.profile-completion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.profile-completion-item {
  display: inline-flex;
  align-items: center;
  border: 1px dashed #dac7ac;
  border-radius: 999px;
  background: #fff9ef;
  color: #5f5a4f;
  padding: 0.2rem 0.52rem;
  font-size: 0.74rem;
}

.profile-presence-pills {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.profile-presence-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #31465f;
}

.profile-settings-preview-grid {
  margin: 0.72rem 0 0.86rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.profile-settings-preview-card,
.profile-settings-help-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(175deg, #fffefb, #fff8ef 62%, #fff);
  padding: 0.7rem;
}

.profile-settings-preview-head {
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.profile-settings-preview-avatar {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #d2c2a9;
  background: #ece7de;
  flex: 0 0 auto;
}

.profile-settings-preview-meta {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.profile-settings-preview-meta strong {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
}

.profile-settings-preview-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.profile-settings-preview-meta p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-settings-preview-pills {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.profile-sticker-section {
  display: grid;
  gap: 0.45rem;
}

.profile-sticker-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.profile-sticker-controls label {
  margin: 0;
}

.sticker-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.4rem;
}

.sticker-picker-btn {
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  color: #2f455f;
  min-height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.sticker-picker-btn:hover {
  border-color: #b7cde8;
  box-shadow: 0 7px 14px rgba(22, 62, 112, 0.12);
  transform: translateY(-1px);
}

.sticker-picker-btn.active {
  border-color: #d7b36d;
  background: linear-gradient(170deg, #fff9ec, #fff2de);
  box-shadow: 0 8px 16px rgba(177, 129, 48, 0.2);
  color: #5a451f;
}

.sticker-picker-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.sticker-picker-label {
  line-height: 1.1;
}

.profile-settings-help-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
  color: #334860;
}

.profile-privacy-controls,
.profile-pinned-controls,
.profile-loadout-controls {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefb, #ffffff);
  padding: 0.72rem;
}

.profile-privacy-grid {
  margin-top: 0.52rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.58rem;
}

.profile-highlight-picker {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.42rem;
}

.profile-highlight-option {
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  background: #fff;
  padding: 0.48rem 0.56rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-highlight-option input {
  width: auto;
  margin: 0;
}

.profile-loadout-grid {
  margin-top: 0.52rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.58rem;
}

.settings-privacy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.settings-privacy-row label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#profileHeadline {
  margin-top: 0.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  border: 1px dashed #d8cab3;
  background: #fff8ee;
  width: fit-content;
  max-width: 100%;
}

.profile-detail-chips {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 0.28rem 0.58rem;
  font-size: 0.8rem;
}

.profile-accent-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 27, 36, 0.2);
  background: var(--profile-accent, var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  display: inline-block;
  flex: 0 0 auto;
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.settings-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

@media (min-width: 1320px) {
  .settings-grid.wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.settings-block {
  display: grid;
  align-content: start;
  gap: 0.32rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffefc, #fff9f2);
  padding: 0.85rem;
  box-shadow: inset 0 1px 0 #fff;
  transition: transform 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.settings-block:hover {
  transform: translateY(-1px);
  border-color: #d7c8b2;
  box-shadow: 0 10px 18px rgba(23, 27, 36, 0.08);
}

.settings-block h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-family: 'Space Grotesk', sans-serif;
}

.settings-block.settings-block-focus {
  animation: settingsBlockFocusPulse 720ms ease;
}

@keyframes settingsBlockFocusPulse {
  0% {
    border-color: #f0b26b;
    box-shadow: 0 0 0 0 rgba(240, 178, 107, 0.36);
  }
  100% {
    border-color: var(--border);
    box-shadow: 0 0 0 12px rgba(240, 178, 107, 0);
  }
}

.settings-save-row {
  margin-top: 0.2rem;
}

.settings-global-action-bar {
  position: sticky;
  top: 5rem;
  left: auto;
  transform: none;
  width: 100%;
  z-index: 1200;
  margin-top: 0;
  border: 2px solid #f0b06b;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ee 0%, #fffdf8 100%);
  box-shadow: 0 18px 36px rgba(11, 32, 61, 0.18);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  will-change: opacity, filter, box-shadow;
  backface-visibility: hidden;
  pointer-events: auto;
  isolation: isolate;
}

.settings-global-action-bar.hidden {
  pointer-events: none;
}

.settings-global-action-bar.settings-global-action-pop {
  animation: settingsGlobalActionPop 640ms cubic-bezier(0.24, 0.78, 0.26, 1.05);
}

@keyframes settingsGlobalActionPop {
  0% {
    opacity: 0;
    filter: saturate(1.18) brightness(1.02);
    box-shadow: 0 8px 20px rgba(11, 32, 61, 0.14);
  }
  58% {
    opacity: 1;
    filter: saturate(1.05) brightness(1.01);
    box-shadow: 0 22px 44px rgba(11, 32, 61, 0.24);
  }
  100% {
    opacity: 1;
    filter: none;
    box-shadow: 0 18px 36px rgba(11, 32, 61, 0.18);
  }
}

.settings-global-action-copy {
  min-width: min(360px, 100%);
}

.settings-global-action-copy strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
}

.settings-global-action-copy p {
  margin: 0.2rem 0 0;
}

.settings-global-action-buttons {
  margin-top: 0;
  gap: 0.45rem;
}

.settings-global-action-buttons .button-secondary {
  font-weight: 700;
}

.settings-save-row-top {
  position: sticky;
  top: 0.3rem;
  z-index: 3;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.94) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 10px 20px rgba(11, 32, 61, 0.08);
}

.widget-settings-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.2fr);
  gap: 0.75rem;
  align-items: start;
}

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

.webhook-delivery-filter-grid {
  margin-top: 0.55rem;
}

.workspace-widget-settings-list {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.55rem;
}

.workspace-widget-setting-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--widget-accent, var(--accent));
  border-radius: 12px;
  background: #fff;
  padding: 0.62rem 0.72rem;
}

.workspace-widget-setting-item.is-hidden {
  opacity: 0.82;
}

.workspace-widget-setting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.workspace-widget-setting-head strong {
  line-height: 1.2;
}

.overview-widget-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.55rem;
}

.overview-widget-card {
  grid-column: span 4;
  border: 1px solid var(--border);
  border-left: 4px solid var(--widget-accent, var(--accent));
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb, #fff);
  padding: 0.58rem 0.65rem;
  display: grid;
  gap: 0.35rem;
}

.overview-widget-card.overview-widget-size-small {
  grid-column: span 3;
}

.overview-widget-card.overview-widget-size-medium {
  grid-column: span 4;
}

.overview-widget-card.overview-widget-size-large {
  grid-column: span 6;
}

.overview-widget-card.overview-widget-size-full {
  grid-column: 1 / -1;
}

.overview-widget-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.overview-widget-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.overview-widget-link-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid #dfe5f4;
  object-fit: cover;
  background: #eef2fa;
  display: block;
}

.overview-widget-link-site {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.overview-widget-link-site span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-widget-link-favicon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #dfe5f4;
  background: #fff;
}

.widget-metadata-preview-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.32rem;
}

@media (max-width: 1200px) {
  .overview-widget-card,
  .overview-widget-card.overview-widget-size-small,
  .overview-widget-card.overview-widget-size-medium {
    grid-column: span 6;
  }

  .overview-widget-card.overview-widget-size-large,
  .overview-widget-card.overview-widget-size-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .overview-widget-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .overview-widget-card,
  .overview-widget-card.overview-widget-size-small,
  .overview-widget-card.overview-widget-size-medium,
  .overview-widget-card.overview-widget-size-large,
  .overview-widget-card.overview-widget-size-full {
    grid-column: 1 / -1;
  }
}

.input-hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.setup-script-output {
  width: 100%;
  margin-top: 0.65rem;
  min-height: 260px;
  font-family: "Cascadia Code", "Fira Code", monospace;
  font-size: 0.82rem;
  line-height: 1.35;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.player-chip-link {
  text-decoration: none;
  color: inherit;
}

.player-chip-link:hover .player-meta strong {
  text-decoration: underline;
}

.player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #d9cfbe;
  background: #f3f0ea;
  object-fit: cover;
  flex: 0 0 auto;
}

.player-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #42506a;
}

.player-meta {
  display: grid;
  gap: 0.08rem;
}

.player-meta strong {
  line-height: 1.1;
}

.player-meta span {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.1;
}

.overview-player-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.22rem 0;
}

.overview-rank {
  width: 1.2rem;
  font-weight: 700;
  color: var(--muted);
}

.role-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-rank-map-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.role-rank-map-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.5rem;
}

.role-rank-map-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.role-rank-map-header .muted {
  font-size: 0.78rem;
}

.role-rank-map-row label {
  margin-bottom: 0.25rem;
}

.role-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.role-picker-meta {
  font-size: 0.78rem;
  font-weight: 700;
}

.role-picker-actions {
  gap: 0.35rem;
}

.role-picker-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
}

.role-chip-list-picker {
  max-height: 220px;
  overflow: auto;
  padding-right: 0.2rem;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 0.28rem 0.58rem;
  font-size: 0.8rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.role-chip:hover {
  border-color: #cbb894;
  background: #fffcf7;
}

.role-chip small {
  color: var(--muted);
}

.role-chip input {
  width: auto;
  margin: 0;
}

.role-tone-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cfdded;
  background: #f9fcff;
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.role-tone-chip.tone-owner {
  border-color: #f1c9a5;
  background: #fff3e6;
  color: #8b4e03;
}

.role-tone-chip.tone-manager {
  border-color: #b7d8f7;
  background: #ebf5ff;
  color: #1d4e88;
}

.role-tone-chip.tone-analyst {
  border-color: #b9e7dd;
  background: #eafbf6;
  color: #0e6f5d;
}

.role-tone-chip.tone-admin {
  border-color: #d3c3f4;
  background: #f6f0ff;
  color: #5a3e95;
}

.role-tone-chip.tone-member {
  border-color: #d7dcc6;
  background: #f8faef;
  color: #5a6640;
}

.role-tone-chip.tone-a {
  border-color: #f5d0ba;
  background: #fff4ec;
  color: #8b4a22;
}

.role-tone-chip.tone-b {
  border-color: #c9e3bf;
  background: #f3fbef;
  color: #406733;
}

.role-tone-chip.tone-c {
  border-color: #c9d8f8;
  background: #f1f5ff;
  color: #33538c;
}

.role-tone-chip.tone-d,
.role-tone-chip.tone-default {
  border-color: #d7e3f1;
  background: #f7faff;
  color: #4a607d;
}

.permission-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.permission-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
}

.permission-switch input {
  width: auto;
  margin: 0;
}

.role-perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.role-perm-tag {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: #fff;
}

.role-perm-tag.on {
  color: #0f6a63;
  border-color: #c6e9e4;
  background: #effaf8;
}

.role-perm-tag.off {
  color: #7a2630;
  border-color: #efc5cc;
  background: #fff4f6;
}

.role-perm-details {
  margin-top: 0.6rem;
}

.role-perm-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.role-perm-grid {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
}

.role-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
}

.sim-result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}

.sim-result-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.role-target-meta {
  margin-top: 0.2rem;
  font-size: 0.78rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.28rem 0.52rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.online {
  color: #0f6a63;
  border-color: #b9e0dc;
  background: #e8f7f5;
}

.status-pill.degraded {
  color: #875100;
  border-color: #f0d7aa;
  background: #fff5e0;
}

.status-pill.major_outage {
  color: #8c1f23;
  border-color: #f6b9bc;
  background: #ffe9e9;
}

.status-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-metrics-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-metric-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefc, #fff8ef);
  padding: 0.8rem;
  display: grid;
  gap: 0.25rem;
}

.status-metric-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.1;
}

.status-window-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-window-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefc;
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.status-window-stats {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-window-stats div {
  display: grid;
  gap: 0.12rem;
}

.status-window-stats strong {
  font-size: 1.02rem;
}

.status-spark-shell {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf8;
  padding: 0.7rem;
}

.status-spark-grid {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 0.25rem;
}

.status-spark-dot {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #ece4d8;
}

.status-spark-dot.online {
  border-color: #b9e0dc;
  background: #d9f1ee;
}

.status-spark-dot.degraded {
  border-color: #f0d7aa;
  background: #ffe9ba;
}

.status-spark-dot.major_outage {
  border-color: #f6b9bc;
  background: #ffd8dc;
}

.status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffefc;
  padding: 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.status-downtime-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.support-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1500;
  border: 1px solid #f2c79f;
  background: linear-gradient(135deg, #ff9f4d, #d24f2f);
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(210, 79, 47, 0.32);
}

.support-fab:hover {
  box-shadow: 0 16px 28px rgba(210, 79, 47, 0.36);
}

.support-modal {
  width: min(460px, 100%);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sessionCardReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sessionLivePulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(33, 150, 102, 0.12);
  }
  50% {
    box-shadow: 0 16px 28px rgba(33, 150, 102, 0.23);
  }
}

@keyframes sessionDetailsModalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 28, 0.55);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
  padding: 1rem;
}

.global-search-modal-card {
  width: min(760px, 100%);
}

.settings-setup-guide-modal-card {
  width: min(980px, 100%);
  max-height: min(88vh, 960px);
  overflow: auto;
}

.settings-guide-checklist,
.settings-guide-jump,
.settings-guide-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff 100%);
  padding: 0.75rem;
}

.settings-guide-checklist h3,
.settings-guide-jump h3,
.settings-guide-section h3 {
  margin: 0;
}

.settings-guide-steps {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.settings-guide-chip-row {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.settings-guide-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem;
}

.settings-guide-list {
  margin: 0.5rem 0 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.3rem;
}

.global-search-hint {
  margin-top: 0.45rem;
  font-size: 0.8rem;
}

.global-search-results {
  margin-top: 0.7rem;
  max-height: min(52vh, 520px);
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.global-search-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.58rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: left;
}

.global-search-item:hover {
  border-color: #bcd3f1;
  background: #f8fcff;
}

.global-search-meta {
  min-width: 0;
}

.global-search-meta strong {
  display: block;
  line-height: 1.25;
}

.global-search-meta span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.workspace-tour-modal-card {
  width: min(520px, 100%);
}

.tour-focus-target {
  position: relative;
  z-index: 1002;
  outline: 3px solid rgba(43, 141, 255, 0.9);
  outline-offset: 3px;
  border-radius: 10px;
  box-shadow: 0 0 0 8px rgba(43, 141, 255, 0.16);
}

.create-workspace-modal {
  width: min(720px, 100%);
}

.create-workspace-modal .topbar {
  margin-bottom: 0.35rem;
}

.create-workspace-modal code {
  background: #fff4e8;
  border: 1px solid #f0dcc4;
  border-radius: 8px;
  padding: 0.08rem 0.3rem;
  font-size: 0.82rem;
}

.consent-list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.consent-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--text);
  margin: 0;
}

.consent-item input {
  width: auto;
  margin-top: 0.15rem;
}

.consent-item a {
  color: var(--accent-strong);
  font-weight: 700;
}

.star-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.star-rating-button {
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #c4ccd8;
  width: 2.1rem;
  height: 2.1rem;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, color 140ms ease;
}

.star-rating-button:hover,
.star-rating-button:focus-visible {
  transform: translateY(-1px);
  border-color: #e3b341;
  color: #e3b341;
  box-shadow: 0 7px 16px rgba(227, 179, 65, 0.2);
  outline: none;
}

.star-rating-button.active {
  border-color: #e3b341;
  background: #fff9ea;
  color: #d09100;
}

.star-rating-label {
  margin-left: 0.35rem;
}

body[data-theme-pack="sunset"] {
  --bg: #f7eee6;
  --surface: #fff8f2;
  --surface-soft: #ffefe3;
  --text: #241a1e;
  --muted: #755a58;
  --border: #e8cab9;
  --primary: #d76041;
  --primary-strong: #b64a31;
  --accent: #9a5d48;
  --accent-strong: #7f4837;
  --workspace-bg-radial-a: rgba(215, 110, 65, 0.2);
  --workspace-bg-radial-b: rgba(173, 117, 86, 0.17);
  --workspace-bg-grad-start: #fff8f1;
  --workspace-bg-grad-mid: #fff2e7;
  --workspace-bg-grad-end: #f8ebe2;
  --workspace-grid-line: rgba(145, 97, 72, 0.06);
  --workspace-brand-start: #d76041;
  --workspace-brand-end: #a76a4f;
  --workspace-brand-shadow: rgba(182, 74, 49, 0.32);
  --workspace-primary-grad-start: #d76041;
  --workspace-primary-grad-end: #c34f2f;
  --workspace-primary-grad-hover-start: #bf4f33;
  --workspace-primary-grad-hover-end: #ad4127;
  --workspace-secondary-grad-start: #a66a54;
  --workspace-secondary-grad-end: #8f5641;
  --workspace-secondary-grad-hover-start: #925641;
  --workspace-secondary-grad-hover-end: #7f4837;
  --workspace-sidebar-radial: rgba(214, 124, 86, 0.16);
  --workspace-sidebar-bg-start: #fffaf5;
  --workspace-sidebar-bg-end: #fff3e9;
  --workspace-tab-bg: #fff9f3;
  --workspace-tab-border: #e7d0c2;
  --workspace-tab-text: #5c3d37;
  --workspace-tab-dot: #bd8b73;
  --workspace-tab-hover-bg: #fff2e7;
  --workspace-tab-hover-border: #debba7;
  --workspace-tab-active-start: #d76041;
  --workspace-tab-active-end: #bf4e32;
  --workspace-tab-active-border: #b64a31;
  --workspace-tab-active-shadow: rgba(182, 74, 49, 0.28);
  --workspace-greeting-border: #e3c9bc;
  --workspace-greeting-start: #fffaf5;
  --workspace-greeting-mid: #fff0e4;
  --workspace-greeting-end: #fff5ec;
  --workspace-module-border: #e7d3c6;
  --workspace-module-bg-start: #fffdfb;
  --workspace-module-bg-end: #fff4ea;
  --workspace-inner-tab-active-start: #9a5d48;
  --workspace-inner-tab-active-end: #7f4837;
  --workspace-motion-radial-a: rgba(215, 110, 65, 0.15);
  --workspace-motion-radial-b: rgba(173, 117, 86, 0.12);
  --workspace-motion-grad-start: #fff8f1;
  --workspace-motion-grad-mid: #fff2e7;
  --workspace-motion-grad-end: #fff7f0;
}

body[data-theme-pack="mint"] {
  --bg: #eef8f5;
  --surface: #f9fefb;
  --surface-soft: #f0faf5;
  --text: #173028;
  --muted: #4f6d63;
  --border: #cfe6dd;
  --primary: #1f8f78;
  --primary-strong: #136f5d;
  --accent: #2c7fb0;
  --accent-strong: #206287;
  --workspace-bg-radial-a: rgba(31, 143, 120, 0.2);
  --workspace-bg-radial-b: rgba(44, 127, 176, 0.15);
  --workspace-bg-grad-start: #f4fcf9;
  --workspace-bg-grad-mid: #edf9f4;
  --workspace-bg-grad-end: #e8f5f0;
  --workspace-grid-line: rgba(57, 107, 95, 0.05);
  --workspace-brand-start: #1f8f78;
  --workspace-brand-end: #2c7fb0;
  --workspace-brand-shadow: rgba(19, 111, 93, 0.3);
  --workspace-primary-grad-start: #1f8f78;
  --workspace-primary-grad-end: #19866f;
  --workspace-primary-grad-hover-start: #167561;
  --workspace-primary-grad-hover-end: #136f5d;
  --workspace-secondary-grad-start: #2c7fb0;
  --workspace-secondary-grad-end: #26729f;
  --workspace-secondary-grad-hover-start: #246a94;
  --workspace-secondary-grad-hover-end: #206287;
  --workspace-sidebar-radial: rgba(31, 143, 120, 0.14);
  --workspace-sidebar-bg-start: #fbfffd;
  --workspace-sidebar-bg-end: #f0faf5;
  --workspace-tab-bg: #f8fdfa;
  --workspace-tab-border: #cfe5dd;
  --workspace-tab-text: #1f4d43;
  --workspace-tab-dot: #71a99a;
  --workspace-tab-hover-bg: #eef9f4;
  --workspace-tab-hover-border: #bdddcf;
  --workspace-tab-active-start: #1f8f78;
  --workspace-tab-active-end: #157964;
  --workspace-tab-active-border: #136f5d;
  --workspace-tab-active-shadow: rgba(19, 111, 93, 0.26);
  --workspace-greeting-border: #c8e4da;
  --workspace-greeting-start: #fafffd;
  --workspace-greeting-mid: #eefaf5;
  --workspace-greeting-end: #f2fcf8;
  --workspace-module-border: #d2e8e0;
  --workspace-module-bg-start: #ffffff;
  --workspace-module-bg-end: #f2faf6;
  --workspace-inner-tab-active-start: #2c7fb0;
  --workspace-inner-tab-active-end: #206287;
  --workspace-motion-radial-a: rgba(31, 143, 120, 0.14);
  --workspace-motion-radial-b: rgba(44, 127, 176, 0.11);
  --workspace-motion-grad-start: #f4fcf9;
  --workspace-motion-grad-mid: #edf9f4;
  --workspace-motion-grad-end: #f5fcf9;
}

body[data-theme-pack="ocean"] {
  --bg: #edf5fb;
  --surface: #f8fcff;
  --surface-soft: #eef8ff;
  --text: #12263b;
  --muted: #4f6782;
  --border: #c9dbef;
  --primary: #2378c9;
  --primary-strong: #195e9d;
  --accent: #1d8a9b;
  --accent-strong: #146b78;
  --workspace-bg-radial-a: rgba(35, 120, 201, 0.2);
  --workspace-bg-radial-b: rgba(29, 138, 155, 0.14);
  --workspace-bg-grad-start: #f4f9ff;
  --workspace-bg-grad-mid: #edf5fd;
  --workspace-bg-grad-end: #e8f1fb;
  --workspace-grid-line: rgba(56, 95, 140, 0.05);
  --workspace-brand-start: #2378c9;
  --workspace-brand-end: #1d8a9b;
  --workspace-brand-shadow: rgba(25, 94, 157, 0.32);
  --workspace-primary-grad-start: #2378c9;
  --workspace-primary-grad-end: #1e69b0;
  --workspace-primary-grad-hover-start: #1f68af;
  --workspace-primary-grad-hover-end: #195e9d;
  --workspace-secondary-grad-start: #1d8a9b;
  --workspace-secondary-grad-end: #177886;
  --workspace-secondary-grad-hover-start: #16717f;
  --workspace-secondary-grad-hover-end: #146b78;
  --workspace-sidebar-radial: rgba(35, 120, 201, 0.14);
  --workspace-sidebar-bg-start: #fbfdff;
  --workspace-sidebar-bg-end: #eff6fd;
  --workspace-tab-bg: #f9fcff;
  --workspace-tab-border: #c8dced;
  --workspace-tab-text: #1f4266;
  --workspace-tab-dot: #7fa8cb;
  --workspace-tab-hover-bg: #eef6ff;
  --workspace-tab-hover-border: #b6d2ea;
  --workspace-tab-active-start: #2378c9;
  --workspace-tab-active-end: #1b66af;
  --workspace-tab-active-border: #195e9d;
  --workspace-tab-active-shadow: rgba(25, 94, 157, 0.28);
  --workspace-greeting-border: #c7dcee;
  --workspace-greeting-start: #ffffff;
  --workspace-greeting-mid: #eef6ff;
  --workspace-greeting-end: #f0fbff;
  --workspace-module-border: #d1e2f2;
  --workspace-module-bg-start: #ffffff;
  --workspace-module-bg-end: #f2f8ff;
  --workspace-inner-tab-active-start: #1d8a9b;
  --workspace-inner-tab-active-end: #146b78;
  --workspace-motion-radial-a: rgba(35, 120, 201, 0.14);
  --workspace-motion-radial-b: rgba(29, 138, 155, 0.11);
  --workspace-motion-grad-start: #f4f9ff;
  --workspace-motion-grad-mid: #eef6ff;
  --workspace-motion-grad-end: #f5fbff;
}

body[data-theme-pack="candy"] {
  --bg: #fbf0f3;
  --surface: #fff9fb;
  --surface-soft: #fff2f7;
  --text: #2f1a30;
  --muted: #7a5877;
  --border: #e9cde3;
  --primary: #d6457f;
  --primary-strong: #ac3364;
  --accent: #8b56b5;
  --accent-strong: #6c4091;
  --workspace-bg-radial-a: rgba(214, 69, 127, 0.2);
  --workspace-bg-radial-b: rgba(139, 86, 181, 0.16);
  --workspace-bg-grad-start: #fff7fa;
  --workspace-bg-grad-mid: #fff1f6;
  --workspace-bg-grad-end: #f8edf6;
  --workspace-grid-line: rgba(124, 86, 138, 0.06);
  --workspace-brand-start: #d6457f;
  --workspace-brand-end: #8b56b5;
  --workspace-brand-shadow: rgba(172, 51, 100, 0.3);
  --workspace-primary-grad-start: #d6457f;
  --workspace-primary-grad-end: #c03a71;
  --workspace-primary-grad-hover-start: #bf3b70;
  --workspace-primary-grad-hover-end: #ac3364;
  --workspace-secondary-grad-start: #8b56b5;
  --workspace-secondary-grad-end: #7a49a3;
  --workspace-secondary-grad-hover-start: #74459a;
  --workspace-secondary-grad-hover-end: #6c4091;
  --workspace-sidebar-radial: rgba(214, 69, 127, 0.14);
  --workspace-sidebar-bg-start: #fffbfe;
  --workspace-sidebar-bg-end: #f7effa;
  --workspace-tab-bg: #fff9fd;
  --workspace-tab-border: #e3cfe9;
  --workspace-tab-text: #5a3d70;
  --workspace-tab-dot: #b791d1;
  --workspace-tab-hover-bg: #fdf1fb;
  --workspace-tab-hover-border: #d9bee6;
  --workspace-tab-active-start: #d6457f;
  --workspace-tab-active-end: #b73f72;
  --workspace-tab-active-border: #ac3364;
  --workspace-tab-active-shadow: rgba(172, 51, 100, 0.28);
  --workspace-greeting-border: #e2cde8;
  --workspace-greeting-start: #fffafe;
  --workspace-greeting-mid: #f9effb;
  --workspace-greeting-end: #fff2f8;
  --workspace-module-border: #e3d3e9;
  --workspace-module-bg-start: #ffffff;
  --workspace-module-bg-end: #f9f2fb;
  --workspace-inner-tab-active-start: #8b56b5;
  --workspace-inner-tab-active-end: #6c4091;
  --workspace-motion-radial-a: rgba(214, 69, 127, 0.14);
  --workspace-motion-radial-b: rgba(139, 86, 181, 0.11);
  --workspace-motion-grad-start: #fff7fa;
  --workspace-motion-grad-mid: #fff1f6;
  --workspace-motion-grad-end: #fff7fc;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-metrics,
  .home-pill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-showcase {
    grid-template-columns: 1fr;
  }

  .landing-info {
    grid-template-columns: 1fr;
  }

  .two-col,
  .sim-result-grid,
  .module-grid,
  .tab-split-grid,
  .tables-grid,
  .stat-grid,
  .settings-grid,
  .status-grid,
  .status-metrics-grid,
  .status-window-grid,
  .status-downtime-grid {
    grid-template-columns: 1fr;
  }

  .status-spark-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .analytics-chart-grid {
    grid-template-columns: 1fr;
  }

  .permission-switches {
    grid-template-columns: 1fr;
  }

  .permission-preview-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .permission-preview-bar .actions {
    width: 100%;
    justify-content: flex-start;
  }

  #webhookTable code {
    max-width: 240px;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .header-actions,
  .footer-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .workspace-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .workspace-tabs .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
  }

  .workspace-settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-tabs-rail.inner-tabs {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-settings-layout {
    grid-template-columns: 1fr;
  }

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

  .workspace-overview-banner {
    grid-template-columns: 1fr;
  }

  .workspace-overview-banner-image {
    height: 120px;
  }

  .overview-trend-row {
    grid-template-columns: 1fr;
  }

  .overview-layout-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .owner-sign-canvas {
    height: 200px;
  }

  .manage-player-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .manage-player-list {
    max-height: 48vh;
  }

  .shift-create-box {
    margin-top: 0.6rem;
  }

  .shift-card-detail-grid {
    grid-template-columns: 1fr;
  }

  .session-details-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem;
  }

  .profile-avatar-lg {
    width: 78px;
    height: 78px;
    border-radius: 16px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .win-error-body {
    grid-template-columns: 1fr;
    gap: 0.58rem;
  }

  .win-error-icon {
    width: 2.15rem;
    height: 2.15rem;
  }

  .win-error-actions {
    justify-content: stretch;
  }

  .win-error-actions .button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .profile-main-card #profileStats {
    grid-template-columns: 1fr;
  }

  .profile-settings-preview-grid {
    grid-template-columns: 1fr;
  }

  .sticker-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-loadout-grid {
    grid-template-columns: 1fr;
  }

  .profile-highlight-picker {
    grid-template-columns: 1fr;
  }

  .workspace-switcher-top {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-switcher-badges {
    justify-content: flex-start;
    align-items: stretch;
  }

  .workspace-switcher-top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .profile-music-preview-card {
    align-items: flex-start;
  }

  .profile-music-track-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-sticker-play-stage {
    min-height: 124px;
  }

  .profile-sticker-toy {
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.36rem;
  }

  .profile-badge-row,
  .profile-settings-preview-pills,
  .profile-presence-pills {
    gap: 0.32rem;
  }

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

  .table-wrap table {
    min-width: 620px;
  }

  .admin-badge-studio-grid {
    grid-template-columns: 1fr;
  }

  .admin-badge-studio-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-badge-details-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-notify-create {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 1rem));
  }

  .card {
    padding: 0.8rem;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .header-actions {
    gap: 0.4rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .header-actions .nav-link,
  .header-actions .button {
    white-space: nowrap;
  }

  .workspace-sidebar {
    gap: 0.8rem;
  }

  .workspace-settings-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-settings-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-sticker-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .sticker-picker-grid {
    grid-template-columns: 1fr;
  }

  .settings-tabs-rail.inner-tabs {
    grid-template-columns: 1fr;
  }

  .workspace-user {
    align-items: flex-start;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-metrics,
  .home-pill-grid,
  .hero-account-grid {
    grid-template-columns: 1fr;
  }

  .workspace-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-item .actions {
    width: 100%;
  }

  .workspace-item .actions .button {
    width: 100%;
  }

  .shift-card-grid {
    grid-template-columns: 1fr;
  }

  .profile-mini-pill {
    font-size: 0.72rem;
  }

  .profile-settings-preview-avatar {
    width: 52px;
    height: 52px;
  }

  .overview-layout-modal-card {
    width: 100%;
    max-height: calc(100dvh - 0.6rem);
    padding: 0.8rem;
  }

  .overview-layout-editor {
    max-height: calc(100dvh - 11rem);
  }

  .support-fab {
    right: 0.7rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  }

  .table-wrap table {
    min-width: 560px;
  }

  .admin-user-notify-create {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card-thumb {
    height: 170px;
  }
}

/* ================================
   Kyra Design Overhaul (2026-02-07)
   Cleaner layout, stronger hierarchy,
   better scanning and mobile polish.
================================ */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #122033;
  --muted: #4d617d;
  --border: #dbe4f1;
  --primary: #1566d6;
  --primary-strong: #0e50ac;
  --accent: #1b9f8a;
  --accent-strong: #157968;
  --workspace-bg-radial-a: rgba(52, 133, 255, 0.16);
  --workspace-bg-radial-b: rgba(44, 191, 159, 0.14);
  --workspace-bg-grad-start: #f9fbff;
  --workspace-bg-grad-mid: #f5f8fd;
  --workspace-bg-grad-end: #f3f7fc;
  --workspace-grid-line: rgba(59, 96, 148, 0.05);
  --workspace-brand-start: #1566d6;
  --workspace-brand-end: #38ac8f;
  --workspace-brand-shadow: rgba(21, 102, 214, 0.34);
  --workspace-primary-grad-start: #1566d6;
  --workspace-primary-grad-end: #2f8bea;
  --workspace-primary-grad-hover-start: #1159bd;
  --workspace-primary-grad-hover-end: #287ed7;
  --workspace-secondary-grad-start: #1b9f8a;
  --workspace-secondary-grad-end: #27b39a;
  --workspace-secondary-grad-hover-start: #178676;
  --workspace-secondary-grad-hover-end: #22a088;
  --workspace-sidebar-radial: rgba(52, 133, 255, 0.13);
  --workspace-sidebar-bg-start: #ffffff;
  --workspace-sidebar-bg-end: #f8fcff;
  --workspace-tab-bg: #ffffff;
  --workspace-tab-border: #d6e1ef;
  --workspace-tab-text: #2a405f;
  --workspace-tab-dot: #8ba7cb;
  --workspace-tab-hover-bg: #f6fbff;
  --workspace-tab-hover-border: #c7d7ec;
  --workspace-tab-active-start: #1566d6;
  --workspace-tab-active-end: #2a86e3;
  --workspace-tab-active-border: #1566d6;
  --workspace-tab-active-shadow: rgba(21, 102, 214, 0.3);
  --workspace-greeting-border: #cddcf0;
  --workspace-greeting-start: #ffffff;
  --workspace-greeting-mid: #f2f8ff;
  --workspace-greeting-end: #f3fffb;
  --workspace-module-border: #d9e4f2;
  --workspace-module-bg-start: #ffffff;
  --workspace-module-bg-end: #f8fbff;
  --workspace-inner-tab-active-start: var(--accent);
  --workspace-inner-tab-active-end: var(--accent-strong);
  --workspace-motion-radial-a: rgba(41, 135, 238, 0.12);
  --workspace-motion-radial-b: rgba(36, 188, 154, 0.1);
  --workspace-motion-grad-start: #f6fbff;
  --workspace-motion-grad-mid: #f7fcff;
  --workspace-motion-grad-end: #f8fffd;
  --radius: 18px;
  --shadow: 0 18px 44px rgba(11, 32, 61, 0.09);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 8% -16%, var(--workspace-bg-radial-a) 0, transparent 42%),
    radial-gradient(circle at 88% -10%, var(--workspace-bg-radial-b) 0, transparent 40%),
    linear-gradient(180deg, var(--workspace-bg-grad-start) 0%, var(--workspace-bg-grad-mid) 44%, var(--workspace-bg-grad-end) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: linear-gradient(var(--workspace-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--workspace-grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, #000 52%, transparent 100%);
}

.container {
  width: min(1240px, calc(100% - 2.2rem));
}

.site-header {
  position: sticky;
  top: 0.65rem;
  z-index: 80;
  margin-top: 0.5rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(214, 225, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 28px rgba(11, 32, 61, 0.08);
}

.brand {
  font-size: 2rem;
  letter-spacing: -0.025em;
}

.brand span {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.46rem;
  background: linear-gradient(145deg, var(--workspace-brand-start), var(--workspace-brand-end));
  box-shadow: 0 8px 16px var(--workspace-brand-shadow);
}

.header-actions {
  gap: 0.45rem;
}

.nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.46rem 0.78rem;
  color: var(--muted);
  font-size: 0.89rem;
}

.nav-link:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: 0 16px 36px rgba(11, 32, 61, 0.08);
  padding: 1.06rem;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  box-shadow: 0 22px 44px rgba(11, 32, 61, 0.12);
}

h2,
h3 {
  letter-spacing: -0.02em;
}

.topbar {
  padding-bottom: 0.52rem;
  border-bottom: 1px solid var(--border);
}

.button,
button {
  border-radius: 12px;
}

.button-primary {
  background: linear-gradient(145deg, var(--workspace-primary-grad-start), var(--workspace-primary-grad-end));
}

.button-primary:hover {
  background: linear-gradient(145deg, var(--workspace-primary-grad-hover-start), var(--workspace-primary-grad-hover-end));
}

.button-secondary {
  background: linear-gradient(145deg, var(--workspace-secondary-grad-start), var(--workspace-secondary-grad-end));
}

.button-secondary:hover {
  background: linear-gradient(145deg, var(--workspace-secondary-grad-hover-start), var(--workspace-secondary-grad-hover-end));
}

.button-ghost {
  background: #fff;
  border-color: #cfdbec;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.hero {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid #cfdff2;
  background:
    radial-gradient(circle at 100% 0, rgba(48, 131, 238, 0.17) 0, rgba(48, 131, 238, 0) 38%),
    radial-gradient(circle at 0 100%, rgba(38, 182, 149, 0.14) 0, rgba(38, 182, 149, 0) 36%),
    linear-gradient(155deg, #ffffff 0%, #f7fbff 50%, #f6fdff 100%);
  gap: 1rem;
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 3vw, 2.75rem);
}

.home-badge {
  border: 1px solid #bed6f4;
  background: #edf5ff;
  color: #20508e;
}

.hero-metric,
.hero-account-cell,
.stat,
.stat-grid .stat {
  border-color: #d7e2f1;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.hero-account {
  border: 1px solid #d6e3f2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 64%, #f7fffc 100%);
}

.home-showcase-main,
.home-showcase-side,
.landing-info-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.home-pill {
  border-color: #d8e3f1;
  border-radius: 14px;
}

#dashboard {
  margin-top: 1.1rem;
  gap: 0.95rem;
}

.workspace-shell {
  margin-top: 1rem;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 0.95rem;
}

.workspace-shell.container {
  width: min(1960px, calc(100vw - 1.6rem));
}

body[data-workspace-layout="split"] .workspace-shell {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1rem;
}

body[data-workspace-layout="split"] .workspace-shell.container {
  width: min(2280px, calc(100vw - 1.1rem));
}

body[data-workspace-layout="split"] .tab-split-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
}

body[data-workspace-layout="split"] .shift-split-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
}

.workspace-sidebar {
  top: 1rem;
  gap: 0.82rem;
}

.workspace-sidebar.card {
  border-radius: 20px;
  background:
    radial-gradient(circle at 110% -10%, var(--workspace-sidebar-radial) 0, transparent 40%),
    linear-gradient(180deg, var(--workspace-sidebar-bg-start) 0%, var(--workspace-sidebar-bg-end) 100%);
}

.workspace-tabs {
  gap: 0.34rem;
}

.tab-btn {
  border-radius: 11px;
  border-color: var(--workspace-tab-border);
  background: var(--workspace-tab-bg);
  color: var(--workspace-tab-text);
  padding: 0.58rem 0.72rem;
  position: relative;
}

.tab-btn::before {
  content: "";
  position: absolute;
  left: 0.46rem;
  top: 50%;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 999px;
  background: var(--workspace-tab-dot);
  transform: translateY(-50%);
  transition: all 0.16s ease;
}

.tab-btn:hover {
  border-color: var(--workspace-tab-hover-border);
  background: var(--workspace-tab-hover-bg);
}

.tab-btn.active {
  background: linear-gradient(145deg, var(--workspace-tab-active-start), var(--workspace-tab-active-end));
  color: #ffffff;
  border-color: var(--workspace-tab-active-border);
  box-shadow: 0 10px 20px var(--workspace-tab-active-shadow);
  padding-left: 0.84rem;
}

.tab-btn.active::before {
  background: #ffffff;
  width: 0.28rem;
  height: 0.28rem;
}

.workspace-content {
  gap: 0.85rem;
}

.workspace-tabs {
  gap: 0.68rem;
  align-content: start;
}

.workspace-tab-group {
  display: grid;
  gap: 0.34rem;
  border: 1px solid color-mix(in srgb, var(--workspace-tab-border) 86%, #ffffff 14%);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefb 0%, #f6fbff 100%);
  padding: 0.45rem;
}

.workspace-tab-group.hidden {
  display: none;
}

.workspace-tab-group-label {
  margin: 0;
  padding: 0.05rem 0.25rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #617894;
}

.tab-btn {
  width: 100%;
  justify-content: space-between;
}

.tab-btn::after {
  content: '\203A';
  margin-left: auto;
  font-size: 0.9rem;
  opacity: 0.65;
  transform: translateX(0);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.tab-btn:hover::after {
  opacity: 0.9;
  transform: translateX(1px);
}

.tab-btn.active::after {
  opacity: 1;
}

/* Workspace UI V2 */
.workspace-shell {
  align-items: start;
}

.workspace-sidebar {
  max-height: calc(100vh - 1.2rem);
  overflow: auto;
  scrollbar-gutter: stable;
}

.workspace-sidebar-head {
  display: grid;
  gap: 0.3rem;
}

.workspace-sidebar-pulse {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.38rem;
}

.workspace-sidebar-pill {
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 84%, #ffffff 16%);
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  padding: 0.45rem 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.workspace-sidebar-pill span {
  color: #5a6f8a;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.workspace-sidebar-pill strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
}

.workspace-sidebar-guide {
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 84%, #ffffff 16%);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 0.58rem 0.62rem;
  display: grid;
  gap: 0.4rem;
}

.workspace-sidebar-guide strong {
  font-size: 0.88rem;
  font-family: 'Space Grotesk', sans-serif;
}

.workspace-sidebar-guide p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.36;
}

.workspace-context-card {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 82%, #ffffff 18%);
  background:
    radial-gradient(circle at 94% -12%, rgba(76, 147, 255, 0.14) 0, rgba(76, 147, 255, 0) 44%),
    linear-gradient(160deg, #ffffff 0%, #f6fbff 56%, #f6fffb 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
}

.workspace-context-main {
  min-width: 0;
}

.workspace-context-eyebrow {
  margin: 0;
  color: #607995;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-context-card h2 {
  margin: 0.26rem 0 0.14rem;
  font-size: clamp(1.15rem, 1.75vw, 1.4rem);
}

.workspace-context-description {
  margin: 0;
  max-width: 76ch;
}

.workspace-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
}

.workspace-context-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cdddf0;
  border-radius: 999px;
  background: #ffffffcc;
  color: #315172;
  padding: 0.25rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-tabs .tab-btn {
  min-height: 38px;
  border-radius: 10px;
}

.workspace-content > .tab-panel.card {
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 84%, #ffffff 16%);
  box-shadow: 0 12px 28px rgba(14, 39, 71, 0.08);
}

.workspace-content > .tab-panel.card > .topbar:first-child {
  position: sticky;
  top: 0.45rem;
  z-index: 6;
  margin: -0.1rem -0.1rem 0.8rem;
  padding: 0.6rem 0.72rem 0.64rem;
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 84%, #ffffff 16%);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  box-shadow: 0 8px 18px rgba(13, 37, 67, 0.08);
}

.workspace-content > .tab-panel.card > .topbar:first-child h3 {
  margin: 0;
}

.workspace-content > .tab-panel.card > .topbar:first-child .actions {
  gap: 0.35rem;
}

.workspace-content .module-grid {
  gap: 0.76rem;
}

.workspace-content .table-wrap {
  border: 1px solid color-mix(in srgb, var(--workspace-module-border) 84%, #ffffff 16%);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.08rem;
}

.workspace-content .table-wrap table thead th {
  background: linear-gradient(180deg, #f6fbff 0%, #eff7ff 100%);
  border-bottom-color: #d9e5f2;
}

.workspace-content .module-card {
  box-shadow: 0 8px 20px rgba(13, 36, 64, 0.06);
}

.workspace-content .module-card:hover {
  transform: translateY(-1px);
}

.overview-structure-bar {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--workspace-module-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--workspace-module-bg-end) 100%);
}

.overview-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.overview-group-btn {
  appearance: none;
  border: 1px solid var(--workspace-tab-border);
  border-radius: 999px;
  background: var(--workspace-tab-bg);
  color: var(--workspace-tab-text);
  padding: 0.4rem 0.72rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.overview-group-btn:hover {
  border-color: var(--workspace-tab-hover-border);
  background: var(--workspace-tab-hover-bg);
}

.overview-group-btn.active {
  background: linear-gradient(145deg, var(--workspace-tab-active-start), var(--workspace-tab-active-end));
  border-color: var(--workspace-tab-active-border);
  color: #fff;
}

.overview-group-search {
  display: grid;
  gap: 0.25rem;
  min-width: min(320px, 100%);
}

.overview-group-search label {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.overview-card-filtered-out {
  display: none !important;
}

#overviewFilterEmpty {
  margin-top: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--workspace-module-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--workspace-module-bg-end) 100%);
}

@media (max-width: 980px) {
  .overview-structure-bar {
    align-items: stretch;
    padding: 0.62rem 0.68rem;
  }

  .overview-group-search {
    min-width: 0;
    width: 100%;
  }

  .overview-group-search input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .overview-structure-bar {
    gap: 0.48rem;
    padding: 0.55rem 0.58rem;
  }

  .overview-group-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    width: 100%;
    padding-bottom: 0.12rem;
  }

  .overview-group-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.36rem 0.64rem;
  }

  .overview-group-search label {
    font-size: 0.72rem;
  }
}

body[data-workspace-mood="focus"] .workspace-content .module-card {
  border-color: rgba(38, 110, 191, 0.26);
}

body[data-workspace-mood="calm"] .workspace-content .module-card {
  border-color: rgba(32, 146, 115, 0.24);
}

body[data-workspace-mood="festival"] .workspace-content .module-card {
  border-color: rgba(205, 102, 38, 0.3);
  box-shadow: 0 10px 24px rgba(205, 102, 38, 0.12);
}

body.workspace-motion-bg {
  background:
    radial-gradient(circle at 8% 12%, var(--workspace-motion-radial-a), transparent 34%),
    radial-gradient(circle at 88% 78%, var(--workspace-motion-radial-b), transparent 32%),
    linear-gradient(180deg, var(--workspace-motion-grad-start) 0%, var(--workspace-motion-grad-mid) 42%, var(--workspace-motion-grad-end) 100%);
  background-size: 100% 100%;
  animation: kyra-bg-drift 18s ease-in-out infinite;
}

@keyframes kyra-bg-drift {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 2% 2%;
  }
  100% {
    background-position: 0% 0%;
  }
}

.tab-panel.card {
  border-radius: 20px;
  padding: 1rem;
}

body[data-ui-density="compact"] .tab-panel.card {
  padding: 0.78rem;
}

body[data-ui-density="compact"] .module-grid {
  gap: 0.48rem;
}

body[data-ui-density="compact"] .module-card {
  padding: 0.58rem;
}

body[data-ui-density="compact"] .workspace-tabs .tab-btn {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

body[data-ui-density="compact"] .overview-player-row {
  gap: 0.45rem;
}

.workspace-greeting {
  border-color: var(--workspace-greeting-border);
  background: linear-gradient(130deg, var(--workspace-greeting-start) 0%, var(--workspace-greeting-mid) 62%, var(--workspace-greeting-end) 100%);
}

.module-card {
  border-color: var(--workspace-module-border);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--workspace-module-bg-start) 0%, var(--workspace-module-bg-end) 100%);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.workspace-content .module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 44, 79, 0.09);
}

.module-grid {
  gap: 0.66rem;
}

.overview-pulse-card,
.shift-create-box,
.settings-panel,
.assignments-create-pane {
  background:
    radial-gradient(circle at 100% -20%, var(--workspace-motion-radial-a) 0, transparent 34%),
    linear-gradient(180deg, var(--workspace-module-bg-start) 0%, var(--workspace-module-bg-end) 100%);
}

.workspace-ad-slot {
  border: 1px solid #dbe5f3;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.workspace-ad-body {
  border: 1px solid #e4ebf8;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.workspace-switcher-item,
.workspace-item,
.manage-player-item,
.profile-link-row,
.settings-block,
.status-card,
.status-window-card,
.status-metric-card {
  border-color: #d7e3f1;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.workspace-switcher-item.active,
.manage-player-item.active {
  border-color: #9ac0ef;
  background: linear-gradient(160deg, #eaf4ff 0%, #f9fdff 100%);
}

.button {
  position: relative;
  overflow: hidden;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 65%);
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.button:active::after {
  opacity: 1;
}

.module-reveal {
  animation: module-reveal-rise 320ms ease both;
  animation-delay: var(--module-reveal-delay, 0ms);
}

@keyframes module-reveal-rise {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.inner-tabs {
  gap: 0.38rem;
}

.inner-tab-btn {
  border: 1px solid #d4dfed;
  border-radius: 10px;
  background: #ffffff;
  color: #29405d;
}

.inner-tab-btn.active {
  background: linear-gradient(145deg, var(--workspace-inner-tab-active-start), var(--workspace-inner-tab-active-end));
  border-color: var(--workspace-inner-tab-active-start);
  color: #ffffff;
}

.settings-tabs-rail.inner-tabs {
  border-color: #d4e0ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 20px rgba(11, 32, 61, 0.06);
}

.settings-panel {
  border: 1px solid #d6e1ef;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(11, 32, 61, 0.07);
}

.badge,
.status-pill,
.role-perm-tag,
.role-chip {
  border-color: #cfdded;
  background: #f9fcff;
}

.status-pill.online {
  border-color: #9edccd;
  background: #e7fbf5;
}

.status-pill.degraded {
  border-color: #f0d39b;
  background: #fff5de;
}

.status-pill.major_outage {
  border-color: #f2b7bf;
  background: #ffecef;
}

.table-wrap {
  border: 1px solid #d5e2f2;
  border-radius: 12px;
  background: #ffffff;
}

th {
  background: linear-gradient(180deg, #f2f7ff 0%, #f8fbff 100%);
  color: #314a69;
  border-bottom: 1px solid #d8e4f3;
}

td {
  border-bottom: 1px solid #edf2f9;
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #eff6ff;
}

.site-footer {
  margin-top: 1.2rem;
  margin-bottom: 2rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #d7e3f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.footer-links a:hover {
  color: #163c67;
}

.modal-overlay {
  background: rgba(8, 24, 44, 0.54);
}

.modal-card {
  border: 1px solid #d5e1f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.support-fab {
  border-color: #6db7ea;
  background: linear-gradient(145deg, #1566d6, #34a0db);
  box-shadow: 0 16px 28px rgba(21, 102, 214, 0.35);
}

/* Docs layout unified with global design system */
.docs-shell {
  margin-top: 1.05rem;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  border-left: 4px solid #2f86e4;
  padding-left: 0.95rem;
}

.docs-sidebar-head {
  display: grid;
  gap: 0.15rem;
}

.docs-eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  width: fit-content;
  padding: 0.23rem 0.56rem;
  border-radius: 999px;
  border: 1px solid #bed6f4;
  background: #edf5ff;
  color: #20508e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-search-wrap {
  border: 1px solid #d4e0ef;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 0.58rem;
  display: grid;
  gap: 0.35rem;
}

.docs-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.docs-search-row .button {
  min-width: 72px;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.docs-search-status {
  margin: 0;
  font-size: 0.79rem;
}

.docs-meta-row {
  border: 1px solid #d6e2f1;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.45rem 0.56rem;
  font-size: 0.8rem;
}

.docs-nav {
  display: grid;
  gap: 0.4rem;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 0.1rem;
}

.docs-nav a {
  border: 1px solid #d7e2f0;
  background: #fff;
  color: #213b5a;
  text-decoration: none;
  padding: 0.53rem 0.68rem;
  border-radius: 11px;
  font-weight: 700;
  position: relative;
  line-height: 1.25;
}

.docs-nav a::before {
  content: "";
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #9bb8dc;
  display: inline-block;
  margin-right: 0.46rem;
  vertical-align: middle;
}

.docs-nav a:hover {
  border-color: #9bc0ec;
  color: #114477;
  background: #f4f9ff;
}

.docs-nav a.active {
  border-color: #1668d9;
  color: #0f4ea6;
  background: #eaf3ff;
  box-shadow: 0 10px 18px rgba(22, 104, 217, 0.16);
}

.docs-nav a.active::before {
  background: #1668d9;
}

.docs-content {
  display: grid;
  gap: 0.8rem;
}

.docs-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 0.8rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(47, 134, 228, 0.16) 0, rgba(47, 134, 228, 0) 36%),
    radial-gradient(circle at 0% 100%, rgba(40, 171, 141, 0.14) 0, rgba(40, 171, 141, 0) 38%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.docs-hero-copy p {
  margin-top: 0.42rem;
  max-width: 72ch;
}

.docs-hero-stats {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.docs-hero-stat {
  border: 1px solid #d7e2f1;
  border-radius: 12px;
  background: #fff;
  padding: 0.52rem 0.64rem;
  display: grid;
  gap: 0.1rem;
}

.docs-hero-stat span {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.docs-hero-stat strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  line-height: 1.1;
}

.docs-article {
  display: grid;
  gap: 0.5rem;
}

.docs-article-preview {
  border-radius: 18px;
}

.docs-article-banner {
  border-style: dashed;
  border-color: #c6d9f0;
  background: linear-gradient(180deg, #f9fcff, #ffffff);
}

.docs-article-full {
  background: #fff;
}

.docs-page-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.docs-page-link {
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  min-height: 42px;
}

.docs-page-link-disabled {
  opacity: 0.58;
  pointer-events: none;
  filter: grayscale(0.22);
}

.docs-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem 0.52rem;
  align-items: center;
}

.docs-article-title {
  line-height: 1.18;
}

.docs-article-link {
  color: #0f3f75;
  text-decoration: none;
}

.docs-article-link:hover {
  text-decoration: underline;
}

.docs-article-excerpt {
  margin: 0;
  line-height: 1.52;
}

.docs-article-content {
  line-height: 1.62;
}

.docs-article-content h3 {
  margin-top: 0.95rem;
  margin-bottom: 0.28rem;
}

.docs-article-content ul,
.docs-article-content ol {
  margin-top: 0.3rem;
  margin-bottom: 0.65rem;
}

.docs-article-content code,
.docs-editor code {
  background: #f0f5ff;
  border: 1px solid #d6e2f2;
  border-radius: 7px;
  padding: 0.08rem 0.3rem;
}

.docs-method {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e2f0;
  border-radius: 999px;
  background: #ffffff;
  color: #314a69;
  padding: 0.2rem 0.5rem;
  margin-right: 0.22rem;
  margin-bottom: 0.2rem;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.docs-method-get {
  color: #0b6b46;
  border-color: #bce8d5;
  background: #ebf9f2;
}

.docs-method-post {
  color: #0f4ea6;
  border-color: #bfd8f8;
  background: #ecf4ff;
}

.docs-method-put,
.docs-method-patch {
  color: #8c5b0f;
  border-color: #efd9b0;
  background: #fff6e6;
}

.docs-method-delete {
  color: #9f2b2b;
  border-color: #f2c1c1;
  background: #ffefef;
}

.docs-article pre {
  margin: 0.6rem 0;
  padding: 0.8rem;
  overflow: auto;
  border: 1px solid #d5e1f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #fbfdff 100%);
}

.docs-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.docs-editor textarea {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid #ceddef;
  background: #fbfdff;
}

@media (max-width: 1100px) {
  .workspace-shell.container {
    width: min(1240px, calc(100% - 1.2rem));
  }

  body[data-workspace-layout="split"] .workspace-shell.container {
    width: min(1240px, calc(100% - 1.2rem));
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  body[data-workspace-layout="split"] .workspace-shell {
    grid-template-columns: 1fr;
  }

  body[data-workspace-layout="split"] .tab-split-grid,
  body[data-workspace-layout="split"] .shift-split-grid {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
  }

  .webhook-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .docs-hero-card {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
    top: auto;
  }
}

@media (max-width: 860px) {
  .container {
    width: min(1240px, calc(100% - 1.2rem));
  }

  .site-header {
    padding: 0.65rem 0.7rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .header-actions .nav-link,
  .header-actions .button {
    white-space: nowrap;
  }

  .hero {
    padding: 1rem;
  }

  .card {
    padding: 0.86rem;
  }

  .tab-panel.card {
    padding: 0.86rem;
  }

  .settings-tabs-rail.inner-tabs {
    position: static;
  }

  .settings-global-action-bar {
    top: 0.4rem;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    padding: 0.5rem 0.55rem;
  }

  .settings-global-action-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .webhook-filter-grid {
    grid-template-columns: 1fr;
  }

  .docs-shell,
  .status-window-grid,
  .status-metrics-grid,
  .status-grid,
  .status-downtime-grid {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    padding-left: 0.82rem;
  }

  .docs-search-row {
    grid-template-columns: 1fr;
  }

  .docs-search-row .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .docs-sidebar {
    border-left-width: 3px;
    padding-left: 0.65rem;
  }

  .docs-nav {
    max-height: none;
  }

  .docs-hero-stats {
    grid-template-columns: 1fr;
  }

  .docs-article-meta {
    gap: 0.32rem 0.4rem;
  }

  .docs-page-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-notification-wrap {
    position: static;
  }

  .header-notification-menu {
    position: fixed;
    top: 4.8rem;
    right: 0.6rem;
    left: 0.6rem;
    width: auto;
  }
}

/* ================================
   Home Page Refresh (2026-02-08)
================================ */
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid #c8dbf1;
  background:
    radial-gradient(circle at 105% -5%, rgba(20, 99, 200, 0.26) 0, rgba(20, 99, 200, 0) 38%),
    radial-gradient(circle at -8% 110%, rgba(19, 158, 130, 0.2) 0, rgba(19, 158, 130, 0) 42%),
    linear-gradient(165deg, #ffffff 0%, #f7fbff 48%, #f5fdfb 100%);
  box-shadow: 0 26px 54px rgba(17, 34, 58, 0.13);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -130px auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(58, 124, 255, 0.18) 0, rgba(58, 124, 255, 0) 72%);
  pointer-events: none;
}

.home-hero-copy {
  display: grid;
  align-content: start;
}

.home-lead {
  max-width: 64ch;
}

.home-hero-actions .button {
  min-height: 42px;
}

.home-kpi-grid {
  margin-top: 1.1rem;
}

.home-trust-row {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.home-trust-row span {
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  padding: 0.24rem 0.54rem;
  background: #ffffffd1;
  color: #2f4b70;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.home-command-card {
  position: relative;
  z-index: 1;
}

.home-command-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.home-command-grid {
  margin-top: 0.12rem;
}

.home-login-panel .button {
  min-height: 42px;
}

.home-command-preview {
  display: grid;
  gap: 0.45rem;
}

.home-preview-card {
  border: 1px solid #d6e3f2;
  border-radius: 12px;
  padding: 0.55rem 0.62rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  display: grid;
  gap: 0.14rem;
}

.home-preview-card strong {
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
}

.home-preview-card span {
  font-size: 0.8rem;
  line-height: 1.4;
}

.home-value-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.home-value-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.home-value-card h3 {
  margin-bottom: 0.38rem;
}

.home-operating-model {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.home-operating-main,
.home-operating-side {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.home-flow-grid {
  margin-top: 0.68rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-flow-step {
  border: 1px solid #d6e3f2;
  border-radius: 14px;
  padding: 0.6rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  display: grid;
  gap: 0.18rem;
}

.home-flow-step strong {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: #0f4ea6;
  background: #e7f1ff;
  border: 1px solid #bfd4f4;
}

.home-flow-step h4 {
  margin: 0;
  font-size: 0.95rem;
  font-family: 'Space Grotesk', sans-serif;
}

.home-flow-step p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.home-ecosystem-grid {
  margin-top: 0.95rem;
  margin-bottom: 0.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.home-ecosystem-main,
.home-ecosystem-side {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
}

.home-ecosystem-tiles {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.home-ecosystem-tile {
  border: 1px solid #d5e1f0;
  border-radius: 14px;
  padding: 0.62rem;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  display: grid;
  gap: 0.2rem;
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-ecosystem-tile:hover {
  transform: translateY(-1px);
  border-color: #9cc0eb;
  box-shadow: 0 14px 24px rgba(24, 66, 114, 0.14);
}

.home-ecosystem-tile strong {
  font-size: 0.91rem;
  font-family: 'Space Grotesk', sans-serif;
}

.home-ecosystem-tile span {
  font-size: 0.8rem;
  line-height: 1.4;
}

.home-dashboard-hub {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

@keyframes homeCardRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hero,
.home-value-card,
.home-operating-main,
.home-operating-side,
.home-ecosystem-main,
.home-ecosystem-side {
  animation: homeCardRise 0.35s ease both;
}

.home-value-card:nth-child(2),
.home-flow-step:nth-child(2),
.home-ecosystem-tile:nth-child(2) {
  animation-delay: 0.04s;
}

.home-value-card:nth-child(3),
.home-flow-step:nth-child(3),
.home-ecosystem-tile:nth-child(3) {
  animation-delay: 0.08s;
}

@media (max-width: 1100px) {
  .home-value-grid {
    grid-template-columns: 1fr;
  }

  .home-operating-model,
  .home-ecosystem-grid {
    grid-template-columns: 1fr;
  }

  .home-ecosystem-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .home-trust-row span {
    font-size: 0.73rem;
  }

  .home-flow-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-hero {
    border-radius: 20px;
    padding: 0.95rem;
  }

  .home-hero-copy h1 {
    font-size: clamp(1.6rem, 8.2vw, 2rem);
  }

  .home-trust-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-ecosystem-tiles {
    grid-template-columns: 1fr;
  }
}

/* Workspace Mobile + Polish Pass */
@media (max-width: 860px) {
  .workspace-shell {
    gap: 0.62rem;
  }

  .workspace-sidebar {
    max-height: none;
  }

  .workspace-context-card {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .workspace-context-meta {
    justify-content: flex-start;
  }

  .workspace-tab-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-tab-group-label {
    grid-column: 1 / -1;
  }

  .workspace-sidebar.card {
    border-radius: 16px;
    padding: 0.72rem;
  }

  .workspace-sidebar > div:first-child {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "logo name"
      "logo meta"
      "logo badge";
    gap: 0.22rem 0.55rem;
    align-items: center;
  }

  #workspaceGroupLogo {
    grid-area: logo;
    width: 52px;
    height: 52px;
    margin: 0;
  }

  #workspaceName {
    grid-area: name;
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.15;
  }

  #workspaceMeta {
    grid-area: meta;
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #workspaceRoleBadge {
    grid-area: badge;
    width: fit-content;
  }

  .workspace-ad-slot {
    display: none;
  }

  .workspace-sidebar-pulse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-sidebar-pill {
    min-height: 56px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.16rem;
  }

  .workspace-tabs {
    margin-top: 0.44rem;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.12rem;
  }

  .workspace-tabs .tab-btn {
    scroll-snap-align: start;
  }

  .tab-panel.card {
    border-radius: 16px;
    padding: 0.8rem;
  }

  .table-wrap {
    max-height: none;
  }

  .table-wrap table {
    min-width: 540px;
  }

  .island-toast {
    max-width: min(96vw, 560px);
    font-size: 0.83rem;
  }
}

@media (max-width: 640px) {
  .workspace-tab-group {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar-pulse {
    grid-template-columns: 1fr;
  }

  .workspace-context-card {
    border-radius: 14px;
    padding: 0.72rem;
  }

  .workspace-context-card h2 {
    font-size: 1.08rem;
  }

  .workspace-user {
    padding: 0.52rem;
  }

  .workspace-user strong {
    font-size: 0.9rem;
  }

  .workspace-tabs .tab-btn {
    font-size: 0.81rem;
    padding: 0.5rem 0.62rem;
  }

  .topbar .actions {
    width: 100%;
  }

  .topbar .actions .button {
    flex: 1 1 auto;
    min-height: 40px;
  }

  .table-wrap table {
    min-width: 500px;
  }

  .table-empty-state {
    min-height: 84px;
    padding: 0.62rem 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-reveal,
  .confetti-piece,
  .workspace-content .card,
  .home-hero,
  .home-value-card,
  .home-operating-main,
  .home-operating-side,
  .home-ecosystem-main,
  .home-ecosystem-side {
    animation: none !important;
  }

  .button,
  .module-card,
  .workspace-switcher-item,
  .manage-player-item,
  .kyra-page-loader,
  .kyra-loader-stage,
  .kyra-loader-spinner,
  .kyra-loader-complete,
  .kyra-loader-check,
  .island-toast,
  .profile-hero::before,
  .profile-sticker-badge,
  .profile-sticker-badge-icon,
  .profile-sticker-reaction-btn,
  .profile-sticker-toy,
  .profile-sticker-spark,
  .profile-sticker-toast,
  .profile-sticker-play-spark,
  .profile-sticker-play-drop {
    transition: none !important;
    animation: none !important;
  }
}

img.twemoji-discord,
img.emoji {
  width: 1.05em;
  height: 1.05em;
  margin: 0 0.04em;
  vertical-align: -0.14em;
  display: inline-block;
  pointer-events: none;
}

/* Workspace Simplified V2 */
.workspace-sidebar {
  gap: 0.7rem;
}

.workspace-tabs {
  display: grid;
  gap: 0.42rem;
  align-content: start;
}

.workspace-tabs .tab-btn {
  justify-content: flex-start;
  padding: 0.55rem 0.72rem;
  min-height: 36px;
  border-radius: 10px;
}

.workspace-tabs .tab-btn::after {
  content: none;
}

.workspace-tabs .tab-btn.active {
  padding-left: 0.72rem;
}

.workspace-content {
  gap: 0.7rem;
}

.workspace-content > .tab-panel.card {
  box-shadow: 0 6px 14px rgba(14, 39, 71, 0.06);
}

.workspace-content > .tab-panel.card > .topbar:first-child {
  position: static;
  top: auto;
  margin: 0 0 0.72rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workspace-content .module-grid {
  gap: 0.64rem;
}

.workspace-content .module-card {
  box-shadow: 0 4px 10px rgba(13, 36, 64, 0.05);
}

.workspace-content .module-card:hover {
  transform: none;
}

.overview-hero {
  grid-template-columns: 1fr;
  gap: 0.64rem;
}

/* Workspace Settings V2 */
.settings-tabs-rail.inner-tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}

.settings-tabs-rail .inner-tab-btn {
  border-radius: 9px;
  min-height: 34px;
}

.settings-tabs-rail .inner-tab-btn.active {
  box-shadow: 0 8px 16px rgba(15, 106, 99, 0.2);
}

.settings-tab-context {
  box-shadow: 0 6px 14px rgba(11, 32, 61, 0.06);
}

.settings-general-map {
  box-shadow: 0 6px 14px rgba(11, 32, 61, 0.05);
}

.settings-category-title {
  border-left: 3px solid color-mix(in srgb, var(--accent) 58%, #ffffff 42%);
  padding-left: 0.55rem;
}

.settings-grid.wide {
  gap: 0.66rem;
}

.settings-block {
  border-radius: 12px;
  padding: 0.76rem;
  gap: 0.28rem;
}

.settings-block h4 {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.settings-block label {
  font-size: 0.86rem;
}

.settings-block input,
.settings-block select,
.settings-block textarea {
  min-height: 36px;
}

@media (max-width: 980px) {
  .settings-tab-context {
    padding: 0.52rem 0.58rem;
  }

  .settings-general-map {
    padding: 0.56rem 0.6rem;
  }

  .settings-general-map-chips .button {
    flex: 1 1 calc(50% - 0.28rem);
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .settings-general-map-chips .button {
    flex: 1 1 100%;
  }

  .settings-category-title {
    padding-left: 0.44rem;
  }
}

/* Workspace Settings Overhaul */
#workspaceSettingsForm.settings-grid.wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.72rem;
}

.settings-block.settings-v2-ready {
  padding: 0.72rem;
  gap: 0.58rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.settings-v2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}

.settings-v2-expand {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  border-radius: 10px;
  transition: background 140ms ease, color 140ms ease;
  flex: 1 1 auto;
  min-width: 0;
}

.settings-v2-expand:hover {
  background: #f4f8ff;
}

.settings-v2-expand:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.settings-v2-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-v2-meta {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #3d5f88;
  border: 1px solid #cfe0f3;
  background: #f5faff;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}

.settings-v2-chevron {
  font-size: 1rem;
  color: #4d6486;
  transform: rotate(0deg);
  transition: transform 220ms ease;
}

.settings-v2-expanded .settings-v2-chevron {
  transform: rotate(180deg);
}

.settings-v2-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 220ms ease;
  display: grid;
  gap: 0.38rem;
}

.settings-v2-expanded .settings-v2-body {
  opacity: 1;
  transform: translateY(0);
}

.settings-v2-hidden-toggle-row {
  display: none !important;
}

.settings-v2-inactive {
  border-color: #dfe6f0;
  background: linear-gradient(180deg, #fafcff 0%, #f6f9ff 100%);
}

.settings-v2-inactive .settings-v2-title {
  color: #6a7c96;
}

.settings-v2-switch,
.settings-switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
}

.settings-v2-switch-spacer {
  display: inline-flex;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  pointer-events: none;
}

.settings-v2-switch input,
.settings-switch-wrap input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.settings-v2-slider,
.settings-switch-slider {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #cdd9e7;
  background: linear-gradient(180deg, #e3eaf3 0%, #d8e2ef 100%);
  box-shadow: inset 0 1px 2px rgba(16, 33, 58, 0.12);
  position: relative;
  transition: background 200ms ease, border-color 200ms ease;
}

.settings-v2-slider::after,
.settings-switch-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d7dfe9;
  box-shadow: 0 3px 8px rgba(11, 32, 61, 0.18);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 180ms ease;
}

.settings-v2-switch input:checked + .settings-v2-slider,
.settings-switch-wrap input:checked + .settings-switch-slider {
  background: linear-gradient(150deg, #0f8d6b 0%, #11a384 100%);
  border-color: #0f8d6b;
}

.settings-v2-switch input:checked + .settings-v2-slider::after,
.settings-switch-wrap input:checked + .settings-switch-slider::after {
  transform: translateX(18px);
  border-color: #9dd8ca;
}

.settings-panel input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 0.6rem 0.68rem;
}

.settings-switch-row-inline {
  margin-top: 0.1rem;
}

.settings-switch-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.settings-switch-copy strong {
  font-size: 0.9rem;
  line-height: 1.3;
}

.settings-switch-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.settings-invite-panel {
  padding: 0.86rem;
}

.settings-invite-card {
  display: grid;
  gap: 0.8rem;
}

.settings-invite-head {
  display: grid;
  gap: 0.28rem;
}

.settings-invite-form {
  border: 1px solid #d8e2ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.75rem;
}

.settings-invite-grid {
  display: grid;
  gap: 0.64rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-invite-grid #inviteExpiryCustomRow {
  grid-column: span 3;
}

.settings-invite-result {
  display: grid;
  gap: 0.36rem;
}

.settings-invite-result-row {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.settings-invite-result-row input[readonly] {
  min-height: 40px;
  background: #f9fcff;
}

@media (max-width: 980px) {
  .settings-v2-meta {
    display: none;
  }

  .settings-invite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-invite-grid #inviteExpiryCustomRow {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .settings-v2-row {
    align-items: flex-start;
  }

  .settings-v2-switch {
    margin-top: 0.08rem;
  }

  .settings-v2-switch-spacer {
    margin-top: 0.08rem;
  }

  .settings-invite-grid {
    grid-template-columns: 1fr;
  }

  .settings-invite-grid #inviteExpiryCustomRow {
    grid-column: auto;
  }

  .settings-invite-result-row {
    grid-template-columns: 1fr;
  }
}

.settings-surface-ready {
  padding: 0.72rem;
  border-radius: 14px;
  border: 1px solid #d8e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.settings-surface-head {
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.12rem 0.2rem;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: background 140ms ease;
}

.settings-surface-head:hover {
  background: #f4f8ff;
}

.settings-surface-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-surface-meta {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #3d5f88;
  border: 1px solid #cfe0f3;
  background: #f5faff;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}

.settings-surface-chevron {
  font-size: 1rem;
  color: #4d6486;
  transform: rotate(0deg);
  transition: transform 220ms ease;
}

.settings-surface-expanded .settings-surface-chevron {
  transform: rotate(180deg);
}

.settings-surface-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 220ms ease;
  display: grid;
  gap: 0.45rem;
}

.settings-surface-expanded .settings-surface-body {
  opacity: 1;
  transform: translateY(0);
}

.home-overview-grid {
  margin-top: 0.7rem;
}

.home-weekly-card {
  display: grid;
  gap: 0.25rem;
}

.home-sessions-card {
  display: grid;
  gap: 0.25rem;
}

.home-weekly-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.home-weekly-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0.58rem 0.62rem;
  display: grid;
  gap: 0.2rem;
}

.home-weekly-stat-label {
  margin: 0;
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.home-weekly-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.22rem, 2.1vw, 1.48rem);
  line-height: 1.2;
}

.home-weekly-minutes {
  margin: 0;
  font-size: clamp(1.44rem, 3.4vw, 1.98rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

.home-weekly-sessions {
  margin: 0;
  font-size: clamp(1.44rem, 3.2vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.home-weekly-minutes.is-loading,
.home-weekly-sessions.is-loading {
  font-size: 1rem;
  letter-spacing: 0;
}

.inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-weight: 700;
  color: var(--text-muted);
}

.inline-loading-spinner {
  width: 0.88rem;
  height: 0.88rem;
  border-radius: 999px;
  border: 2px solid rgba(23, 138, 129, 0.22);
  border-top-color: var(--accent);
  animation: inlineSpin 0.9s linear infinite;
}

@keyframes inlineSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.home-announcement-list {
  display: grid;
  gap: 0.55rem;
  max-height: min(44vh, 360px);
  overflow: auto;
}

.home-announcement-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.65rem 0.7rem;
  background: var(--surface-soft);
  display: grid;
  gap: 0.38rem;
}

.home-announcement-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.home-announcement-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.home-announcement-actions {
  display: flex;
  justify-content: flex-end;
}

.home-music-now {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 0.85rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  min-height: 132px;
}

.home-music-now-cover {
  width: 104px;
  height: 104px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(12, 23, 38, 0.12);
}

.home-music-now-body {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.home-music-now-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.home-music-now-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-music-list {
  display: grid;
  gap: 0.45rem;
  max-height: min(54vh, 520px);
  overflow: auto;
}

.home-music-item {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 0.55rem 0.6rem;
  display: flex;
  gap: 0.62rem;
  align-items: center;
}

.home-music-item-cover {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.home-music-item-body {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.home-music-item-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

.home-music-item-meta {
  margin: 0;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.home-music-item-link {
  margin-left: auto;
  flex-shrink: 0;
}

.activity-log-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.24rem, 2.6vw, 1.56rem);
  line-height: 1.1;
}

.join-invite-shell {
  padding: 2rem 0 2.6rem;
}

.join-invite-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.15rem;
  display: grid;
  gap: 0.95rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(210, 79, 47, 0.12), rgba(210, 79, 47, 0) 35%),
    radial-gradient(circle at 100% 0%, rgba(23, 138, 129, 0.12), rgba(23, 138, 129, 0) 32%),
    var(--surface);
}

.join-invite-hero {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.join-invite-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 26, 34, 0.1);
  flex-shrink: 0;
}

.join-invite-title {
  margin: 0.25rem 0 0.2rem;
  font-size: clamp(1.4rem, 3.3vw, 2rem);
  line-height: 1.08;
}

.join-invite-meta {
  margin: 0;
}

.join-invite-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.join-invite-rules {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.65);
}

.join-invite-rules h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.join-invite-rules ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.join-invite-rules li {
  color: var(--muted);
  line-height: 1.4;
}

.join-status {
  margin: 0.15rem 0 0;
}

.join-status.join-status-success {
  color: #1d8f4f;
}

.join-status.join-status-error {
  color: #b13a3a;
}

.join-invite-actions {
  margin-top: 0.25rem;
}

@media (max-width: 980px) {
  .home-weekly-stats {
    grid-template-columns: 1fr;
  }

  .home-music-now {
    min-height: 0;
    padding: 0.72rem;
    gap: 0.7rem;
  }

  .home-music-now-cover {
    width: 78px;
    height: 78px;
    border-radius: 14px;
  }

  .home-music-now-title {
    font-size: 0.98rem;
  }

  .home-music-now-meta {
    font-size: 0.84rem;
  }

  .join-invite-card {
    padding: 0.9rem;
  }
}

@media (max-width: 760px) {
  .join-invite-shell {
    padding: 1.15rem 0 1.7rem;
  }

  .join-invite-hero {
    align-items: flex-start;
    gap: 0.66rem;
  }

  .join-invite-logo {
    width: 58px;
    height: 58px;
    border-radius: 12px;
  }

  .join-invite-title {
    font-size: 1.25rem;
  }

  .session-staff-role-row {
    grid-template-columns: 1fr;
  }

  .session-calendar-day {
    min-height: 78px;
    padding: 0.26rem 0.3rem;
  }

  .session-calendar-preview-line:nth-child(n+2) {
    display: none;
  }
}
