:root {
  color-scheme: dark;
  --bg: #09101c;
  --bg-elevated: #101a2b;
  --panel: rgba(17, 28, 47, 0.92);
  --panel-strong: #132139;
  --border: rgba(148, 163, 184, 0.18);
  --text: #edf3ff;
  --muted: #9eb0c9;
  --accent: #7c9cff;
  --accent-strong: #9db4ff;
  --success: #55d98d;
  --danger: #ff7f8a;
  --warning: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, 0.22), transparent 31rem),
    radial-gradient(circle at 80% 20%, rgba(85, 217, 141, 0.12), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}



.public-landing-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 26px clamp(18px, 4vw, 56px) 70px;
  background:
    radial-gradient(circle at 10% 10%, rgba(124, 156, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.16), transparent 28rem),
    radial-gradient(circle at 50% 95%, rgba(85, 217, 141, 0.10), transparent 28rem),
    linear-gradient(180deg, #08101d 0%, #09101c 48%, #070c16 100%);
}

.public-landing-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
}

.landing-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.32;
  pointer-events: none;
  animation: landingFloat 12s ease-in-out infinite alternate;
}

.landing-orb-one { left: -120px; top: 80px; background: #617dff; }
.landing-orb-two { right: -160px; top: 360px; background: #33d6ad; animation-delay: -5s; }

.landing-nav,
.landing-main {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(8, 16, 29, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.landing-logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.34), rgba(85, 217, 141, 0.10));
  border: 1px solid rgba(157, 180, 255, 0.34);
  color: var(--accent-strong);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.landing-logo strong,
.landing-logo small { display: block; }
.landing-logo small { color: var(--muted); margin-top: 2px; font-size: 0.76rem; }

.landing-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}

.landing-links a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.landing-links a:hover { color: var(--text); transform: translateY(-1px); }
.landing-nav-cta { white-space: nowrap; }

.landing-main { padding-top: clamp(28px, 5vw, 58px); }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(34px, 6vw, 74px);
  align-items: center;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(124, 156, 255, 0.28);
  border-radius: 999px;
  color: #c9d6ff;
  background: rgba(124, 156, 255, 0.10);
  font-weight: 900;
  font-size: 0.84rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 16px rgba(85, 217, 141, 0.8);
}

.landing-hero h1 {
  margin: 24px 0 0;
  max-width: 820px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.91;
  letter-spacing: -0.075em;
}

.landing-lead {
  margin: 24px 0 0;
  max-width: 720px;
  color: #bfd0ec;
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
  line-height: 1.72;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}

.public-login-button {
  position: relative;
  isolation: isolate;
  font-size: 1rem;
  padding: 15px 22px;
  box-shadow: 0 16px 42px rgba(124, 156, 255, 0.25);
}

.public-login-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(124,156,255,.55), rgba(85,217,141,.35), rgba(124,156,255,.55));
  opacity: .0;
  filter: blur(14px);
  transition: opacity .2s ease;
}
.public-login-button:hover::after { opacity: .75; }

.landing-secondary { padding: 14px 20px; text-decoration: none; }
.landing-access-note { margin-top: 14px; color: var(--muted); font-size: 0.93rem; }

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.landing-trust-row span {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dce7fb;
  font-weight: 800;
  font-size: 0.86rem;
}

.landing-dashboard-preview {
  position: relative;
  min-height: 520px;
  perspective: 1200px;
}

.preview-window {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(157, 180, 255, 0.28);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(21, 35, 58, 0.96), rgba(8, 15, 27, 0.96));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.42), 0 0 80px rgba(124, 156, 255, 0.16);
  transform: rotateX(4deg) rotateY(-7deg) rotateZ(1deg);
  animation: previewFloat 7s ease-in-out infinite;
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 16px;
  color: var(--muted);
  font-size: 0.82rem;
}
.preview-topbar span { width: 10px; height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.36); }
.preview-topbar span:nth-child(1) { background: #ff7f8a; }
.preview-topbar span:nth-child(2) { background: #ffd166; }
.preview-topbar span:nth-child(3) { background: #55d98d; }
.preview-topbar strong { margin-left: auto; color: #dce7fb; }

.preview-hero-card,
.preview-list article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}
.preview-hero-card { padding: 20px; }
.preview-hero-card p { margin: 0; color: var(--muted); font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.preview-hero-card h2 { margin: 7px 0 18px; font-size: 1.45rem; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview-stats span { padding: 12px; border-radius: 16px; background: rgba(8, 16, 29, 0.74); color: var(--muted); font-size: 0.78rem; }
.preview-stats strong { display: block; color: var(--text); font-size: 1.4rem; }
.preview-tabs { display: flex; gap: 10px; margin: 14px 0; }
.preview-tabs span { padding: 9px 13px; border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.04); font-weight: 900; font-size: .78rem; }
.preview-tabs .active { color: var(--text); background: rgba(124,156,255,.22); border: 1px solid rgba(124,156,255,.32); }
.preview-list { display: grid; gap: 12px; }
.preview-list article { padding: 16px; }
.preview-list b, .preview-list small { display: block; }
.preview-list small { color: var(--muted); margin-top: 6px; line-height: 1.45; }

.floating-chip {
  position: absolute;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid rgba(157, 180, 255, 0.30);
  border-radius: 999px;
  background: rgba(8, 16, 29, 0.78);
  color: #e8eeff;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
  animation: chipFloat 5s ease-in-out infinite alternate;
}
.chip-one { top: 54px; right: 0; }
.chip-two { bottom: 98px; left: 4px; animation-delay: -1.8s; }
.chip-three { bottom: 22px; right: 32px; animation-delay: -3.2s; }

.landing-section {
  margin-top: clamp(62px, 9vw, 110px);
  animation: sectionReveal .7s ease both;
}

.section-heading { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.section-heading.compact { max-width: 760px; }
.section-heading h2,
.landing-split h2,
.landing-final-cta h2,
.harka-card h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.section-heading p,
.landing-split p,
.landing-final-cta p,
.harka-card p { color: #bfd0ec; line-height: 1.7; }

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-feature-card,
.workflow-grid article,
.harka-card,
.landing-final-cta,
.landing-split,
.faq-list details {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(145deg, rgba(17, 28, 47, 0.90), rgba(9, 17, 30, 0.82));
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.landing-feature-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.landing-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(124,156,255,.18), transparent 55%);
  opacity: 0;
  transition: opacity .22s ease;
}
.landing-feature-card:hover { transform: translateY(-6px); border-color: rgba(157, 180, 255, 0.34); }
.landing-feature-card:hover::before { opacity: 1; }
.feature-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: rgba(124,156,255,.16); font-size: 1.35rem; }
.landing-feature-card h3 { position: relative; margin: 18px 0 0; font-size: 1.22rem; }
.landing-feature-card p { position: relative; color: var(--muted); line-height: 1.65; }

.workflow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.workflow-grid article { padding: 26px; }
.workflow-grid article span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgba(85,217,141,.15); color: var(--success); font-weight: 900; }
.workflow-grid h3 { margin: 18px 0 0; }
.workflow-grid p { color: var(--muted); line-height: 1.65; }

.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
}
.usecase-list { display: flex; flex-wrap: wrap; gap: 12px; }
.usecase-list span { padding: 12px 14px; border-radius: 16px; color: #e7efff; background: rgba(124,156,255,.13); border: 1px solid rgba(124,156,255,.22); font-weight: 900; }

.harka-card { display: flex; gap: 20px; align-items: flex-start; padding: 30px; background: linear-gradient(145deg, rgba(124,156,255,.16), rgba(85,217,141,.08)); }
.harka-card .feature-icon { flex: 0 0 auto; }

.faq-list { display: grid; gap: 12px; max-width: 920px; margin: 0 auto; }
.faq-list details { padding: 18px 20px; }
.faq-list summary { cursor: pointer; font-weight: 900; }
.faq-list p { color: var(--muted); line-height: 1.65; margin-bottom: 0; }

.landing-final-cta {
  margin-top: clamp(62px, 9vw, 110px);
  padding: clamp(32px, 6vw, 58px);
  text-align: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,156,255,.22), transparent 38%),
    linear-gradient(145deg, rgba(21, 35, 58, 0.94), rgba(8, 15, 27, 0.94));
}
.landing-final-cta h2 { margin-top: 0; }
.landing-final-cta .button { margin-top: 18px; }

body.public-landing .app-shell { display: none; }
body:not(.public-landing) .public-landing-screen { display: none; }
.brand-mark-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

@keyframes landingFloat { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(30px, -24px, 0) scale(1.06); } }
@keyframes previewFloat { 0%, 100% { transform: rotateX(4deg) rotateY(-7deg) rotateZ(1deg) translateY(0); } 50% { transform: rotateX(2deg) rotateY(-5deg) rotateZ(1deg) translateY(-14px); } }
@keyframes chipFloat { from { transform: translateY(0); } to { transform: translateY(-14px); } }
@keyframes sectionReveal { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes harkaHeartFloat { 0%, 100% { transform: translateY(0) rotate(10deg); } 50% { transform: translateY(-7px) rotate(-4deg); } }

@media (prefers-reduced-motion: reduce) {
  .landing-orb,
  .preview-window,
  .floating-chip,
  .landing-section { animation: none; }
  .landing-feature-card { transition: none; }
  .harka-heart { animation: none; }
}

@media (max-width: 1080px) {
  .landing-links { display: none; }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-dashboard-preview { min-height: auto; }
  .preview-window { transform: none; animation: none; }
  .floating-chip { display: none; }
  .landing-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-split { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .public-landing-screen { padding: 16px 14px 42px; }
  .landing-nav { align-items: stretch; flex-direction: column; }
  .landing-nav-cta { width: 100%; }
  .landing-hero h1 { font-size: clamp(2.55rem, 16vw, 4rem); }
  .landing-actions { align-items: stretch; flex-direction: column; }
  .landing-actions .button { width: 100%; justify-content: center; }
  .landing-feature-grid,
  .workflow-grid,
  .preview-stats { grid-template-columns: 1fr; }
}

.app-shell { display: none; }
body:not(.public-landing) .public-landing-screen { display: none; }
.brand-mark-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .public-feature-grid { grid-template-columns: 1fr; }
  .public-landing-card { padding: 28px; }
}

.app-shell {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-right: 1px solid var(--border);
  background: rgba(7, 13, 24, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 14px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(157, 180, 255, 0.3);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.24), rgba(124, 156, 255, 0.08));
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark-button {
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.brand-mark-button:hover,
.brand-mark-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(157, 180, 255, 0.6);
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.36), rgba(124, 156, 255, 0.14));
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
  outline: none;
}

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

h1 {
  font-size: 1.55rem;
}

h2 {
  font-size: 1rem;
}

h3 {
  font-size: 1.35rem;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel,
.card,
.welcome-card,
.hero {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-heading,
.card-heading,
.inline-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
  line-height: 1.55;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.button,
.icon-button,
.guild-button {
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover,
.icon-button:hover,
.guild-button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button {
  padding: 12px 15px;
  font-weight: 800;
}

.button-primary {
  background: var(--accent);
  color: #08101d;
}

.button-ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 127, 138, 0.34);
  background: rgba(255, 127, 138, 0.12);
  color: var(--danger);
}

.button-compact {
  padding: 8px 11px;
  border-radius: 13px;
  font-size: 0.9rem;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.15rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.pill-accent {
  color: var(--accent-strong);
  background: rgba(124, 156, 255, 0.12);
}

.pill-success {
  color: var(--success);
  background: rgba(85, 217, 141, 0.12);
}

.pill-danger {
  color: var(--danger);
  background: rgba(255, 127, 138, 0.12);
}

.guild-list {
  display: grid;
  gap: 10px;
}

.guild-button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
}

.guild-button.active {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
}

.guild-button strong {
  font-size: 0.98rem;
}

.guild-button span {
  color: var(--muted);
  font-size: 0.84rem;
}

.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.flash-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 80;
  width: min(460px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
}

.flash {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  line-height: 1.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  animation: flash-enter 180ms ease-out;
}

.flash-body {
  min-width: 0;
}

.flash-action-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(157, 180, 255, 0.36);
  color: #eef4ff;
  background: rgba(124, 156, 255, 0.18);
  font-weight: 850;
  text-decoration: none;
}

.flash-action-link:hover {
  border-color: rgba(157, 180, 255, 0.58);
  background: rgba(124, 156, 255, 0.26);
}

.flash.flash-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.flash-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 18px;
  cursor: pointer;
  opacity: 0.82;
}

