/* Next Generation inspired control center. Loaded last so both themes share one layout. */
html[data-theme="dark"]{--bg:#081225;--panel:#101e36;--panel2:#152640;--text:#e4e9f0;--muted:#a3b1c5;--line:#2b3d58;--accent:#c4cedb;--accent-ink:#102039;--accent-soft:#223750;--shadow:0 12px 32px #02091530;color-scheme:dark}
html[data-theme="light"]{--bg:#fffaf5;--panel:#fff;--panel2:#fff5eb;--text:#292522;--muted:#75675c;--line:#eaded3;--accent:#c14b08;--accent-ink:#fff;--accent-soft:#fff0e1;--shadow:0 12px 32px #7b390b0a;color-scheme:light}
html[data-theme]:not(#legacy-theme) body{background:var(--bg)!important;color:var(--text)!important}
html[data-theme]:not(#legacy-theme) .site-header,html[data-theme]:not(#legacy-theme) footer{background:var(--panel)!important;border-color:var(--line)!important;color:var(--muted)!important}
html[data-theme]:not(#legacy-theme) .brand,html[data-theme]:not(#legacy-theme) .section-title h1,html[data-theme]:not(#legacy-theme) h1,html[data-theme]:not(#legacy-theme) h2,html[data-theme]:not(#legacy-theme) h3,html[data-theme]:not(#legacy-theme) h4,html[data-theme]:not(#legacy-theme) label,html[data-theme]:not(#legacy-theme) strong{color:var(--text)}
html[data-theme]:not(#legacy-theme) a{color:var(--accent)}
html[data-theme]:not(#legacy-theme) .panel,html[data-theme]:not(#legacy-theme) .guild-card,html[data-theme]:not(#legacy-theme) .empty,html[data-theme]:not(#legacy-theme) .feature-card,html[data-theme]:not(#legacy-theme) .command-card,html[data-theme]:not(#legacy-theme) .ticket-module-card,html[data-theme]:not(#legacy-theme) .automation-builder,html[data-theme]:not(#legacy-theme) .automation-form,html[data-theme]:not(#legacy-theme) .automation-rule-card,html[data-theme]:not(#legacy-theme) .stream-alert-card,html[data-theme]:not(#legacy-theme) .embed-editor,html[data-theme]:not(#legacy-theme) .embed-preview-card,html[data-theme]:not(#legacy-theme) .suggestions-panel,html[data-theme]:not(#legacy-theme) .paid-access-card,html[data-theme]:not(#legacy-theme) .owner-section,html[data-theme]:not(#legacy-theme) .dashboard-toolbar,html[data-theme]:not(#legacy-theme) .dashboard-home-hero,html[data-theme]:not(#legacy-theme) .summary-card,html[data-theme]:not(#legacy-theme) .twitch-card,html[data-theme]:not(#legacy-theme) .twitch-config-form,html[data-theme]:not(#legacy-theme) .cookie-notice{background:var(--panel)!important;background-image:none!important;border:1px solid var(--line)!important;color:var(--text)!important;box-shadow:var(--shadow)!important;border-radius:16px}
html[data-theme]:not(#legacy-theme) .feature-fields,html[data-theme]:not(#legacy-theme) .feature-requirement,html[data-theme]:not(#legacy-theme) .feature-toggle,html[data-theme]:not(#legacy-theme) .checks label,html[data-theme]:not(#legacy-theme) .feature-config-details summary,html[data-theme]:not(#legacy-theme) .dashboard-home-stats>div,html[data-theme]:not(#legacy-theme) .server-stats-summary>div,html[data-theme]:not(#legacy-theme) .twitch-card-grid>div,html[data-theme]:not(#legacy-theme) .twitch-message-preview{background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) .btn,html[data-theme]:not(#legacy-theme) .feature-card .btn,html[data-theme]:not(#legacy-theme) .guild-card .btn{background:var(--accent)!important;color:var(--accent-ink)!important;border:1px solid transparent!important;border-radius:9px;box-shadow:none!important}
html[data-theme]:not(#legacy-theme) .btn.secondary,html[data-theme]:not(#legacy-theme) .feature-card .btn.secondary,html[data-theme]:not(#legacy-theme) .icon-btn{background:var(--panel2)!important;color:var(--text)!important;border:1px solid var(--line)!important}
html[data-theme]:not(#legacy-theme) .btn:hover{filter:brightness(.94)}
html[data-theme]:not(#legacy-theme) .feature-icon,html[data-theme]:not(#legacy-theme) .summary-icon,html[data-theme]:not(#legacy-theme) .dashboard-home-badge,html[data-theme]:not(#legacy-theme) .managed-server-count,html[data-theme]:not(#legacy-theme) .pill,html[data-theme]:not(#legacy-theme) .eyebrow,html[data-theme]:not(#legacy-theme) .guild-icon,html[data-theme]:not(#legacy-theme) .token-row span{background:var(--accent-soft)!important;color:var(--accent)!important;border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) .feature-description,html[data-theme]:not(#legacy-theme) .feature-priority,html[data-theme]:not(#legacy-theme) .feature-card small,html[data-theme]:not(#legacy-theme) .command-card p,html[data-theme]:not(#legacy-theme) .ticket-module-card p,html[data-theme]:not(#legacy-theme) .feature-requirement,html[data-theme]:not(#legacy-theme) .guild-card small,html[data-theme]:not(#legacy-theme) .dashboard-home-hero p,html[data-theme]:not(#legacy-theme) .dashboard-toolbar-hint,html[data-theme]:not(#legacy-theme) .mini-label{color:var(--muted)!important}
html[data-theme]:not(#legacy-theme) .feature-card h3,html[data-theme]:not(#legacy-theme) .feature-card strong,html[data-theme]:not(#legacy-theme) .guild-card h3,html[data-theme]:not(#legacy-theme) .guild-card strong,html[data-theme]:not(#legacy-theme) .guild-card-copy,html[data-theme]:not(#legacy-theme) .twitch-name,html[data-theme]:not(#legacy-theme) .twitch-card-grid strong,html[data-theme]:not(#legacy-theme) .twitch-message-preview p{color:var(--text)!important}
html[data-theme]:not(#legacy-theme) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),html[data-theme]:not(#legacy-theme) select,html[data-theme]:not(#legacy-theme) textarea{background:var(--bg)!important;color:var(--text)!important;border:1px solid var(--line)!important;caret-color:var(--text)!important;border-radius:9px}
html[data-theme]:not(#legacy-theme) input::placeholder,html[data-theme]:not(#legacy-theme) textarea::placeholder{color:var(--muted)!important}
html[data-theme]:not(#legacy-theme) input[type="checkbox"],html[data-theme]:not(#legacy-theme) input[type="radio"]{accent-color:var(--accent)}
html[data-theme]:not(#legacy-theme) option{background:var(--panel);color:var(--text)}
html[data-theme]:not(#legacy-theme) .account-dropdown-menu,html[data-theme]:not(#legacy-theme) .account-submenu-menu,html[data-theme]:not(#legacy-theme) .nav-dropdown-menu{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) .account-menu-item,html[data-theme]:not(#legacy-theme) .site-nav>a,html[data-theme]:not(#legacy-theme) .nav-dropdown>summary,html[data-theme]:not(#legacy-theme) .account-dropdown>summary{color:var(--text)!important}
html[data-theme]:not(#legacy-theme) .site-nav>a:hover,html[data-theme]:not(#legacy-theme) .account-menu-item:hover{background:var(--accent-soft)!important;color:var(--accent)!important}
html[data-theme]:not(#legacy-theme) th,html[data-theme]:not(#legacy-theme) td{border-color:var(--line)!important}th{color:var(--muted)!important}tr:hover td{background:var(--panel2)!important}
html[data-theme]:not(#legacy-theme) :where(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-theme]:not(#legacy-theme) .control-rail{position:fixed;inset:0 auto 0 0;width:72px;background:var(--panel);border-right:1px solid var(--line);z-index:400;display:flex;align-items:center;flex-direction:column;gap:14px;padding:20px 10px}
html[data-theme]:not(#legacy-theme) .control-rail a{width:44px;height:44px;display:grid;place-items:center;color:var(--muted);font-size:24px;border-radius:12px;transition:background .15s,color .15s}
html[data-theme]:not(#legacy-theme) .control-rail a:hover,html[data-theme]:not(#legacy-theme) .control-rail a[aria-current="page"]{background:var(--accent-soft);color:var(--accent)}
html[data-theme]:not(#legacy-theme) .control-rail .rail-monogram{background:var(--accent);color:var(--accent-ink);font-weight:900;font-size:22px;margin-bottom:20px}
html[data-theme]:not(#legacy-theme) .control-rail .rail-settings{margin-top:auto}
html[data-theme]:not(#legacy-theme) .control-center{padding-left:72px}
html[data-theme]:not(#legacy-theme) .control-center .site-header{height:76px;z-index:200;box-shadow:none}
html[data-theme]:not(#legacy-theme) .control-center main{max-width:1500px;padding:36px 32px 72px}
html[data-theme]:not(#legacy-theme) .control-center .section-title h1{font-size:34px;letter-spacing:-.035em}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-home-hero{padding:30px!important;margin-bottom:24px}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-home-hero h1{font-size:clamp(28px,3vw,42px)!important;letter-spacing:-.035em;color:var(--text)!important}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-home-badge{font-size:10px;letter-spacing:.16em;border-radius:6px}
html[data-theme]:not(#legacy-theme) .control-center .server-stats-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
html[data-theme]:not(#legacy-theme) .control-center .summary-card{padding:20px!important;min-width:0}
html[data-theme]:not(#legacy-theme) .control-center .summary-card strong{color:var(--text)!important;font-size:28px}
html[data-theme]:not(#legacy-theme) .control-center .friendly-guild-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
html[data-theme]:not(#legacy-theme) .control-center .guild-card:hover,html[data-theme]:not(#legacy-theme) .control-center .feature-card:hover{border-color:var(--accent)!important;transform:translateY(-2px)}
html[data-theme]:not(#legacy-theme) .control-center .feature-grid,html[data-theme]:not(#legacy-theme) .control-center .command-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px}
html[data-theme]:not(#legacy-theme) .control-center .feature-card{padding:20px}
html[data-theme]:not(#legacy-theme) .control-center .panel{padding:24px;scroll-margin-top:96px}
html[data-theme]:not(#legacy-theme) .management-label{display:block;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.16em;padding:10px 12px 16px}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump{position:fixed;left:72px;top:76px;bottom:0;width:224px;display:flex;flex-direction:column;flex-wrap:nowrap;gap:6px;padding:22px 12px;margin:0;background:var(--panel)!important;border:0;border-right:1px solid var(--line);border-radius:0;overflow-y:auto;z-index:100}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump a{background:transparent!important;color:var(--muted)!important;padding:12px 14px;font-size:13px;border:1px solid transparent;font-weight:600;border-radius:9px}
html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump a:hover,html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump a[aria-current="location"]{background:var(--accent-soft)!important;color:var(--accent)!important;border-color:var(--line)}
html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) main{margin-left:224px;max-width:1400px}
html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) footer{margin-left:224px}
@media(max-width:1200px){html[data-theme]:not(#legacy-theme) .control-center .feature-grid,html[data-theme]:not(#legacy-theme) .control-center .command-grid{grid-template-columns:1fr!important}html[data-theme]:not(#legacy-theme) .control-center main{padding:28px 22px}html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump{width:190px}html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) main,html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) footer{margin-left:190px}}
@media(max-width:800px){html[data-theme]:not(#legacy-theme) .control-rail{width:58px;padding:16px 7px}html[data-theme]:not(#legacy-theme) .control-rail a{width:40px;height:40px}html[data-theme]:not(#legacy-theme) .control-center{padding-left:58px}html[data-theme]:not(#legacy-theme) .control-center main{padding:24px 16px}html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump{position:static;width:auto;flex-direction:row;overflow-x:auto;gap:6px;border:1px solid var(--line);border-radius:12px;padding:8px;margin-bottom:20px}html[data-theme]:not(#legacy-theme) .control-center .dashboard-jump a{white-space:nowrap;padding:9px 12px}html[data-theme]:not(#legacy-theme) .management-label{display:none}html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) main,html[data-theme]:not(#legacy-theme) .control-center:has(.dashboard-jump) footer{margin-left:0}html[data-theme]:not(#legacy-theme) .control-center .server-stats-summary{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-theme]:not(#legacy-theme) .control-center .panel{padding:18px}html[data-theme]:not(#legacy-theme) .control-center .dashboard-home-hero{padding:22px!important}}
@media(prefers-reduced-motion:reduce){html[data-theme]:not(#legacy-theme) .control-center *{scroll-behavior:auto!important;transition:none!important}}

/* Override the previous feature cards full-height rule to prevent mobile grid overlap. */
html[data-theme]:not(#legacy-theme) .control-center #features .feature-card{height:auto!important;min-width:0}

/* Stream configuration follows the same palette as the surrounding workspace. */
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-form-footer{margin-top:20px;padding-top:16px;gap:16px;flex-wrap:wrap;border-top:1px solid var(--line)}
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-config-form,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-embed-editor,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-card,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-list-row{background:var(--panel2)!important;background-image:none!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-unified-block,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-embed-section{border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-card{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important;border-left-color:var(--embed-color,var(--accent))!important;box-shadow:var(--shadow)!important}
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-field{background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important}
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-body>strong,
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-field strong,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-list-title>a,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-list-meta strong,
html[data-theme]:not(#legacy-theme) #stream-alerts .stream-plan-summary strong{color:var(--text)!important}
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-body>p,
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-body>small,
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-preview-field span,
html[data-theme]:not(#legacy-theme) #stream-alerts .embed-editor-controls>small{color:var(--muted)!important}
.status-monitor-grid { display: grid; grid-template-columns: repeat(var(--check-count), minmax(0,1fr)); gap: 4px; margin-top: 10px; }
.status-compact-monitor .status-section-heading { margin-bottom: 14px; }
.status-monitor-row + .status-monitor-row { margin-top: 18px; }
.status-check-bar { display: block; width: 100%; min-width: 0; height: 28px; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.status-check-bar.good { background: #26a978; }
.status-check-bar.warning { background: #dcaa37; }
.status-check-bar.bad { background: #df6262; }
.status-check-bar.unknown { background: #8290a3; opacity: .35; }
.status-check-bar:hover, .status-check-bar:focus-visible, .status-check-bar[aria-pressed="true"] { outline: 2px solid currentColor; outline-offset: 2px; opacity: 1; }
.status-monitor-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; opacity: .75; }
.status-check-detail { display: block; margin-top: 6px; font-size: 12px; min-height: 18px; overflow-wrap: anywhere; }
.status-monitor-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 11px; }
.status-monitor-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: #8290a3; }
.status-monitor-legend .good::before { background: #26a978; }
.status-monitor-legend .warning::before { background: #dcaa37; }
.status-monitor-legend .bad::before { background: #df6262; }
@media(max-width:600px) { .status-monitor-grid { gap: 3px; } .status-check-bar { height: 24px; border-radius: 3px; } .status-monitor-row .uptime-history-label { flex-wrap: wrap; gap: 4px; } }
.owner-support-controls .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.owner-support-controls .support-settings-form { display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); }
.owner-support-controls .support-settings-form label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 12px; }
.owner-support-controls .support-settings-form input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.owner-support-controls .support-settings-form button { width: auto; justify-self: start; grid-column: 1/-1; }
.faq-tabs { display: flex; gap: 10px; margin: 20px 0; }
.faq-tabs a[aria-current=page] { border-color: var(--accent); background: var(--accent-soft); }
.roadmap-list { display: grid; gap: 16px; margin: 20px 0; }
.roadmap-card p { white-space: pre-wrap; overflow-wrap: anywhere; }
.roadmap-form { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 16px; margin-top: 18px; }
.roadmap-form label { display: grid; gap: 8px; }
.roadmap-form input,.roadmap-form select,.roadmap-form textarea { width: 100%; min-width: 0; padding: 12px; }
.roadmap-form .roadmap-publish { display: flex; align-items: center; gap: 10px; }
.roadmap-form input[type=checkbox] { width: 18px; }
@media(max-width:700px) { .owner-support-controls .support-settings-form,.roadmap-form { grid-template-columns: 1fr; } }
.owner-notices .form-grid .notice-toggle { display: flex; align-items: center; gap: 12px; align-self: center; }
.owner-notices .form-grid .notice-toggle input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; }
.maintenance-banner.notice-red { background: #fff0f0; border-color: #d94242; color: #8d2020; }
.maintenance-banner.notice-green { background: #e9f8ef; border-color: #24965e; color: #155e3b; }
html[data-theme=dark] .maintenance-banner.notice-red { background: #38202a; color: #ffbcbc; }
html[data-theme=dark] .maintenance-banner.notice-green { background: #15352b; color: #abebc9; }
.spelling-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.spelling-tools > button { font-size: 12px; padding: 6px 10px; width: auto; }
.spelling-results { width: 100%; font-size: 12px; }
.spelling-word { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.spelling-word button { padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; }
/* Keep checkbox labels together across owner, module and support forms. */
html[data-theme] .control-center label:has(> input[type="checkbox"]) { display:flex!important; flex-direction:row!important; align-items:center!important; justify-content:flex-start!important; gap:10px!important; text-align:left!important; }
html[data-theme] .control-center label>input[type="checkbox"] { width:18px!important; min-width:18px!important; height:18px!important; margin:0!important; flex:0 0 18px!important; }
html[data-theme] .support-panel .panel-heading-row .actions { display:flex!important; flex-wrap:wrap!important; align-items:center!important; gap:10px!important; }
html[data-theme] .support-panel .panel-heading-row .actions .btn { margin:0!important; }
html[data-theme] .control-center .paid-access-form { display:grid!important; grid-template-columns:minmax(0,1.1fr) minmax(150px,.6fr) minmax(0,1fr) auto!important; align-items:start!important; gap:18px!important; padding:20px!important; background:var(--panel2)!important; border:1px solid var(--line)!important; border-radius:14px!important; }
html[data-theme] .control-center .paid-access-form label { display:grid!important; align-content:start!important; gap:8px!important; min-width:0!important; margin:0!important; }
html[data-theme] .control-center .paid-access-form label>input, html[data-theme] .control-center .paid-access-form label>select { margin:0!important; height:52px!important; }
html[data-theme] .control-center .paid-access-form>button { margin:28px 0 0!important; min-height:52px!important; align-self:start!important; }
html[data-theme] .control-center .paid-access-form .spelling-tools { margin:0!important; }
html[data-theme] .control-center .paid-access-form .spelling-results:empty { display:none; }
@media(max-width:1100px) { html[data-theme] .control-center .paid-access-form { grid-template-columns:repeat(2,minmax(0,1fr))!important; } html[data-theme] .control-center .paid-access-form>button { margin:28px 0 0!important; } }
@media(max-width:600px) { html[data-theme] .control-center .paid-access-form { grid-template-columns:1fr!important; gap:16px!important; } html[data-theme] .control-center .paid-access-form>button { margin:0!important; width:100%!important; } }
.spelling-tools:not(:has(.spelling-results:not(:empty))) { display:none!important; }
.schedule-time-fields { display:grid; grid-template-columns:minmax(160px,1fr) minmax(240px,1fr) minmax(180px,1fr); gap:16px; padding:18px; border:1px solid var(--line); border-radius:12px; min-width:0; }
.schedule-time-fields legend { padding:0 6px; font-weight:700; }
.schedule-clock { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.schedule-time-fields small { color:var(--muted); font-size:11px; }
@media(max-width:900px) { .schedule-time-fields { grid-template-columns:1fr; } }
.roadmap-form .support-wide { grid-column:1 / -1; }
html[data-theme] .announcement-form { padding:24px!important; grid-template-columns:minmax(0,1fr) minmax(180px,.4fr); align-items:start; }
.announcement-form .schedule-time-fields { grid-column:1 / -1; width:100%; box-sizing:border-box; margin:0; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr); background:var(--bg); }
.announcement-form label, .announcement-form .schedule-clock { min-width:0; }
.announcement-form label>input, .announcement-form label>select { box-sizing:border-box; min-width:0; max-width:100%; height:48px; margin:0; }
.announcement-form textarea { box-sizing:border-box; min-height:140px; }
.announcement-form>button { grid-column:1 / -1; justify-self:start; min-width:160px; }
@media(max-width:800px) { html[data-theme] .announcement-form { grid-template-columns:1fr; padding:18px!important; } .announcement-form .schedule-time-fields { grid-template-columns:1fr; } }
.announcement-embed-fields { display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:16px; }
.announcement-embed-fields[hidden] { display:none!important; }
.announcement-preview { min-width:0; }
.announcement-preview h2 { font-size:15px; margin:0 0 12px; }
.announcement-preview-message { padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--bg); overflow-wrap:anywhere; }
.announcement-preview-message.is-embed { border-left:4px solid #5865f2; }
.announcement-preview-message p { white-space:pre-wrap; margin:8px 0; }
.announcement-preview-message small { color:var(--muted); }
.application-question-editor { grid-column:1/-1; min-width:0; border:1px solid var(--line); border-radius:12px; padding:16px; }
.application-question-editor legend { padding:0 6px; font-weight:700; }
.application-question-editor p { font-size:12px; color:var(--muted); margin:0 0 12px; }
.application-question-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:12px; margin-bottom:12px; }
.application-question-row label { min-width:0; }
.application-question-row>button { margin-top:26px; }
.application-question-editor>[data-add-question] { width:auto; }
@media(max-width:600px) { .application-question-row { grid-template-columns:1fr; gap:6px; } .application-question-row>button { margin-top:0; justify-self:start; } }
.role-mapping-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(120px,.7fr) auto; gap:12px; align-items:start; margin-bottom:14px; }
.role-mapping-row>button { margin-top:27px; }
.role-panel-form label[hidden] { display:none!important; }
@media(max-width:600px) { .role-mapping-row { grid-template-columns:1fr; } .role-mapping-row>button { margin-top:0; justify-self:start; } }
html[data-theme]:not(#legacy-theme) .ticket-config-panel .ticket-behavior-form,
html[data-theme]:not(#legacy-theme) .ticket-config-panel .checks,
html[data-theme]:not(#legacy-theme) .owner-announcement-form { background:var(--panel2)!important; background-image:none!important; color:var(--text)!important; border:1px solid var(--line)!important; border-radius:14px!important; padding:20px!important; }
html[data-theme]:not(#legacy-theme) .ticket-config-panel .checks label,
html[data-theme]:not(#legacy-theme) .owner-announcement-form .checks label { background:var(--bg)!important; color:var(--text)!important; border:1px solid var(--line)!important; }
.owner-announcement-form [data-owner-embed][hidden] { display:none!important; }
.owner-announcement-form .owner-broadcast-checks { display:grid; gap:12px; }
.application-inbox-layout { display:grid; grid-template-columns:280px minmax(0,1fr); gap:18px; align-items:start; }
.application-inbox-layout>.panel { min-width:0; padding:20px; }
.application-case { display:grid; gap:6px; padding:14px; border-bottom:1px solid var(--line); color:var(--text); }
.application-case.selected { border-radius:10px; background:var(--accent-soft); }
.application-case small { color:var(--muted); }
.application-answer { border-bottom:1px solid var(--line); padding:16px 0; }
.application-answer h3 { font-size:15px; }
.application-answer p { white-space:pre-wrap; overflow-wrap:anywhere; }
.applications-inbox .actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
@media(max-width:800px) { .application-inbox-layout { grid-template-columns:1fr; } }
html[data-theme] .owner-announcement-form .announcement-embed-fields { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:18px!important; }
html[data-theme] .owner-announcement-form .announcement-embed-fields>.support-wide { grid-column:auto!important; }
html[data-theme] .owner-announcement-form .announcement-embed-fields label { min-width:0; }
html[data-theme] .owner-announcement-form .announcement-embed-fields input { width:100%!important; box-sizing:border-box; height:48px!important; margin:0!important; }
html[data-theme] .owner-dashboard-hero .owner-access-badge { margin-inline-end:14px!important; vertical-align:middle; }
html[data-theme] .owner-dashboard-hero .owner-access-badge+.eyebrow { vertical-align:middle; }
html[data-theme] .feature-label-row { column-gap:12px!important; row-gap:8px!important; }
html[data-theme] .owner-section>.eyebrow+h2, html[data-theme] .owner-section-heading .eyebrow+h2 { margin-top:12px!important; margin-bottom:12px!important; }
html[data-theme] .panel-heading-row h1, html[data-theme] .panel-heading-row h2 { margin-top:10px; }
@media(max-width:650px) { html[data-theme] .owner-announcement-form .announcement-embed-fields { grid-template-columns:1fr!important; } }

/* Plan-locked modules are labels, never navigation links or editable forms. */
.management-module-locked{display:flex;align-items:center;gap:10px;padding:10px 14px;color:var(--muted,#9298a7);cursor:not-allowed;opacity:.7;line-height:1.4}
.subscription-module-locked{cursor:not-allowed;opacity:.72;border-style:dashed!important;box-shadow:none!important;transform:none!important}
.subscription-module-locked .feature-icon{filter:grayscale(.3)}
.overview-module.subscription-module-locked{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.overview-module.subscription-module-locked small,.subscription-upgrade-message{font-size:12px;line-height:1.5;color:var(--muted,#b3b9c8)}

.community-toolbox>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none}.community-toolbox>summary>span:first-child{display:grid;gap:7px}.community-toolbox>summary strong{font-size:22px}.community-toolbox>summary small{color:var(--muted)}.community-toolbox>summary:after{content:'−';font-size:24px}.community-toolbox:not([open])>summary:after{content:'+'}.community-toolbox-groups{display:grid;gap:18px;margin:22px 0}.toolbox-category{border:1px solid var(--line,#343b49);border-radius:10px;padding:14px}.toolbox-category>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;padding:4px}.toolbox-category>summary span,.toolbox-count{font-size:12px;color:var(--muted)}.toolbox-category .overview-module-grid{margin-top:16px}.level-reward-row{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;margin:8px 0}.level-reward-editor{border:1px solid var(--line,#343b49);border-radius:10px;padding:14px}.module-management-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:20px}.module-management-group>summary{cursor:pointer;font-weight:700;margin-bottom:16px}.module-management-group .form-grid{margin-top:16px}@media(max-width:600px){.level-reward-row{grid-template-columns:1fr}.community-toolbox>summary strong{font-size:18px}}
.toolbox-category>summary{list-style:none;align-items:center;min-height:36px}.toolbox-category>summary::-webkit-details-marker{display:none}.toolbox-category>summary>span{margin-left:auto}.toolbox-category>summary:after{content:'＋';display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:var(--bg);font-size:20px}.toolbox-category[open]>summary:after{content:'−'}.toolbox-category>summary:focus-visible{outline:2px solid var(--accent,#5865f2);outline-offset:5px;border-radius:6px}
.role-selector{position:relative;min-width:0;width:100%}.role-selector-trigger{width:100%;display:flex;justify-content:space-between;text-align:left;background:var(--bg)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:10px;padding:12px 14px;cursor:pointer}.role-selector-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.role-selector-chip{width:auto!important;border:1px solid var(--line);border-radius:18px;padding:5px 10px;background:var(--accent-soft,var(--panel2));color:var(--text);font-size:12px;cursor:pointer}.role-selector-menu{position:absolute;top:100%;left:0;right:0;z-index:60;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel,#152033);box-shadow:0 12px 28px #0004}.role-selector-menu[hidden],.role-selector-option[hidden]{display:none!important}.role-selector-menu>input{width:100%;box-sizing:border-box;margin:0 0 8px!important}.role-selector-options{max-height:220px;overflow:auto;display:grid;gap:4px}.role-selector-options .role-selector-option{display:flex!important;align-items:center;gap:10px;padding:9px 10px;margin:0!important;border-radius:7px;cursor:pointer;background:transparent!important}.role-selector-option:hover{background:var(--accent-soft)!important}.role-selector-option input{width:16px!important;height:16px!important;margin:0!important;accent-color:#5865f2}.role-selector-clear{margin-top:8px;width:auto!important;background:transparent;color:var(--muted);border:0;cursor:pointer}
select[data-role-selector][hidden]{display:none!important}.role-selector button:focus-visible,.role-selector input:focus-visible{outline:2px solid var(--accent,#5865f2);outline-offset:2px}
.role-selector-options .role-selector-option[hidden]{display:none!important}
.role-selector-options .role-selector-option{flex-direction:row!important;justify-content:flex-start!important;text-align:left!important}.role-selector-option span{flex:1;min-width:0;overflow-wrap:anywhere}.role-selector-menu{position:static;margin-top:8px;box-sizing:border-box}
