/* Community extension: reference-inspired layout, existing product identity. */
body { background: #27272f; }
.rfm-sidebar { background: #363642; border-color: #42424e; overflow-y: auto; border-radius: 16px; }
/* Keep the server identity card at its natural height when the menu overflows. */
.rfm-sidebar > .rfm-server-card { flex: 0 0 auto; }
.rfm-sidebar > .rfm-menu-label,
.rfm-sidebar > .rfm-bot-card,
.rfm-sidebar > .rfm-support-button { flex-shrink: 0; }
.rfm-sidebar .admin-menu-item { color: #dedee8; flex-shrink: 0; min-height: 35px; }
.rfm-sidebar .admin-menu-item.active { background: #5865f2; box-shadow: none; }
.rfm-menu-label { color: #aaaab9; margin-top: 18px; }
.rfm-content { min-width: 0; }
/* Navigation shell: fixed identity, independently scrollable categories. */
.rfm-admin-shell { grid-template-columns:248px minmax(0,1fr); gap:24px; }
.rfm-sidebar {
  padding:12px; gap:10px; min-height:0; height:calc(100dvh - 110px);
  overflow:hidden; border:1px solid #a49dff24; border-radius:20px;
  background:radial-gradient(ellipse at 0 0,#7760ff18,transparent 55%),#10131f;
  box-shadow:0 18px 50px #0003,inset 0 1px 0 #ffffff08;
}
.rfm-sidebar .rfm-server-card { margin:0; border-color:#a5a2e826; border-radius:13px; background:#171c2d; }
.rfm-sidebar .rfm-server-cover { height:52px; background:radial-gradient(ellipse at 85% 10%,#50cfdb55,transparent 60%),linear-gradient(120deg,#6154b9,#242948); }
.rfm-sidebar .rfm-server-card-body { padding:0 12px 13px; margin-top:-18px; }
.rfm-sidebar .rfm-server-avatar { width:48px; height:48px; border-color:#171c2d; border-radius:15px; box-shadow:0 4px 15px #0004; }
.rfm-sidebar .rfm-server-card-name { color:#f1f0ff; letter-spacing:-.02em; }
.rfm-sidebar .rfm-server-card-id { color:#8993ae; }
.rfm-sidebar-navigation {
  flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
  padding:0 5px 12px 0; scrollbar-width:thin; scrollbar-color:#6e63a65c transparent;
  scrollbar-gutter:stable; overscroll-behavior:contain; scroll-behavior:smooth;
}
.rfm-sidebar-navigation::-webkit-scrollbar { width:5px; }
.rfm-sidebar-navigation::-webkit-scrollbar-thumb { background:#6e63a65c; border-radius:20px; }
.rfm-sidebar-navigation:hover::-webkit-scrollbar-thumb { background:#9b8aeb; }
.rfm-sidebar-navigation .rfm-menu-label {
  display:flex; align-items:center; gap:10px; margin:14px 0 6px; padding:8px 10px;
  font-size:9px; letter-spacing:.16em; color:#939bb7; font-weight:700;
}
.rfm-sidebar-navigation .rfm-menu-label::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,#8e84c332,transparent); }
.rfm-sidebar-navigation .admin-menu-item {
  position:relative; width:100%; min-height:40px; padding:10px 11px; margin:3px 0; gap:11px;
  font-size:12px; font-weight:500; line-height:1.4; letter-spacing:0;
  border:1px solid transparent!important; border-radius:10px!important;
  background:transparent!important; color:#aab3cc!important; box-shadow:none!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.rfm-sidebar-navigation .admin-menu-item:hover {
  background:#ffffff06!important; border-color:#a598ff22!important;
  color:#f1f0ff!important; transform:none; filter:none;
}
.rfm-sidebar-navigation .admin-menu-item.active {
  color:#f4f0ff!important; border-color:#ac94ff40!important;
  background:linear-gradient(100deg,#8266ed30,#8266ed0b)!important;
  box-shadow:inset 3px 0 0 #a68bff,0 2px 14px #8060ff08!important;
}
.rfm-nav-icon { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.active .rfm-nav-icon { color:#b8a2ff; }
.rfm-sidebar-navigation .admin-menu-item:focus-visible { outline:2px solid #ab95ff; outline-offset:-2px; }
.rfm-sidebar-navigation .community-dot { font-size:8px; color:#66708a; }
.rfm-sidebar-navigation .community-dot.on { color:#59dcb4; text-shadow:0 0 8px #59dcb470; }
.rfm-sidebar .rfm-bot-card { margin:0; padding:10px; border-color:#8d86c91c; background:#ffffff03; }
.rfm-sidebar .rfm-support-button { height:32px; color:#9fa8c7; background:transparent; border-color:#8d86c920; }
@media(max-width:760px) {
  .rfm-admin-shell { grid-template-columns:1fr; gap:16px; }
  .rfm-sidebar { display:flex; height:auto; max-height:65dvh; position:relative; top:auto; }
  .rfm-sidebar-navigation { flex:1 1 auto; max-height:36dvh; }
}
@media(prefers-reduced-motion:reduce) {
  .rfm-sidebar-navigation { scroll-behavior:auto; }
  .rfm-sidebar-navigation .admin-menu-item { transition:none; }
}
.community-page { max-width: 1120px; margin: 0 auto; padding: 20px 6px 100px; color: #efeff6; }
.community-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:22px; border-bottom:1px solid #454550; margin-bottom:24px; }
.community-heading h1 { font-size:26px; font-weight:600; margin:0 0 8px; }
.community-page p, .community-page small { color:#b5b5c6; line-height:1.6; }
.community-card { background:#202027; border:1px solid #35353f; border-radius:14px; padding:22px; margin:16px 0; }
.community-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.community-field { display:flex; flex-direction:column; gap:9px; font-size:13px; color:#c8c8d6; }
.community-field input:not([type=checkbox]),.community-field select,.community-field textarea,.community-search { width:100%; min-height:42px; border:1px solid #454550; border-radius:7px; background:#292932; color:#f4f4fa; padding:10px 12px; font:inherit; }
.community-field textarea { min-height:130px; resize:vertical; }
.community-field:has(textarea) { grid-column:1/-1; }
.community-toggle { display:flex; align-items:center; gap:12px; cursor:pointer; }
.community-toggle input { accent-color:#5865f2; width:23px; height:23px; }
.community-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:18px; }
.community-page button { cursor:pointer; border:1px solid #4a4a59; color:#fff; background:#393943; border-radius:7px; padding:10px 17px; font:inherit; }
.community-page button.primary { background:#5865f2; border-color:#5865f2; }
.community-page button.danger { color:#ff9d9d; }
.community-page button:disabled { opacity:.5; cursor:wait; }
.community-save { position:sticky; bottom:18px; background:#17171e; padding:16px; border:1px solid #484854; border-radius:12px; display:flex; align-items:center; gap:12px; z-index:2; box-shadow:0 8px 35px #0005; }
.community-save span { flex:1; }
.community-status { min-height:24px; padding:8px 0; color:#a5f1c6; }
.community-status.error { color:#ffaaaa; }
.community-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.community-metrics .community-card { margin:0; }
.community-metrics strong { display:block; font-size:32px; padding-top:18px; }
.community-chart { width:100%; height:190px; overflow:visible; }
.community-table { width:100%; border-collapse:collapse; font-size:13px; }
.community-table th,.community-table td { padding:15px; text-align:left; border-bottom:1px solid #363640; overflow-wrap:anywhere; }
.community-table th { color:#aaaabb; }

/* Dettagli amministrativi: riepilogo in tabella e differenze espandibili. */
.community-audit-table th:first-child,.community-audit-table td:first-child{width:18%;}
.community-audit-table th:last-child,.community-audit-table td:last-child{width:23%;white-space:nowrap;}
.community-audit-action{font-weight:600;color:#e8e8f3;}
.community-audit-details{margin-top:9px;max-width:880px;}
.community-audit-details summary{width:max-content;max-width:100%;cursor:pointer;color:#aaa6ff;font-size:12px;line-height:1.7;user-select:none;}
.community-audit-details summary:hover{color:#d7d4ff;}
.community-audit-details ul{list-style:none;padding:8px 12px;margin:8px 0 0;background:#191c2b;border:1px solid #45465c;border-radius:9px;}
.community-audit-details li{padding:8px 0;}
.community-audit-details li+li{border-top:1px solid #ffffff16;}
.community-audit-details strong{display:block;color:#e9e9fa;font-size:12px;margin-bottom:5px;}
.community-audit-diff{display:flex;flex-wrap:wrap;gap:5px 18px;font-size:12px;line-height:1.65;}
.community-audit-before{color:#ffafae;overflow-wrap:anywhere;}
.community-audit-after{color:#9de3b7;overflow-wrap:anywhere;}
@media(max-width:760px){.community-audit-table th:first-child,.community-audit-table td:first-child,.community-audit-table th:last-child,.community-audit-table td:last-child{width:auto;}.community-audit-table th:last-child,.community-audit-table td:last-child{white-space:normal;}}

.community-preview { border-left:4px solid #5865f2; padding:16px; background:#292932; border-radius:5px; margin-top:20px; white-space:pre-wrap; overflow-wrap:anywhere; }
.community-dot { margin-left:auto; color:#999; font-size:12px; }
.community-dot.on { color:#36ecac; }
@media(max-width:760px) { .community-grid,.community-metrics { grid-template-columns:1fr; } .community-heading { align-items:flex-start; } .community-save { flex-wrap:wrap; } .community-table th,.community-table td { padding:8px; } }
/* Channel routing and log preferences */
#channel-config-grid.channel-log-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch}
.channel-log-heading{grid-column:1/-1;margin:18px 0 0;padding-bottom:12px;border-bottom:1px solid #ffffff12;font-size:14px;color:#b9bacb}
.channel-log-card{min-width:0;padding:26px 22px 20px;border:1px solid #ffffff05;border-radius:22px;background:#23232c;transition:border-color .2s,background .2s}
.channel-log-card:hover{border-color:#7773ee40;background:#252530}
.channel-log-title{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:42px;margin-bottom:20px;font-size:15px;font-weight:600;color:#eeedf5}
.channel-log-label{display:block;margin-top:16px;font-size:11px;letter-spacing:.06em;color:#999aaf}
.channel-log-label select{display:block;width:100%;max-width:100%;height:40px;margin-top:8px;padding:0 10px;border:1px solid #ffffff14;border-radius:8px;background:#272730;color:#e2e2ed;font-size:12px;text-overflow:ellipsis}
.channel-log-label input[type=color]{display:block;width:100%;height:40px;margin-top:8px;padding:0;border:0;border-radius:10px;background:transparent;cursor:pointer;overflow:hidden}
.channel-log-label input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.channel-log-label input[type=color]::-webkit-color-swatch{border:0;border-radius:10px}
.channel-log-label input[type=color]::-moz-color-swatch{border:0;border-radius:10px}
.channel-log-switch{position:relative;flex:0 0 44px;width:44px;height:25px;cursor:pointer}
.channel-log-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0}
.channel-log-switch span{display:block;height:25px;border-radius:20px;background:#62636e;transition:background .2s}
.channel-log-switch span:after{content:'';position:absolute;left:3px;top:3px;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 2px 4px #0003;transition:transform .2s}
.channel-log-switch input:checked+span{background:#6560f5}
.channel-log-switch input:checked+span:after{transform:translateX(19px)}
.channel-log-switch input:focus-visible+span,.channel-log-label select:focus-visible{outline:2px solid #b5a2ff;outline-offset:4px}
.channel-log-reset{border:0;background:none;color:#a5a4bf;padding:8px 0 0;font-size:11px;cursor:pointer}
.channel-log-reset:hover{color:#ddd5ff}
.channel-log-hint{color:#85859c;font-size:12px;margin:20px 0 0}
@media(max-width:1100px){#channel-config-grid.channel-log-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:650px){#channel-config-grid.channel-log-grid{grid-template-columns:1fr}}


/* 3.3.2 — Dashboard distinta dalle statistiche e stato del piano sempre visibile. */
.rfm-subscription-pill { display:inline-flex; gap:6px; align-items:center; max-width:100%;
  margin-top:8px; padding:5px 10px; border:1px solid #717b9444; border-radius:20px;
  font-size:10px; font-weight:700; letter-spacing:.025em; color:#ccd6ec; background:#27304466; }
.rfm-subscription-pill.is-premium,.rfm-home-plan-badge.is-premium {
  color:#ecd18b; border-color:#b7954a66; background:#9a74331f; }
.rfm-subscription-pill.is-pro,.rfm-home-plan-badge.is-pro {
  color:#c4b3ff; border-color:#9680ef69; background:#674be423; }
.rfm-home-dashboard { max-width:1160px; margin:0 auto; padding:4px 0 36px; color:#f1effb; }
.rfm-home-heading { margin-bottom:22px; padding-bottom:17px; border-bottom:1px solid #ffffff12; }
.rfm-home-kicker { color:#a5a0d7; font-size:10px; font-weight:750; letter-spacing:.12em; }
.rfm-home-heading h2 { margin:6px 0 8px; font-size:24px; letter-spacing:-.03em; }
.rfm-home-heading p,.rfm-home-subscription p,.rfm-home-help p { color:#a8b2ce; font-size:13px; line-height:1.7; margin:6px 0; }
.rfm-home-heading p strong {color:#e7e5f5}
.rfm-home-status-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.rfm-home-status-card { min-width:0; border:1px solid #8681bc2e; border-radius:14px; padding:19px 18px;
  background:linear-gradient(140deg,#111829,#101626); display:flex; flex-direction:column; gap:10px; }
.rfm-home-status-card strong { font-size:17px; overflow-wrap:anywhere; }
.rfm-home-status-card small { color:#95a1bd; font-size:11px; line-height:1.5; }
.rfm-home-stat-label { color:#9da8c3; font-size:12px; }
.rfm-home-online { color:#60d9a1; display:flex; align-items:center; gap:9px; }
.rfm-home-plan-card.is-premium { border-color:#d3ac603e; background:linear-gradient(140deg,#292519,#141928); }
.rfm-home-plan-card.is-premium strong { color:#ebcb81; }
.rfm-home-plan-card.is-pro strong { color:#baadff; }
.rfm-home-subscription,.rfm-home-help { padding:22px; border:1px solid #8983b82e; border-radius:14px;
  background:linear-gradient(120deg,#111829,#101520); margin-bottom:18px; }
.rfm-home-subscription-header { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.rfm-home-subscription h3,.rfm-home-help h3 { margin:6px 0 14px; font-size:17px; }
.rfm-home-plan-badge { display:inline-flex; gap:5px; align-items:center; padding:8px 12px; font-size:12px;
  border:1px solid #5a64814d; color:#c2ccdf; border-radius:18px; background:#2b344b52; font-weight:700; }
.rfm-home-feature-row { display:flex; justify-content:space-between; align-items:center; gap:14px;
  padding:13px 0; border-top:1px solid #ffffff0d; font-size:13px; }
.rfm-home-feature-row > span { color:#a6b1cd; }
.rfm-home-feature-row strong { text-align:right; color:#e9e4fd; }
@media(max-width:900px) { .rfm-home-status-grid { grid-template-columns:1fr; } }

/* Reforger Manager 3.7.1: navigation tiers, visible without entering a module. */
.rfm-sidebar-navigation .rfm-tier-sidebar-group{margin:5px 0 11px;border:1px solid #29324985;border-radius:12px;background:#0b13236e;overflow:hidden}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;padding:12px 10px;color:#b9a8ec;letter-spacing:.11em;font-size:10px;font-weight:800;user-select:none}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary::-webkit-details-marker{display:none}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary:after{content:'⌄';padding-left:8px;opacity:.65}
.rfm-sidebar-navigation .rfm-tier-sidebar-group:not([open])>summary:after{content:'›'}
.rfm-sidebar-navigation .rfm-tier-sidebar-group.is-included>summary{color:#9bcbd4}
.rfm-sidebar-navigation .rfm-tier-group-count{margin-left:auto;color:#b3bfd4;border:1px solid #354260;border-radius:7px;padding:2px 6px;letter-spacing:0}
.rfm-sidebar-navigation .rfm-tier-sidebar-items{padding:0 4px 7px}
.rfm-sidebar-navigation .rfm-tier-sidebar-items .admin-menu-item{min-height:36px;margin:1px 0;padding:7px 8px;gap:8px}
.rfm-sidebar-navigation .rfm-tier-sidebar-items .admin-menu-item>span:nth-child(2){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rfm-sidebar-navigation .rfm-nav-tier{margin-left:auto;flex:0 0 auto;color:#93a4b8;background:#18243b;border:1px solid #33415e;border-radius:6px;padding:3px 5px;font-size:8px;line-height:1;font-weight:800;letter-spacing:.02em}
.rfm-sidebar-navigation [data-nav-required="PRO"]>.rfm-nav-tier{color:#bcafff;background:#6353ab1e}
.rfm-sidebar-navigation [data-nav-required="PREMIUM"]>.rfm-nav-tier{color:#e0c38c;background:#be96551b}
.rfm-sidebar-navigation .rfm-tier-nav-locked{opacity:.82}
.rfm-sidebar-navigation .rfm-tier-nav-locked:hover{opacity:1}
.rfm-sidebar-navigation .rfm-sidebar-shortcut{font:inherit;text-align:left;cursor:pointer}
.rfm-shortcut-icon{font-size:14px;width:17px;flex:0 0 17px;text-align:center;color:#8575cf}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary:focus-visible{outline:2px solid #ad95ff;outline-offset:-3px}
@media(min-width:1051px){.rfm-admin-shell{grid-template-columns:252px minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1050px){.rfm-admin-shell{grid-template-columns:216px minmax(0,1fr)}}

/* 3.7.6 — XP announcements and server-level role rewards. */
.community-leveling-options{grid-column:1/-1;margin-top:22px;padding:18px;border:1px solid #7776b840;border-radius:14px;background:linear-gradient(135deg,#201c36a6,#171c2ac6)}
.community-leveling-options h3{font-size:16px;margin:0 0 8px;color:#e9e3ff}
.community-leveling-options p{font-size:12px;margin:0 0 14px;color:#adb5ce}
.community-level-reward-list{display:flex;flex-direction:column;gap:10px}
.community-level-reward{display:grid;grid-template-columns:minmax(90px,130px) minmax(0,1fr) auto;gap:12px;align-items:end;padding:12px;background:#0e1526ad;border:1px solid #ffffff12;border-radius:11px}
.community-level-reward label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#b9c5d9;min-width:0}
.community-level-reward input,.community-level-reward select{width:100%;min-width:0;padding:9px 11px;border:1px solid #555c7d;border-radius:8px;background:#171c2e;color:#f1efff;font:inherit}
.community-level-preview{margin-top:17px;padding:13px 15px;background:#5865f211;border:1px solid #9297ec37;border-radius:10px;white-space:pre-wrap;overflow-wrap:anywhere}
.community-level-preview strong{color:#ded8ff;font-size:12px}
.community-level-preview p{margin:8px 0 0;color:#d3dbea}
@media(max-width:760px){.community-level-reward{grid-template-columns:1fr 1fr}.community-level-reward button{grid-column:1/-1}}
@media(max-width:470px){.community-level-reward{grid-template-columns:1fr}.community-level-reward button{grid-column:1}}

/* v3.7.7 — Allinea le caselle di conferma alla loro etichetta.
   Le opzioni interamente booleane usano una riga compatta (es. Utility). */
.community-grid > .community-field.community-boolean {
  display:inline-flex; flex-direction:row !important; align-items:center;
  justify-content:flex-start; gap:10px; width:fit-content; max-width:100%;
  min-height:38px; padding:9px 12px; box-sizing:border-box;
  border:1px solid #6676ac33; border-radius:10px;
  background:#20283b66; color:#d4dbef; cursor:pointer;
}
.community-grid > .community-field.community-boolean > span {
  flex:0 1 auto; font-size:12px; line-height:1.45;
}
.community-grid > .community-field.community-boolean > input[type="checkbox"] {
  position:static; display:block; flex:0 0 17px !important;
  width:17px !important; min-width:17px !important; max-width:17px !important;
  height:17px !important; min-height:17px !important;
  margin:0 !important; padding:0 !important;
  accent-color:#6875ff; cursor:pointer;
}
.community-grid > .community-field.community-boolean:focus-within {
  outline:2px solid #9b8cff; outline-offset:2px;
}
.community-grid.community-grid--toggles {
  display:flex; flex-wrap:wrap; align-items:flex-start;
  justify-content:flex-start; gap:12px;
}
@media(max-width:760px) {
  .community-grid.community-grid--toggles {gap:9px;}
}

/* v3.7.11 — Stato uniforme dei moduli nella sidebar: dati reali del Centro Moduli. */
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot{
  display:inline-block;position:relative;flex:0 0 7px;width:7px;height:7px;
  margin-left:auto;border-radius:50%;font-size:0;line-height:0;
  background:#7d869a;box-shadow:0 0 0 1px #8690a21a;
}
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot[data-status="active"]{
  background:#4ee0ad;box-shadow:0 0 8px #4ee0ad70;
}
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot[data-status="inactive"]{
  background:#778196;
}
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot[data-status="locked"]{
  background:#88809e;box-shadow:0 0 0 1px #b6a6ff42;
}
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot[data-status="available"]{
  background:transparent;border:1.5px solid #a5b4d5;box-shadow:none;
}
.rfm-sidebar-navigation .admin-menu-item > .rfm-nav-state-dot[data-status="unknown"]{
  background:#727c90;opacity:.5;
}
.rfm-sidebar-navigation .admin-menu-item:has(> .rfm-nav-state-dot) > .rfm-nav-tier{
  margin-left:0;
}

/* v3.8.77 — designer dei pannelli Ruoli selezionabili */
.community-selfroles-page{max-width:1300px}
.community-selfroles-page .community-heading h1{font-size:24px}
.community-selfroles-page .community-heading p{max-width:840px}
.community-selfrole-banner{padding:16px 20px;border:1px solid #8d80fb42;background:linear-gradient(120deg,#55469c2c,#1221385a);border-radius:14px;margin:0 0 18px}
.community-selfrole-banner strong{font-size:14px;color:#e9e4ff}
.community-selfrole-banner p{margin:6px 0 0;font-size:12px}
.community-selfrole-card{background:linear-gradient(160deg,#161c2b,#101625);border-color:#6c77b331;box-shadow:0 12px 28px #0002}
.community-selfrole-card-head,.community-selfrole-rows-title{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.community-selfrole-card-head h3,.community-selfrole-rows-title h4{margin:4px 0 0;color:#f0eeff;font-size:17px}
.community-selfrole-card-head small,.community-selfrole-rows-title small{color:#98a6c6;font-size:11px;letter-spacing:.04em}
.community-selfrole-description{grid-column:1/-1}
.community-selfrole-description textarea{min-height:76px}
.community-selfrole-rows-title{padding-top:20px;border-top:1px solid #8296c026;margin-top:18px;margin-bottom:12px}
.community-selfrole-row{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(100px,.6fr) minmax(150px,1fr) auto;gap:12px;align-items:end;padding:12px;border:1px solid #9ea8d326;background:#080f2099;border-radius:12px;margin:9px 0}
.community-selfrole-row .danger{height:42px;min-width:44px}
.community-selfrole-preview{--selfrole-accent:#5865f2;margin:18px 0 4px;padding:18px;background:#0b1120;border:1px solid #8d8bba35;border-left:3px solid var(--selfrole-accent);border-radius:12px;display:grid;gap:10px}
.community-selfrole-preview>span{font-size:10px;letter-spacing:.12em;color:#96a4c6}
.community-selfrole-preview>strong{font-size:16px;color:#f0f3ff}
.community-selfrole-preview>p{margin:0;font-size:12px;color:#adb8d3;white-space:pre-wrap}
.community-selfrole-preview-list{display:flex;gap:9px;flex-wrap:wrap}
.community-selfrole-preview-item{border:1px solid #9c9df039;background:#363e6c55;border-radius:10px;padding:10px 12px;font-size:12px;color:#ebefff;white-space:pre-wrap}
.community-selfroles-page .community-card .community-field{min-width:0}
.community-selfroles-page .community-field input[type=color]{width:100%;min-height:42px;padding:5px}
@media(max-width:920px){.community-selfrole-row{grid-template-columns:repeat(2,minmax(0,1fr))}.community-selfrole-row .danger{justify-self:start}}
@media(max-width:550px){.community-selfrole-row{grid-template-columns:1fr}.community-selfrole-card-head{align-items:flex-start}}

/* v3.8.78 — private role mapping + public acknowledgement message */
.community-selfroles-page .community-selfrole-description textarea{min-height:190px;line-height:1.6;resize:vertical}
.community-selfroles-page .community-selfrole-description>small{color:#96acd7;font-size:11px;line-height:1.5}
.community-selfrole-private-label{display:flex;align-items:center;min-height:42px;color:#adc0e5;font-size:12px}
.community-selfrole-preview-reaction{font-size:23px;padding:8px 13px;min-width:32px;text-align:center;border-radius:999px}
.community-selfrole-preview-note{color:#9eaed0;font-size:11px;line-height:1.5}
.community-selfrole-preview>strong[hidden]{display:none}
@media(min-width:921px){.community-selfroles-page .community-selfrole-row:has(.community-selfrole-private-label){grid-template-columns:minmax(150px,1.5fr) minmax(110px,.7fr) minmax(130px,.9fr) auto}}

/* v3.8.79 — selettore delle emoji Unicode classiche per Ruoli selezionabili. */
.community-selfrole-emoji-control{display:flex;align-items:stretch;gap:6px;min-width:0}
.community-selfroles-page .community-selfrole-emoji-control input{min-width:0;flex:1;width:100%;box-sizing:border-box}
.community-selfroles-page .community-selfrole-emoji-trigger{flex:0 0 55px;display:flex;align-items:center;justify-content:center;gap:5px;min-height:42px;padding:0 8px;border-radius:9px;border:1px solid #6e729c;background:linear-gradient(145deg,#31395d,#1e2747);color:#f5f0ff;font-size:24px;cursor:pointer;transition:background .15s,border-color .15s}
.community-selfroles-page .community-selfrole-emoji-trigger span{font-size:13px;color:#bec7eb}
.community-selfroles-page .community-selfrole-emoji-trigger:hover,.community-selfroles-page .community-selfrole-emoji-trigger[aria-expanded="true"]{border-color:#aca1ff;background:linear-gradient(145deg,#434982,#2a3161)}
.community-selfroles-page .community-selfrole-emoji-trigger:focus-visible{outline:2px solid #ad9bff;outline-offset:2px}
.community-emoji-picker{position:fixed;z-index:2147482000;box-sizing:border-box;display:flex;flex-direction:column;gap:10px;max-height:min(455px,calc(100vh - 20px));padding:14px;border:1px solid #666e9e;border-radius:14px;background:#11192b;color:#eaf0ff;box-shadow:0 20px 45px #000b;font-family:inherit}
.community-emoji-picker *{box-sizing:border-box}
.community-emoji-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.community-emoji-picker-head strong{font-size:14px}
.community-emoji-picker-head button{width:29px;height:29px;flex:0 0 29px;border:0;border-radius:7px;background:#293453;color:#dce7ff;cursor:pointer}
.community-emoji-picker-search{width:100%;height:40px;flex:0 0 40px;padding:9px 12px;border:1px solid #4d5c85;border-radius:9px;background:#0a1021;color:#f0f4ff;outline:none;font-size:13px}
.community-emoji-picker-search:focus{border-color:#9c8fff;box-shadow:0 0 0 2px #8b7bff30}
.community-emoji-picker-tabs{display:flex;flex:0 0 auto;overflow-x:auto;gap:3px;padding-bottom:5px;scrollbar-width:thin}
.community-emoji-picker-tab{min-width:32px;height:36px;flex:0 0 32px;border:0;border-radius:8px;background:transparent;color:#e6edff;font-size:19px;cursor:pointer}
.community-emoji-picker-tab[aria-pressed="true"],.community-emoji-picker-tab:hover{background:#313a70}
.community-emoji-picker-note{min-height:14px;flex:0 0 auto;margin:0;color:#b0c1e5;font-size:11px;line-height:1.4}
.community-emoji-picker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;min-height:85px;overflow-y:auto;align-content:start;scrollbar-width:thin;overscroll-behavior:contain;flex:1 1 auto}
.community-emoji-picker-choice{min-width:0;aspect-ratio:1/1;border:0;border-radius:8px;background:transparent;color:#eaf1ff;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:24px;line-height:1;cursor:pointer}
.community-emoji-picker-choice:hover,.community-emoji-picker-choice:focus-visible{outline:none;background:#363f6a}
.community-emoji-picker-more{min-height:28px;border:1px solid #4c5686;border-radius:7px;background:#282f52;color:#c9d5fd;cursor:pointer;font-size:11px}
.community-emoji-picker-more[hidden]{display:none}
@media(max-width:550px){.community-emoji-picker{padding:10px;gap:7px}.community-emoji-picker-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* v3.8.83 — Auto Responder editor */
.community-ar-page{max-width:1360px}
.community-ar-heading{padding:17px 19px;background:linear-gradient(110deg,#0b162b,#15182a);border:1px solid #283c5f;border-radius:15px;margin:0 0 18px}
.community-ar-heading h1{font-size:23px;margin:5px 0 7px}
.community-ar-kicker{font-size:10px;letter-spacing:1.5px;font-weight:750;color:#9ab6f2}
.community-ar-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-bottom:22px}
.community-ar-overview>div{background:#101b30;border:1px solid #273857;border-radius:12px;padding:16px}
.community-ar-overview strong{display:block;color:#f0f4ff;font-size:22px}
.community-ar-overview small{color:#aebfd8;display:block;margin-top:3px}
.community-ar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:13px 0}
.community-ar-toolbar h2{font-size:17px;margin:0 0 3px}
.community-ar-toolbar small{color:#b5c5df}
.community-ar-items{display:grid;gap:15px}
.community-ar-card{margin:0;background:#0c1629;border:1px solid #2d4266;border-radius:15px;overflow:hidden;padding:18px}
.community-ar-card-head{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid #2b3956;padding-bottom:14px;margin-bottom:16px}
.community-ar-card-head h3{font-size:17px;color:#eff5ff;margin:4px 0;overflow-wrap:anywhere}
.community-ar-switch{display:flex;gap:8px;align-items:center;color:#cdd9ef;font-size:12px}
.community-ar-switch input{accent-color:#6677ff;width:17px;height:17px}
.community-ar-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.community-ar-pane{background:#101b30;border:1px solid #253751;border-radius:12px;padding:15px;display:flex;flex-direction:column;gap:13px;min-width:0}
.community-ar-pane h4{font-size:13px;color:#dfebff;margin:0 0 2px}
.community-ar-grid,.community-ar-sim-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.community-ar-page .community-field input:not([type=checkbox]),.community-ar-page .community-field select,.community-ar-page .community-field textarea{border-radius:9px;border-color:#374765;background:#091326;color:#e8f1ff;min-width:0;font-size:13px}
.community-ar-page .community-field textarea{min-height:60px;resize:vertical}
.community-ar-page .community-field select[multiple]{min-height:106px;max-height:150px}
.community-ar-page .community-field input:focus-visible,.community-ar-page .community-field select:focus-visible,.community-ar-page .community-field textarea:focus-visible{outline:2px solid #7b83ff;outline-offset:1px}
.community-ar-pane .community-field:has(textarea){grid-column:auto}
.community-ar-embed{display:flex;flex-direction:column;gap:12px}
.community-ar-embed[hidden]{display:none}
.community-ar-preview{background:#080f1e;border:1px solid #2c3c5f;border-radius:10px;padding:12px;margin-top:auto}
.community-ar-preview>strong{display:block;font-size:11px;color:#91a9dc;margin-bottom:8px}
.community-ar-preview p{margin:4px 0;color:#e0e8fb;white-space:pre-wrap;overflow-wrap:anywhere}
.community-ar-text-preview{padding:8px 4px}
.community-ar-embed-preview{border-left:4px solid #5865f2;border-radius:4px;padding:12px;background:#202b42;max-width:480px}
.community-ar-embed-preview strong{font-size:13px}
.community-ar-advanced{border:1px solid #293955;border-radius:10px;padding:12px 15px;margin-top:14px}
.community-ar-advanced summary{cursor:pointer;font-size:13px;font-weight:650;color:#d4e1ff}
.community-ar-advanced>p{font-size:12px;margin:10px 0}
.community-ar-card-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px}
.community-ar-card-footer small{color:#9baed3}
.community-ar-empty{border:1px dashed #445174;border-radius:13px;text-align:center;padding:28px;color:#abbcde}
.community-ar-simulator{background:#101b2d;border-color:#334362;margin:20px 0}
.community-ar-test-result{margin-top:12px;padding:12px 15px;border-radius:10px;background:#0a1425;border:1px solid #2f4163;font-size:13px;color:#cfdef4;white-space:pre-wrap;overflow-wrap:anywhere}
.community-ar-test-result p{margin:5px 0}
@media(max-width:850px){.community-ar-columns{grid-template-columns:1fr}.community-ar-overview{grid-template-columns:1fr 1fr}.community-ar-grid,.community-ar-sim-grid{grid-template-columns:1fr}}
@media(max-width:520px){.community-ar-overview{grid-template-columns:1fr}.community-ar-card-head{flex-direction:column;align-items:flex-start}.community-ar-page .community-save{flex-wrap:wrap}.community-ar-page .community-save span{flex-basis:100%}}

/* v3.8.87 · PRO Auto Roles */
.community-auto-heading{align-items:center}
.community-auto-heading .community-ar-kicker{font-size:10px;letter-spacing:.14em;color:#a49aff;font-weight:800;margin-bottom:8px}
.community-auto-heading h1{margin:0 0 7px;font-size:25px;color:#f3f2ff}
.community-auto-heading p{max-width:710px}
.community-auto-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.community-auto-summary>div{border:1px solid #756dec33;background:linear-gradient(135deg,#292541,#191d2e);border-radius:13px;padding:17px 19px}
.community-auto-summary strong{display:block;font-size:22px;color:#f4f0ff;margin-bottom:5px}
.community-auto-summary small{color:#a8abc5;font-size:11px}
.community-auto-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.community-auto-group{margin:0;min-width:0;background:#191d2c;border-color:#6c68a633}
.community-auto-group-heading h2{font-size:17px;color:#f1edff;margin:0 0 8px}
.community-auto-group-heading p,.community-auto-check p,.community-auto-note p{font-size:12px;color:#adb3c7;line-height:1.6;margin:0 0 18px}
.community-auto-role-list{border:1px solid #5a5c7955;background:#121724;border-radius:11px;margin:13px 0;max-height:255px;overflow:auto;padding:5px}
.community-auto-role-row{display:flex;align-items:center;gap:12px;padding:10px 11px;border-radius:8px;cursor:pointer;font-size:12px}
.community-auto-role-row:hover{background:#7163ca1d}
.community-auto-role-row:has(input:checked){background:#7b70d72e}
.community-auto-role-row input{flex-shrink:0;width:17px;height:17px;accent-color:#8874ff}
.community-auto-role-row>span{min-width:0;display:block}
.community-auto-role-row strong{font-weight:600;color:#e9eaf6;overflow-wrap:anywhere}
.community-auto-role-row small{display:block;color:#dbb481;margin-top:4px;font-size:10px}
.community-auto-role-row:has(input:disabled):not(:has(input:checked)){opacity:.55;cursor:not-allowed}
.community-auto-role-row[hidden]{display:none}
.community-auto-preview{background:#111729;border:1px solid #645cb844;border-radius:10px;padding:13px;min-height:100px}
.community-auto-preview>strong{display:block;font-size:11px;color:#b8b8cf;margin-bottom:12px}
.community-auto-preview>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:#858fac;font-size:12px}
.community-auto-preview em{font-style:normal;color:#9199b2}
.community-auto-chip{display:inline-block;background:#554c8b66;border:1px solid #9081d966;color:#e3dfff;padding:5px 9px;border-radius:8px;max-width:100%;overflow-wrap:anywhere}
.community-auto-check{display:flex;align-items:center;gap:18px;flex-wrap:wrap;justify-content:space-between;background:#181d2c;border-color:#6d69ab33}
.community-auto-check h3{font-size:15px;margin:0 0 5px}
.community-auto-check p{margin:0}
.community-auto-check #community-auto-result{width:100%;font-size:12px;color:#9de1b4;line-height:1.5}
.community-auto-check #community-auto-result.error{color:#ffc5a1}
.community-auto-note{background:#222135aa;border-left:3px solid #7b70d7;border-radius:8px;padding:15px 18px;margin:12px 0 22px}
.community-auto-note strong{font-size:13px;color:#e8e3fa}
.community-auto-note p{margin:5px 0 0}
@media(max-width:950px){.community-auto-grid{grid-template-columns:1fr}}
@media(max-width:620px){.community-auto-summary{grid-template-columns:1fr}.community-auto-check{align-items:stretch}.community-auto-check button{width:100%}}

/* v3.8.88 • Modalità prioritaria tra bot, senza modifiche alla vecchia UI. */
.community-auto-priority{display:flex;align-items:center;justify-content:space-between;gap:22px;border-color:#a78bfa55;background:linear-gradient(112deg,#a78bfa13,#141928 80%);}
.community-auto-priority h3{margin:6px 0 8px;color:#e8dcff;}
.community-auto-priority p{max-width:740px;margin:0 0 10px;}
.community-auto-priority small{display:block;color:#bcb2e5;}
.community-auto-priority .community-toggle{flex:0 0 auto;}
@media(max-width:660px){.community-auto-priority{flex-direction:column;align-items:stretch}.community-auto-priority .community-toggle{justify-content:space-between}}

/* v3.8.94 • Messaggi di addio PRO: editor e anteprima Discord */
.community-goodbye-page{max-width:1450px}
.cgb-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,0.85fr);gap:18px;align-items:start}
.cgb-layout .community-card{margin:0 0 17px;background:#0d1729;border:1px solid #293c59}
.cgb-layout .community-card h3{font-size:15px;margin:0 0 18px;color:#eaf0ff}
.cgb-config .community-field{margin-bottom:15px}
.cgb-config .community-field input:not([type=checkbox]),.cgb-config .community-field select,.cgb-config .community-field textarea{background:#0b1323;border-color:#344663;color:#eef3ff;border-radius:9px;min-width:0}
.cgb-config .community-field input[type=color]{padding:4px;max-width:112px;cursor:pointer}
.cgb-config .community-field textarea{min-height:95px}
.cgb-hint{font-size:12px;line-height:1.6;color:#a5b3ce!important;margin:10px 0 16px}
.cgb-hint code{color:#c6baff;background:#1d2540;border-radius:4px;padding:2px 4px}
.cgb-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.cgb-switch{display:flex;gap:11px;align-items:center;cursor:pointer;padding:12px;border:1px solid #34415d;border-radius:10px;background:#101d32;min-width:0}
.cgb-switch:hover{border-color:#696dcb}
.cgb-switch input[type=checkbox]{width:18px;height:18px;accent-color:#7b68fa;flex-shrink:0;cursor:pointer}
.cgb-switch span{min-width:0}
.cgb-switch strong{display:block;font-size:12px;color:#f0f4ff;font-weight:600}
.cgb-switch small{display:block;font-size:11px;color:#a8b7d2;line-height:1.4;margin-top:3px}
.cgb-side{min-width:0}.cgb-sticky{position:sticky;top:16px}
.cgb-preview-discord{padding:12px;background:#292a32;border-radius:11px;color:#f2f2f4;font-size:13px}
.cgb-preview-bot{color:#70d8ef;font-weight:700;margin-bottom:12px}.cgb-preview-bot span{font-size:9px;background:#5865f2;color:white;padding:2px 4px;border-radius:4px}
.cgb-preview-embed{background:#303139;border-left:4px solid #ed4245;padding:13px 14px;border-radius:5px;overflow-wrap:anywhere;min-height:110px;position:relative}
.cgb-preview-author{display:flex;gap:6px;align-items:center;color:#fff;font-size:12px;font-weight:600;margin-bottom:7px}
.cgb-preview-avatar{height:24px;width:24px;border-radius:50%;background:#46506b;display:grid;place-items:center;font-size:14px}
.cgb-preview-title{font-weight:700;margin-bottom:7px}.cgb-preview-description{white-space:pre-wrap;line-height:1.5;max-width:85%}
.cgb-preview-thumbnail{position:absolute;top:15px;right:12px;border-radius:10px;background:#53607b;display:grid;place-items:center;width:45px;height:45px;font-size:24px}
.cgb-preview-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.cgb-preview-fields>div{min-width:0;font-size:11px}.cgb-preview-fields strong{display:block;color:#e4e7ff}.cgb-preview-fields span{display:block;color:#c2c7d5;margin-top:4px;overflow-wrap:anywhere}
.cgb-preview-footer{font-size:10px;color:#aaaebc;margin-top:12px}
.cgb-preview-plain{background:#292a32;border-radius:8px;color:#fff;padding:16px;white-space:pre-wrap;overflow-wrap:anywhere}
.cgb-config :disabled{opacity:.48;cursor:not-allowed}
@media(max-width:1040px){.cgb-layout{grid-template-columns:1fr}.cgb-sticky{position:static}}
@media(max-width:560px){.cgb-options-grid{grid-template-columns:1fr}.cgb-layout .community-card{padding:14px}.cgb-preview-fields{grid-template-columns:1fr}}
.cgb-preview-mention{color:#d8dcff;margin:5px 0;font-size:12px;font-weight:600}

/* v3.8.96: guida sintetica alle menzioni tramite variabile {user}. */
.cgb-mention-tip{display:flex;gap:9px;align-items:flex-start;background:#16243b;border:1px solid #344a70;border-radius:9px;padding:11px 12px;color:#b9c9e5;font-size:12px;line-height:1.55;margin:6px 0 10px}
.cgb-mention-tip>span:first-child{font-size:16px;line-height:1.2;flex:none}
.cgb-mention-tip strong{color:#e7edff}
.cgb-mention-tip code{color:#e0d4ff;background:#273354;border-radius:4px;padding:1px 5px;white-space:nowrap}

/* v3.8.98: Welcome Designer remains the visual focus when enabled. */
.cgb-banner-option{background:#142239!important;border:1px solid #6655c266!important;margin-top:9px;}
.cgb-banner-option[hidden]{display:none!important;}
.cgb-banner-mock{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:135px;margin-top:9px;padding:17px 22px;border:1px solid #715dc27a;border-radius:11px;background:radial-gradient(ellipse at 65% 35%,#7c3fd555,transparent 55%),linear-gradient(110deg,#100f22,#24204b 60%,#120e26);color:#eeeafd;overflow:hidden;}
.cgb-banner-mock::before{content:'';position:absolute;inset:0;background:linear-gradient(130deg,transparent 30%,#ffffff0b 31%,transparent 32%,transparent 56%,#ffffff0b 57%,transparent 58%);pointer-events:none;}
.cgb-banner-mock-kicker{font-size:10px;letter-spacing:.18em;color:#b3a1ff;font-weight:800;}
.cgb-banner-mock-main{font-size:21px;font-weight:750;overflow-wrap:anywhere;}
.cgb-banner-mock-label{font-size:11px;color:#c1bbda;font-weight:500;}

/* v3.9.0 — Benvenuti FREE: editor testuale chiaro e anteprima Discord essenziale. */
.community-welcome-free-page{max-width:1500px}
.cwf-heading h1{font-size:25px;letter-spacing:-.02em}
.cwf-heading p{max-width:780px}
.cwf-kicker{font-size:10px;font-weight:800;color:#aaa0ff;letter-spacing:.13em;margin-bottom:8px}
.cwf-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr);gap:18px;align-items:start}
.cwf-editor{min-width:0;display:flex;flex-direction:column;gap:16px}
.community-welcome-free-page .cwf-card,.community-welcome-free-page .cwf-preview{margin:0;padding:20px;border-radius:13px;background:#0d1729;border:1px solid #2a3b59;min-width:0}
.cwf-section-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}
.cwf-section-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#5b52ad38;color:#d5cbff;font-weight:800;font-size:17px;flex:0 0 32px}
.cwf-section-heading h3,.cwf-preview-heading h3{margin:0 0 5px;font-size:14px;color:#edf2ff}
.cwf-section-heading p,.cwf-preview-heading p{font-size:12px;color:#9eacc7;margin:0;line-height:1.5}
.community-welcome-free-page .community-field{font-size:12px;color:#aebbd3;margin:0 0 9px}
.community-welcome-free-page #cwf-channel,.community-welcome-free-page #cwf-message{display:block;width:100%;min-width:0;box-sizing:border-box;background:#0b1324;border:1px solid #334767;border-radius:9px;color:#edf1ff;font:inherit;font-size:13px;padding:11px 13px}
.community-welcome-free-page #cwf-channel{min-height:44px}
.community-welcome-free-page #cwf-message{min-height:134px;resize:vertical;line-height:1.6}
.community-welcome-free-page #cwf-channel:focus-visible,.community-welcome-free-page #cwf-message:focus-visible,.community-welcome-free-page .cwf-token:focus-visible{outline:2px solid #9687f9;outline-offset:2px}
.cwf-channel-access{padding:11px 12px;border-radius:9px;margin-top:10px;border:1px solid #35445f;background:#15213a;font-size:12px;line-height:1.55;color:#b5c5e2}
.cwf-access-ok{background:#0e2927;border-color:#27534a;color:#9ee8c3}
.cwf-access-error{background:#38201f;border-color:#79413d;color:#ffd5bf}
.cwf-text-bottom{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;flex-wrap:wrap;margin:9px 0 15px;color:#aebbd4;font-size:11px;line-height:1.7}
.cwf-text-bottom code{color:#d2c5ff;background:#263052;padding:2px 5px;border-radius:4px}
#cwf-counter{margin-left:auto;white-space:nowrap;color:#97a9c5;font-variant-numeric:tabular-nums}
#cwf-counter.cwf-counter-over{color:#f6a8a8}
.cwf-variables-label{font-size:11px;color:#adbad2;font-weight:700;margin-bottom:10px}
.cwf-variables{display:flex;gap:8px;flex-wrap:wrap}
.community-welcome-free-page .cwf-token{border:1px solid #615b9d66;background:#26223e;color:#d7cfff;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;padding:7px 10px;border-radius:7px}
.community-welcome-free-page .cwf-token:hover{border-color:#a79bff;background:#382e58}
.cwf-free-note{display:flex;align-items:flex-start;gap:10px;padding:12px 15px;border-radius:9px;border:1px solid #5a518a66;background:#29213b6b;font-size:12px;line-height:1.6;color:#bfb8d9}
.cwf-free-note strong{color:#dcd0ff}
.cwf-preview{position:sticky;top:12px}
.cwf-preview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:18px}
.cwf-preview-tag{background:#202c48;border:1px solid #435276;color:#a7c4f3;border-radius:7px;padding:4px 7px;font-size:10px;font-weight:800;letter-spacing:.05em}
.cwf-discord{border-radius:10px;overflow:hidden;background:#303139;color:#e9e9ed;border:1px solid #363b49}
.cwf-channel-head{display:flex;gap:7px;align-items:center;padding:10px 14px;background:#282a32;border-bottom:1px solid #40434e;font-size:12px;font-weight:700;color:#ced0dd;word-break:break-word}
.cwf-channel-head span:first-child{font-size:20px;color:#8e91a6;line-height:.7}
.cwf-discord-body{display:flex;gap:11px;padding:18px 13px;align-items:flex-start;min-height:105px}
.cwf-bot-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:50%;background:linear-gradient(135deg,#5b60fb,#8d4dff);display:grid;place-items:center;color:#fff;font-weight:850;font-size:17px}
.cwf-discord-message{min-width:0;flex:1}
.cwf-bot-name{color:#62d9ff;font-size:12px;font-weight:750;line-height:1.6;margin-bottom:4px}
.cwf-bot-name>span{display:inline-block;background:#5865f2;border-radius:3px;color:#fff;font-size:9px;margin-left:4px;padding:0px 4px;font-weight:700;vertical-align:1px}
.cwf-bot-name small{color:#a9a9b8;font-size:10px;font-weight:400;margin-left:7px}
.cwf-message-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6;color:#f0f0f2}
.cwf-mention{background:#49548677;color:#d9dfff;border-radius:3px;padding:0 2px;font-weight:600}
.cwf-placeholder{color:#9d9fab;font-style:italic}
.cwf-preview-info{display:flex;align-items:flex-start;gap:9px;margin-top:14px;background:#15243d;border:1px solid #304563;border-radius:9px;padding:12px;color:#aec1dc;font-size:11px;line-height:1.6}
.cwf-preview-info strong{color:#e0eafd}
.cwf-preview-state{color:#94a5c0;font-size:11px;margin-top:12px}
.community-welcome-free-page .community-save{background:#101827;border-color:#31405d}
@media(max-width:990px){.cwf-layout{grid-template-columns:1fr}.cwf-preview{position:static}}
@media(max-width:600px){.community-welcome-free-page .cwf-card,.community-welcome-free-page .cwf-preview{padding:14px}.cwf-discord-body{padding:13px 9px}.community-welcome-free-page .community-save{gap:8px}.community-welcome-free-page .community-save>span{width:100%;flex:auto}}

/* v3.9.6 — FREE statistics: readable periods, clear UTC labels and XP identity. */
.rfm-statistics-page{max-width:1320px;padding:12px 4px 96px;color:#edf1ff}
.rfm-stats-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap;padding:23px 24px;margin-bottom:15px;border:1px solid #34436380;border-radius:15px;background:linear-gradient(130deg,#172139,#0c1729)}
.rfm-stats-kicker{font-size:10px;letter-spacing:.16em;font-weight:800;color:#a69aff;margin-bottom:8px}
.rfm-stats-heading h1{margin:0 0 5px;font-size:22px;letter-spacing:-.02em}
.rfm-stats-heading p{margin:0;font-size:12px;color:#a8b8d2}
.rfm-stats-controls{display:flex;align-items:center;gap:4px;padding:4px;background:#0a1425;border:1px solid #334261;border-radius:11px}
.rfm-statistics-page .rfm-stats-controls button{background:transparent;border:0;border-radius:8px;color:#a7b4cd;font-weight:650;font-size:12px;padding:9px 12px;white-space:nowrap}
.rfm-statistics-page .rfm-stats-controls button.selected{background:#594dc8;color:#fff;box-shadow:0 3px 12px #0004}
.rfm-statistics-page .rfm-stats-controls button:focus-visible{outline:2px solid #bbb0ff;outline-offset:1px}
.rfm-stats-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0}
.rfm-stats-summary-card{display:flex;flex-direction:column;gap:9px;min-width:0;padding:18px;border-radius:13px;border:1px solid #31405d;background:linear-gradient(130deg,#111b30,#101725)}
.rfm-stats-metric-label{color:#adbad3;font-size:12px;font-weight:650}
.rfm-stats-summary-card strong{font-size:28px;line-height:1.2;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.rfm-stats-summary-card small{font-size:11px;color:#91a1bd}
.rfm-stats-graphs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.rfm-statistics-page .rfm-stats-chart,.rfm-statistics-page .rfm-stats-ranking{margin:0;background:#101929;border:1px solid #303d56;border-radius:14px;padding:20px;min-width:0}
.rfm-stats-chart header{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.rfm-stats-chart h3,.rfm-stats-ranking h3{font-size:15px;color:#e9edff;margin:0}
.rfm-stats-chart svg{display:block;width:100%;height:auto;min-height:148px;margin-top:15px}
.rfm-stats-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;color:#a8b4ca}
.rfm-stats-legend span{display:inline-flex;gap:5px;align-items:center}
.rfm-stats-legend i{display:inline-block;width:9px;height:9px;border-radius:3px}
.rfm-statistics-page .rfm-stats-note{font-size:11px;color:#8e9eba;line-height:1.6;margin:12px 3px 20px}
.rfm-stats-ranking-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:15px}
.rfm-stats-ranking-title p{font-size:11px;margin:5px 0 0;color:#97a8c5}
.rfm-stats-ranking-title>span{font-size:11px;border:1px solid #3a4965;padding:7px 11px;border-radius:9px;color:#bbc7e4}
.rfm-stats-ranking-list{display:grid;gap:6px}
.rfm-stats-rank-row{display:grid;grid-template-columns:36px 32px minmax(0,1fr) 110px 100px;gap:13px;align-items:center;min-width:0;padding:9px 12px;border:1px solid #ffffff0b;border-radius:10px;background:#172237}
.rfm-stats-rank-num{color:#9badd0;font-size:12px;font-weight:800}
.rfm-stats-rank-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;background:#303754}
.rfm-stats-avatar-fallback{display:flex;align-items:center;justify-content:center}
.rfm-stats-rank-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:700;color:#eef1ff}
.rfm-stats-rank-xp,.rfm-stats-rank-level{font-variant-numeric:tabular-nums;font-size:12px;text-align:right;color:#bcc5ed}
@media(max-width:1040px){.rfm-stats-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.rfm-stats-graphs{grid-template-columns:1fr}}
@media(max-width:620px){.rfm-stats-summary{grid-template-columns:1fr 1fr;gap:8px}.rfm-stats-summary-card{padding:12px}.rfm-stats-heading{padding:16px}.rfm-stats-rank-row{grid-template-columns:25px 28px minmax(0,1fr) 76px;gap:7px;padding:8px}.rfm-stats-rank-avatar{width:28px;height:28px}.rfm-stats-rank-level{display:none}.rfm-stats-rank-xp{font-size:11px}}

/* v3.9.7: per-server time zone selector for FREE Statistics */
.rfm-stats-timezone{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:10px 0 15px;padding:12px 16px;background:#101d34;border:1px solid #243854;border-radius:12px;color:#d6e4ff}
.rfm-stats-timezone label{font-size:13px;font-weight:700}
.rfm-stats-timezone select{min-width:230px;max-width:100%;border:1px solid #34466b;border-radius:8px;background:#152640;color:#f2f7ff;padding:8px 10px;flex:0 1 300px}
.rfm-stats-timezone span{font-size:12px;color:#aebcd8}


/* v3.9.36 — sidebar raggruppata per funzione; la logica dei permessi non cambia. */
.rfm-sidebar-navigation .rfm-sidebar-panel-group{
  padding:3px 2px 12px; margin-bottom:12px;
  border-bottom:1px solid #53608335;
}
.rfm-sidebar-navigation .rfm-sidebar-panel-group .rfm-menu-label{
  margin:4px 0 6px;padding:7px 10px;color:#a5b4ce;letter-spacing:.12em;
}
.rfm-sidebar-navigation .rfm-sidebar-panel-group .rfm-tier-sidebar-items{padding:0 2px}
.rfm-sidebar-navigation .rfm-sidebar-panel-group .admin-menu-item{min-height:37px}
.rfm-sidebar-navigation .rfm-tier-sidebar-group{
  margin:0 1px 10px;border-color:#34436773;
  background:linear-gradient(155deg,#111b2bbd,#0b14249c);
}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary{
  padding:12px 10px;gap:8px;min-height:39px;
  border-bottom:1px solid transparent;
}
.rfm-sidebar-navigation .rfm-tier-sidebar-group[open]>summary{border-color:#41507038}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary .rfm-tier-group-name{flex:1;min-width:0;line-height:1.5}
.rfm-sidebar-navigation .rfm-tier-sidebar-group>summary:after{margin-left:0;padding-left:2px}
.rfm-sidebar-navigation .rfm-tier-sidebar-group[data-tier-group="FREE"]>summary{color:#90baf3}
.rfm-sidebar-navigation .rfm-tier-sidebar-group[data-tier-group="PRO"]>summary{color:#bdacff}
.rfm-sidebar-navigation .rfm-tier-sidebar-group[data-tier-group="PREMIUM"]>summary{color:#e8c88a}
.rfm-sidebar-navigation .rfm-game-sidebar-group{
  margin-top:13px;border-color:#9d7e483f;
  background:linear-gradient(155deg,#201b2480,#101827b0);
}
.rfm-sidebar-navigation .rfm-sidebar-subheading{
  margin:9px 9px 3px;padding:7px 4px 3px;
  color:#7f91ad;font-size:9px;letter-spacing:.095em;
  font-weight:750;line-height:1.25;
}
.rfm-sidebar-navigation .rfm-sidebar-subheading:not(:first-child){border-top:1px solid #46506b26;padding-top:11px}
.rfm-sidebar-navigation .rfm-tier-sidebar-items .admin-menu-item{font-size:11.5px;min-height:35px}
.rfm-sidebar-navigation .rfm-sidebar-legacy{display:none!important}
.rfm-sidebar .admin-menu-item[data-rfm-search-hidden]{display:none!important}
.rfm-sidebar-navigation .rfm-tier-sidebar-group[hidden]{display:none!important}
.rfm-sidebar-navigation .rfm-tier-sidebar-group .admin-menu-item.active .rfm-nav-icon{color:#c9b7ff}
.rfm-sidebar #rfm-dev-mode-card:not([hidden])::before{
  content:'STRUMENTI SVILUPPATORE';display:block;color:#9ba7d1;
  font-size:9px;letter-spacing:.1em;font-weight:750;margin:0 0 8px;
}
@media(max-width:880px){
  .rfm-sidebar-navigation .rfm-sidebar-subheading{font-size:9px}
  .rfm-sidebar-navigation .rfm-tier-sidebar-items .admin-menu-item{min-height:38px}
}

/* v3.9.43 — editor PREMIUM: Colori, Starboard, Canali temporanei. */
.community-premium-page{max-width:none;padding-top:8px;color:#e8edff}
.community-premium-page .community-heading{border-bottom:1px solid #ffffff12;margin-bottom:22px;padding:10px 0 22px}
.community-premium-page .community-heading h1{font-size:25px;letter-spacing:-.025em}
.community-premium-page .community-heading p{max-width:700px;color:#a9b7d2;margin:0}
.community-premium-page .community-toggle{font-size:13px;color:#dbe5fb}
.community-premium-page .community-toggle input{accent-color:#6962fa;width:19px;height:19px}
.rfm-premium-kicker{font-weight:700;font-size:10px;letter-spacing:.12em;color:#9ca9d5;margin-bottom:9px}
.rfm-premium-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,.8fr);align-items:start;gap:16px}
.rfm-premium-editor{min-width:0}
.rfm-premium-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:0 0 9px}
.rfm-premium-section-head h2{font-size:17px;margin:0 0 5px;color:#f2f5ff}
.rfm-premium-section-head p{font-size:12px;margin:0 0 8px;max-width:690px;color:#a2b2d1}
.community-premium-page .community-card{background:#111c32;border:1px solid #2a3855;border-radius:12px;margin:7px 0 14px;padding:20px}
.community-premium-page .community-grid{gap:16px}
.community-premium-page .community-field{color:#cad7f1;font-size:12px;min-width:0}
.community-premium-page .community-field small{font-size:11px;color:#9baacb;line-height:1.5}
.community-premium-page .community-field input:not([type=checkbox]),.community-premium-page .community-field select{background:#18243b;border:1px solid #354360;color:#eff4ff;min-height:41px;border-radius:8px}
.community-premium-page .community-field input:focus-visible,.community-premium-page .community-field select:focus-visible{outline:2px solid #7972ff;outline-offset:1px}
.rfm-premium-card-title{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:20px}
.rfm-premium-card-title h3{margin:0;color:#edf3ff;font-size:15px}
.rfm-premium-card-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px;padding-top:16px;border-top:1px solid #ffffff12}
.rfm-premium-card-actions small{font-size:11px;color:#abb8d1}
.community-premium-page button{background:#192742;border:1px solid #344366;color:#e8eeff}
.community-premium-page button:hover:not(:disabled){background:#25385b;border-color:#6575af}
.community-premium-page button.primary{background:linear-gradient(95deg,#4d60e9,#7752f2);border-color:transparent;color:white}
.community-premium-page button.danger{background:#3a1b2a;border-color:#573144;color:#ffb4c3}
.community-premium-page button:disabled{cursor:not-allowed;opacity:.48}
.rfm-premium-aside{position:sticky;top:76px;min-width:0}
.rfm-premium-aside h3{font-size:15px;margin:0 0 8px}
.rfm-premium-aside p{font-size:12px;margin:0 0 18px;color:#a6b4cf}
.rfm-premium-discord{border-left:4px solid #7369fb;background:#0b162b;border-radius:8px;padding:15px;margin:10px 0;overflow-wrap:anywhere}
.rfm-premium-discord-title{font-size:14px;font-weight:750;color:#f3f5ff}
.rfm-premium-discord p{margin:8px 0 13px;color:#c9d3e8}
.rfm-premium-discord small{display:block;font-size:11px;color:#98b6f0;margin-top:12px}
.rfm-premium-button-demo{display:inline-block;border-radius:6px;padding:8px 14px;font-size:12px;background:#4759c4;color:#fff}
.rfm-premium-link-demo{display:block;font-size:12px;color:#8bbaff;margin-top:7px}
.rfm-premium-help{margin-top:17px;border-top:1px solid #ffffff16;padding-top:14px;font-size:11px;color:#a6b9d6;line-height:1.6}
.rfm-premium-steps>div{display:flex;align-items:center;gap:12px;margin:0 0 13px;color:#c6d3ee;font-size:12px}
.rfm-premium-steps b{display:inline-flex;align-items:center;justify-content:center;background:#344778;border-radius:50%;min-width:25px;min-height:25px;color:#fff}
.rfm-premium-aside>small{color:#a9b9d9}
.community-premium-page .community-save{background:#101a2c;border-color:#2d3c5c;padding:12px 15px}
.community-premium-page .community-status{font-size:12px}
@media(max-width:1050px){.rfm-premium-layout{grid-template-columns:minmax(0,1fr)}.rfm-premium-aside{position:static}}
@media(max-width:650px){.community-premium-page .community-card{padding:14px}.community-premium-page .community-grid{grid-template-columns:1fr}.community-premium-page .community-heading h1{font-size:21px}.rfm-premium-card-title{align-items:flex-start}.community-premium-page .community-save{bottom:4px}.community-premium-page .community-save>span{flex-basis:100%}}

/* v3.9.44 hotfix: color roles picker, distinct from panel publication */
.community-premium-page .community-field input::placeholder{color:#8897b5;opacity:0.76}
.rfm-role-color-field{grid-column:1/-1;border:1px solid #334564;border-radius:10px;padding:15px;background:#101d33;display:grid;gap:10px}
.rfm-role-color-head{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:5px;font-size:12px;color:#e6efff}
.rfm-role-color-head span{font-size:11px;color:#a0b4d7}
.rfm-role-color-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.community-premium-page .rfm-role-color-row input[type=color]{width:56px;min-width:56px;height:43px;padding:3px;cursor:pointer;border-radius:9px}
.community-premium-page .rfm-role-color-row input[type=text]{max-width:150px;width:130px;font-family:ui-monospace,Consolas,monospace;text-transform:uppercase}
.rfm-role-color-row button{min-height:42px;padding:8px 14px}
.rfm-color-palette{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.rfm-color-palette button{background:var(--rfm-swatch)!important;border-radius:7px;width:30px;height:30px;padding:0;border:2px solid #d0dafb55;box-shadow:0 2px 7px #0006;cursor:pointer}
.rfm-color-palette button:hover:not(:disabled),.rfm-color-palette button:focus-visible{outline:2px solid #e7ecff;outline-offset:2px}
.rfm-role-color-field small{font-size:11px;line-height:1.55;color:#aebed9}
.rfm-color-preview-dot{display:inline-block;width:12px;height:12px;border-radius:50%;border:1px solid #ffffff66;vertical-align:-1px;margin-right:6px}
@media(max-width:650px){.rfm-role-color-row button{width:100%}.rfm-role-color-head{flex-direction:column}.rfm-role-color-field{padding:12px}}

/* ==========================================================
   v3.9.66 · Dashboard UI consistency pass
   Solo presentazione: nessun salvataggio, ruolo o modulo viene modificato.
   ========================================================== */

/* 1) Identical slim scrolling across dashboard, Community, Welcome,
      infrastructure and dynamically-generated module lists. */
html, body, body * {
  scrollbar-width: thin;
  scrollbar-color: #7769b4a6 transparent;
}
html::-webkit-scrollbar, body::-webkit-scrollbar, body *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track, body *::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb, body *::-webkit-scrollbar-thumb {
  background: #7769b4a6;
  border-radius: 20px;
}
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover, body *::-webkit-scrollbar-thumb:hover {
  background: #a18fe4;
}
/* The navigation scrollbar stays slightly slimmer, as before. */
.rfm-sidebar-navigation::-webkit-scrollbar { width: 5px; }

/* 2) Buttons: consistent interaction, with explicit primary/danger states.
      Existing module-specific colors and dimensions are preserved. */
.rfm-admin-shell .server-button,
.rfm-infra-page .rfm-infra-actions > button,
.community-page .community-actions > button,
.community-page .community-save > button,
.community-ar-sim-actions > button {
  border-radius: 10px;
  transition: background-color .16s ease, border-color .16s ease,
              box-shadow .16s ease, color .16s ease, opacity .16s ease;
}
.rfm-admin-shell :is(button, .server-button):focus-visible,
.rfm-infra-page button:focus-visible,
.community-page button:focus-visible {
  outline: 2px solid #a899ff;
  outline-offset: 2px;
}
.rfm-admin-shell :is(button, .server-button):disabled,
.rfm-infra-page button:disabled,
.community-page button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}
.community-page button:not(:disabled):hover { border-color: #9183ed; }
.community-page button.primary:not(:disabled):hover { filter: brightness(1.12); }
/* Avoid turning checkboxes, icon swatches, draggable controls into wide buttons. */

/* 3) Inputs / placeholders: hints are visually muted, never treated as data. */
.rfm-content :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),textarea,select),
.community-page :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),textarea,select),
.rfm-infra-page :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),textarea,select) {
  color-scheme: dark;
  min-width: 0;
}
.rfm-content :is(input,textarea)::placeholder,
.community-page :is(input,textarea)::placeholder,
.rfm-infra-page :is(input,textarea)::placeholder,
.welcome-designer-page :is(input,textarea)::placeholder {
  color: #90a0be;
  opacity: .68;
  font-style: normal;
}
.rfm-content :is(input,textarea,select):focus-visible,
.community-page :is(input,textarea,select):focus-visible,
.rfm-infra-page :is(input,textarea,select):focus-visible {
  outline: 2px solid #a095ff;
  outline-offset: 1px;
}
.rfm-content :is(input,textarea,select):disabled,
.community-page :is(input,textarea,select):disabled,
.rfm-infra-page :is(input,textarea,select):disabled {
  opacity: .56;
  cursor: not-allowed;
}
.community-field select[multiple],
.community-auto-role-list,
.community-ar-pane,
.rfm-infra-page select[multiple] {
  background-color: #10192d;
  color: #e9eeff;
  color-scheme: dark;
}
.community-auto-group .community-auto-role-list {
  background: #10192d;
  color: #e9eeff;
}
.community-auto-role-list:focus-within { border-color: #8777df; }
.community-auto-role-row:focus-within { background: #8170d52b; }
.community-auto-role-row:focus-within input:focus-visible { outline-offset: 3px; }

/* 4) Structured preview panels: visually separate results from controls. */
.community-ar-simulator {
  background: #101b30;
  border: 1px solid #394b73;
  border-radius: 15px;
}
.community-ar-sim-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 14px;
}
.community-ar-sim-actions > button { align-self: flex-start; min-width: 154px; }
.community-ar-test-result {
  width: 100%;
  box-sizing: border-box;
  min-height: 94px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #3e5075;
  background: #0b1428;
  font-size: 13px;
  line-height: 1.6;
  color: #dce7ff;
  cursor: default;
  user-select: text;
  white-space: normal;
  overflow-wrap: anywhere;
}
.community-ar-test-result strong { display: block; color: #f2f5ff; margin: 0 0 8px; }
.community-ar-test-result small { display: block; color: #99add2; margin-top: 10px; }
.community-ar-test-output { white-space: pre-wrap; overflow-wrap: anywhere; }
.community-ar-test-result.is-success { border-color: #33765d; background: #102a27; }
.community-ar-test-result.is-empty { border-color: #74613d; background: #2b2418; }
.community-ar-test-result.is-error { border-color: #7b4050; background: #301c2c; }
.community-ar-test-result.is-placeholder { border-style: dashed; }
.community-ar-preview, .community-auto-preview, .cwf-preview,
.rfm-embed-preview, .rfm-infra-verify-card {
  border-radius: 12px;
}

/* 5) Status feedback: consistent, readable, never indistinguishable from input. */
.community-status:not(:empty),
.rfm-infra-save-status:not(:empty),
.rfm-module-status:not(:empty) {
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.community-status.error, .rfm-infra-save-status.error,
.rfm-module-status.error { color: #ffb1bd; }
.community-status:not(.error):not(:empty) { color: #96e6c3; }
.community-ar-page .community-status:empty { padding: 0; min-height: 0; }
.community-save { border-radius: 13px; }
.community-save button:disabled { cursor: not-allowed; }

@media (max-width: 700px) {
  .community-ar-sim-actions > button { width: 100%; }
  .community-ar-test-result { min-height: 84px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rfm-admin-shell .server-button,
  .rfm-infra-page .rfm-infra-actions > button,
  .community-page button { transition: none; }
}
/* K129: translated Community headings must not push controls off-screen. */
.community-heading>div{min-width:0}
.community-heading h1{overflow-wrap:anywhere}
.community-heading>.community-toggle{flex-shrink:0}
@media(max-width:650px){
 .community-heading{flex-wrap:wrap;align-items:flex-start;gap:12px}
 .community-heading>div{flex:1 1 100%;width:100%}
 .community-heading>.community-toggle{max-width:100%;justify-content:space-between;flex:1 1 100%;padding:10px 0;box-sizing:border-box}
 .community-save{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px!important;margin-top:18px}
 .community-save>span{grid-column:1/-1;font-size:12px}
 .community-save>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:13px;padding:10px!important}
 .community-save>#community-test{grid-column:1/-1}
 .community-page{padding-bottom:24px}
}

/* Auto Roles v4.0 BETA — mode and optional audit destination. */
.community-auto-settings { display:flex; flex-direction:column; gap:12px; }
.community-auto-mode { display:flex; align-items:flex-start; gap:12px; padding:12px; border:1px solid rgba(130,140,180,.22); border-radius:10px; cursor:pointer; }
.community-auto-mode:has(input:checked) { border-color:rgba(120,104,255,.65); background:rgba(105,96,255,.09); }
.community-auto-mode span { display:flex; flex-direction:column; gap:5px; }
.community-auto-mode small { opacity:.82; line-height:1.45; }
.community-auto-mode input { margin-top:4px; accent-color:#746aff; }
.community-auto-settings select { max-width:100%; width:100%; }