.flash-close:hover {
  opacity: 1;
}

.flash.success {
  border-color: rgba(85, 217, 141, 0.36);
  background: rgba(85, 217, 141, 0.12);
}

.flash.error {
  border-color: rgba(255, 127, 138, 0.36);
  background: rgba(255, 127, 138, 0.12);
}

.flash-list-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.flash-list {
  margin: 0;
  padding-left: 20px;
}

.flash-list li + li {
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

.welcome-card {
  padding: 30px;
}

.welcome-card p {
  max-width: 850px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.welcome-grid article,
.kpi,
.config-section {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.welcome-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.welcome-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
}

.card {
  padding: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.kpi strong {
  font-size: 1.5rem;
}

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

.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.module-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.module-copy {
  display: grid;
  gap: 6px;
}

.module-copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 34px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--text);
  content: "";
  transition: transform 160ms ease, background 160ms ease;
}

.switch input:checked + .switch-track {
  border-color: rgba(85, 217, 141, 0.42);
  background: rgba(85, 217, 141, 0.28);
}

.switch input:checked + .switch-track::after {
  transform: translateX(24px);
  background: var(--success);
}

.config-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.config-section {
  padding: 18px;
}

.config-section h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.config-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.config-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.config-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.config-row dt {
  color: var(--muted);
}

.config-row dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero,
  .inline-heading {
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .sidebar,
  .main-content {
    padding: 18px;
  }

  .welcome-grid,
  .kpi-grid,
  .modules-grid,
  .config-sections {
    grid-template-columns: 1fr;
  }
}

textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

textarea:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.dashboard-field {
  margin-top: 0;
}

.compact-field {
  max-width: 720px;
}

.save-state {
  margin-top: 14px;
  font-size: 0.92rem;
}

.save-state.pending {
  color: var(--warning);
}

.save-state.saved {
  color: var(--success);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 700;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}

@media (max-width: 820px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

.ticket-hubs-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ticket-hub-tile {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ticket-hub-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-hub-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 110px;
  gap: 14px;
  align-items: end;
}

.ticket-hub-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ticket-hub-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ticket-hub-meta dt {
  color: var(--muted);
}

.ticket-hub-meta dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.hub-emoji-field input,
.hub-order-field input {
  text-align: center;
}

@media (max-width: 1180px) {
  .ticket-hubs-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .ticket-hub-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-meta div {
    flex-direction: column;
  }

  .ticket-hub-meta dd {
    text-align: left;
  }
}


select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
  outline: none;
}

select:focus {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.ticket-types-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.ticket-type-group {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.ticket-type-group-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ticket-type-tile {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ticket-type-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-type-heading h5 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.ticket-type-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 1180px) {
  .ticket-type-grid,
  .ticket-type-main-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.028);
}

.dashboard-tab {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.dashboard-tab:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  color: var(--text);
}

.dashboard-tab.active {
  border-color: rgba(124, 156, 255, 0.42);
  background: rgba(124, 156, 255, 0.16);
  color: var(--text);
}

.future-module-card {
  border-style: dashed;
}

.future-module-card p {
  max-width: 920px;
}

@media (max-width: 760px) {
  .dashboard-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-tab {
    width: 100%;
    justify-content: center;
  }
}


.ticket-hub-toolbar {
  margin-top: 0;
  justify-content: flex-end;
}

.ticket-hub-create-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(124, 156, 255, 0.26);
  border-radius: 24px;
  background: rgba(124, 156, 255, 0.075);
}

.ticket-hub-create-heading,
.ticket-hub-tile-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-hub-create-heading h4 {
  margin: 4px 0 0;
  font-size: 1.08rem;
}

.ticket-hub-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ticket-hub-create-actions {
  margin-top: 0;
}

.ticket-hub-tile-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .ticket-hub-create-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-toolbar,
  .ticket-hub-create-heading,
  .ticket-hub-tile-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.emoji-field-block {
  display: grid;
  gap: 10px;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.emoji-choice {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.emoji-choice:hover,
.emoji-choice:focus-visible {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.emoji-choice.emoji-clear {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hub-emoji-field input {
  text-align: left;
}

.emoji-field-block {
  display: grid;
  gap: 10px;
}

.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.emoji-choice {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.emoji-choice:hover,
.emoji-choice:focus-visible {
  border-color: rgba(124, 156, 255, 0.72);
  background: rgba(124, 156, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.emoji-choice.emoji-clear {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.hub-emoji-field input {
  text-align: left;
}

.ticket-hub-types-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 22px;
  background: rgba(12, 20, 35, 0.52);
}

.ticket-hub-types-heading,
.ticket-type-editor-heading,
.ticket-type-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-hub-types-heading h5,
.ticket-type-editor-heading h6 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.ticket-type-editor-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(124, 156, 255, 0.22);
  border-radius: 20px;
  background: rgba(124, 156, 255, 0.07);
}

.ticket-type-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ticket-type-editor-actions {
  margin-top: 0;
}

.ticket-type-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ticket-type-summary-meta {
  margin-top: 0;
}

@media (max-width: 960px) {
  .ticket-type-editor-grid {
    grid-template-columns: 1fr;
  }

  .ticket-hub-types-heading,
  .ticket-type-editor-heading,
  .ticket-type-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.technical-key {
  cursor: help;
  font-style: italic;
  opacity: 0.92;
}

.technical-key-input:disabled {
  cursor: help;
  font-style: italic;
  opacity: 0.88;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.style-legend {
  margin-top: 2px;
}

.ticket-types-count {
  cursor: help;
}

.ticket-type-add-actions {
  justify-content: flex-end;
  margin-top: 0;
}

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

.resource-hidden-value {
  display: none !important;
}

.resource-picker {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resource-picker-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resource-picker-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 16px;
}

.resource-picker-empty {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(124, 156, 255, 0.24);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.12);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.resource-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-chip-remove {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.resource-picker-search {
  width: 100%;
}

.resource-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(100%, 720px);
  max-height: 300px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(124, 156, 255, 0.26);
  border-radius: 18px;
  background: #0b1526;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.resource-picker-menu.hidden {
  display: none;
}

.resource-option {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
}

.resource-option:hover,
.resource-option:focus-visible {
  border-color: rgba(124, 156, 255, 0.42);
  background: rgba(124, 156, 255, 0.16);
  outline: none;
}

.resource-option-meta {
  flex: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.resource-option-selected {
  opacity: 0.58;
}

.resource-picker-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.ticket-buttons-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ticket-buttons-header .eyebrow {
  margin: 0;
}

@media (max-width: 720px) {
  .flash {
    top: 16px;
    right: 16px;
    width: calc(100vw - 32px);
  }

  .ticket-buttons-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V2.21.1 — Panels / boutons */
.button-warning {
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

.pill-warning {
  color: var(--warning);
  background: rgba(255, 209, 102, 0.12);
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-input-row input[type="color"] {
  width: 76px;
  min-width: 76px;
  height: 44px;
  padding: 4px;
  border-radius: 12px;
  cursor: pointer;
}

.color-preview-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--panel-preview-color, #5865F2) 55%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-preview-color, #5865F2) 18%, transparent);
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.panel-color-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
  background: var(--panel-color-swatch, #5865F2);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

/* V2.21.3 — Panels / boutons : création atomique panel + boutons */
.sidebar-action-button {
  width: 100%;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.button-with-icon {
  display: inline-flex;
  align-items: center;
}

#ticket-panels-list {
  grid-template-columns: 1fr;
}

.ticket-hub-create-panel {
  grid-column: 1 / -1;
}

.ticket-hub-tile.publication-attention {
  border-color: rgba(255, 209, 102, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.14);
}

.panel-publication-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.panel-publication-note-warning {
  color: var(--warning);
  border: 1px solid rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.11);
}

.button-publication-cta {
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.18), 0 12px 32px rgba(0, 0, 0, 0.18);
  font-weight: 900;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dashboard-modal.hidden {
  display: none;
}

.dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 9, 18, 0.72);
  backdrop-filter: blur(4px);
}

.dashboard-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid rgba(124, 156, 255, 0.3);
  border-radius: 28px;
  background: #101d32;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.dashboard-modal-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.dashboard-modal-card .eyebrow {
  margin: 0;
}

.dashboard-modal-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
}

.dashboard-modal-actions {
  justify-content: flex-end;
  margin-top: 6px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .dashboard-modal {
    padding: 16px;
  }

  .dashboard-modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}


/* V2.21.4 — Validation lisible et formulaire panel plus explicite */
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(124, 156, 255, 0.32);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.12);
  color: var(--text);
  cursor: help;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 18px;
}

.field-help::after {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  width: min(420px, 72vw);
  padding: 10px 12px;
  border: 1px solid rgba(124, 156, 255, 0.32);
  border-radius: 12px;
  background: rgba(8, 15, 27, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.field-help::before {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  z-index: 31;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(124, 156, 255, 0.32);
  border-left: 1px solid rgba(124, 156, 255, 0.32);
  background: rgba(8, 15, 27, 0.98);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg) translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.field-help.tooltip-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.field-help.tooltip-visible::before {
  opacity: 1;
  transform: translateX(-50%) rotate(45deg) translateY(0);
}

.field-help:focus-visible {
  outline: 2px solid rgba(124, 156, 255, 0.85);
  outline-offset: 3px;
}

.field-invalid,
.resource-invalid,
.field-validation-error {
  animation: invalid-field-pulse 720ms ease-in-out 0s 2;
}

.field-invalid input,
.field-invalid textarea,
.field-invalid select,
.field-invalid .resource-picker-shell,
.resource-invalid .resource-picker-shell,
.resource-create-panel.field-invalid,
.checkbox-field.field-invalid {
  border-color: rgba(255, 116, 136, 0.82) !important;
  box-shadow: 0 0 0 4px rgba(255, 116, 136, 0.14);
}

@keyframes invalid-field-pulse {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-4px); }
  44% { transform: translateX(4px); }
  66% { transform: translateX(-2px); }
  88% { transform: translateX(2px); }
}

.resource-picker-shell {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(8, 15, 27, 0.92);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.resource-picker-shell:focus-within {
  border-color: rgba(124, 156, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.14);
}

.resource-picker-selection {
  align-items: center;
  min-height: 0;
}

.resource-picker-search {
  flex: 1 1 180px;
  min-width: 160px;
  min-height: 36px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resource-picker-search:focus {
  border-color: transparent;
  box-shadow: none;
}

.resource-single-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.resource-picker[data-resource-mode="single"] .resource-picker-search {
  padding-right: 34px;
}

#ticket-panel-buttons-list.empty-state {
  min-height: 0;
  margin-top: 0;
  padding: 10px 0 0;
}


/* V2.21.8 — édition avancée des boutons de panel */
.button-editor-grid { align-items: start; }
.button-editor-section-title { margin: 4px 0 -2px; color: var(--accent-strong, #b6c8ff); }
.button-editor-divider { height: 1px; margin: 8px 0 2px; background: linear-gradient(90deg, rgba(124, 156, 255, 0.42), rgba(124, 156, 255, 0.04)); }
.ticket-button-modal-config { display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(124, 156, 255, 0.22); border-radius: 18px; background: rgba(10, 18, 31, 0.38); }
.modal-config-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.modal-title-field { margin: 0; }
.modal-fields-list { display: grid; gap: 12px; }
.modal-field-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(124, 156, 255, 0.18); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.modal-field-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.modal-field-heading .eyebrow { margin-bottom: 6px; }
.modal-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.modal-field-required { align-self: end; min-height: 52px; }
.macro-help { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; line-height: 1.7; }
.macro-help-title { margin-right: 2px; color: var(--muted); font-weight: 700; }
.macro-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.macro-chip code {
  padding: 2px 7px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.08);
  color: var(--text);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.macro-chip:hover code,
.macro-chip:focus-visible code {
  border-color: rgba(124, 156, 255, 0.58);
  background: rgba(124, 156, 255, 0.18);
  transform: translateY(-1px);
}
.macro-chip::after {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  z-index: 35;
  width: min(420px, 72vw);
  padding: 10px 12px;
  border: 1px solid rgba(124, 156, 255, 0.32);
  border-radius: 12px;
  background: rgba(8, 15, 27, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}
.macro-chip::before {
  position: absolute;
  top: calc(100% + 6px);
  left: 10px;
  z-index: 36;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(124, 156, 255, 0.32);
  border-left: 1px solid rgba(124, 156, 255, 0.32);
  background: rgba(8, 15, 27, 0.98);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg) translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
}
.macro-chip:hover::after,
.macro-chip:hover::before,
.macro-chip:focus-visible::after,
.macro-chip:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}
.macro-chip:focus-visible {
  border-radius: 999px;
  outline: 2px solid rgba(124, 156, 255, 0.85);
  outline-offset: 3px;
}

@media (max-width: 920px) { .modal-config-heading, .modal-field-grid { grid-template-columns: 1fr; } .modal-field-heading { align-items: stretch; flex-direction: column; } }


.pill-toggle-button {
  cursor: pointer;
  font: inherit;
}

.pill-toggle-button:hover,
.pill-toggle-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
}


/* V2.22.2 — alignements visuels du formulaire bouton */
.compact-checkbox {
  min-height: 52px;
  padding: 0 16px;
  align-items: center;
}

.button-ticket-category-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-category-auto-create {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-category-auto-create .inline-category-checkbox {
  width: fit-content;
  min-width: min(100%, 460px);
  margin: 0;
}

@media (max-width: 820px) {
  .ticket-category-auto-create .inline-category-checkbox {
    width: 100%;
    min-width: 0;
  }
}


/* V2.22.3 — Alignement des cases de grilles + états vides compacts */
.field-label-spacer {
  display: block;
  min-height: 18px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  visibility: hidden;
}

.grid-checkbox-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.grid-checkbox-field .checkbox-field {
  min-height: 52px;
}

.resource-create-panel.grid-checkbox-field {
  align-self: start;
}

.empty-panel-state {
  padding: 18px 20px;
  border: 1px dashed rgba(124, 156, 255, 0.28);
  border-radius: 20px;
  background: rgba(124, 156, 255, 0.045);
}

.empty-panel-state strong,
.empty-button-state strong {
  color: var(--text);
  font-weight: 850;
}

.ticket-panel-buttons-panel-empty {
  gap: 10px;
  padding: 14px 16px;
}

.ticket-panel-buttons-panel-empty .ticket-buttons-header {
  margin-bottom: 0;
}

#ticket-panel-buttons-list.empty-button-state {
  padding-top: 2px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .field-label-spacer {
    display: none;
  }
}


.resource-role-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--resource-role-color, rgba(255, 255, 255, 0.35));
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.resource-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.resource-chip-colored-role {
  gap: 0.45rem;
}


/* V2.22.6 — Réglages Tickets à activation explicite */
.ticket-settings-options {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.ticket-settings-option-row {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.ticket-settings-toggle {
  min-height: 56px;
}

.ticket-settings-thresholds {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 0 2px min(0px, 0px);
}

.number-suffix-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.number-suffix-field input {
  flex: 1;
  min-width: 0;
}

.number-suffix-field em {
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .ticket-settings-option-row,
  .ticket-settings-thresholds {
    grid-template-columns: 1fr;
  }
}


/* V2.25 — onboarding Discord */
.guild-install-button {
  width: 100%;
  justify-content: center;
  margin-top: 0.9rem;
}

.guild-install-copy {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
}

/* V2.26 — administration des serveurs */
.admin-dashboard {
  display: grid;
  gap: 18px;
}

.global-admin-intro-card,
.global-admin-servers-card {
  padding: 24px;
}

.admin-guild-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-guilds-list {
  display: grid;
  gap: 14px;
}

.admin-guild-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-guild-copy {
  display: grid;
  gap: 5px;
}

.admin-guild-copy strong {
  font-size: 1rem;
}

.admin-guild-copy span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-guild-actions {
  margin-top: 0;
}

.guild-membership-card .card-heading {
  align-items: center;
}

@media (max-width: 920px) {
  .guild-membership-card .card-heading {
    align-items: flex-start;
  }
}

/* Twitch V3.0 — planning multi-chaînes */
.twitch-planning-card {
  display: grid;
  gap: 18px;
}
.module-disabled-card {
  display: grid;
  gap: 18px;
}
.module-disabled-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 20px;
  background: rgba(255, 193, 7, 0.08);
}
.module-disabled-panel h4 {
  margin: 4px 0 8px;
}
.module-disabled-panel-highlight {
  padding: 24px 26px;
  border-width: 2px;
  border-color: rgba(255, 193, 7, 0.56);
  background:
    linear-gradient(135deg, rgba(255, 193, 7, 0.16), rgba(255, 193, 7, 0.08)),
    rgba(255, 193, 7, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 130, 0.08), 0 18px 40px rgba(0, 0, 0, 0.18);
}
.module-disabled-panel-highlight h4 {
  font-size: 1.08rem;
}
.twitch-channels-list {
  display: grid;
  gap: 16px;
}
.twitch-channel-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 22px;
  background: rgba(22, 34, 56, 0.92);
}
.twitch-channel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.twitch-channel-identity {
  display: flex;
  gap: 14px;
  align-items: center;
}
.twitch-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.twitch-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #d9c3ff;
  background: rgba(145, 70, 255, 0.18);
}
.twitch-channel-identity h4 {
  margin: 0 0 4px;
}
.twitch-channel-badges,
.twitch-channel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.twitch-channel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.twitch-channel-summary > div,
.twitch-notification-panel {
  padding: 12px 14px;
  border: 1px solid rgba(139, 161, 205, 0.16);
  border-radius: 16px;
  background: rgba(8, 15, 28, 0.38);
}
.twitch-channel-summary dt {
  color: var(--muted, #a7bddf);
  font-size: .82rem;
  margin-bottom: 6px;
}
.twitch-channel-summary dd {
  margin: 0;
  font-weight: 700;
}
.twitch-channel-settings {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}
.twitch-inline-select {
  display: grid;
  gap: 8px;
}
.twitch-inline-select select,
.twitch-notification-panel select {
  width: 100%;
}
.twitch-notification-panel {
  display: grid;
  gap: 12px;
}
.twitch-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.twitch-notification-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.twitch-empty-state {
  padding: 22px;
  border: 1px dashed rgba(139, 161, 205, 0.28);
  border-radius: 18px;
  background: rgba(8, 15, 28, 0.22);
}
@media (max-width: 1100px) {
  .twitch-channel-summary,
  .twitch-channel-settings {
    grid-template-columns: 1fr;
  }
  .twitch-channel-heading,
  .module-disabled-panel {
    flex-direction: column;
    align-items: stretch;
  }
}

.twitch-weekly-reminder-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 22px;
  background: rgba(22, 34, 56, 0.78);
}
.twitch-weekly-reminder-form {
  display: grid;
  gap: 14px;
}
.twitch-reminder-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
  gap: 14px;
  align-items: end;
}
.twitch-reminder-enabled {
  min-height: 52px;
}
.twitch-reminder-channels {
  display: grid;
  gap: 8px;
}
.twitch-reminder-channel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.twitch-reminder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted, #a7bddf);
  font-size: .9rem;
}
@media (max-width: 1200px) {
  .twitch-reminder-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .twitch-reminder-grid {
    grid-template-columns: 1fr;
  }
}
.twitch-reminder-block-title {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2, #8aa8ff);
}
.twitch-reminder-actions {
  align-items: center;
}
.twitch-reminder-grid-fill {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
}
.twitch-reminder-grid-fill .dashboard-field-wide {
  grid-column: span 3;
}
@media (max-width: 1200px) {
  .twitch-reminder-grid-fill {
    grid-template-columns: 1fr 1fr;
  }
  .twitch-reminder-grid-fill .dashboard-field-wide {
    grid-column: span 2;
  }
}
@media (max-width: 760px) {
  .twitch-reminder-grid-fill,
  .twitch-reminder-grid {
    grid-template-columns: 1fr;
  }
  .twitch-reminder-grid-fill .dashboard-field-wide {
    grid-column: auto;
  }
}

.twitch-automatic-messages-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(139, 161, 205, 0.22);
  border-radius: 24px;
  background: rgba(12, 22, 38, 0.48);
}
.twitch-automatic-messages-panel.hidden {
  display: none !important;
}
.twitch-reminder-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}
.twitch-reminder-grid-auto {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(160px, 200px);
}
.twitch-weekly-reminder-panel .dashboard-field textarea {
  min-height: 160px;
  resize: vertical;
}
@media (max-width: 900px) {
  .twitch-reminder-config,
  .twitch-reminder-grid-auto {
    grid-template-columns: 1fr;
  }
}

.twitch-reminder-macros {
  margin: -4px 0 4px;
}

.twitch-message-preview {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 156, 255, 0.18);
  border-radius: 16px;
  background: rgba(10, 18, 31, 0.38);
}

.twitch-message-preview pre {
  min-height: 64px;
  max-height: 240px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(124, 156, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
}

.subtabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(125, 157, 255, 0.18);
  background: rgba(15, 29, 51, 0.76);
  border-radius: 1.25rem;
}

.subtab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #a9c3ec);
  font-weight: 800;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.subtab:hover {
  border-color: rgba(125, 157, 255, 0.28);
  color: #fff;
}

.subtab.active {
  background: rgba(112, 145, 255, 0.18);
  border-color: rgba(155, 180, 255, 0.56);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(125, 157, 255, 0.18) inset;
}

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

.dashboard-access-grid .resource-field:last-child {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .dashboard-access-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-access-grid .resource-field:last-child {
    grid-column: auto;
  }
}

.twitch-banners-panel {
  display: grid;
  gap: 18px;
}

.twitch-banner-section {
  border: 1px solid rgba(142, 169, 219, 0.22);
  border-radius: 20px;
  padding: 18px;
  background: rgba(10, 18, 34, 0.22);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.banner-editor-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}

.banner-editor-grid-form {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 2fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

.banner-editor-fields {
  display: grid;
  gap: 12px;
}

.banner-preview {
  display: block;
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(142, 169, 219, 0.22);
  background: rgba(5, 10, 20, 0.65);
}

.banner-preview-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  color: #9fb5d8;
  font-weight: 700;
  border-style: dashed;
}

.twitch-banner-list {
  display: grid;
  gap: 10px;
}

.twitch-banner-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(142, 169, 219, 0.18);
  border-radius: 18px;
  background: rgba(11, 20, 37, 0.45);
}

.twitch-banner-row .banner-preview {
  height: 72px;
}

.twitch-banner-row-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.twitch-banner-row-copy span {
  color: #9fb5d8;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-test-result {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(142, 169, 219, 0.2);
  background: rgba(8, 15, 28, 0.42);
}

.error-state {
  border-color: rgba(255, 112, 137, 0.42);
}

@media (max-width: 980px) {
  .banner-editor-grid,
  .banner-editor-grid-form,
  .twitch-banner-row,
  .banner-test-result {
    grid-template-columns: 1fr;
  }
}

/* Twitch banner editor / approval workflow */
.subtabs-inline {
  margin-bottom: 1rem;
}
.banner-pending-section {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 1rem;
}
.banner-editor-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.banner-compare-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.35);
}
.banner-compare-card h5 {
  margin: 0 0 .75rem;
  font-size: .95rem;
}
.banner-future-preview canvas,
.banner-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  max-height: 260px;
  object-fit: cover;
  border-radius: .9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}
.banner-preview-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 700;
}
.banner-crop-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.banner-category-results {
  display: grid;
  gap: .5rem;
  margin: .75rem 0 1rem;
}
.banner-category-result {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: .9rem;
  padding: .65rem .75rem;
  background: rgba(15, 23, 42, 0.35);
  color: inherit;
  cursor: pointer;
}
.banner-category-result:hover:not(:disabled) {
  border-color: rgba(139, 92, 246, 0.75);
  background: rgba(139, 92, 246, 0.12);
}
.banner-category-result:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.banner-category-result img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: .4rem;
}
.banner-category-result span {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.tag-warning {
  display: inline-flex;
  width: fit-content;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.admin-banner-requests-card {
  grid-column: 1 / -1;
}
.admin-banner-requests-list {
  width: 100%;
  display: grid;
  gap: .75rem;
}
@media (max-width: 860px) {
  .banner-editor-compare-grid,
  .banner-crop-controls {
    grid-template-columns: 1fr;
  }
}

.banner-future-preview canvas {
  cursor: grab;
  touch-action: none;
}
.banner-future-preview canvas:active {
  cursor: grabbing;
}
.banner-crop-controls {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}
.banner-crop-controls .muted {
  grid-column: 1 / -1;
  margin: 0;
}
.banner-approval-settings {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: .75rem 0 1rem;
}
@media (max-width: 760px) {
  .banner-crop-controls,
  .banner-approval-settings {
    grid-template-columns: 1fr;
  }
}

/* V3.3.7 - enforce the real 2.5:1 banner ratio in the editor previews.
   Previous max-height rules compressed wide previews and made the dashboard display
   look different from the exported image / Discord rendering. */
.banner-compare-card .banner-preview,
.banner-future-preview canvas {
  aspect-ratio: 5 / 2;
  max-height: none;
}

.banner-compare-card .banner-preview {
  height: auto;
  object-fit: cover;
}

.banner-compare-card .banner-preview-empty {
  min-height: 0;
  aspect-ratio: 5 / 2;
}

.banner-history-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: .75rem 0 1rem;
}
.admin-banner-request-row .tag {
  white-space: nowrap;
}
.tag-success {
  display: inline-flex;
  width: fit-content;
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, .35);
  background: rgba(34, 197, 94, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.tag-danger {
  display: inline-flex;
  width: fit-content;
  color: #fda4af;
  border: 1px solid rgba(253, 164, 175, .35);
  background: rgba(244, 63, 94, .1);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
  font-weight: 800;
}
.banner-logs-panel {
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 1rem;
  padding: .8rem 1rem;
  background: rgba(15, 23, 42, .28);
}
.banner-logs-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: #dbeafe;
}
.banner-logs-list {
  display: grid;
  gap: .55rem;
  margin-top: .85rem;
}
.banner-log-entry {
  display: grid;
  gap: .18rem;
  border-top: 1px solid rgba(148, 163, 184, .14);
  padding-top: .55rem;
}
.banner-log-entry:first-child {
  border-top: 0;
  padding-top: 0;
}
.banner-log-entry span,
.banner-log-entry small {
  color: #9fb5d8;
}
@media (max-width: 760px) {
  .banner-history-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Nextcloud V3.8 — configuration multiguilde */
.nextcloud-card {
  display: grid;
  gap: 18px;
}
.nextcloud-config-form {
  display: grid;
  gap: 16px;
}
.nextcloud-status-panel {
  padding: 16px;
  border: 1px solid rgba(139, 161, 205, 0.16);
  border-radius: 20px;
  background: rgba(8, 15, 28, 0.38);
}
.nextcloud-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.nextcloud-status-grid > div {
  padding: 12px 14px;
  border: 1px solid rgba(139, 161, 205, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.nextcloud-status-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .82rem;
}
.nextcloud-status-grid strong {
  display: block;
  word-break: break-word;
}
.error-copy {
  margin-top: 12px;
  color: var(--danger);
}
@media (max-width: 980px) {
  .nextcloud-status-grid {
    grid-template-columns: 1fr;
  }
}

.nextcloud-editor-section {
  gap: 14px;
}

.section-heading-row-compact {
  align-items: flex-start;
  margin-bottom: 4px;
}

.nextcloud-decks-editor,
.nextcloud-users-editor {
  display: grid;
  gap: 12px;
}

.nextcloud-deck-card,
.nextcloud-user-card {
  border: 1px solid rgba(124, 156, 255, 0.16);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.42);
  padding: 14px;
}

.nextcloud-deck-card-enabled {
  border-color: rgba(88, 211, 141, 0.34);
  box-shadow: 0 0 0 1px rgba(88, 211, 141, 0.08) inset;
}

.nextcloud-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.nextcloud-toggle-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  width: 100%;
}

.nextcloud-toggle-line input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.nextcloud-toggle-line span {
  display: grid;
  gap: 3px;
}

.nextcloud-toggle-line small,
.nextcloud-user-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.nextcloud-deck-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(124, 156, 255, 0.14);
}

.nextcloud-deck-options.hidden {
  display: none;
}

.nextcloud-user-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 14px;
  align-items: center;
}

.nextcloud-user-copy {
  display: grid;
  gap: 4px;
}

@media (max-width: 860px) {
  .nextcloud-deck-options,
  .nextcloud-user-card {
    grid-template-columns: 1fr;
  }
}


/* V3.8.6 — Nextcloud polish */
.nextcloud-empty-action {
  display: grid;
  gap: 12px;
  align-items: start;
}

.nextcloud-empty-action .button {
  justify-self: start;
}


/* V3.8.9 — Nextcloud link safety */
.nextcloud-subtabs { margin: 18px 0 16px; }
.nextcloud-subtab-section.hidden { display: none !important; }
.settings-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .settings-grid-compact { grid-template-columns: 1fr; } }
.field-help:not(.tooltip-visible)::before,
.field-help:not(.tooltip-visible)::after { opacity: 0 !important; }

.nextcloud-archives-list {
  display: grid;
  gap: 0.75rem;
}

.nextcloud-archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.nextcloud-archive-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
}


.button-row-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.compact-select {
  width: auto;
  min-width: 180px;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.bot-identity-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form-grid.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 820px) {
  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

.bot-avatar-editor {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bot-avatar-preview {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.55);
  display: grid;
  place-items: center;
  color: #8ba4c8;
  font-size: 0.72rem;
  text-align: center;
  overflow: hidden;
}

.bot-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: #8ba4c8;
  font-size: 0.78rem;
  line-height: 1.35;
}


/* V3.13.12 — landing premium Harka-Chan clean
   Bloc unique pour la landing : éviter l'empilement des anciennes phases.
   Réglages rapides : modifier uniquement les variables dans .public-landing-screen. */

.public-landing-screen {
  --harka-hero-size: 110%;
  --harka-hero-x: -10%;
  --harka-hero-y: 0%;

  --harka-note-x: 40px;
  --harka-note-y: 0px;
  --harka-note-width: 340px;

  --harka-touch-size: 100%;
  --harka-touch-x: 0%;
  --harka-touch-y: 4%;

  background:
    radial-gradient(circle at 14% 12%, rgba(86, 114, 255, 0.30), transparent 32rem),
    radial-gradient(circle at 82% 10%, rgba(139, 92, 246, 0.24), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(37, 211, 169, 0.12), transparent 34rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}

.landing-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.76) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(124,156,255,.70) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,209,102,.62) 0 1px, transparent 1.4px);
  background-position: 7% 16%, 79% 8%, 92% 31%;
  background-size: 210px 170px, 260px 220px, 330px 250px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.landing-logo-mark { font-size: 1.12rem; letter-spacing: 0; }
.landing-secondary { gap: 0; }

.landing-hero-premium {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, .94fr);
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
}

.landing-hero-copy { max-width: 760px; }

.landing-hero h1 {
  max-width: 760px;
  font-size: clamp(4.1rem, 7vw, 6.2rem);
  line-height: .94;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.section-heading h2,
.landing-split h2,
.landing-final-cta h2 {
  text-wrap: balance;
}

.section-heading { max-width: 980px; }
.section-heading.compact { max-width: 900px; }

/* Espacements finaux landing */
.landing-hero h1 {
  margin-top: 0;
  max-width: 900px;
  font-size: clamp(3.6rem, 5.8vw, 5.45rem);
  line-height: .98;
}

.landing-lead {
  margin-top: 30px;
}

.section-heading h2,
.landing-split h2,
.landing-final-cta h2,
.harka-card h2 {
  margin-top: 0;
}

.section-heading p,
.landing-split p,
.landing-final-cta p,
.harka-card p {
  margin-top: 16px;
}

/* Le badge d'origine n'est plus affiché dans le hero. */
.landing-kicker { display: none; }

/* Hero Harka */
.landing-mascot-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, .96fr) minmax(250px, .86fr);
  grid-template-areas: "mascot note";
  align-items: center;
  column-gap: clamp(18px, 3vw, 34px);
  min-height: 0;
  overflow: visible;
}

.mascot-orbit {
  grid-area: mascot;
  position: relative;
  justify-self: center;
  align-self: center;
  width: min(410px, 43vw);
  height: min(410px, 43vw);
  min-width: 300px;
  min-height: 300px;
  margin: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 48% 48%, rgba(124,156,255,.22), transparent 43%),
    radial-gradient(circle, rgba(124,156,255,.16), transparent 60%);
  border: 1px solid rgba(157, 180, 255, .22);
  box-shadow: 0 0 120px rgba(124,156,255,.16);
  animation: previewFloat 7s ease-in-out infinite;
}

.mascot-orbit::before,
.mascot-orbit::after,
.mascot-orbit span {
  content: "";
  position: absolute;
  border-radius: inherit;
  border: 1px solid rgba(124,156,255,.22);
}

.mascot-orbit::before { inset: 26px; }
.mascot-orbit::after { inset: 54px; border-color: rgba(85,217,141,.12); }
.mascot-orbit span:nth-child(1) { inset: 88px; border-color: rgba(255,255,255,.08); }

.mascot-orbit span:nth-child(2),
.mascot-orbit span:nth-child(3) {
  inset: auto;
  border: 0;
  box-shadow: 0 0 18px currentColor;
}

.mascot-orbit span:nth-child(2) {
  width: 9px;
  height: 9px;
  right: 54px;
  top: 86px;
  color: rgba(255,209,102,.75);
  background: #ffd166;
}

.mascot-orbit span:nth-child(3) {
  width: 11px;
  height: 11px;
  left: 44px;
  bottom: 110px;
  color: rgba(124,156,255,.75);
  background: #7c9cff;
}

.mascot-portrait {
  grid-area: mascot;
  position: relative;
  z-index: 2;
  justify-self: center;
  align-self: center;
  width: min(320px, 32vw);
  height: min(320px, 32vw);
  min-width: 238px;
  min-height: 238px;
  margin: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(157,180,255,.42);
  background:
    radial-gradient(circle at 50% 42%, rgba(124,156,255,.28), transparent 58%),
    linear-gradient(145deg, rgba(12,22,39,.92), rgba(8,16,29,.76));
  box-shadow: 0 26px 90px rgba(0,0,0,.36), 0 0 82px rgba(124,156,255,.25);
}

.mascot-portrait::before { display: none; }

.mascot-portrait img {
  display: block;
  width: var(--harka-hero-size);
  height: var(--harka-hero-size);
  margin: var(--harka-hero-y) 0 0 var(--harka-hero-x);
  object-fit: contain;
  object-position: center top;
  transform: none;
  filter: drop-shadow(0 22px 24px rgba(0,0,0,.36));
}

.mascot-note {
  grid-area: note;
  position: relative;
  z-index: 3;
  justify-self: start;
  align-self: center;
  max-width: var(--harka-note-width);
  margin: 0;
  padding-left: 18px;
  color: #edf4ff;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 750;
  font-style: italic;
  text-wrap: balance;
  text-shadow: 0 14px 34px rgba(0,0,0,.38);
  transform: translate(var(--harka-note-x), var(--harka-note-y));
}

.mascot-note::before {
  content: "";
  position: absolute;
  left: -50px;
  top: 50%;
  width: 40px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(220,231,251,.24), rgba(220,231,251,.9));
  box-shadow: 0 0 14px rgba(124,156,255,.28);
  transform: translateY(-50%);
}

.mascot-note::after {
  content: "";
  position: absolute;
  left: -53px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 2px solid rgba(220,231,251,.9);
  border-bottom: 2px solid rgba(220,231,251,.9);
  transform: translateY(-50%) rotate(45deg);
}

/* Fonctionnalités : alignement propre icône + texte */
.landing-feature-grid-premium .landing-feature-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 22px;
  min-height: 200px;
  padding: 26px;
}

.landing-feature-grid-premium .feature-icon {
  position: static;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 18px 42px rgba(0,0,0,.22);
}

.landing-feature-grid-premium .landing-feature-card h3 {
  grid-column: 2;
  align-self: end;
  margin: 0 0 6px;
}

.landing-feature-grid-premium .landing-feature-card p {
  grid-column: 2;
  align-self: start;
  margin: 0;
}

.landing-feature-grid-premium .feature-ticketing .feature-icon { background: linear-gradient(145deg, rgba(255,209,102,.30), rgba(255,209,102,.10)); color: #ffd166; }
.landing-feature-grid-premium .feature-twitch .feature-icon { background: linear-gradient(145deg, rgba(139,92,246,.34), rgba(139,92,246,.12)); color: #b99cff; }
.landing-feature-grid-premium .feature-nextcloud .feature-icon { background: linear-gradient(145deg, rgba(59,130,246,.34), rgba(59,130,246,.12)); color: #93c5fd; }
.landing-feature-grid-premium .feature-access .feature-icon { background: linear-gradient(145deg, rgba(124,156,255,.34), rgba(124,156,255,.12)); color: #9db4ff; }
.landing-feature-grid-premium .feature-team .feature-icon { background: linear-gradient(145deg, rgba(244,114,182,.30), rgba(244,114,182,.10)); color: #f9a8d4; }
.landing-feature-grid-premium .feature-more .feature-icon { background: linear-gradient(145deg, rgba(45,212,191,.30), rgba(45,212,191,.10)); color: #5eead4; }
.landing-feature-grid-premium .landing-feature-card::after { display: none; }

/* Mise en route */
.workflow-grid article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 188px;
  padding: 30px 28px;
  overflow: hidden;
  text-align: center;
}

.workflow-grid article::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(85,217,141,.10), transparent 70%);
  pointer-events: none;
}

.workflow-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(85,217,141,.14);
  color: #7af0ad;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.workflow-grid h3 { margin: 20px 0 0; font-size: 1.24rem; }
.workflow-grid p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }

/* Cas d'usage */
.landing-split {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  padding: clamp(28px, 4vw, 44px);
}

.landing-split::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -12%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124,156,255,.16), transparent 68%);
  pointer-events: none;
}

.usecase-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.usecase-card-list article {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(157, 180, 255, .20);
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(124,156,255,.14), transparent 56%), rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.usecase-card-list article::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c9cff, #55d98d);
  box-shadow: 0 0 18px rgba(124,156,255,.55);
}

.usecase-card-list strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: block;
  color: #eef4ff;
  font-size: 1.02rem;
  line-height: 1.3;
}

.usecase-card-list span {
  grid-column: 1 / -1;
  display: block;
  padding: 0;
  margin-top: 2px;
  border: 0;
  background: transparent;
  color: #b9c8df;
  font-weight: 650;
  line-height: 1.55;
}

/* La touche Harka */
.harka-card { align-items: center; overflow: hidden; }

.harka-card-avatar {
  position: relative;
  flex: 0 0 124px;
  width: 124px;
  height: 124px;
  padding: 7px;
  box-sizing: border-box;
  overflow: visible;
  border-radius: 999px;
  border: 1px solid rgba(157,180,255,.34);
  background: radial-gradient(circle at 50% 42%, rgba(85,217,141,.16), transparent 60%), rgba(8,16,29,.70);
  box-shadow: 0 16px 36px rgba(0,0,0,.26), 0 0 42px rgba(124,156,255,.12);
}

.harka-card-avatar img {
  position: relative;
  z-index: 2;
  display: block;
  width: var(--harka-touch-size);
  height: var(--harka-touch-size);
  margin: var(--harka-touch-y) 0 0 var(--harka-touch-x);
  object-fit: contain;
  object-position: center center;
  transform: none;
  filter: none;
}

.harka-heart {
  position: absolute;
  z-index: 3;
  color: #f9a8d4;
  font-size: 1.12rem;
  line-height: 1;
  text-shadow: 0 8px 18px rgba(0,0,0,.28), 0 0 16px rgba(244,114,182,.35);
  animation: harkaHeartFloat 4.8s ease-in-out infinite;
}

.heart-one { right: -6px; top: 12px; transform: rotate(12deg); }
.heart-two { right: 12px; top: -9px; font-size: .86rem; animation-delay: -1.4s; opacity: .86; }
.heart-three { right: -15px; top: 42px; font-size: .74rem; animation-delay: -2.6s; opacity: .76; }

.landing-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(148,163,184,.12);
  color: rgba(191,208,236,.74);
  font-size: .86rem;
  text-align: center;
}

.landing-footer strong { color: #e8efff; }

@media (max-width: 1080px) {
  .landing-hero-premium { grid-template-columns: 1fr; }
  .landing-mascot-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "mascot" "note";
    row-gap: 20px;
  }
  .mascot-orbit { width: min(410px, 80vw); height: min(410px, 80vw); }
  .mascot-portrait { width: min(320px, 62vw); height: min(320px, 62vw); }
  .mascot-note {
    justify-self: center;
    max-width: 620px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
    transform: none;
  }
  .mascot-note::before,
  .mascot-note::after { display: none; }
  .landing-split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .landing-hero h1 { font-size: clamp(3.2rem, 14vw, 4.4rem); }
  .landing-feature-grid-premium .landing-feature-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }
  .landing-feature-grid-premium .feature-icon,
  .landing-feature-grid-premium .landing-feature-card h3,
  .landing-feature-grid-premium .landing-feature-card p {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  .landing-feature-grid-premium .feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }
  .harka-card-avatar { flex-basis: 112px; width: 112px; height: 112px; }
}

@media (max-width: 680px) {
  .landing-mascot-panel { row-gap: 20px; }
  .mascot-orbit { min-width: 268px; min-height: 268px; }
  .mascot-portrait { min-width: 214px; min-height: 214px; }
  .mascot-portrait img { width: 114%; height: 114%; margin: -3% 0 0 -8%; }
  .workflow-grid article { min-height: 0; }
  .usecase-card-list { grid-template-columns: 1fr; }
}


/* V3.13.13 — derniers micro-ajustements wording */
.landing-lead {
  max-width: 760px;
}

.mascot-note {
  max-width: 380px;
}

.staff-note {
  display: block;
  grid-column: 3;
  justify-self: center;
  max-width: 360px;
  margin-top: -12px;
  color: rgba(191, 208, 236, .52);
  font-size: .72rem;
  line-height: 1.4;
  font-weight: 650;
  text-align: center;
}

.landing-final-cta {
  margin-top: clamp(28px, 4vw, 48px);
}

.harka-card p {
  max-width: 860px;
}

.harka-title-star {
  display: inline-block;
  margin-left: 6px;
  color: #f9a8d4;
  font-size: .36em;
  line-height: 1;
  vertical-align: super;
  transform: translateY(-.18em);
}

.harka-gratouille-note {
  display: inline-block;
  margin-left: 8px;
  color: rgba(191, 208, 236, .58);
  font-size: .68em;
  font-weight: 650;
  white-space: nowrap;
}

.feature-more p {
  text-wrap: pretty;
}

@media (max-width: 1080px) {
  .staff-note {
    grid-column: 1;
    margin-top: -4px;
  }
}

@media (max-width: 760px) {
  .harka-gratouille-note {
    display: block;
    margin: 8px 0 0;
    white-space: normal;
  }
}

/* V3.14 — dashboard connecté aligné avec la landing */
body:not(.public-landing) {
  --bg: #050b16;
  --bg-elevated: rgba(12, 22, 39, .86);
  --panel: linear-gradient(145deg, rgba(17, 28, 47, .88), rgba(8, 16, 29, .78));
  --panel-flat: rgba(13, 24, 42, .78);
  --border: rgba(157, 180, 255, .18);
  --border-strong: rgba(157, 180, 255, .34);
  --text: #edf4ff;
  --muted: #aebed8;
  --accent: #7c9cff;
  --accent-strong: #aabaff;
  --success: #55d98d;
  --danger: #ff7f8a;
  --warning: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, .30);
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(86, 114, 255, .26), transparent 31rem),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, .20), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(37, 211, 169, .10), transparent 34rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}

body:not(.public-landing)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.62) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(124,156,255,.62) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,209,102,.48) 0 1px, transparent 1.4px);
  background-position: 8% 16%, 78% 9%, 92% 31%;
  background-size: 220px 180px, 270px 230px, 350px 260px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}

body:not(.public-landing) .app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 26px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
}

body:not(.public-landing) .sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow: auto;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  scrollbar-width: thin;
}

body:not(.public-landing) .main-content {
  gap: 24px;
  padding: 0;
  min-width: 0;
}

body:not(.public-landing) .brand,
body:not(.public-landing) .panel,
body:not(.public-landing) .card,
body:not(.public-landing) .welcome-card,
body:not(.public-landing) .hero,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .subtab-section,
body:not(.public-landing) .empty-state-card,
body:not(.public-landing) .ticket-panel-card,
body:not(.public-landing) .module-card,
body:not(.public-landing) .nextcloud-card,
body:not(.public-landing) .twitch-channel-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.045);
  backdrop-filter: blur(18px);
}

body:not(.public-landing) .brand {
  align-items: center;
  padding: 20px;
}

body:not(.public-landing) .brand h1 {
  font-size: 1.72rem;
  letter-spacing: -.035em;
}

body:not(.public-landing) .brand .eyebrow,
body:not(.public-landing) .eyebrow {
  color: #c7d4ff;
  font-weight: 900;
  letter-spacing: .16em;
}

body:not(.public-landing) .brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 35% 25%, rgba(85, 217, 141, .18), transparent 45%),
    linear-gradient(145deg, rgba(124,156,255,.30), rgba(124,156,255,.08));
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
}

body:not(.public-landing) .panel {
  padding: 20px;
}

body:not(.public-landing) .panel-heading,
body:not(.public-landing) .card-heading,
body:not(.public-landing) .inline-heading {
  align-items: center;
  margin-bottom: 16px;
}

body:not(.public-landing) .panel-heading h2,
body:not(.public-landing) .card-heading h2,
body:not(.public-landing) .inline-heading h2 {
  font-size: 1.02rem;
  letter-spacing: -.015em;
}

body:not(.public-landing) .auth-panel .button-row {
  align-items: stretch;
}

body:not(.public-landing) .auth-panel #discord-login-button.hidden + #disconnect-button,
body:not(.public-landing) .auth-panel #disconnect-button:not(.hidden) {
  margin-top: 2px;
}

body:not(.public-landing) .button,
body:not(.public-landing) .icon-button,
body:not(.public-landing) .guild-button {
  border-radius: 18px;
  font-weight: 900;
}

body:not(.public-landing) .button-primary {
  color: #07101d;
  background: linear-gradient(135deg, #88a2ff 0%, #7190ff 100%);
  box-shadow: 0 16px 42px rgba(124,156,255,.22);
}

body:not(.public-landing) .button-ghost {
  border-color: var(--border);
  background: rgba(255,255,255,.035);
  color: #edf4ff;
}

body:not(.public-landing) .button:hover,
body:not(.public-landing) .icon-button:hover,
body:not(.public-landing) .guild-button:hover {
  transform: translateY(-1px);
  border-color: rgba(157,180,255,.40);
}

body:not(.public-landing) .pill {
  border-color: var(--border);
  background: rgba(255,255,255,.045);
  font-weight: 900;
}

body:not(.public-landing) .pill-success {
  color: #6ff0a4;
  border-color: rgba(85,217,141,.28);
  background: rgba(85,217,141,.13);
}

body:not(.public-landing) .pill-accent {
  color: #cad6ff;
  border-color: rgba(124,156,255,.30);
  background: rgba(124,156,255,.13);
}

body:not(.public-landing) .guild-list {
  gap: 12px;
}

body:not(.public-landing) .guild-button {
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(124,156,255,.10), transparent 50%),
    rgba(255,255,255,.035);
}

body:not(.public-landing) .guild-button.active {
  border-color: rgba(124,156,255,.65);
  background:
    radial-gradient(circle at top right, rgba(124,156,255,.24), transparent 58%),
    rgba(124,156,255,.12);
  box-shadow: 0 16px 42px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
}

body:not(.public-landing) .hero {
  align-items: center;
  padding: clamp(24px, 3vw, 36px);
  background:
    radial-gradient(circle at 18% 18%, rgba(124,156,255,.20), transparent 44%),
    linear-gradient(145deg, rgba(20, 33, 55, .88), rgba(8, 16, 29, .76));
}

body:not(.public-landing) .hero h2 {
  margin: 2px 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .96;
  letter-spacing: -.065em;
}

body:not(.public-landing) .hero-copy {
  max-width: 820px;
  color: #c6d4ec;
}

body:not(.public-landing) .hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtab-nav,
body:not(.public-landing) .nextcloud-subtab-nav {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(8,16,29,.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab-button,
body:not(.public-landing) .nextcloud-subtab-button {
  border-radius: 18px;
  font-weight: 900;
}

body:not(.public-landing) .dashboard-tab.active,
body:not(.public-landing) .subtab-button.active,
body:not(.public-landing) .nextcloud-subtab-button.active {
  color: #07101d;
  background: linear-gradient(135deg, #8ea7ff, #7c9cff);
  box-shadow: 0 14px 34px rgba(124,156,255,.20);
}

body:not(.public-landing) .card,
body:not(.public-landing) .welcome-card,
body:not(.public-landing) .tab-section,
body:not(.public-landing) .subtab-section {
  padding: clamp(20px, 2.4vw, 30px);
}

body:not(.public-landing) input,
body:not(.public-landing) select,
body:not(.public-landing) textarea,
body:not(.public-landing) .resource-picker-control {
  border-color: rgba(157,180,255,.18);
  border-radius: 18px;
  background: rgba(6, 13, 24, .74);
  color: #edf4ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) input:focus,
body:not(.public-landing) select:focus,
body:not(.public-landing) textarea:focus,
body:not(.public-landing) .resource-picker-control:focus-within {
  border-color: rgba(124,156,255,.72);
  box-shadow: 0 0 0 4px rgba(124,156,255,.14), inset 0 1px 0 rgba(255,255,255,.05);
}

body:not(.public-landing) .muted {
  color: #aebed8;
}

body:not(.public-landing) .flash-stack {
  top: 24px;
  right: 24px;
}

body:not(.public-landing) .welcome-grid article,
body:not(.public-landing) .kpi-card,
body:not(.public-landing) .module-row,
body:not(.public-landing) .ticket-hub-card,
body:not(.public-landing) .banner-request-card,
body:not(.public-landing) .usecase-card-list article {
  border-color: rgba(157,180,255,.17);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) .hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  body:not(.public-landing) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.public-landing) .sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }
}

@media (max-width: 760px) {
  body:not(.public-landing) .app-shell {
    padding: 14px;
  }

  body:not(.public-landing) .hero,
  body:not(.public-landing) .panel-heading,
  body:not(.public-landing) .card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.public-landing) .hero-badges {
    justify-content: flex-start;
  }
}

/* V3.15 — auth transparente au refresh */
body.auth-checking {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(86, 114, 255, .26), transparent 31rem),
    radial-gradient(circle at 86% 12%, rgba(139, 92, 246, .20), transparent 30rem),
    linear-gradient(180deg, #060d1a 0%, #08101d 48%, #050914 100%);
}
body.auth-checking .public-landing-screen { display: none; }
body.auth-checking .app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 26px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
}
body.auth-checking .guild-panel,
body.auth-checking .discord-lists-panel,
body.auth-checking .status-panel,
body.auth-checking #guild-view,
body.auth-checking #global-admin-view,
body.auth-checking .dashboard-tabs,
body.auth-checking .subtabs {
  display: none !important;
}
body.auth-checking .auth-panel,
body.auth-checking .hero,
body.auth-checking .welcome-card {
  border: 1px solid rgba(157,180,255,.20);
  background: linear-gradient(145deg, rgba(17,28,47,.88), rgba(8,16,29,.78));
  box-shadow: 0 24px 70px rgba(0,0,0,.30);
}
body.auth-checking .welcome-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 3px solid rgba(157,180,255,.20);
  border-top-color: #7c9cff;
  animation: dashboardAuthSpin .9s linear infinite;
}
@keyframes dashboardAuthSpin { to { transform: rotate(360deg); } }


/* V3.15.2 — overlay auth + boutons Nextcloud */
.auth-checking-overlay {
  display: none;
}
body.auth-checking .auth-checking-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 18, .42);
  backdrop-filter: blur(14px) saturate(1.1);
  pointer-events: all;
}
.auth-checking-card {
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(157, 180, 255, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 14%, rgba(124,156,255,.22), transparent 44%),
    linear-gradient(145deg, rgba(17, 28, 47, .94), rgba(8, 16, 29, .88));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.055);
  text-align: center;
}
.auth-checking-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 999px;
  border: 3px solid rgba(157,180,255,.22);
  border-top-color: #7c9cff;
  animation: dashboardAuthSpin .9s linear infinite;
}
.auth-checking-card h2 {
  margin: 8px 0 10px;
  color: #edf4ff;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -.055em;
}
.auth-checking-card p:last-child {
  margin: 0;
  color: #c6d4ec;
}
body.auth-checking .app-shell {
  filter: blur(3px);
  transform: scale(.995);
  pointer-events: none;
  user-select: none;
}
body.auth-checking .welcome-card::before {
  display: none;
}
.welcome-open-button {
  margin-top: 18px;
}
body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
  display: grid;
  grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px 24px;
}
body:not(.public-landing) #nextcloud-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
  min-width: 0;
}
body:not(.public-landing) #nextcloud-actions-row .button {
  white-space: nowrap;
}
@media (max-width: 900px) {
  body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
    grid-template-columns: 1fr;
  }
}


/* V3.15.2 — Nextcloud actions ciblées */
body:not(.public-landing) .nextcloud-card .card-heading.inline-heading {
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  align-items: center;
}
body:not(.public-landing) #nextcloud-actions-row {
  justify-content: flex-end;
}
body:not(.public-landing) .nextcloud-editor-heading {
  align-items: center;
  gap: 12px;
}
body:not(.public-landing) .nextcloud-editor-heading > div {
  min-width: 0;
}
body:not(.public-landing) .nextcloud-editor-heading .button {
  flex: 0 0 auto;
  white-space: nowrap;
}
body:not(.public-landing) .button-compact {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
}
@media (max-width: 900px) {
  body:not(.public-landing) #nextcloud-actions-row {
    justify-content: flex-start;
  }
  body:not(.public-landing) .nextcloud-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V3.17 — badge version déporté + page de modifications */
body:not(.public-landing) .brand {
  gap: 14px;
}

body:not(.public-landing) .brand-copy {
  min-width: 0;
}

body:not(.public-landing) .brand-kicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body:not(.public-landing) .brand-kicker-row .eyebrow {
  margin: 0;
}

body:not(.public-landing) .brand-mark {
  overflow: hidden;
}

body:not(.public-landing) .brand-mark img {
  display: block;
  width: 118%;
  height: 118%;
  margin: -8% 0 0 -8%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.28));
}

body:not(.public-landing) .phase-link {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid rgba(124,156,255,.34);
  color: #d8e2ff;
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body:not(.public-landing) .phase-link:hover,
body:not(.public-landing) .phase-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(157,180,255,.64);
  background: rgba(124,156,255,.20);
  box-shadow: 0 0 0 4px rgba(124,156,255,.12);
  outline: none;
}

body:not(.public-landing) .hero-badges {
  display: none;
}

body:not(.public-landing) .changelog-view {
  display: grid;
  gap: 18px;
}

body:not(.public-landing) .changelog-view.hidden {
  display: none !important;
}

body:not(.public-landing) .changelog-view h3 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.055em;
}

body:not(.public-landing) .changelog-list {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

body:not(.public-landing) .changelog-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
}

body:not(.public-landing) .changelog-entry strong {
  color: var(--text);
}


/* V3.17.1 — header dashboard, changelog et refresh listes Discord */
body:not(.public-landing) .brand-mark img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  filter: none;
}

body:not(.public-landing) .brand-mark-button[disabled],
body:not(.public-landing) .brand-mark-button[aria-disabled="true"] {
  cursor: default;
}

body:not(.public-landing) .brand-mark-button[disabled]:hover,
body:not(.public-landing) .brand-mark-button[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

body:not(.public-landing) .hero-copy:empty {
  display: none;
}

body:not(.public-landing) .discord-lists-panel {
  display: none !important;
}

body:not(.public-landing) .compact-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body:not(.public-landing) .icon-button-inline {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 16px;
  font-size: 1rem;
}

body:not(.public-landing) .ticket-panel-toolbar,
body:not(.public-landing) #nextcloud-actions-row {
  align-items: center;
}

@media (max-width: 760px) {
  body:not(.public-landing) .compact-action-row,
  body:not(.public-landing) .ticket-panel-toolbar,
  body:not(.public-landing) #nextcloud-actions-row {
    justify-content: flex-start;
  }
}

/* V3.17.2 - historique bannières super-admin */

.banner-history-toolbar {
  grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) auto auto;
}
.admin-banner-request-actions {
  align-items: center;
}
.icon-button-danger {
  color: #fda4af;
  border-color: rgba(253, 164, 175, .38);
  background: rgba(244, 63, 94, .08);
}
.icon-button-danger:hover {
  color: #fecdd3;
  border-color: rgba(253, 164, 175, .62);
  background: rgba(244, 63, 94, .16);
}
@media (max-width: 900px) {
  .banner-history-toolbar {
    grid-template-columns: 1fr;
  }
}

/* V3.17.3 - nettoyage fin du journal des bannières */
.banner-logs-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: .85rem;
}
.banner-log-entry {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  column-gap: .8rem;
}
.banner-log-entry-copy {
  display: grid;
  gap: .18rem;
  min-width: 0;
}
.banner-log-entry .icon-button-danger {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  line-height: 1;
}
@media (max-width: 680px) {
  .banner-logs-toolbar {
    justify-content: stretch;
  }
  .banner-logs-toolbar .button {
    width: 100%;
  }
}

/* V3.19 — identité du bot par serveur */
.bot-custom-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.bot-identity-enabled-line {
  width: auto;
  min-width: 132px;
  justify-content: flex-end;
}

.bot-identity-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
  padding: 20px;
  border: 1px solid rgba(157, 180, 255, .16);
  border-radius: 24px;
  background: rgba(2, 6, 23, .22);
}

.bot-media-column,
.bot-form-column,
.bot-preview-column {
  display: grid;
  gap: 14px;
}

.vertical-media-editor {
  align-items: flex-start;
  flex-direction: column;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bot-avatar-preview-large,
.bot-member-avatar,
.bot-profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid rgba(157, 180, 255, .34);
  background: radial-gradient(circle at 35% 25%, rgba(124,156,255,.22), transparent 50%), rgba(9, 16, 30, .86);
  display: grid;
  place-items: center;
  color: #cbd7ef;
  font-weight: 900;
  overflow: hidden;
}

.bot-member-avatar,
.bot-profile-avatar {
  width: 44px;
  height: 44px;
  font-size: .78rem;
  flex: 0 0 auto;
}

.bot-profile-avatar {
  width: 76px;
  height: 76px;
  margin-top: -38px;
  border: 3px solid rgba(13, 18, 32, .95);
}

.bot-avatar-preview img,
.bot-member-avatar img,
.bot-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-banner-preview,
.bot-profile-banner {
  min-height: 96px;
  border-radius: 18px;
  border: 1px dashed rgba(157, 180, 255, .22);
  background: linear-gradient(135deg, rgba(124,156,255,.22), rgba(85,217,141,.10));
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #8ba4c8;
  font-size: .82rem;
  font-weight: 800;
  overflow: hidden;
}

.bot-profile-banner {
  min-height: 86px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background-color: rgba(124, 156, 255, .34);
}

.preview-label {
  color: #8ea3c7;
  font-size: .78rem;
  font-weight: 850;
}

.bot-member-preview,
.bot-profile-preview {
  border: 1px solid rgba(157,180,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  overflow: hidden;
}

.bot-member-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.bot-member-preview p,
.bot-profile-preview p {
  margin: 4px 0 0;
  color: #aebddd;
  font-size: .82rem;
}

.bot-app-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #6875ff;
  color: white;
  font-size: .66rem;
  font-weight: 900;
}

.bot-profile-body {
  padding: 0 16px 16px;
}

.bot-activity-preview {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #f1f5ff;
  font-weight: 800;
}

.bot-bio-preview {
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .bot-identity-layout {
    grid-template-columns: 1fr;
  }

  .bot-preview-column {
    max-width: 420px;
  }
}

/* V3.19.2 — bot personnalisé drag crop + activité personnalisée */
.form-grid.three-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.global-bot-presence-card {
  display: grid;
  gap: 14px;
}

.media-adjust-controls {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(157,180,255,.14);
  border-radius: 16px;
  background: rgba(2, 6, 23, .28);
}

.media-adjust-controls label {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #aebddd;
  font-size: .76rem;
  font-weight: 850;
}

.media-adjust-controls input[type="range"] {
  width: 100%;
  accent-color: #7c9cff;
}

.bot-custom-heading {
  align-items: flex-start;
}

.bot-profile-preview .bot-activity-preview {
  display: none;
}

@media (max-width: 980px) {
  .form-grid.three-columns {
    grid-template-columns: 1fr;
  }
}


/* V3.19.2 — recadrage par glisser-déposer + layout plus compact */
.bot-identity-layout {
  grid-template-columns: minmax(240px, 0.78fr) minmax(320px, 1fr) minmax(300px, 0.9fr);
  align-items: stretch;
}

.bot-media-column {
  align-content: start;
}

.bot-form-column {
  align-content: start;
}

.bot-preview-column {
  align-content: start;
}

.media-adjust-controls.hidden {
  display: none !important;
}

.media-drag-hint {
  margin: 8px 0 0;
  color: #8ea3c7;
  font-size: .76rem;
  font-weight: 800;
}

.bot-avatar-preview-large,
.bot-banner-preview {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.bot-avatar-preview-large:active,
.bot-banner-preview:active {
  cursor: grabbing;
}

.bot-banner-preview {
  min-height: 118px;
}

@media (max-width: 1180px) {
  .bot-identity-layout {
    grid-template-columns: 1fr;
  }
}


/* V3.20.1 — licences discrètes + expiration automatique */
.admin-license-editor {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(150px, 180px) minmax(130px, 150px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(157,180,255,.14);
}

.admin-license-editor .field {
  margin: 0;
}

@media (max-width: 900px) {
  .admin-license-editor {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}


/* V3.20.1 — licence visible sans bloquer l'aperçu */
body:not(.public-landing) .hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

body:not(.public-landing) .hero-license-pill {
  align-self: flex-start;
  white-space: nowrap;
}

body:not(.public-landing) .guild-button {
  position: relative;
  overflow: hidden;
}

body:not(.public-landing) .guild-premium-crown {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, .36);
  background: rgba(255, 209, 102, .12);
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  font-size: 1rem;
}

@media (max-width: 720px) {
  body:not(.public-landing) .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* V3.20.2 — hero serveur fusionné + aperçu allégé (conservé) */
body:not(.public-landing) .hero {
  align-items: flex-start;
  padding: clamp(24px, 3vw, 34px);
}

body:not(.public-landing) .hero-main {
  min-width: 0;
  width: 100%;
}

body:not(.public-landing) .hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

body:not(.public-landing) .hero-title-row h2 {
  min-width: 0;
  margin: 0;
}

body:not(.public-landing) .hero-guild-id {
  margin: 8px 0 0;
  font-size: .95rem;
}

body:not(.public-landing) .hero-kpis {
  margin-top: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.public-landing) .hero-license-pill {
  flex: 0 0 auto;
  margin-top: 4px;
}

body:not(.public-landing) #guild-summary-card {
  display: none !important;
}

body:not(.public-landing) .overview-card {
  margin-top: 0;
}

body:not(.public-landing) .overview-card .config-sections {
  margin-top: 0;
}

@media (max-width: 960px) {
  body:not(.public-landing) .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body:not(.public-landing) .hero-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  body:not(.public-landing) .hero-kpis {
    grid-template-columns: 1fr;
  }
}

/* V3.20.5 — passe UI globale : moins de répétitions, licence visible, onglets nettoyés */
body:not(.public-landing) .auth-panel #auth-title {
  content: none;
}

body:not(.public-landing) .hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3.2vw, 40px);
}

body:not(.public-landing) .hero-title-row {
  align-items: flex-start;
  padding-right: 150px;
}

body:not(.public-landing) .hero-title-row h2 {
  line-height: .98;
}

body:not(.public-landing) .hero-license-pill {
  position: absolute;
  top: 30px;
  right: 32px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 92px;
  justify-content: center;
  margin: 0;
  padding: 8px 13px;
  font-size: .78rem;
}

body:not(.public-landing) .hero-license-pill.pill-success::before {
  content: "👑";
  font-size: .85rem;
}

body:not(.public-landing) .hero-license-pill.pill-muted::before {
  content: "";
}

body:not(.public-landing) .hero-license-pill.pill-danger::before {
  content: "⌛";
  font-size: .85rem;
}

body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtabs {
  gap: 10px;
  padding: 9px;
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab {
  min-width: 0;
  white-space: nowrap;
}

body:not(.public-landing) .tickets-panels-card .card-heading .eyebrow,
body:not(.public-landing) .twitch-planning-card .card-heading .eyebrow,
body:not(.public-landing) .twitch-banners-card .card-heading .eyebrow {
  color: #91a7df;
}

body:not(.public-landing) .overview-card {
  padding-top: 26px;
}

body:not(.public-landing) .overview-card .config-sections {
  display: block;
}

body:not(.public-landing) .overview-section-heading {
  margin: 0 0 18px;
}

body:not(.public-landing) .overview-section-heading h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

body:not(.public-landing) .overview-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body:not(.public-landing) .overview-sections-grid .config-section {
  min-height: 0;
}

@media (max-width: 920px) {
  body:not(.public-landing) .hero-title-row {
    padding-right: 0;
  }

  body:not(.public-landing) .hero-license-pill {
    position: static;
    margin-top: 12px;
  }

  body:not(.public-landing) .overview-sections-grid {
    grid-template-columns: 1fr;
  }
}


/* V3.20.5 — harmonisation finale des onglets et actions secondaires */
body:not(.public-landing) .dashboard-tabs,
body:not(.public-landing) .subtabs,
body:not(.public-landing) .subtabs-inline,
body:not(.public-landing) .nextcloud-subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(124, 156, 255, .22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(13, 25, 45, .82), rgba(8, 16, 31, .74));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body:not(.public-landing) .dashboard-tab,
body:not(.public-landing) .subtab,
body:not(.public-landing) .subtabs-inline .subtab,
body:not(.public-landing) .nextcloud-subtabs .subtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #afbdd4;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body:not(.public-landing) .dashboard-tab:hover,
body:not(.public-landing) .subtab:hover,
body:not(.public-landing) .subtabs-inline .subtab:hover,
body:not(.public-landing) .nextcloud-subtabs .subtab:hover {
  color: #eef4ff;
  border-color: rgba(157, 180, 255, .34);
  background: rgba(124, 156, 255, .08);
}

body:not(.public-landing) .dashboard-tab.active,
body:not(.public-landing) .subtab.active,
body:not(.public-landing) .subtabs-inline .subtab.active,
body:not(.public-landing) .nextcloud-subtabs .subtab.active {
  color: #071225;
  border-color: rgba(255,255,255,.82);
  background: linear-gradient(135deg, #92a9ff, #7893ff);
  box-shadow: 0 14px 34px rgba(100, 126, 255, .22), inset 0 1px 0 rgba(255,255,255,.35);
}

body:not(.public-landing) .card-heading.inline-heading {
  align-items: flex-start;
  gap: 18px;
}

body:not(.public-landing) .twitch-banners-card .card-heading,
body:not(.public-landing) .twitch-automatic-messages-panel .card-heading,
body:not(.public-landing) .twitch-planning-card .card-heading,
body:not(.public-landing) .tickets-panels-card .card-heading,
body:not(.public-landing) .tickets-settings-card .card-heading,
body:not(.public-landing) .nextcloud-config-card .card-heading {
  margin-bottom: 18px;
}

body:not(.public-landing) .nextcloud-archives-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

body:not(.public-landing) .nextcloud-archives-actions .button,
body:not(.public-landing) .nextcloud-archives-actions .compact-select {
  min-height: 46px;
}

body:not(.public-landing) .nextcloud-archives-actions .compact-select {
  max-width: 190px;
}

body:not(.public-landing) .overview-section-heading {
  margin-bottom: 18px;
}

body:not(.public-landing) .overview-section-heading h3 {
  margin: 0;
}

body:not(.public-landing) .subtabs + .card,
body:not(.public-landing) .dashboard-tabs + .card,
body:not(.public-landing) .nextcloud-subtabs + .nextcloud-subtab-section {
  margin-top: 16px;
}

body:not(.public-landing) .twitch-banners-card > .muted:first-of-type {
  display: none;
}

@media (max-width: 920px) {
  body:not(.public-landing) .dashboard-tabs,
  body:not(.public-landing) .subtabs,
  body:not(.public-landing) .subtabs-inline,
  body:not(.public-landing) .nextcloud-subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }
}

/* V3.21.2 — premium Twitch gratuit limité */
body:not(.public-landing) .premium-crown-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, .42);
  background: rgba(255, 209, 102, .12);
  box-shadow: 0 10px 24px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.08);
  color: #ffd166;
  font-size: .82rem;
  line-height: 1;
  vertical-align: middle;
}

body:not(.public-landing) .dashboard-tab .premium-crown-badge,
body:not(.public-landing) .subtab .premium-crown-badge {
  width: 20px;
  height: 20px;
  margin-left: 5px;
  font-size: .76rem;
}

body:not(.public-landing) [data-premium-feature].premium-locked {
  position: relative;
}

body:not(.public-landing) .dashboard-tab.premium-locked,
body:not(.public-landing) .subtab.premium-locked {
  opacity: .58;
  filter: saturate(.72);
}

body:not(.public-landing) .dashboard-tab.premium-locked:hover,
body:not(.public-landing) .subtab.premium-locked:hover {
  opacity: .76;
}

body:not(.public-landing) .card.premium-locked,
body:not(.public-landing) .module-tile.premium-locked,
body:not(.public-landing) .bot-identity-panel.premium-locked,
body:not(.public-landing) .field.premium-locked,
body:not(.public-landing) .nextcloud-editor-section.premium-locked {
  opacity: .62;
  filter: grayscale(.18) saturate(.75);
}

body:not(.public-landing) .card.premium-locked::after,
body:not(.public-landing) .bot-identity-panel.premium-locked::after {
  display: none;
}

body:not(.public-landing) .card.premium-locked::before,
body:not(.public-landing) .bot-identity-panel.premium-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(8,16,29,.16), rgba(8,16,29,.34));
  pointer-events: none;
}

body:not(.public-landing) .premium-locked input,
body:not(.public-landing) .premium-locked select,
body:not(.public-landing) .premium-locked textarea,
body:not(.public-landing) .premium-locked button:not(.dashboard-tab):not(.subtab) {
  cursor: not-allowed;
}

body:not(.public-landing) .module-tile.premium-locked {
  border-color: rgba(255, 209, 102, .22);
  background: linear-gradient(135deg, rgba(255,209,102,.05), rgba(255,255,255,.025));
}

body:not(.public-landing) .module-tile.premium-locked .switch {
  opacity: .54;
}


/* V3.21.2 — Twitch gratuit limité */
.premium-soft-note {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 16px;
  background: rgba(255, 209, 102, .08);
  color: #dbe7ff;
  font-size: .92rem;
  line-height: 1.45;
}

/* V3.21.4 — limites Basique / Premium */
.premium-panel-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 209, 102, .28);
  border-radius: 999px;
  color: #f8d889;
  background: rgba(255, 209, 102, .08);
  font-weight: 850;
  font-size: .82rem;
}
.ticket-hub-tile.premium-locked-soft {
  opacity: .72;
}
.premium-grace-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 209, 102, .30);
  border-radius: 18px;
  color: #f6d88a;
  background: rgba(255, 209, 102, .08);
  font-weight: 750;
}

/* V3.22 - Bibliothèque d'avatars Harka */
.global-bot-avatars-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.global-avatar-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .46);
}
.global-avatar-row img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(129, 160, 255, .45);
}
.global-avatar-row strong,
.global-avatar-row span {
  display: block;
}
.global-avatar-row span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 2px;
}
.global-avatar-row.is-default {
  border-color: rgba(250, 204, 21, .45);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, .08);
}
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.avatar-preset-card {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .55);
  color: var(--text);
  border-radius: 18px;
  padding: 10px;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  transition: border-color .16s ease, opacity .16s ease, transform .16s ease;
  font: inherit;
  font-weight: 800;
  font-size: .82rem;
}
.avatar-preset-card img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
}
.avatar-preset-card.selected {
  border-color: rgba(129, 160, 255, .9);
  box-shadow: 0 0 0 2px rgba(129, 160, 255, .16);
}
.avatar-preset-card:disabled {
  cursor: not-allowed;
  opacity: .58;
}
.avatar-preset-card:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(129, 160, 255, .65);
}
.file-field-inline input[type="file"] {
  padding: 13px;
}
.soft-empty-state {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .4);
}

/* V3.22.1 - Recadrage bibliothèque avatars Harka */
.global-avatar-crop-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 8px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 20px;
  background: rgba(15, 23, 42, .42);
}
.global-avatar-crop-preview {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(129, 160, 255, .42);
  background: radial-gradient(circle at 30% 30%, rgba(129,160,255,.18), rgba(15,23,42,.72));
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
  font-weight: 800;
  user-select: none;
  touch-action: none;
}
.global-avatar-crop-preview.has-image {
  border-style: solid;
  cursor: grab;
}
.global-avatar-crop-preview.has-image:active {
  cursor: grabbing;
}
.global-avatar-crop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.global-avatar-crop-help {
  display: grid;
  gap: 4px;
  color: var(--muted);
  line-height: 1.45;
}
.global-avatar-crop-help strong {
  color: var(--text);
}
@media (max-width: 720px) {
  .global-avatar-crop-editor { align-items: flex-start; flex-direction: column; }
}


/* V3.22.4.3 — affichage expiration licence */
.superadmin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(129, 160, 255, .20);
  border-radius: 24px;
  background: rgba(8, 14, 26, .55);
}
#global-admin-view[data-superadmin-tab-active="servers"] [data-superadmin-panel]:not([data-superadmin-panel~="servers"]),
#global-admin-view[data-superadmin-tab-active="licenses"] [data-superadmin-panel]:not([data-superadmin-panel~="licenses"]),
#global-admin-view[data-superadmin-tab-active="avatars"] [data-superadmin-panel]:not([data-superadmin-panel~="avatars"]),
#global-admin-view[data-superadmin-tab-active="banners"] [data-superadmin-panel]:not([data-superadmin-panel~="banners"]),
#global-admin-view[data-superadmin-tab-active="twitch-publications"] [data-superadmin-panel]:not([data-superadmin-panel~="twitch-publications"]),
#global-admin-view[data-superadmin-tab-active="supervision"] [data-superadmin-panel]:not([data-superadmin-panel~="supervision"]),
#global-admin-view[data-superadmin-tab-active="status"] [data-superadmin-panel]:not([data-superadmin-panel~="status"]) {
  display: none;
}
#global-admin-view[data-superadmin-tab-active="servers"] .admin-license-editor,
#global-admin-view[data-superadmin-tab-active="servers"] .admin-banner-requests-card,
#global-admin-view[data-superadmin-tab-active="licenses"] .admin-guild-actions,
#global-admin-view[data-superadmin-tab-active="licenses"] .admin-banner-requests-card,
#global-admin-view[data-superadmin-tab-active="banners"] .admin-guild-card:not(.admin-banner-requests-card) {
  display: none;
}
#global-admin-view[data-superadmin-tab-active="banners"] .admin-banner-requests-card {
  display: grid;
}
#global-admin-view[data-superadmin-tab-active="licenses"] .admin-license-editor {
  display: grid;
}

/* V3.23.4 — Twitch Planning : polish preview planning */
.twitch-planning-card {
  display: grid;
  gap: 22px;
}

.twitch-planning-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(132, 160, 255, .18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, .10), transparent 34rem),
    rgba(8, 16, 29, .34);
}

.twitch-section-heading {
  align-items: center;
}

.twitch-section-heading .muted {
  max-width: 760px;
  margin-top: 6px;
}

.twitch-render-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.planning-format-help {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: 22px;
  align-items: start;
  margin: 0;
  padding: 20px;
  border-color: rgba(139, 92, 246, .26);
  background:
    radial-gradient(circle at 12% 12%, rgba(139, 92, 246, .14), transparent 28rem),
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, .08), transparent 24rem),
    rgba(10, 18, 32, .62);
}

.planning-format-help h3 {
  margin: 4px 0 8px;
  font-size: 1.18rem;
}

.planning-format-help code {
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  color: #edf4ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}

.planning-hover-note {
  margin: -4px 0 14px;
  font-size: .88rem;
}

.planning-preview-editor {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 15px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.planning-preview-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.planning-preview-editor .dashboard-field,
.planning-preview-editor input,
.planning-preview-editor select {
  min-width: 0;
  box-sizing: border-box;
}

.planning-preview-title-field {
  margin: 0;
}

.planning-preview-channel-field,
.planning-preview-category-field {
  grid-column: 1 / -1;
}

.planning-preview-date-field,
.planning-preview-time-field {
  grid-column: span 1;
}

.planning-preview-recurrent-field {
  grid-column: 1 / -1;
  margin: 0;
}

.planning-recurrent-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid rgba(157, 180, 255, .18);
  border-radius: 14px;
  background: rgba(8, 15, 27, .48);
  color: var(--text-main);
  font-weight: 800;
}

.planning-recurrent-switch input {
  width: 18px;
  height: 18px;
  accent-color: #7c9cff;
}

.planning-preview-publish-row {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.planning-preview-publish-row .button {
  width: 100%;
  justify-content: center;
}

.planning-preview-publish-state {
  margin: 0;
  font-size: .86rem;
}

.planning-category-search-shell {
  position: relative;
  min-width: 0;
}

.planning-category-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 25;
  display: grid;
  gap: 6px;
  max-height: 270px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(157, 180, 255, .20);
  border-radius: 14px;
  background: rgba(8, 15, 27, .98);
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
}

.planning-category-results:empty {
  display: none;
}

.planning-category-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.planning-category-result:hover,
.planning-category-result:focus-visible {
  border-color: rgba(124,156,255,.45);
  background: rgba(124,156,255,.12);
}

.planning-category-result img,
.planning-category-result-placeholder {
  width: 42px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(124,156,255,.14);
}

.planning-category-result span {
  min-width: 0;
}

.planning-category-result strong,
.planning-category-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-category-result small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .78rem;
}

.planning-preview-category-state {
  margin: -2px 0 0;
  font-size: .86rem;
}

.warning-text {
  color: #f8d68a !important;
}

.planning-title-pattern {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  color: var(--text-main);
  font-weight: 820;
}

.pattern-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 10px;
  color: #07111f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
  cursor: help;
  outline: none;
}

.pattern-token::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: max-content;
  max-width: 280px;
  padding: 9px 11px;
  border: 1px solid rgba(157,180,255,.20);
  border-radius: 12px;
  background: rgba(8, 15, 27, .98);
  color: #edf4ff;
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .14s ease, transform .14s ease;
}

.pattern-token:hover::after,
.pattern-token:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pattern-title {
  background: #eaff5f;
}

.pattern-separator {
  background: #42f5ef;
}

.pattern-main {
  background: #10f1b5;
}

.pattern-guest-streamers {
  background: #ff3ce9;
}

.pattern-feats {
  background: #2637ff;
  color: #fff;
}


.planning-example-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(124,156,255,.18);
  border-radius: 18px;
  background: rgba(5, 12, 25, .36);
}

.planning-example-breakdown > span {
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.planning-example-breakdown > code {
  display: block;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  white-space: normal;
  line-height: 1.5;
  color: #f7f9ff !important;
  background: rgba(0,0,0,.28) !important;
}

.planning-example-breakdown ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.planning-example-breakdown strong {
  color: #edf4ff;
}

.planning-premium-note {
  margin-top: 14px;
}

.planning-format-preview {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(20, 27, 45, .88), rgba(9, 14, 26, .88)),
    rgba(5, 12, 25, .66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}

.preview-label {
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.discord-event-preview {
  border: 1px solid rgba(0,0,0,.35);
  border-radius: 10px;
  background: #1f2027;
  color: #f2f3f5;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
  font-family: Inter, "gg sans", "Segoe UI", system-ui, sans-serif;
}

.discord-event-banner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 138px;
  background:
    radial-gradient(circle at 23% 46%, rgba(241, 155, 130, .95) 0 14%, transparent 15%),
    radial-gradient(circle at 82% 42%, rgba(190, 125, 100, .92) 0 15%, transparent 16%),
    linear-gradient(135deg, #7acbd7 0%, #8fd8dd 45%, #61aebd 100%);
  isolation: isolate;
}

.discord-event-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.discord-event-banner-has-image .discord-event-banner-title {
  opacity: 0;
}

.discord-event-banner-source {
  margin: -2px 2px 0;
  color: #9aa3b2;
  font-size: .72rem;
}

.discord-event-banner::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(7, 28, 39, .24));
  z-index: -1;
}

.discord-event-banner::after {
  content: "×";
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(21, 23, 31, .78);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.discord-event-banner-title {
  padding: 4px 18px;
  color: rgba(255,255,255,.94);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 950;
  letter-spacing: .04em;
  text-shadow: 0 8px 22px rgba(0,0,0,.30);
}

.discord-event-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #24252d;
  color: #b5bac1;
  font-size: .70rem;
}

.discord-event-tabs strong {
  color: #f2f3f5;
  font-size: .72rem;
}

.discord-event-body {
  display: grid;
  gap: 9px;
  padding: 13px 14px 16px;
  background: #1f2027;
  font-size: .78rem;
}

.discord-event-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbdee1;
  font-weight: 700;
}

.discord-event-calendar {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.discord-event-body h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #f2f3f5;
  font-size: .98rem;
  line-height: 1.3;
}

.discord-event-dot {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #8b5cf6;
}

.discord-event-server,
.discord-event-meta {
  margin: 0;
  color: #b5bac1;
}

.discord-event-meta strong {
  color: #7aa2ff;
}

.discord-event-description {
  display: grid;
  gap: 6px;
  margin-top: 3px;
  color: #dbdee1;
  line-height: 1.4;
}

.discord-event-description p {
  margin: 0;
}

.discord-event-description ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
}

.discord-event-description li::marker {
  color: #dbdee1;
}

.discord-event-description span {
  color: #7aa2ff;
}

@media (max-width: 980px) {
  .planning-format-help {
    grid-template-columns: 1fr;
  }

  .planning-preview-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-preview-channel-field,
  .planning-preview-category-field,
  .planning-preview-date-field,
  .planning-preview-time-field {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .planning-preview-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* V3.25.3 — journal des publications Twitch */
.planning-publication-history {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(124, 156, 255, .24);
  border-radius: 18px;
  background: rgba(5, 12, 24, .34);
}

.planning-publication-history h4 {
  margin: 2px 0 0;
}

.planning-publication-log-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.planning-publication-log-list.empty-state {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, .22);
  background: rgba(0, 0, 0, .18);
}

.planning-publication-log-list.empty-state p {
  margin: 5px 0 0;
}

.planning-publication-log-item {
  padding: 12px 13px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: rgba(9, 17, 32, .62);
}

.planning-publication-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.planning-publication-log-item strong {
  display: block;
  color: #f3f7ff;
}

.planning-publication-log-item p {
  margin: 5px 0 0;
  color: #c6d4ee;
  line-height: 1.45;
}

.planning-publication-error {
  color: #ffb4c1 !important;
}


/* V3.25.5 — Publications Twitch réservées au superadmin */
.global-admin-twitch-publications-card {
  display: grid;
  gap: 16px;
}
.admin-twitch-publications-toolbar {
  align-items: end;
}
.admin-twitch-publication-log-list .planning-publication-log-item strong {
  word-break: break-word;
}


/* V3.25.6 — Supervision superadmin */
.global-supervision-card {
  display: grid;
  gap: 16px;
}
.global-supervision-card .form-grid {
  align-items: end;
}

/* V4.0.4 — Archives tickets unifiées */
.ticket-archives-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 1rem;
  margin: 1rem 0;
}

.ticket-archives-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.35fr);
  gap: 1rem;
  align-items: start;
}

.ticket-archives-list {
  display: grid;
  gap: 0.75rem;
}

.ticket-archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.ticket-archive-main {
  min-width: 0;
}

.ticket-archive-main strong,
.ticket-archive-main small {
  display: block;
}

.ticket-archive-main strong {
  overflow-wrap: anywhere;
}

.ticket-archive-main small {
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
}

.ticket-archive-number {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  color: var(--accent, #8b5cf6);
}

.ticket-archive-preview-panel {
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
}

.ticket-archive-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border, rgba(148, 163, 184, 0.2));
}

.ticket-archive-preview-heading h4 {
  margin: 0.15rem 0 0;
}

.ticket-archive-preview-frame {
  width: 100%;
  min-height: 620px;
  border: 0;
  background: #ffffff;
}

@media (max-width: 1100px) {
  .ticket-archives-layout,
  .ticket-archives-filters {
    grid-template-columns: 1fr;
  }
}

/* V4.0.5 — Compteurs tickets */
.ticket-counters-toolbar {
  align-items: center;
}

.ticket-counters-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ticket-counter-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.22));
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.ticket-counter-main strong,
.ticket-counter-main small {
  display: block;
}

.ticket-counter-main small {
  margin-top: 0.25rem;
  color: var(--muted, #9fb4d8);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  overflow-wrap: anywhere;
}

.ticket-counter-usage {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: #c6d4ee;
}

.ticket-counter-usage li + li {
  margin-top: 0.25rem;
}

.ticket-counter-empty-usage {
  margin: 0.75rem 0 0;
}

.ticket-counter-value-field {
  margin: 0;
}

.ticket-counter-value-field input {
  text-align: right;
  font-weight: 800;
}

.ticket-counter-value-field small {
  margin-top: 0.4rem;
  color: var(--muted, #9fb4d8);
}

@media (max-width: 900px) {
  .ticket-counter-card {
    grid-template-columns: 1fr;
  }
}
