:root {
    color-scheme: dark;
    --bg: #070b14;
    --sidebar: #07090f;
    --panel: #0c1322;
    --panel-2: #111a2c;
    --panel-3: #172238;
    --line: rgba(168, 181, 224, .12);
    --line-strong: rgba(168, 181, 224, .23);
    --text: #f5f7ff;
    --muted: #9aa4bf;
    --muted-2: #68738f;
    --accent: #8b5cf6;
    --accent-2: #527dff;
    --blue: #178cff;
    --green: #4fd1a1;
    --amber: #f6b86a;
    --red: #ff7188;
    --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 78% -12%, rgba(124, 140, 255, .12), transparent 34rem),
        radial-gradient(circle at 18% 105%, rgba(167, 139, 250, .07), transparent 38rem),
        var(--bg);
    font: 500 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image: linear-gradient(rgba(150, 165, 215, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 165, 215, .025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
input::placeholder { color: #59637d; }
::selection { color: #fff; background: rgba(124, 140, 255, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* Shell */
.app-shell { min-height: 100vh; padding-left: 260px; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 260px;
    flex-direction: column;
    padding: 24px 18px 20px;
    border-right: 1px solid var(--line);
    background: rgba(10, 15, 29, .94);
    backdrop-filter: blur(24px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; }
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #8fa0ff, #665ee8);
    box-shadow: 0 12px 28px rgba(86, 92, 210, .28), inset 0 1px rgba(255, 255, 255, .35);
    font-size: 18px;
    font-weight: 900;
}
.brand strong { display: block; font-size: 17px; font-weight: 830; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 1px; color: #737e9b; font-size: 8px; font-weight: 850; letter-spacing: .17em; }
.workspace-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}
.workspace-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #dce1ff; background: rgba(124, 140, 255, .17); font-size: 11px; font-weight: 850; }
.workspace-card span:nth-child(2) { display: grid; min-width: 0; }
.workspace-card small { color: #626d88; font-size: 7px; font-weight: 850; letter-spacing: .11em; }
.workspace-card strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card i { color: #5f6983; font-style: normal; }
.nav-label { margin: 0 11px 9px; color: #59647f; font-size: 8px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.secondary-label { margin-top: 26px; }
.main-nav { display: grid; gap: 5px; }
.nav-item {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 11px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 0 11px;
    color: #8b95af;
    background: transparent;
    text-align: left;
    transition: .18s ease;
}
.nav-item:hover { color: #eef1ff; background: rgba(124, 140, 255, .07); }
.nav-item.active { border-color: rgba(124, 140, 255, .17); color: #fff; background: linear-gradient(90deg, rgba(124, 140, 255, .17), rgba(124, 140, 255, .045)); }
.nav-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #707b98; background: rgba(255, 255, 255, .025); font-size: 15px; }
.nav-item.active .nav-icon { color: #cdd4ff; background: rgba(124, 140, 255, .16); }
.nav-item > span:last-child { display: grid; }
.nav-item strong { font-size: 11px; font-weight: 750; }
.nav-item small { color: #59637c; font-size: 8px; }
.sidebar-create {
    display: flex;
    min-height: 53px;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px dashed rgba(124, 140, 255, .3);
    border-radius: 11px;
    padding: 0 12px;
    color: #cfd5ff;
    background: rgba(124, 140, 255, .055);
    text-align: left;
}
.sidebar-create:hover { border-style: solid; background: rgba(124, 140, 255, .1); }
.sidebar-create > span:first-child { font-size: 20px; }
.sidebar-create > span:last-child { display: grid; }
.sidebar-create strong { font-size: 10px; }
.sidebar-create small { color: #697590; font-size: 8px; }
.sidebar-foot { margin-top: auto; padding: 17px 9px 0; border-top: 1px solid var(--line); }
.system-state, .hero-status { display: flex; align-items: center; gap: 10px; }
.system-state > span:last-child, .hero-status > span:last-child { display: grid; min-width: 0; }
.system-state strong { font-size: 10px; }
.system-state small { color: var(--muted-2); font-size: 8px; }
.pulse { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(79, 209, 161, .09), 0 0 15px rgba(79, 209, 161, .45); }
.system-state.error .pulse, .hero-status.error .pulse { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 113, 136, .09), 0 0 15px rgba(255, 113, 136, .4); }
.sidebar-backdrop { display: none; }

.main { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 13, 24, .78);
    backdrop-filter: blur(22px) saturate(130%);
}
.topbar-title { display: grid; }
.topbar-title small { color: #626d88; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.topbar-title strong { font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.last-update { color: #68738d; font-size: 9px; }
.top-divider { width: 1px; height: 24px; margin: 0 3px; background: var(--line); }
.icon-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #9da8c4;
    background: rgba(19, 27, 46, .8);
    font-size: 16px;
    transition: .16s ease;
}
.icon-button:hover { border-color: rgba(124, 140, 255, .35); color: #fff; transform: translateY(-1px); }
.icon-button.loading { animation: spin .8s linear infinite; pointer-events: none; }
.menu-button { display: none; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(124, 140, 255, .25); border-radius: 50%; color: #eef0ff; background: linear-gradient(145deg, #2a3557, #171e32); font-size: 11px; font-weight: 850; }
.large-avatar { width: 40px; height: 40px; margin: 0; }
.account-control { position: relative; }
.account-control > .avatar:hover, .account-control > .avatar[aria-expanded=true] { border-color: rgba(124, 140, 255, .6); box-shadow: 0 0 0 4px rgba(124, 140, 255, .09); }
.account-menu { position: absolute; top: 47px; right: 0; z-index: 45; width: 270px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: #12192b; box-shadow: var(--shadow); }
.account-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 6px; padding: 10px 9px 14px; border-bottom: 1px solid var(--line); }
.account-summary strong, .account-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary strong { font-size: 11px; }
.account-summary small { margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.account-menu > button { display: flex; width: 100%; min-height: 39px; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 0 10px; color: #aab3ca; background: transparent; font-size: 10px; text-align: left; }
.account-menu > button:hover { color: #fff; background: rgba(124, 140, 255, .08); }
.account-menu > button span { width: 17px; color: #737e9c; }
.account-menu .logout-item, .account-menu .logout-item span { color: #ff8ea0; }

/* Dashboard */
.page { width: min(100%, 1540px); margin: 0 auto; padding: 44px 38px 70px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 6px 2px 28px; }
.eyebrow { margin: 0 0 7px; color: #7d89aa; font-size: 8px; font-weight: 900; letter-spacing: .17em; }
.page-heading h1 { margin: 0; font-size: clamp(28px, 3.2vw, 43px); line-height: 1.08; letter-spacing: -.045em; }
.page-heading h1 span { color: #aeb8ff; }
.page-heading .hero-copy > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.hero-actions { display: flex; align-items: center; gap: 12px; }
.hero-status { min-width: 218px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(16, 23, 39, .76); }
.hero-status small { color: #66718e; font-size: 7px; font-weight: 900; letter-spacing: .11em; }
.hero-status strong { overflow: hidden; margin-top: 1px; color: #dfe3f4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 42px; border-radius: 10px; padding: 0 17px; font-size: 10px; font-weight: 800; transition: .16s ease; }
.primary-button { border: 1px solid #9aa7ff; color: #fff; background: linear-gradient(145deg, #8595ff, #695fe5); box-shadow: 0 12px 28px rgba(86, 91, 208, .22); }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button span { margin-right: 4px; font-size: 16px; }
.secondary-button { border: 1px solid rgba(124, 140, 255, .35); color: #dce1ff; background: rgba(124, 140, 255, .13); }
.secondary-button:hover { border-color: rgba(124, 140, 255, .62); }
.ghost-button { border: 1px solid var(--line-strong); color: #b5bed4; background: #161e31; }
.ghost-button:hover { color: #fff; border-color: rgba(168, 181, 224, .38); }
.danger-button { border: 1px solid rgba(255, 113, 136, .32); color: #ff9bab; background: rgba(145, 42, 60, .16); }
.danger-button:hover { border-color: rgba(255, 113, 136, .58); }
.wide { width: 100%; margin-top: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 116px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 15px; color: inherit; background: linear-gradient(145deg, rgba(18, 26, 44, .96), rgba(13, 19, 34, .96)); text-align: left; transition: .18s ease; }
.stat-card::after { content: ""; position: absolute; right: -25px; bottom: -30px; width: 86px; height: 86px; border-radius: 50%; background: rgba(124, 140, 255, .045); }
.stat-card:hover { border-color: rgba(124, 140, 255, .3); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0, 0, 0, .15); }
.stat-card.active { border-color: rgba(124, 140, 255, .55); box-shadow: inset 0 0 0 1px rgba(124, 140, 255, .12); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(124, 140, 255, .16); border-radius: 9px; color: #aeb8ff; background: rgba(124, 140, 255, .1); font-size: 13px; }
.stat-trend { color: #5c6781; font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { display: block; margin-top: 11px; font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.stat-label { display: block; margin-top: 5px; color: #7d88a5; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.stat-card.blue .stat-icon { color: var(--blue); background: rgba(99, 179, 255, .1); }
.stat-card.violet .stat-icon { color: #ba9eff; background: rgba(167, 139, 250, .1); }
.stat-card.amber .stat-icon { color: var(--amber); background: rgba(246, 184, 106, .1); }
.stat-card.red .stat-icon { color: var(--red); background: rgba(255, 113, 136, .1); }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.bots-section, .operations-panel { border: 1px solid var(--line); border-radius: 16px; background: rgba(15, 22, 38, .86); box-shadow: 0 20px 48px rgba(0, 0, 0, .14); }
.bots-section { min-width: 0; padding: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.section-heading > div:first-child > span { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }
.layout-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #0c1220; }
.layout-switch button { display: grid; width: 30px; height: 27px; place-items: center; border: 0; border-radius: 6px; color: #626d89; background: transparent; }
.layout-switch button.active { color: #fff; background: rgba(124, 140, 255, .18); }
.list-tools { display: grid; grid-template-columns: minmax(220px, 1fr) 160px 165px; gap: 8px; margin-top: 17px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #0c1220; }
.search { display: flex; min-width: 0; align-items: center; gap: 8px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #11192a; }
.search > span { color: #66718e; font-size: 17px; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 9px; }
.search kbd { border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; color: #69748f; background: #171f33; font: 7px inherit; }
.list-tools select { height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 28px 0 10px; color: #aeb7cd; background: #11192a; font-size: 9px; outline: 0; }
.bot-surface { margin-top: 13px; }
.bot-collection { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.bot-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; padding: 15px; background: linear-gradient(145deg, #141c2e, #101727); transition: .18s ease; }
.bot-card:hover { border-color: rgba(124, 140, 255, .3); transform: translateY(-2px); box-shadow: 0 17px 38px rgba(0, 0, 0, .18); }
.bot-card.error { border-color: rgba(255, 113, 136, .22); }
.bot-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bot-cell { display: flex; min-width: 0; align-items: center; gap: 10px; }
.bot-avatar { position: relative; display: grid; width: 38px; height: 38px; flex: none; place-items: center; overflow: visible; border: 1px solid rgba(124, 140, 255, .22); border-radius: 11px; color: #dce1ff; background: linear-gradient(145deg, #293454, #192139); font-size: 12px; font-weight: 850; }
.bot-avatar img { position: absolute; inset: 0; display: none; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.bot-avatar.has-image img { display: block; }
.bot-avatar i { position: absolute; right: -2px; bottom: -2px; z-index: 2; width: 9px; height: 9px; border: 2px solid #141c2e; border-radius: 50%; background: #59647e; }
.bot-avatar i.online { background: var(--green); }
.bot-name { display: grid; min-width: 0; }
.bot-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bot-name span { overflow: hidden; color: #69748f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; width: max-content; border: 1px solid var(--line); border-radius: 99px; padding: 4px 7px; color: #8d97b1; background: rgba(255, 255, 255, .025); font-size: 7px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #65708b; }
.status-pill.online { border-color: rgba(79, 209, 161, .22); color: #77ddb9; background: rgba(79, 209, 161, .07); }
.status-pill.online::before { background: var(--green); }
.status-pill.starting { border-color: rgba(99, 179, 255, .25); color: #85c5ff; background: rgba(99, 179, 255, .07); }
.status-pill.starting::before { background: var(--blue); animation: pulse-dot 1.3s infinite; }
.status-pill.error { border-color: rgba(255, 113, 136, .25); color: #ff96a7; background: rgba(255, 113, 136, .07); }
.status-pill.error::before { background: var(--red); }
.room-cell { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #0d1423; }
.room-cell:hover { border-color: rgba(124, 140, 255, .3); }
.room-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 7px; color: #aeb8ff; background: rgba(124, 140, 255, .12); font-size: 10px; font-weight: 850; }
.room-cell > span:nth-child(2) { display: grid; min-width: 0; }
.room-cell small { color: #5f6a84; font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.room-cell strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.room-cell > i { color: #66718d; font-style: normal; font-size: 10px; }
.bot-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.bot-metrics > span { display: grid; padding: 9px 10px; border-radius: 8px; background: rgba(255, 255, 255, .025); }
.bot-metrics small { color: #5f6a85; font-size: 6px; font-weight: 900; letter-spacing: .09em; }
.bot-metrics strong { margin-top: 1px; font-size: 9px; }
.bot-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.configure-button { min-height: 31px; border: 0; border-radius: 7px; padding: 0 10px; color: #cbd1e7; background: rgba(124, 140, 255, .09); font-size: 8px; font-weight: 750; }
.configure-button:hover { color: #fff; background: rgba(124, 140, 255, .16); }
.row-actions { display: flex; gap: 5px; }
.row-actions button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: #8792ad; background: #11192a; font-size: 10px; }
.row-actions button:hover { border-color: rgba(124, 140, 255, .35); color: #fff; }
.row-actions .power.off { color: var(--green); }
.row-actions .power.on { color: var(--amber); }
.row-actions .delete { color: #ff8497; }
.bot-collection[data-layout="list"] { grid-template-columns: 1fr; }
.bot-collection[data-layout="list"] .bot-card { display: grid; grid-template-columns: minmax(180px, 1.25fr) minmax(150px, 1fr) minmax(170px, .8fr) auto; align-items: center; gap: 13px; padding: 12px 14px; }
.bot-collection[data-layout="list"] .room-cell, .bot-collection[data-layout="list"] .bot-metrics, .bot-collection[data-layout="list"] .bot-card-foot { margin: 0; }
.bot-collection[data-layout="list"] .bot-card-foot { padding: 0; border: 0; }
.bot-collection[data-layout="list"] .configure-button { font-size: 0; }
.bot-collection[data-layout="list"] .configure-button span { font-size: 11px; }
.empty-state { padding: 64px 20px; text-align: center; }
.empty-mark { display: grid; width: 52px; height: 52px; margin: 0 auto 15px; place-items: center; border: 1px solid rgba(124, 140, 255, .2); border-radius: 15px; color: #aeb8ff; background: rgba(124, 140, 255, .08); font-size: 22px; }
.empty-state h3 { margin: 0; font-size: 15px; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); font-size: 9px; }

.operations-panel { position: sticky; top: 86px; padding: 20px; }
.operations-head { display: flex; align-items: center; justify-content: space-between; color: #707b99; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.operations-head .pulse { width: 6px; height: 6px; }
.operation-score { margin-top: 20px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.operation-score > strong { display: block; font-size: 35px; line-height: 1; letter-spacing: -.05em; }
.operation-score > span { color: var(--muted); font-size: 8px; }
.operation-score > div { height: 5px; overflow: hidden; margin-top: 13px; border-radius: 99px; background: #202940; }
.operation-score > div i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6fa4ff, #9e83fa); transition: width .35s ease; }
.operation-list { margin: 0; padding: 7px 0 18px; border-bottom: 1px solid var(--line); }
.operation-list div { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; }
.operation-list dt { color: #8792ad; font-size: 8px; }
.operation-list dd { margin: 0; font-size: 10px; font-weight: 800; }
.quick-actions { display: grid; gap: 6px; margin-top: 18px; }
.quick-actions > small { margin-bottom: 3px; color: #5e6985; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.quick-actions > button, .quick-actions > a { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; min-height: 45px; border: 1px solid transparent; border-radius: 9px; padding: 0 9px; color: #9da7bf; background: rgba(255, 255, 255, .022); text-align: left; }
.quick-actions > button:hover, .quick-actions > a:hover { border-color: var(--line); color: #fff; background: rgba(124, 140, 255, .06); }
.quick-actions > button > span:first-child, .quick-actions > a > span:first-child { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: #aeb8ff; background: rgba(124, 140, 255, .1); }
.quick-actions > button > span:last-child, .quick-actions > a > span:last-child { display: grid; }
.quick-actions strong { font-size: 8px; }
.quick-actions small { color: #5e6983; font-size: 7px; }

/* Shared forms */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 7, 14, .8); backdrop-filter: blur(10px); }
.modal { display: grid; width: min(1180px, 100%); max-height: calc(100vh - 32px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 18px; background: #0f1626; box-shadow: var(--shadow); }
.bot-workspace { width: min(1460px, 100%); height: calc(100vh - 32px); grid-template-columns: 245px minmax(0, 1fr); grid-template-rows: 76px minmax(0, 1fr); }
.modal-head { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.bot-workspace > .modal-head { grid-column: 1 / -1; }
.modal-head h2 { margin: 1px 0 0; font-size: 19px; letter-spacing: -.03em; }
.modal-head p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.editor-title { display: flex; align-items: center; gap: 12px; }
.editor-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #8292ff, #695fe5); font-size: 13px; font-weight: 900; }
.editor-head-actions { display: flex; align-items: center; gap: 12px; }
.save-state { display: inline-flex; align-items: center; gap: 6px; color: #75809a; font-size: 8px; }
.save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.save-state.dirty { color: #c49a64; }
.save-state.dirty::before { background: var(--amber); }
.modal-tabs { grid-column: 1; grid-row: 2; overflow: auto; padding: 18px 13px; border-right: 1px solid var(--line); background: #0b1120; }
.modal-tabs > p { margin: 16px 10px 7px; color: #505b76; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.modal-tabs > p:first-child { margin-top: 0; }
.modal-tabs button { display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: center; gap: 9px; width: 100%; min-height: 48px; border: 1px solid transparent; border-radius: 9px; padding: 0 9px; color: #7e89a5; background: transparent; text-align: left; }
.modal-tabs button:hover { color: #dfe3f2; background: rgba(124, 140, 255, .055); }
.modal-tabs button.active { border-color: rgba(124, 140, 255, .18); color: #fff; background: linear-gradient(90deg, rgba(124, 140, 255, .17), rgba(124, 140, 255, .045)); }
.modal-tabs button > i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: #66718d; background: rgba(255, 255, 255, .03); font-size: 7px; font-style: normal; font-weight: 850; }
.modal-tabs button.active > i { color: #cbd2ff; background: rgba(124, 140, 255, .16); }
.modal-tabs button > span { display: grid; }
.modal-tabs button strong { font-size: 9px; }
.modal-tabs button small { color: #59647f; font-size: 7px; }
#botForm { grid-column: 2; grid-row: 2; min-width: 0; overflow: auto; }
.tab-panel { display: none; width: min(100%, 1050px); margin: 0 auto; padding: 34px 34px 14px; animation: reveal .18s ease-out; }
.tab-panel.active { display: block; }
.form-intro { margin-bottom: 15px; }
.form-intro h3, .activity-toolbar h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.form-intro p, .activity-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.form-card { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 18px; background: #131b2d; }
.form-card > h4 { margin: 0 0 13px; font-size: 10px; }
.form-card-title { margin-bottom: 13px; }
.form-card-title h4 { margin: 0; font-size: 10px; }
.form-card-title p { margin: 3px 0 0; color: var(--muted-2); font-size: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label, .account-form-body label, .admin-maintenance-message, .login-card label { display: grid; gap: 6px; color: #aab3ca; font-size: 8px; font-weight: 750; }
.form-grid label > span, .account-form-body label > span { color: var(--red); }
.form-grid small { color: #626d88; font-size: 7px; font-weight: 500; }
input, select { min-width: 0; height: 39px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; color: #eef1fb; background: #0d1423; outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus { border-color: rgba(124, 140, 255, .58); box-shadow: 0 0 0 3px rgba(124, 140, 255, .08); }
input[type="color"] { width: 43px; padding: 4px; }
.switch-row, .toggle-card, .moderation-general, .game-toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; background: #121a2c; }
.switch-row > span, .toggle-card > span, .game-toggle > span:first-child { display: grid; }
.switch-row strong, .toggle-card strong, .game-toggle strong { font-size: 9px; }
.switch-row small, .toggle-card small, .game-toggle small { color: #626d88; font-size: 7px; }
.switch, .panel-switch { position: relative; display: inline-flex; flex: none; }
.switch input, .panel-switch input { position: absolute; opacity: 0; }
.switch i, .panel-switch i { position: relative; width: 37px; height: 21px; border: 1px solid #34405c; border-radius: 99px; background: #202a40; transition: .16s ease; }
.switch i::after, .panel-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #7b859e; transition: .16s ease; }
.switch input:checked + i, .panel-switch input:checked + i { border-color: rgba(124, 140, 255, .65); background: #6877e6; }
.switch input:checked + i::after, .panel-switch input:checked + i::after { left: 19px; background: #fff; }
.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.form-error { min-height: 15px; margin: 5px 34px; color: #ff8fa1; font-size: 8px; }
.modal-foot { position: sticky; bottom: 0; z-index: 3; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 15px; padding: 13px 34px; border-top: 1px solid var(--line); background: rgba(15, 22, 38, .94); backdrop-filter: blur(15px); }
.footer-hint { align-self: center; color: #68738e; font-size: 8px; }

/* Appearance, games, moderation, activity */
.appearance-preview { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin-bottom: 12px; border: 1px solid rgba(124, 140, 255, .18); border-radius: 13px; padding: 16px; background: radial-gradient(circle at 80% 0, rgba(124, 140, 255, .12), transparent 20rem), #131b2d; }
.appearance-preview > i { color: #66718d; font-size: 8px; font-style: normal; }
.avatar-preview { position: relative; display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #8797ff, #695fe5); font-weight: 850; }
.avatar-preview img { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; }
.avatar-preview.has-image img { display: block; }
.appearance-preview > div { display: grid; }
.appearance-preview > div strong { font-size: 11px; }
.appearance-preview > div span { color: var(--muted); font-size: 8px; }
.appearance-preview > div small { color: var(--muted-2); font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.color-field { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.welcome-preview { margin-top: 12px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; padding: 12px 14px; background: rgba(124, 140, 255, .07); }
.welcome-preview small { color: #727e9b; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.welcome-preview p { margin: 4px 0 0; font-size: 9px; }
.game-heading, .moderation-heading { margin-bottom: 16px; }
.game-heading > span, .moderation-heading > span { color: #7f8aab; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.game-heading h3, .moderation-heading h3 { margin: 4px 0 0; font-size: 17px; }
.game-heading p, .moderation-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.game-master-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.game-master-grid > :only-child { grid-column: 1 / -1; }
.game-card, .moderation-card { margin-bottom: 11px; border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: #131b2d; }
.game-card-title { display: flex; align-items: center; gap: 11px; }
.game-card-title > div:not(.command-tools) { min-width: 0; flex: 1; }
.game-card-title h4 { margin: 0; font-size: 10px; }
.game-card-title p { margin: 2px 0 0; color: #66718c; font-size: 7px; }
.game-icon { display: grid; width: 31px; height: 31px; flex: none; place-items: center; border-radius: 9px; color: #b5beff; background: rgba(124, 140, 255, .12); font-style: normal; }
.game-icon.cyan { color: #75cff8; background: rgba(99, 179, 255, .1); }
.game-icon.orange { color: var(--amber); background: rgba(246, 184, 106, .1); }
.game-icon.rose { color: #ff98ac; background: rgba(255, 113, 136, .09); }
.game-options { display: grid; gap: 7px; margin-top: 13px; }
.game-toggle { padding: 10px 11px; background: #0f1727; }
.game-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.game-number-grid { margin-top: 13px; }
.command-tools { display: flex; gap: 5px; }
.command-tools button { height: 27px; border: 1px solid var(--line); border-radius: 7px; color: #929db7; background: #0e1525; font-size: 7px; }
.command-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.command-option { position: relative; }
.command-option input { position: absolute; opacity: 0; }
.command-option > span { display: grid; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px 8px 27px; background: #0e1525; }
.command-option > span i { position: absolute; top: 14px; left: 9px; width: 10px; height: 10px; border: 1px solid #46516e; border-radius: 3px; }
.command-option input:checked + span { border-color: rgba(124, 140, 255, .25); background: rgba(124, 140, 255, .07); }
.command-option input:checked + span i { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 2px #151d30; }
.command-option strong { font-size: 7px; }
.command-option small { color: #5f6a85; font-size: 6px; }
.moderation-top-grid, .moderation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.moderation-grid { margin-top: 10px; }
.moderation-general { display: block; }
.moderation-card.wide { grid-column: 1 / -1; }
.moderation-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.moderation-card-title > div { min-width: 0; flex: 1; }
.moderation-card-title h4 { margin: 0; font-size: 10px; }
.moderation-card-title p { margin: 2px 0 0; color: #66718c; font-size: 7px; }
.moderation-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #c0c7ff; background: rgba(124, 140, 255, .1); font-style: normal; }
.moderation-icon.cyan { color: #7fd2ff; background: rgba(99, 179, 255, .1); }
.moderation-icon.red, .moderation-icon.rose { color: #ff91a3; background: rgba(255, 113, 136, .09); }
.moderation-icon.purple, .moderation-icon.violet { color: #c4a8ff; background: rgba(167, 139, 250, .1); }
.moderation-fields, .moderation-general-grid { display: grid; gap: 9px; }
.moderation-fields label, .moderation-inline-fields label, .manual-moderation-grid label { display: grid; gap: 6px; color: #aab3ca; font-size: 8px; font-weight: 750; }
.moderation-fields label small { color: var(--muted-2); font-size: 7px; font-weight: 500; }
.moderation-option, .compact-toggle { display: flex !important; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: #0e1525; }
.moderation-option > span:first-child, .compact-toggle > span:first-child { display: grid; }
.moderation-option strong, .compact-toggle strong { font-size: 8px; }
.moderation-option small, .compact-toggle small { color: var(--muted-2); font-size: 7px; }
.moderation-inline-fields, .manual-moderation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.manual-moderation-grid { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
.manual-reason { grid-column: auto; }
.forbidden-word-add { display: flex; gap: 7px; margin-top: 10px; }
.forbidden-word-add input { flex: 1; }
.forbidden-words-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.forbidden-words-list > span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255, 113, 136, .18); border-radius: 99px; padding: 4px 7px; color: #e1a9b2; background: rgba(255, 113, 136, .06); font-size: 7px; }
.forbidden-words-list button { border: 0; color: #ff8da0; background: transparent; }
.forbidden-words-list p { color: var(--muted-2); font-size: 8px; }
.word-count { border: 1px solid var(--line); border-radius: 99px; padding: 4px 7px; color: var(--muted); font-size: 7px; }
.moderation-note { display: block; margin-top: 8px; color: var(--muted-2); font-size: 7px; }
.moderation-action-result { min-height: 14px; margin: 8px 0 0; color: var(--green); font-size: 8px; }
.moderation-action-result.error { color: var(--red); }
.activity-list { display: grid; gap: 7px; margin-top: 16px; }
.activity-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 11px; background: #131b2d; }
.activity-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #d7ddff; background: rgba(124, 140, 255, .12); font-size: 7px; font-weight: 850; }
.activity-item strong { font-size: 8px; }
.activity-item p { margin: 2px 0 0; color: #929cb5; font-size: 8px; }
.activity-item time { color: #5e6984; font-size: 7px; }
.activity-empty { padding: 55px 20px; color: var(--muted-2); text-align: center; font-size: 9px; }
.send-row { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #101727; }

/* Login */
.login-overlay { padding: 28px; background: radial-gradient(circle at 16% 20%, rgba(124, 140, 255, .18), transparent 32rem), #080c17; }
.auth-shell { display: grid; grid-template-columns: 1.08fr .92fr; width: min(1060px, 100%); min-height: 610px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: #0f1626; box-shadow: 0 35px 100px rgba(0, 0, 0, .42); }
.auth-showcase { position: relative; display: flex; overflow: hidden; flex-direction: column; padding: 38px 42px; background: radial-gradient(circle at 80% 15%, rgba(179, 162, 255, .25), transparent 20rem), linear-gradient(145deg, #202b52, #11172b 70%); }
.auth-showcase::after { content: ""; position: absolute; right: -130px; bottom: -130px; width: 430px; height: 430px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255, 255, 255, .025), 0 0 0 110px rgba(255, 255, 255, .018); }
.auth-brand { position: relative; z-index: 1; padding: 0; }
.auth-copy { position: relative; z-index: 1; max-width: 470px; margin: auto 0; }
.auth-kicker { color: #bac3ff; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.auth-copy h2 { margin: 13px 0; font-size: clamp(31px, 3.6vw, 48px); line-height: 1.04; letter-spacing: -.05em; }
.auth-copy p { max-width: 400px; margin: 0; color: #aeb7cf; font-size: 11px; }
.auth-proof { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.auth-proof div { display: grid; padding: 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: rgba(255, 255, 255, .04); backdrop-filter: blur(8px); }
.auth-proof strong { font-size: 13px; }
.auth-proof span { color: #8590ad; font-size: 7px; }
.login-card { display: flex; justify-content: center; flex-direction: column; padding: 45px 52px; background: #101727; }
.auth-form-head { margin-bottom: 22px; }
.auth-form-head h1 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.auth-form-head > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.mobile-auth-mark { display: none; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #0c1220; }
.auth-tabs.single { grid-template-columns: 1fr; }
.auth-tabs button { min-height: 34px; border: 0; border-radius: 7px; color: #7d88a3; background: transparent; font-size: 8px; font-weight: 800; }
.auth-tabs button.active { color: #fff; background: #1c2640; box-shadow: 0 5px 15px rgba(0, 0, 0, .16); }
.login-card label { margin-bottom: 12px; }
.login-card input { height: 43px; }
.login-card .form-error { margin: 3px 0; }
.auth-note { margin-top: 14px; color: #5e6983; font-size: 7px; text-align: center; }
.verification-notice { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 8px 0 3px; border: 1px solid rgba(99, 179, 255, .2); border-radius: 10px; padding: 11px; background: rgba(99, 179, 255, .07); }
.verification-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #dff2ff; background: rgba(99, 179, 255, .16); }
.verification-notice strong { font-size: 8px; }
.verification-notice p { margin: 2px 0; color: #8995af; font-size: 7px; }
.verification-notice button { border: 0; padding: 0; color: #8ecaff; background: transparent; font-size: 7px; }

/* Account */
.account-modal { display: grid; width: min(900px, 100%); grid-template-rows: auto minmax(0, 1fr); }
.account-modal > .modal-head { grid-column: 1; }
.account-modal form { display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; min-height: 0; overflow: hidden; }
.account-profile-panel { display: flex; align-items: center; flex-direction: column; padding: 32px 22px; border-right: 1px solid var(--line); background: #0b1120; text-align: center; }
.account-profile-avatar { display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid rgba(124, 140, 255, .3); border-radius: 20px; color: #fff; background: linear-gradient(145deg, #8393ff, #665de2); box-shadow: 0 18px 35px rgba(80, 84, 190, .24); font-size: 22px; font-weight: 900; }
.account-profile-panel > strong { margin-top: 13px; font-size: 12px; }
.account-profile-panel > small { color: var(--muted-2); font-size: 7px; }
.account-profile-panel > div { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 25px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: #78839e; background: rgba(255, 255, 255, .025); font-size: 7px; }
.account-profile-panel > div b { color: var(--green); font-size: 7px; }
.account-profile-panel > p { margin: 14px 0 0; color: #68738d; font-size: 7px; }
.account-form-body { overflow: auto; padding: 28px 28px 8px; }
.password-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 24px; border: 1px solid rgba(255, 113, 136, .18); border-radius: 12px; padding: 14px; background: rgba(139, 39, 57, .08); }
.danger-zone h3 { margin: 0; font-size: 10px; }
.danger-zone p { margin: 3px 0 0; color: #9d7b84; font-size: 7px; }
.delete-confirmation { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.account-foot { grid-column: 1 / -1; margin: 0; }

/* Admin */
.admin-modal { display: grid; width: min(1240px, 100%); grid-template-rows: auto minmax(0, 1fr); }
.admin-head-actions { display: flex; gap: 6px; }
.admin-body { min-height: 0; overflow: auto; padding: 20px 26px 30px; }
.admin-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #0b1120; }
.admin-tabs button { min-height: 34px; border: 0; border-radius: 7px; padding: 0 15px; color: #78839f; background: transparent; font-size: 8px; font-weight: 800; }
.admin-tabs button.active { color: #fff; background: rgba(124, 140, 255, .16); }
.admin-view { display: none; animation: reveal .16s ease-out; }
.admin-view.active { display: block; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.admin-stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #141c2e; }
.admin-stat strong { display: block; margin-top: 4px; font-size: 21px; }
.admin-stat span { color: var(--muted-2); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.admin-system-card { margin-top: 13px; border: 1px solid var(--line); border-radius: 13px; padding: 17px; background: #131b2d; }
.admin-system-title, .admin-system-foot, .admin-system-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.admin-system-title h3, .admin-section-heading h3 { margin: 0; font-size: 12px; }
.admin-system-title p, .admin-section-heading p { margin: 3px 0 0; color: var(--muted-2); font-size: 8px; }
.admin-system-title > span { color: #aeb8ff; font-size: 7px; font-weight: 850; letter-spacing: .12em; }
.admin-system-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.admin-system-option { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #0e1525; }
.admin-system-option > span:first-child { display: grid; }
.admin-system-option strong { font-size: 8px; }
.admin-system-option small { color: var(--muted-2); font-size: 7px; }
.admin-maintenance-message { margin-top: 12px; }
.admin-system-foot { margin-top: 12px; }
.admin-system-foot span { color: var(--muted-2); font-size: 8px; }
.admin-section-heading { margin: 4px 0 11px; }
.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th { height: 39px; padding: 0 12px; color: #5f6a85; background: #0d1423; font-size: 7px; font-weight: 900; letter-spacing: .08em; text-align: left; }
td { padding: 11px 12px; border-top: 1px solid var(--line); color: #9fa9c1; font-size: 8px; }
.admin-table { min-width: 760px; }
.admin-badges, .admin-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-badge { border: 1px solid var(--line); border-radius: 99px; padding: 4px 7px; color: #8d97b1; font-size: 7px; font-style: normal; }
.admin-badge.good { border-color: rgba(79, 209, 161, .23); color: var(--green); background: rgba(79, 209, 161, .07); }
.admin-badge.warn { border-color: rgba(246, 184, 106, .24); color: var(--amber); background: rgba(246, 184, 106, .07); }
.admin-badge.bad { border-color: rgba(255, 113, 136, .24); color: var(--red); background: rgba(255, 113, 136, .07); }
.admin-actions button { height: 28px; border: 1px solid var(--line); border-radius: 7px; color: #919bb4; background: #11192a; font-size: 7px; }
.admin-actions button:hover { border-color: rgba(124, 140, 255, .35); color: #fff; }
.admin-actions .danger { color: var(--red); }
.admin-user { display: grid; }
.admin-user strong { color: #e7eaf5; font-size: 9px; }
.admin-user span { color: var(--muted-2); font-size: 7px; }
.admin-empty { padding: 30px; color: var(--muted-2); text-align: center; }

/* Maintenance and notifications */
.maintenance-overlay { background: radial-gradient(circle at 50% 20%, rgba(124, 140, 255, .16), transparent 30rem), #080c17; }
.maintenance-card { width: min(440px, 100%); border: 1px solid var(--line-strong); border-radius: 19px; padding: 38px; background: #111829; box-shadow: var(--shadow); text-align: center; }
.maintenance-mark { display: grid; width: 56px; height: 56px; margin: 0 auto 17px; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #8494ff, #695fe5); font-size: 15px; font-weight: 900; }
.maintenance-card h1 { margin: 0; font-size: 25px; }
.maintenance-card > p:not(.eyebrow) { margin: 8px 0 20px; color: var(--muted); font-size: 9px; }
.maintenance-admin-button { margin-top: 12px; border: 0; color: #78839e; background: transparent; font-size: 8px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; width: min(350px, calc(100vw - 40px)); gap: 8px; }
.toast { border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 14px; color: #e7eaf7; background: #151d30; box-shadow: 0 18px 45px rgba(0, 0, 0, .35); font-size: 9px; animation: toast-in .2s ease-out; }
.toast.error { border-left-color: var(--red); }

* { scrollbar-width: thin; scrollbar-color: #303b59 #0c1220; }
:focus-visible { outline: 2px solid rgba(124, 140, 255, .75); outline-offset: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes pulse-dot { 50% { opacity: .35; } }

@media (max-width: 1200px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .operations-panel { position: static; display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 20px; align-items: center; }
    .operations-head { grid-column: 1 / -1; }
    .operation-score, .operation-list { border: 0; padding: 0; }
    .quick-actions { margin: 0; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-card:nth-child(n+4) { min-height: 100px; }
}

@media (max-width: 900px) {
    .app-shell { padding-left: 0; }
    .sidebar { width: min(290px, 86vw); transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar.open { transform: none; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; display: block; width: 100%; height: 100%; border: 0; background: rgba(3, 5, 12, .7); }
    .menu-button { display: grid; }
    .topbar { padding: 0 18px; }
    .page { padding: 32px 20px 55px; }
    .bot-workspace { height: 100vh; grid-template-columns: 1fr; grid-template-rows: 70px auto minmax(0, 1fr); border: 0; border-radius: 0; }
    .overlay:has(.bot-workspace) { padding: 0; }
    .bot-workspace > .modal-head { grid-column: 1; }
    .modal-tabs { grid-column: 1; grid-row: 2; display: flex; gap: 5px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
    .modal-tabs > p { display: none; }
    .modal-tabs button { flex: 0 0 auto; width: auto; min-height: 38px; grid-template-columns: auto; padding: 0 12px; }
    .modal-tabs button > i, .modal-tabs button small { display: none; }
    #botForm { grid-column: 1; grid-row: 3; }
    .tab-panel { padding: 26px 20px 12px; }
    .account-modal form { grid-template-columns: 190px minmax(0, 1fr); }
    .auth-shell { grid-template-columns: 1fr; width: min(520px, 100%); min-height: 0; }
    .auth-showcase { display: none; }
    .mobile-auth-mark { display: grid; margin-bottom: 20px; }
}

@media (max-width: 720px) {
    .last-update, .topbar-title, .top-divider { display: none; }
    .topbar { justify-content: space-between; }
    .page { padding-inline: 14px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 30px; }
    .hero-actions { width: 100%; }
    .hero-status { min-width: 0; flex: 1; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 104px; }
    .bot-collection { grid-template-columns: 1fr; }
    .bot-collection[data-layout="list"] .bot-card { display: block; }
    .bot-collection[data-layout="list"] .room-cell, .bot-collection[data-layout="list"] .bot-metrics, .bot-collection[data-layout="list"] .bot-card-foot { margin-top: 11px; }
    .bot-collection[data-layout="list"] .bot-card-foot { padding-top: 11px; border-top: 1px solid var(--line); }
    .bot-collection[data-layout="list"] .configure-button { font-size: 8px; }
    .list-tools { grid-template-columns: 1fr 1fr; }
    .search { grid-column: 1 / -1; }
    .operations-panel { display: block; }
    .operations-head { margin-bottom: 18px; }
    .operation-score { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
    .operation-list { padding: 7px 0 17px; border-bottom: 1px solid var(--line); }
    .quick-actions { margin-top: 17px; }
    .form-grid, .toggle-grid, .game-master-grid, .game-feature-grid, .moderation-top-grid, .moderation-grid, .moderation-inline-fields { grid-template-columns: 1fr; }
    .form-grid .full, .moderation-card.wide { grid-column: auto; }
    .command-grid { grid-template-columns: repeat(2, 1fr); }
    .manual-moderation-grid { grid-template-columns: 1fr; }
    .account-modal { height: 100vh; max-height: 100vh; border: 0; border-radius: 0; }
    .overlay:has(.account-modal) { padding: 0; }
    .account-modal form { display: block; overflow: auto; }
    .account-profile-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
    .account-profile-panel > div, .account-profile-panel > p { display: none; }
    .account-profile-avatar { width: 52px; height: 52px; border-radius: 15px; }
    .account-foot { position: sticky; bottom: 0; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-system-options { grid-template-columns: 1fr; }
    .admin-tabs { overflow-x: auto; }
    .admin-tabs button { flex: 0 0 auto; }
}

@media (max-width: 480px) {
    .page-heading { padding-top: 0; }
    .page-heading h1 { font-size: 27px; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .primary-button { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 95px; }
    .bots-section { padding: 15px; }
    .list-tools { grid-template-columns: 1fr; }
    .search { grid-column: auto; }
    .layout-switch { display: none; }
    .modal-head { padding: 14px 16px; }
    .editor-mark, .save-state { display: none; }
    .modal-head h2 { font-size: 16px; }
    .modal-foot { grid-template-columns: 1fr 1fr; padding-inline: 18px; }
    .footer-hint { display: none; }
    .command-grid { grid-template-columns: 1fr; }
    .login-overlay { padding: 0; }
    .auth-shell { min-height: 100vh; border: 0; border-radius: 0; }
    .login-card { padding: 34px 25px; }
    .danger-zone, .delete-confirmation { grid-template-columns: 1fr; }
    .danger-zone .danger-button { width: 100%; }
    .admin-stats { grid-template-columns: 1fr; }
}

/* Operations workspace */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-item em { margin-left: auto; border-radius: 99px; padding: 2px 7px; color: #aebcff; background: rgba(124, 140, 255, .13); font-size: 9px; font-style: normal; }
.configure-button em { margin-left: 4px; border-radius: 5px; padding: 2px 5px; color: #909dbe; background: rgba(255, 255, 255, .05); font-size: 7px; font-style: normal; text-transform: uppercase; }
.favorite-button { display: grid; width: 27px; height: 27px; margin-left: auto; place-items: center; border: 0; border-radius: 7px; color: #697694; background: transparent; }
.favorite-button:hover, .favorite-button.active { color: #f6c968; background: rgba(246, 201, 104, .09); }
.favorite-button svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; }
.favorite-bots { gap: 2px; }
.favorite-bots .nav-item { min-height: 37px; }
.favorite-bots .nav-icon { color: #e0b95b; }
.favorite-bots .status-dot { margin-left: auto; }
.collapse-sidebar { position: absolute; top: 30px; right: -14px; z-index: 2; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #8794b2; background: #101827; box-shadow: 0 5px 15px rgba(0, 0, 0, .25); }
.collapse-sidebar svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
body.sidebar-collapsed .app-shell { padding-left: 82px; }
body.sidebar-collapsed .sidebar { width: 82px; padding-inline: 14px; }
body.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .brand > span:last-child, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-item > span:last-of-type, body.sidebar-collapsed .nav-item em, body.sidebar-collapsed .sidebar-create > span:last-child, body.sidebar-collapsed .system-state > span:last-child, body.sidebar-collapsed .favorite-bots .status-dot { display: none; }
body.sidebar-collapsed .nav-item, body.sidebar-collapsed .sidebar-create { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-create { width: 48px; }
body.sidebar-collapsed .collapse-sidebar svg { transform: rotate(180deg); }
body.sidebar-collapsed .sidebar-foot { justify-content: center; }
.page-view { animation: page-in .24s ease both; }
@keyframes page-in { from { transform: translateY(6px); } }
.heading-actions, .backup-actions { display: flex; align-items: center; gap: 10px; }
.secondary-button svg, .primary-button svg, .text-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.global-search { position: relative; display: flex; width: clamp(220px, 26vw, 390px); height: 39px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: var(--muted-2); background: rgba(5, 10, 20, .48); }
.global-search > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.global-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.global-search kbd { flex: none; border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; color: var(--muted-2); font: 700 8px/1.2 inherit; }
.global-palette { position: absolute; top: 46px; left: 0; z-index: 55; width: 100%; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; background: #0c1424; box-shadow: var(--shadow); }
.global-palette button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; border-radius: 8px; padding: 10px; color: var(--text); background: transparent; text-align: left; }
.global-palette button:hover { background: rgba(124, 140, 255, .1); }
.global-palette button > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; color: #a7b3ff; background: rgba(124, 140, 255, .12); }
.global-palette button div { display: grid; }
.global-palette strong { font-size: 11px; }
.global-palette small { color: var(--muted); font-size: 9px; }
.dashboard-heading { align-items: flex-end; }
.dashboard-heading h1 { margin-top: 5px; font-size: clamp(25px, 3vw, 36px); }
.dashboard-stats { margin-bottom: 22px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 18px; }
.dashboard-card { min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 20px; background: linear-gradient(145deg, rgba(17, 26, 44, .94), rgba(10, 17, 31, .94)); box-shadow: 0 12px 35px rgba(0, 0, 0, .13); }
.dashboard-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.dashboard-card > header h2 { margin: 2px 0 0; font-size: 15px; letter-spacing: -.02em; }
.dashboard-card > header select { height: 33px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; color: var(--muted); background: rgba(5, 10, 20, .5); font-size: 9px; }
.text-button, .danger-text { border: 0; padding: 0; color: #91a6ff; background: transparent; font-size: 10px; font-weight: 750; }
.danger-text { color: #ff8297; }
.bar-chart { display: flex; height: 190px; align-items: end; gap: 8px; padding-top: 14px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 46px, rgba(155, 170, 215, .06) 47px); }
.bar-chart > span { position: relative; display: flex; height: 100%; flex: 1; align-items: end; justify-content: center; }
.bar-chart i { width: min(22px, 65%); min-height: 8px; border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, #635de7, #859bff); box-shadow: 0 0 18px rgba(115, 124, 245, .2); transition: height .35s ease; }
.bar-chart small { position: absolute; top: 100%; margin-top: 5px; color: var(--muted-2); font-size: 7px; }
.chart-card footer { display: flex; gap: 16px; margin-top: 22px; color: var(--muted); font-size: 9px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #7c75ef; }
.legend-dot.cyan { background: #39b7dc; }
.fleet-card, .radio-summary-card, .audit-summary-card { min-height: 235px; }
#fleetOverview { display: grid; gap: 5px; }
#fleetOverview button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 9px; padding: 8px; color: var(--text); background: transparent; text-align: left; }
#fleetOverview button:hover { background: rgba(255, 255, 255, .035); }
.mini-bot-avatar { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(124, 140, 255, .2); border-radius: 9px; color: #cbd2ff; background: rgba(124, 140, 255, .12); font-size: 11px; font-weight: 850; }
#fleetOverview button > span:nth-child(2) { display: grid; }
#fleetOverview strong { font-size: 10px; }
#fleetOverview small { color: var(--muted); font-size: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #566077; box-shadow: 0 0 0 4px rgba(86, 96, 119, .08); }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 4px rgba(79, 209, 161, .1); }
.status-dot.starting { background: var(--amber); box-shadow: 0 0 0 4px rgba(246, 184, 106, .1); }
.status-dot.error { background: var(--red); }
.now-playing-mini { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; min-height: 125px; }
.now-playing-mini > span { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 17px; color: #d7d9ff; background: radial-gradient(circle at 30% 20%, #7f78f1, #293365); box-shadow: 0 12px 35px rgba(69, 69, 170, .3); }
.now-playing-mini svg { width: 27px; height: 27px; }
.now-playing-mini div { display: grid; min-width: 0; }
.now-playing-mini small { color: #838ff7; font-size: 8px; font-weight: 850; letter-spacing: .11em; }
.now-playing-mini strong { overflow: hidden; margin-top: 4px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.now-playing-mini p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.mini-timeline { display: grid; gap: 2px; }
.mini-timeline article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(168, 181, 224, .07); }
.timeline-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #99a9f7; background: rgba(124, 140, 255, .1); }
.timeline-icon.warning { color: var(--amber); background: rgba(246, 184, 106, .09); }
.timeline-icon.error { color: var(--red); background: rgba(255, 113, 136, .09); }
.timeline-icon.success { color: var(--green); background: rgba(79, 209, 161, .09); }
.timeline-icon svg { width: 14px; height: 14px; }
.mini-timeline article div { display: grid; }
.mini-timeline strong { font-size: 9px; }
.mini-timeline p { overflow: hidden; margin: 1px 0 0; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mini-timeline time { color: var(--muted-2); font-size: 8px; }
.inline-empty { display: grid; min-height: 90px; place-items: center; color: var(--muted); font-size: 10px; text-align: center; }
.inline-empty.wide { grid-column: 1 / -1; }
.dashboard-grid.customizing .dashboard-card { cursor: grab; outline: 1px dashed rgba(139, 92, 246, .6); outline-offset: -5px; }
.dashboard-card.dragging { opacity: .35; }

/* Radio console */
.control-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 620px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(8, 14, 26, .6); }
.control-list { display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--line); padding: 12px; background: rgba(7, 12, 22, .55); }
.control-list > button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; border-radius: 10px; padding: 11px; color: var(--text); background: transparent; text-align: left; }
.control-list > button:hover, .control-list > button.active { border-color: rgba(124, 140, 255, .2); background: rgba(124, 140, 255, .09); }
.control-list > button > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #aab6ff; background: rgba(124, 140, 255, .11); }
.control-list > button div { display: grid; }
.control-list strong { font-size: 10px; }
.control-list small { color: var(--muted); font-size: 8px; }
.control-console { padding: 24px; }
.empty-console { display: grid; place-items: center; color: var(--muted); text-align: center; }
.empty-console > div > svg { width: 48px; height: 48px; color: #66729a; }
.empty-console h2 { color: var(--text); font-size: 17px; }
.empty-console p { font-size: 10px; }
.radio-console-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.radio-console-head h2 { margin: 8px 0 1px; font-size: 21px; }
.radio-console-head p { margin: 0; color: var(--muted); font-size: 10px; }
.radio-player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid rgba(124, 140, 255, .16); border-radius: 14px; padding: 18px; background: linear-gradient(110deg, rgba(104, 90, 230, .14), rgba(18, 28, 48, .6)); }
.cover-placeholder { display: grid; width: 84px; height: 84px; place-items: center; border-radius: 14px; color: #e6e7ff; background: radial-gradient(circle at 30% 25%, #837cf1, #29315e); }
.cover-placeholder svg { width: 31px; height: 31px; }
.radio-player > div { min-width: 0; }
.radio-player small { color: #9fa8ff; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.radio-player h3 { overflow: hidden; margin: 4px 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.radio-player p { margin: 0; color: var(--muted); font-size: 9px; }
.radio-player > button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px; color: var(--text); background: rgba(255, 255, 255, .04); font-size: 9px; }
.player-progress { height: 4px; overflow: hidden; margin-top: 15px; border-radius: 9px; background: rgba(255, 255, 255, .08); }
.player-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #766bef, #7ea1ff); }
.radio-player time { display: block; margin-top: 5px; color: var(--muted-2); font-size: 8px; }
.queue-panel { margin-top: 20px; }
.queue-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 12px; }
.queue-panel h3 { margin: 0; font-size: 14px; }
.queue-panel p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.queue-list { display: grid; gap: 6px; }
.queue-list article { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .018); }
.queue-list em { color: #66718b; font-size: 9px; font-style: normal; font-weight: 800; }
.queue-list article div { display: grid; min-width: 0; }
.queue-list strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.queue-list span { color: var(--muted); font-size: 8px; }
.queue-list mark { border-radius: 5px; padding: 3px 6px; color: #d7c7ff; background: rgba(139, 92, 246, .15); font-size: 7px; font-weight: 850; }
.queue-list button { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 7px; color: var(--muted); background: transparent; }
.queue-list button:hover { color: var(--red); background: rgba(255, 113, 136, .08); }

/* Commands, community and audit */
.command-center-toolbar, .activity-toolbar, .data-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.command-center-toolbar .search, .activity-toolbar .search { flex: 1; max-width: 430px; }
.command-center-toolbar select, .density-control select { height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; color: var(--text); background: var(--panel); font-size: 10px; }
.professional-command-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.professional-command-grid > article { position: relative; min-height: 172px; border: 1px solid var(--line); border-radius: 13px; padding: 17px; background: linear-gradient(145deg, rgba(17, 26, 44, .88), rgba(10, 17, 31, .88)); }
.professional-command-grid code { display: block; margin: 14px 0 9px; color: #bdc7ff; font-size: 12px; font-weight: 800; }
.professional-command-grid h3 { margin: 0; font-size: 12px; }
.professional-command-grid p { margin: 5px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.professional-command-grid button { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 5px; border: 0; color: #92a5f9; background: transparent; font-size: 8px; }
.professional-command-grid article > footer { position: absolute; right: 12px; bottom: 12px; left: 12px; display: flex; justify-content: space-between; }
.professional-command-grid article > footer button { position: static; }
.command-state { position: absolute; top: 16px; right: 15px; color: var(--muted-2); font-size: 7px; font-weight: 800; }
.command-state.enabled { color: var(--green); }
.command-disabled { opacity: .64; }
.command-category { border-radius: 5px; padding: 3px 6px; color: #9ec7ff; background: rgba(23, 140, 255, .1); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.command-category.radio { color: #c9b7ff; background: rgba(139, 92, 246, .12); }
.command-category.games { color: #74dfbc; background: rgba(79, 209, 161, .1); }
.command-category.moderation { color: #ff9bac; background: rgba(255, 113, 136, .1); }
.command-simulator { margin-top: 18px; }
.command-simulator > div { display: grid; grid-template-columns: .7fr 1.5fr auto; gap: 9px; }
.command-simulator input { height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; color: var(--text); background: rgba(5, 10, 20, .45); outline: 0; }
.command-simulator pre { min-height: 68px; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 9px; padding: 12px; color: #aab6d4; background: rgba(5, 10, 20, .42); font: 500 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.compact-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.data-surface { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 17, 31, .75); }
.data-toolbar { justify-content: space-between; margin: 0; padding: 14px; border-bottom: 1px solid var(--line); }
.data-toolbar .search { width: min(420px, 60%); }
.data-toolbar select { height: 39px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--text); background: var(--panel); font-size: 9px; }
.table-scroll { overflow-x: auto; }
.pro-table { width: 100%; border-collapse: collapse; }
.pro-table th { padding: 12px 15px; color: var(--muted-2); text-align: left; }
.pro-table td { padding: 12px 15px; border-top: 1px solid rgba(168, 181, 224, .07); color: #aeb8d0; }
.pro-table td > button { border: 0; border-radius: 6px; padding: 5px 7px; color: #91a5fb; background: rgba(124, 140, 255, .08); font-size: 8px; }
.table-user { display: flex; align-items: center; gap: 9px; }
.table-user > i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: #cad1ff; background: rgba(124, 140, 255, .12); font-style: normal; font-weight: 850; }
.table-user > span { display: grid; }
.table-user strong { color: var(--text); font-size: 10px; }
.table-user small { color: var(--muted-2); font-size: 8px; }
.activity-toolbar { justify-content: space-between; }
.segmented-filter { display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: rgba(5, 10, 20, .4); }
.segmented-filter button { border: 0; border-radius: 6px; padding: 7px 11px; color: var(--muted); background: transparent; font-size: 9px; }
.segmented-filter button.active { color: #fff; background: rgba(124, 140, 255, .2); }
.audit-timeline { display: grid; gap: 8px; }
.audit-entry { display: grid; grid-template-columns: auto 1fr; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 13px; background: rgba(12, 19, 34, .72); }
.audit-entry > div > header { display: flex; justify-content: space-between; gap: 12px; }
.audit-entry strong { font-size: 11px; }
.audit-entry time, .audit-entry small { color: var(--muted-2); font-size: 8px; }
.audit-entry p { margin: 3px 0; color: var(--muted); font-size: 9px; }

/* System, versions and profile drawer */
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.health-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.health-metrics > div { display: grid; border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: rgba(5, 10, 20, .3); }
.health-metrics span { color: var(--muted); font-size: 8px; }
.health-metrics strong { margin-top: 3px; font-size: 10px; }
.session-list { display: grid; gap: 7px; }
.session-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.session-list article > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: #9baaf6; background: rgba(124, 140, 255, .1); }
.session-list article div { display: grid; }
.session-list strong { font-size: 10px; }
.session-list small { color: var(--muted); font-size: 8px; }
.session-list mark { border-radius: 5px; padding: 3px 6px; color: #6ae0b7; background: rgba(79, 209, 161, .1); font-size: 7px; }
.session-list button { border: 0; color: var(--red); background: transparent; font-size: 8px; }
.card-copy { margin: -8px 0 17px; color: var(--muted); font-size: 10px; }
.backup-actions { flex-wrap: wrap; }
.backup-actions select { min-width: 180px; height: 40px; flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--text); background: rgba(5, 10, 20, .4); }
.preference-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preference-grid button { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; color: var(--text); background: rgba(5, 10, 20, .3); text-align: left; }
.preference-grid button.active { border-color: rgba(124, 140, 255, .55); box-shadow: inset 0 0 0 1px rgba(124, 140, 255, .14); }
.theme-swatch { width: 27px; height: 27px; border: 2px solid rgba(255, 255, 255, .18); border-radius: 7px; background: #0b1220; }
.theme-swatch.violet { background: #171126; }
.theme-swatch.light { background: #edf2f9; }
.preference-grid span { display: grid; }
.preference-grid strong { font-size: 9px; }
.preference-grid small { color: var(--muted); font-size: 7px; }
.density-control { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 10px; }
.version-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.version-panel > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.version-panel h3 { margin: 0; font-size: 13px; }
.version-panel p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.version-list { display: grid; gap: 6px; }
.version-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.version-list article > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: #a9b4fb; background: rgba(124, 140, 255, .1); }
.version-list article div { display: grid; }
.version-list strong { font-size: 9px; }
.version-list small { color: var(--muted); font-size: 8px; }
.version-list button { border: 0; color: #91a5fb; background: transparent; font-size: 8px; }
.connection-test-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin: -4px 0 16px; }
.connection-test-results article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.connection-test-results article > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; color: var(--green); background: rgba(79, 209, 161, .09); }
.connection-test-results article.error > span { color: var(--red); background: rgba(255, 113, 136, .09); }
.connection-test-results article div { display: grid; }
.connection-test-results strong { font-size: 9px; }
.connection-test-results small { color: var(--muted); font-size: 8px; }
.connection-test-results b { color: var(--green); font-size: 8px; }
.connection-test-results article.error b { color: var(--red); }
.small-modal { width: min(620px, calc(100vw - 24px)); }
.command-dialog .form-stack { display: grid; gap: 13px; padding: 20px; }
.command-dialog .form-stack > label { display: grid; gap: 6px; color: #b7c0d5; font-size: 10px; font-weight: 700; }
.command-dialog input, .command-dialog select, .command-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--text); background: rgba(5, 10, 20, .45); outline: 0; }
.command-dialog textarea { min-height: 90px; resize: vertical; }
.command-dialog label small { color: var(--muted); font-size: 8px; }
.template-modal { width: min(760px, calc(100vw - 24px)); }
.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; padding: 20px; }
.template-grid > button { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; min-height: 110px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--text); background: rgba(255, 255, 255, .018); text-align: left; }
.template-grid > button:hover { border-color: rgba(124, 140, 255, .45); background: rgba(124, 140, 255, .07); transform: translateY(-1px); }
.template-grid > button > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; color: #bcc5ff; background: rgba(124, 140, 255, .13); }
.template-grid strong { font-size: 12px; }
.template-grid p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.template-grid mark { position: absolute; top: 10px; right: 10px; border-radius: 5px; padding: 3px 6px; color: #75ddb8; background: rgba(79, 209, 161, .1); font-size: 6px; font-weight: 850; }
.changes-modal { width: min(780px, calc(100vw - 24px)); }
.changes-list { display: grid; max-height: min(520px, 65vh); overflow-y: auto; padding: 12px 20px; }
.changes-list article { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.changes-list strong { font-size: 9px; }
.changes-list span, .changes-list b { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.changes-list b { color: #c7d0ef; }
.changes-list i { color: #63708e; }
.changes-list svg { width: 13px; height: 13px; }
.preference-toggle { margin-top: 12px; }
.access-role-guide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.access-role-guide article { border: 1px solid var(--line); border-radius: 9px; padding: 11px; background: rgba(255, 255, 255, .018); }
.access-role-guide strong { font-size: 9px; }
.access-role-guide p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.access-invite { display: grid; grid-template-columns: 1fr 170px auto; gap: 8px; margin-left: 210px; }
.access-invite input, .access-invite select { height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--text); background: rgba(5, 10, 20, .42); }
.access-list { display: grid; gap: 7px; margin-top: 13px; }
.access-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.access-list .profile-avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 11px; }
.access-list article div { display: grid; }
.access-list strong { font-size: 10px; }
.access-list small { color: var(--muted); font-size: 8px; }
.access-list mark { border-radius: 5px; padding: 3px 6px; color: #b8c5ff; background: rgba(124, 140, 255, .1); font-size: 7px; text-transform: uppercase; }
.access-list button { display: flex; align-items: center; gap: 5px; border: 0; color: var(--red); background: transparent; font-size: 8px; }
.user-drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.user-drawer.open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 0, 0, .58); opacity: 0; transition: .2s; }
.user-drawer.open .drawer-backdrop { opacity: 1; }
.user-drawer > aside { position: absolute; inset: 0 0 0 auto; width: min(440px, 92vw); overflow-y: auto; border-left: 1px solid var(--line); padding: 24px; background: #0b1322; box-shadow: -25px 0 70px rgba(0, 0, 0, .35); transform: translateX(100%); transition: .25s ease; }
.user-drawer.open > aside { transform: translateX(0); }
.user-drawer aside > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.profile-avatar { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #8a77f0, #405db9); font-size: 18px; font-weight: 900; }
.user-drawer h2 { margin: 2px 0 0; font-size: 18px; }
.user-drawer header small { color: var(--muted); font-size: 9px; }
.user-drawer header button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .04); }
.profile-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 18px 0; }
.profile-stat-grid article { display: grid; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: rgba(255, 255, 255, .02); }
.profile-stat-grid span { color: var(--muted); font-size: 8px; }
.profile-stat-grid strong { font-size: 17px; }
.user-drawer section { margin-top: 20px; }
.user-drawer section h3 { font-size: 12px; }
.profile-progress > span { display: flex; justify-content: space-between; font-size: 9px; }
.profile-progress small { color: var(--muted); }
.profile-progress > i { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 9px; background: rgba(255, 255, 255, .07); }
.profile-progress b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #766bef, #64a1fa); }
.user-drawer dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.user-drawer dl div { display: flex; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.user-drawer dt { color: var(--muted); font-size: 8px; }
.user-drawer dd { margin: 0; font-size: 9px; font-weight: 800; }

/* Themes and density */
:root[data-theme="violet"] { --bg: #0d0917; --sidebar: #09070f; --panel: #151023; --panel-2: #1c1530; --panel-3: #271d3d; --accent: #aa6cff; --accent-2: #7754f5; }
:root[data-theme="violet"] body { background: radial-gradient(circle at 75% 0, rgba(160, 91, 255, .14), transparent 35rem), var(--bg); }
:root[data-theme="light"] { color-scheme: light; --bg: #eef2f8; --sidebar: #f8fafd; --panel: #fff; --panel-2: #f6f8fc; --panel-3: #e9eef7; --line: rgba(35, 52, 84, .12); --line-strong: rgba(35, 52, 84, .22); --text: #15213a; --muted: #60708e; --muted-2: #8995aa; --shadow: 0 22px 55px rgba(33, 48, 78, .15); }
:root[data-theme="light"] body { background: radial-gradient(circle at 75% 0, rgba(82, 125, 255, .11), transparent 35rem), var(--bg); }
:root[data-theme="light"] .sidebar, :root[data-theme="light"] .topbar, :root[data-theme="light"] .dashboard-card, :root[data-theme="light"] .professional-command-grid > article, :root[data-theme="light"] .data-surface, :root[data-theme="light"] .audit-entry { background: rgba(255, 255, 255, .9); }
:root[data-theme="light"] .global-search, :root[data-theme="light"] .control-layout, :root[data-theme="light"] .command-simulator input, :root[data-theme="light"] .health-metrics > div { background: rgba(255, 255, 255, .65); }
:root[data-theme="light"] .global-palette, :root[data-theme="light"] .user-drawer > aside { background: #fff; }
:root[data-theme="light"] input::placeholder { color: #94a0b4; }
:root[data-theme="light"] .notifications-panel { background: #fff; }
:root[data-theme="light"] .notifications-panel > header { background: #f5f7fb; }
:root[data-density="compact"] .page { padding-top: 20px; }
:root[data-density="compact"] .dashboard-card { padding: 15px; }
:root[data-density="compact"] .bot-card { padding: 13px; }
:root[data-density="compact"] .nav-item { min-height: 43px; }
:root[data-density="compact"] .pro-table td { padding-top: 8px; padding-bottom: 8px; }

@media (max-width: 1180px) {
    .global-search { width: 240px; }
    .professional-command-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .chart-card { grid-column: 1 / -1; }
}
@media (max-width: 920px) {
    .global-search { display: none; }
    .dashboard-grid, .system-grid { grid-template-columns: 1fr; }
    .professional-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .control-layout { grid-template-columns: 1fr; }
    .control-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .control-list > button { min-width: 220px; }
}
@media (max-width: 680px) {
    .dashboard-heading, .radio-console-head, .activity-toolbar, .data-toolbar { align-items: stretch; flex-direction: column; }
    .heading-actions { width: 100%; }
    .heading-actions button { flex: 1; }
    .professional-command-grid, .compact-stats, .health-metrics { grid-template-columns: 1fr; }
    .command-center-toolbar { align-items: stretch; flex-direction: column; }
    .command-center-toolbar .search { max-width: none; }
    .command-simulator > div { grid-template-columns: 1fr; }
    .radio-player { grid-template-columns: auto 1fr; }
    .radio-player > button { grid-column: 1 / -1; justify-content: center; }
    .control-console { padding: 14px; }
    .queue-list article { grid-template-columns: 28px minmax(0, 1fr) auto; }
    .queue-list mark { display: none; }
    .preference-grid { grid-template-columns: 1fr; }
    .template-grid { grid-template-columns: 1fr; }
    .changes-list article { grid-template-columns: 100px 1fr; }
    .changes-list article i { display: none; }
    .access-role-guide { grid-template-columns: repeat(2, 1fr); }
    .access-invite { grid-template-columns: 1fr; margin-left: 0; }
}

/* Bot list and editor usability pass */
.bot-card {
    grid-template-columns: minmax(270px, 1.15fr) minmax(180px, .85fr) minmax(135px, .55fr) auto;
    gap: 20px;
    overflow: visible;
}
.bot-card-head { position: static; min-width: 0; justify-content: flex-start; }
.bot-card-head .bot-cell { min-width: 0; flex: 1; }
.bot-card-head .status-pill { position: static; margin: 0; white-space: nowrap; }
.bot-card-state { display: flex; flex: none; align-items: center; gap: 7px; margin-left: auto; }
.bot-card-state .favorite-button { width: 31px; height: 31px; margin: 0; border: 1px solid transparent; }
.bot-card-state .favorite-button:hover,
.bot-card-state .favorite-button.active { border-color: rgba(246, 201, 104, .18); }
.bot-card-foot { gap: 10px; }
.configure-button {
    display: flex;
    width: auto;
    height: 40px;
    min-width: 126px;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border: 1px solid rgba(48, 151, 255, .28);
    border-radius: 9px;
    padding: 0 12px;
    color: #edf7ff;
    background: linear-gradient(135deg, rgba(22, 142, 245, .95), rgba(77, 98, 239, .95));
    font-size: inherit;
    box-shadow: 0 7px 18px rgba(17, 104, 215, .16);
}
.configure-button:hover { border-color: rgba(125, 196, 255, .55); background: linear-gradient(135deg, #269cff, #6570f5); transform: translateY(-1px); }
.configure-button .configure-icon { display: grid; flex: none; place-items: center; }
.configure-button .configure-icon .ui-icon { width: 17px; height: 17px; }
.configure-copy { display: grid; min-width: 0; text-align: left; line-height: 1.15; }
.configure-copy strong { font-size: 11px; }
.configure-copy small { margin-top: 2px; color: rgba(235, 246, 255, .72); font-size: 8px; font-weight: 600; }
.row-actions { padding-left: 10px; border-left: 1px solid #2b3851; }
.row-actions button { width: 36px; height: 36px; transition: transform .15s ease, filter .15s ease; }
.row-actions button:hover { filter: brightness(1.14); transform: translateY(-1px); }

.bot-workspace { grid-template-columns: 310px minmax(0, 1fr); }
.modal-tabs { padding: 14px 16px 82px; overflow-y: auto; }
.modal-tabs .editor-search { margin-bottom: 10px; }
.modal-tabs > p { margin: 20px 12px 7px; font-size: 9px; letter-spacing: .13em; }
.modal-tabs button { min-height: 57px; grid-template-columns: 28px minmax(0, 1fr); padding: 7px 12px; }
.modal-tabs button strong { font-size: 12px; }
.modal-tabs button small { display: block; overflow: hidden; margin-top: 2px; color: #7080a0; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.modal-tabs button.active small { color: rgba(255, 255, 255, .7); }
#botForm { grid-column: 2; }
.tab-panel { max-width: 1120px; margin: 0 auto; padding: 34px 42px 48px; }
.form-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 20px;
    padding: 0 0 20px;
    text-align: left;
}
.form-intro .section-step { grid-column: 1; color: #7e8cff; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.form-intro h3 { grid-column: 1; margin: 5px 0 0; font-size: 21px; letter-spacing: -.025em; }
.form-intro p { grid-column: 1; max-width: 680px; margin: 5px 0 0; font-size: 11px; }
.form-intro > button { grid-column: 2; grid-row: 1 / 4; align-self: center; margin-left: 20px; }
.bot-workspace .form-card {
    margin-bottom: 14px;
    border: 1px solid #25314a;
    border-radius: 12px;
    padding: 21px 23px;
    background: linear-gradient(145deg, rgba(15, 25, 43, .94), rgba(10, 18, 33, .94));
}
.bot-workspace .form-card-title { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(45, 58, 84, .7); }
.bot-workspace .form-card-title h4 { font-size: 12px; }
.bot-workspace .form-card-title p { font-size: 9px; }
.bot-workspace .form-grid > label { grid-template-columns: 205px minmax(0, 1fr); min-height: 64px; column-gap: 22px; }
.bot-workspace .form-grid > label > span { left: 192px; }
.bot-workspace input,
.bot-workspace select { height: 43px; font-size: 12px; }
.bot-workspace .form-grid > label > small { font-size: 9px; }
.embedded-switch { margin: 14px 0 0; border: 0; border-top: 1px solid rgba(45, 58, 84, .7); border-radius: 0; padding: 17px 0 0; background: transparent; }
.appearance-preview { border-radius: 12px; padding: 18px 21px; }
.modal-foot { left: 310px; }

@media (max-width: 1180px) {
    .bot-card { grid-template-columns: minmax(250px, 1fr) minmax(170px, .75fr) auto; }
    .bot-metrics { display: none; }
    .configure-copy small { display: none; }
    .configure-button { min-width: 108px; }
}
@media (max-width: 980px) {
    .bot-card { grid-template-columns: minmax(240px, 1fr) auto; }
    .bot-card .room-cell { grid-column: 1; grid-row: 2; }
    .bot-card-foot { grid-column: 2; grid-row: 1 / 3; align-items: flex-end; flex-direction: column; }
    .row-actions { padding: 8px 0 0; border-top: 1px solid #2b3851; border-left: 0; }
    .bot-workspace { grid-template-columns: 1fr; }
    #botForm { grid-column: 1; }
    .modal-foot { left: 0; }
}
@media (max-width: 720px) {
    .bot-card { display: block; }
    .bot-card .room-cell, .bot-card-foot { margin-top: 14px; }
    .bot-card-foot { display: flex; align-items: center; flex-direction: row; padding-top: 13px; border-top: 1px solid #29364f; }
    .configure-button { min-width: 124px; }
    .configure-copy small { display: block; }
    .row-actions { overflow-x: auto; margin-left: auto; padding: 0; border: 0; }
    .tab-panel { padding: 28px 20px 40px; }
    .bot-workspace .form-grid > label { grid-template-columns: 1fr; gap: 6px; }
    .bot-workspace .form-grid > label > input,
    .bot-workspace .form-grid > label > select,
    .bot-workspace .form-grid > label > .color-field,
    .bot-workspace .form-grid > label > small { grid-column: 1; }
    .bot-workspace .form-grid > label > span { display: none; }
}
@media (max-width: 520px) {
    .bot-card-head { align-items: flex-start; }
    .bot-card-state { align-items: flex-end; flex-direction: column-reverse; }
    .bot-card-foot { align-items: stretch; flex-direction: column; }
    .configure-button { width: 100%; justify-content: center; }
    .row-actions { width: 100%; justify-content: flex-end; }
    .form-intro { display: block; }
    .form-intro > button { width: 100%; margin: 14px 0 0; }
    .bot-workspace .form-card { padding: 17px; }
}

/* Acabado final: debe permanecer al cierre para ganar la cascada. */
#statsGrid {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    overflow-x: auto;
}
#statsGrid .stat-card {
    --stat-color: #7c5cff;
    --stat-soft: rgba(124, 92, 255, .14);
    min-width: 0;
    padding: 16px 13px;
}
#statsGrid .stat-card.violet { --stat-color: #8b5cf6; --stat-soft: rgba(139, 92, 246, .15); }
#statsGrid .stat-card.blue { --stat-color: #2f8cff; --stat-soft: rgba(47, 140, 255, .15); }
#statsGrid .stat-card.green { --stat-color: #20be8a; --stat-soft: rgba(32, 190, 138, .14); }
#statsGrid .stat-card.amber { --stat-color: #e9aa32; --stat-soft: rgba(233, 170, 50, .14); }
#statsGrid .stat-card.red { --stat-color: #ef5473; --stat-soft: rgba(239, 84, 115, .14); }
#statsGrid .stat-card.orange { --stat-color: #f47b35; --stat-soft: rgba(244, 123, 53, .14); }
#statsGrid .stat-card.rose { --stat-color: #df4fb0; --stat-soft: rgba(223, 79, 176, .14); }
#statsGrid .stat-card .stat-icon {
    color: #fff;
    background: var(--stat-color);
    box-shadow: 0 0 0 5px var(--stat-soft);
}
#statsGrid .stat-card:hover { background: var(--stat-soft); }
#statsGrid .stat-card.active {
    background: var(--stat-soft);
    box-shadow: inset 0 -2px var(--stat-color);
}
.row-actions button[data-action="subscription-guide"] { color: #fff; background: #168fbd; }
.row-actions button[data-action="restart"] { background: #4568df; }
.row-actions button[data-action="subscription-guide"]:hover { background: #20a6d8; }
.row-actions button[data-action="restart"]:hover { background: #5c7bea; }
.subscription-admin-modal > .modal-head { min-height: 92px; padding: 20px 24px; }
.subscription-admin-modal > .modal-head h2 { margin-top: 5px; }
.subscription-admin-modal > .modal-head p:last-child { margin-top: 5px; color: #8795b2; font-size: 10px; }
.subscription-admin-modal form { padding: 24px 26px 0; }
.subscription-admin-modal .subscription-current { margin: 0 0 24px; padding: 16px; }
.subscription-admin-modal .form-stack { display: grid; gap: 19px; }
.subscription-admin-modal .form-stack > label,
.subscription-admin-modal .subscription-duration-fields > label {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
}
.subscription-admin-modal .form-stack input,
.subscription-admin-modal .form-stack select { width: 100%; height: 44px; margin: 0; }
.subscription-admin-modal .subscription-duration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.subscription-admin-modal .subscription-duration-fields[hidden] { display: none; }
.subscription-admin-modal .modal-foot { min-height: 74px; margin: 8px -26px 0; padding: 14px 20px; }
.admin-view[data-admin-view="users"] .admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.admin-view[data-admin-view="users"] .admin-section-heading .primary-button { flex: none; }
.admin-account-modal { width: min(680px, 100%); overflow: hidden; }
.admin-account-modal > .modal-head { min-height: 92px; padding: 20px 24px; }
.admin-account-modal > .modal-head h2 { margin-top: 5px; }
.admin-account-modal > .modal-head p:last-child { margin-top: 5px; color: #aeb9cf; font-size: 10px; }
.admin-account-modal form { padding: 24px 26px 0; }
.admin-account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.admin-account-fields > label { display: grid; gap: 8px; color: #eef2fb; font-size: 11px; font-weight: 750; }
.admin-account-fields > label.full { grid-column: 1 / -1; }
.admin-account-fields input,
.admin-account-fields select { width: 100%; height: 44px; margin: 0; border-radius: 9px; padding: 0 13px; font-size: 11px; }
.admin-account-fields small { color: #aeb9cf; font-size: 9px; font-weight: 500; }
.admin-account-flags { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 19px; }
.admin-account-flags > label { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(150, 174, 216, .18); border-radius: 10px; padding: 13px 14px; background: #0e192a; }
.admin-account-flags > label > span:first-child { display: grid; gap: 4px; }
.admin-account-flags strong { color: #f8faff; font-size: 11px; }
.admin-account-flags small { color: #aeb9cf; font-size: 9px; line-height: 1.4; }
.admin-account-modal .form-error { min-height: 18px; margin: 12px 0 0; }
.admin-account-modal .modal-foot { position: static; left: auto; min-height: 74px; margin: 8px -26px 0; padding: 14px 20px; }
.admin-account-modal .modal-foot > span { align-self: center; color: #aeb9cf; font-size: 9px; }
.admin-account-modal .panel-switch input:disabled + i { opacity: .55; cursor: not-allowed; }
@media (min-width: 1501px) {
    .bot-card {
        display: grid;
        grid-template-columns: minmax(230px, 1fr) minmax(135px, .58fr) minmax(100px, .4fr) minmax(190px, .76fr) auto;
        align-items: center;
        gap: 13px;
    }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell { display: flex; grid-column: 2; grid-row: 1; }
    .bot-card .bot-metrics { display: grid; grid-column: 3; grid-row: 1; }
    .bot-card .subscription-summary { grid-column: 4; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 5; grid-row: 1; margin: 0; padding: 0; border: 0; }
}
@media (min-width: 981px) and (max-width: 1500px) {
    .bot-card { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(190px, .72fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell, .bot-card .bot-metrics { display: none; }
    .bot-card .subscription-summary { grid-column: 2; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 3; grid-row: 1; align-items: center; flex-direction: row; margin: 0; padding: 0; border: 0; }
}
@media (max-width: 560px) {
    .subscription-admin-modal form { padding: 20px 18px 0; }
    .subscription-admin-modal .subscription-duration-fields { grid-template-columns: 1fr; }
    .subscription-admin-modal .modal-foot { margin-inline: -18px; }
    .admin-view[data-admin-view="users"] .admin-section-heading { align-items: stretch; flex-direction: column; }
    .admin-account-modal form { padding: 20px 18px 0; }
    .admin-account-fields, .admin-account-flags { grid-template-columns: 1fr; }
    .admin-account-fields > label.full { grid-column: auto; }
    .admin-account-modal .modal-foot { margin-inline: -18px; }
}

/* Overrides finales: jerarquía cromática y alineación */
#statsGrid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); overflow-x: auto; }
#statsGrid .stat-card { --stat-color: #7c5cff; --stat-soft: rgba(124, 92, 255, .14); min-width: 0; padding: 16px 13px; }
#statsGrid .stat-card.violet { --stat-color: #8b5cf6; --stat-soft: rgba(139, 92, 246, .15); }
#statsGrid .stat-card.blue { --stat-color: #2f8cff; --stat-soft: rgba(47, 140, 255, .15); }
#statsGrid .stat-card.green { --stat-color: #20be8a; --stat-soft: rgba(32, 190, 138, .14); }
#statsGrid .stat-card.amber { --stat-color: #e9aa32; --stat-soft: rgba(233, 170, 50, .14); }
#statsGrid .stat-card.red { --stat-color: #ef5473; --stat-soft: rgba(239, 84, 115, .14); }
#statsGrid .stat-card.orange { --stat-color: #f47b35; --stat-soft: rgba(244, 123, 53, .14); }
#statsGrid .stat-card.rose { --stat-color: #df4fb0; --stat-soft: rgba(223, 79, 176, .14); }
#statsGrid .stat-card .stat-icon { color: #fff; background: var(--stat-color); box-shadow: 0 0 0 5px var(--stat-soft); }
#statsGrid .stat-card:hover { background: var(--stat-soft); }
#statsGrid .stat-card.active { background: var(--stat-soft); box-shadow: inset 0 -2px var(--stat-color); }
#statsGrid .stat-card.active .stat-value { color: #fff; }

.row-actions button[data-action="subscription-guide"] { color: #fff; background: #168fbd; }
.row-actions button[data-action="restart"] { background: #4568df; }
.row-actions button[data-action="subscription-guide"]:hover { background: #20a6d8; }
.row-actions button[data-action="restart"]:hover { background: #5c7bea; }

@media (min-width: 1501px) {
    .bot-card { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(135px, .58fr) minmax(100px, .4fr) minmax(190px, .76fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell { display: flex; grid-column: 2; grid-row: 1; }
    .bot-card .bot-metrics { display: grid; grid-column: 3; grid-row: 1; }
    .bot-card .subscription-summary { grid-column: 4; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 5; grid-row: 1; margin: 0; padding: 0; border: 0; }
}
@media (min-width: 981px) and (max-width: 1500px) {
    .bot-card { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(190px, .72fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell, .bot-card .bot-metrics { display: none; }
    .bot-card .subscription-summary { grid-column: 2; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 3; grid-row: 1; align-items: center; flex-direction: row; margin: 0; padding: 0; border: 0; }
}

/* Vista final de resumen y suscripción */
#statsGrid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); overflow-x: auto; }
#statsGrid .stat-card { min-width: 0; padding: 16px 13px; }
#statsGrid .stat-icon { width: 34px; height: 34px; }
#statsGrid .stat-value { font-size: 20px; }
#statsGrid .stat-label { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.bot-card { grid-template-columns: minmax(235px, 1fr) minmax(145px, .62fr) minmax(105px, .4fr) minmax(205px, .82fr) auto; gap: 14px; }
.subscription-summary { display: grid; min-width: 0; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid rgba(98, 220, 168, .2); border-radius: 10px; padding: 10px 9px; background: rgba(49, 176, 125, .07); }
.subscription-summary.expired { border-color: rgba(255, 113, 136, .24); background: rgba(210, 55, 85, .07); }
.subscription-summary.unactivated { border-color: rgba(246, 201, 104, .22); background: rgba(213, 153, 49, .07); }
.subscription-summary-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: #62dca8; background: rgba(98, 220, 168, .11); }
.subscription-summary.expired .subscription-summary-icon { color: #ff7188; background: rgba(255, 113, 136, .1); }
.subscription-summary.unactivated .subscription-summary-icon { color: #f6c968; background: rgba(246, 201, 104, .1); }
.subscription-summary-icon .ui-icon { width: 16px; height: 16px; }
.subscription-summary > div { display: grid; min-width: 0; gap: 1px; }
.subscription-summary small { color: #71809d; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.subscription-summary strong { color: #dffbef; font-size: 11px; }
.subscription-summary.expired strong { color: #ff9bab; }
.subscription-summary.unactivated strong { color: #f8d98e; }
.subscription-summary time { overflow: hidden; color: #9ba8c1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-summary > button { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #34435f; border-radius: 8px; color: #aebde0; background: #111b2d; }
.subscription-summary > button:hover { border-color: #6176ac; color: #fff; background: #192844; }
.subscription-summary > button .ui-icon { width: 14px; height: 14px; }

@media (max-width: 1500px) {
    .bot-card { grid-template-columns: minmax(235px, 1fr) minmax(205px, .75fr) auto; }
    .bot-card .room-cell, .bot-card .bot-metrics { display: none; }
}
@media (max-width: 900px) {
    .bot-card { grid-template-columns: minmax(0, 1fr) auto; }
    .subscription-summary { grid-column: 1; grid-row: 2; margin-top: 11px; }
    .bot-card-foot { grid-column: 2; grid-row: 1 / 3; align-items: flex-end; flex-direction: column; }
}
@media (max-width: 720px) {
    .bot-card { display: block; }
    .subscription-summary, .bot-card-foot { margin-top: 13px; }
    .bot-card-foot { display: flex; align-items: center; flex-direction: row; padding-top: 13px; border-top: 1px solid #29364f; }
}

/* Alineación estable de instancias */
@media (min-width: 1501px) {
    .bot-card { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(135px, .58fr) minmax(100px, .4fr) minmax(190px, .76fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell { display: flex; grid-column: 2; grid-row: 1; }
    .bot-card .bot-metrics { display: grid; grid-column: 3; grid-row: 1; }
    .bot-card .subscription-summary { grid-column: 4; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 5; grid-row: 1; margin: 0; padding: 0; border: 0; }
}
@media (min-width: 981px) and (max-width: 1500px) {
    .bot-card { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(190px, .72fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell, .bot-card .bot-metrics { display: none; }
    .bot-card .subscription-summary { grid-column: 2; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 3; grid-row: 1; align-items: center; flex-direction: row; margin: 0; padding: 0; border: 0; }
    .bot-card .configure-button { min-width: 112px; }
    .bot-card .row-actions { gap: 5px; padding-left: 8px; }
    .bot-card .row-actions button { width: 33px; height: 33px; }
}

/* Espaciado aislado del editor de suscripción */
.subscription-admin-modal { overflow: hidden; }
.subscription-admin-modal > .modal-head { min-height: 92px; padding: 20px 24px; }
.subscription-admin-modal > .modal-head h2 { margin-top: 5px; }
.subscription-admin-modal > .modal-head p:last-child { margin-top: 5px; color: #8795b2; font-size: 10px; }
.subscription-admin-modal form { padding: 24px 26px 0; }
.subscription-admin-modal .subscription-current { margin: 0 0 24px; padding: 16px; }
.subscription-admin-modal .form-stack { display: grid; gap: 19px; }
.subscription-admin-modal .form-stack > label,
.subscription-admin-modal .subscription-duration-fields > label { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; color: #dbe3f4; font-size: 11px; font-weight: 750; }
.subscription-admin-modal .form-stack input,
.subscription-admin-modal .form-stack select { width: 100%; height: 44px; margin: 0; border-radius: 9px; padding: 0 13px; font-size: 11px; }
.subscription-admin-modal .subscription-duration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.subscription-admin-modal .subscription-duration-fields[hidden] { display: none; }
.subscription-admin-modal .form-error { min-height: 18px; margin: 12px 0 0; }
.subscription-admin-modal .modal-foot { min-height: 74px; margin: 8px -26px 0; padding: 14px 20px; }
@media (max-width: 560px) {
    .subscription-admin-modal form { padding: 20px 18px 0; }
    .subscription-admin-modal .subscription-duration-fields { grid-template-columns: 1fr; }
    .subscription-admin-modal .modal-foot { margin-inline: -18px; }
}

/* Los buscadores se comportan como un único control, sin un input interior visible. */
.app-shell :is(.search, .global-search) {
    min-height: 40px;
    align-items: center;
    border-color: rgba(155, 176, 216, .24);
    border-radius: 10px;
    background: #0e192a;
    box-shadow: inset 0 1px rgba(255, 255, 255, .018);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.app-shell :is(.search, .global-search):focus-within {
    border-color: rgba(113, 137, 255, .72);
    background: #101c2f;
    box-shadow: 0 0 0 3px rgba(93, 111, 235, .12);
}
.app-shell :is(.search, .global-search) > svg,
.app-shell .search > span {
    display: grid;
    flex: 0 0 18px;
    place-items: center;
    color: #91a0bd;
    pointer-events: none;
}
.app-shell :is(.search, .global-search) input,
:root:not([data-theme="light"]) .app-shell :is(.search, .global-search) input {
    width: auto;
    min-width: 0;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: var(--text);
    background: transparent;
    box-shadow: none;
    outline: 0;
}
.app-shell :is(.search, .global-search) input::-webkit-search-decoration,
.app-shell :is(.search, .global-search) input::-webkit-search-cancel-button { appearance: none; }
.app-shell :is(.search, .global-search) input::placeholder { color: #8997b2; opacity: 1; }
.app-shell :is(.search, .global-search) kbd { flex: none; margin-left: 6px; }
:root[data-theme="light"] .app-shell :is(.search, .global-search) {
    border-color: rgba(63, 79, 112, .2);
    background: #fff;
}
:root[data-theme="light"] .app-shell :is(.search, .global-search):focus-within {
    border-color: rgba(79, 91, 213, .58);
    background: #fff;
}



/* Suscripciones individuales */
.stats-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.subscription-metric strong { color: #62dca8; }
.subscription-metric.expired strong { color: #ff7188; }
.subscription-metric.unactivated strong { color: #f6c968; }
.bot-card.subscription-expired { border-color: rgba(255, 113, 136, .34); }
.bot-card.subscription-unactivated { border-color: rgba(246, 201, 104, .28); }
@media (max-width: 1180px) { .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }

/* Gestión administrativa de suscripciones */
.admin-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.subscription-admin-modal { width: min(620px, 100%); }
.subscription-admin-modal form { padding: 22px 24px 0; }
.subscription-admin-modal .modal-foot { position: static; width: auto; margin: 22px -24px 0; }
.subscription-current { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; border: 1px solid #29364f; border-radius: 11px; padding: 14px; background: #0d1627; }
.subscription-current > div { display: grid; gap: 3px; }
.subscription-current small { color: #697792; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.subscription-current strong { color: #dce5f8; font-size: 12px; }
.subscription-duration-fields { grid-template-columns: 1fr 1fr; }
.subscription-duration-fields[hidden] { display: none; }
@media (max-width: 900px) { .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .admin-stats, .subscription-duration-fields { grid-template-columns: 1fr; }
    .subscription-admin-modal form { padding: 18px 18px 0; }
    .subscription-admin-modal .modal-foot { margin: 18px -18px 0; }
}

/* Expanded control center modules */
.sidebar { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #27324a transparent; }
.module-toolbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: rgba(13, 21, 37, .72); }
.module-toolbar .search { flex: 1; }
.module-bot-select { display: grid; min-width: 260px; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.module-bot-select select { height: 42px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 34px 0 12px; color: var(--text); background: var(--panel); font-size: 12px; font-weight: 700; text-transform: none; }
.content-surface { border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(16, 25, 43, .94), rgba(10, 17, 30, .94)); box-shadow: 0 18px 48px rgba(0, 0, 0, .12); }
.content-surface > header { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.content-surface > header h2 { margin: 2px 0 0; font-size: 15px; }
.response-list, .team-member-list { display: grid; }
.response-item, .team-member { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(280px, 1fr) auto; align-items: center; gap: 18px; min-height: 76px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.response-item:last-child, .team-member:last-child { border-bottom: 0; }
.response-command { display: flex; align-items: center; gap: 12px; }
.response-command > span, .team-member > span:first-child { display: grid; width: 36px; height: 36px; flex: none; place-items: center; border: 1px solid rgba(119, 132, 255, .24); border-radius: 10px; color: #9d9bff; background: rgba(119, 92, 246, .1); font-weight: 850; }
.response-command code { display: block; color: #b9c8ff; font-size: 12px; font-weight: 800; }
.response-command small, .team-member small { color: var(--muted-2); font-size: 9px; }
.response-copy { overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.response-actions, .team-member-actions { display: flex; gap: 7px; }
.response-actions button, .team-member-actions button { height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 11px; color: #c9d5f2; background: rgba(20, 30, 50, .8); font-size: 10px; font-weight: 750; }
.role-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin: 0 0 18px; }
.role-cards article { position: relative; min-height: 135px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; padding: 18px; background: rgba(13, 21, 37, .78); }
.role-cards article > span { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 13px; border-radius: 9px; color: #9f9bff; background: rgba(124, 92, 246, .13); }
.role-cards svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.role-cards strong { display: block; font-size: 12px; }
.role-cards p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.team-layout, .support-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, .65fr); gap: 16px; }
.team-member { grid-template-columns: 44px minmax(180px, 1fr) auto auto; }
.team-member > div strong { display: block; font-size: 12px; }
.team-member mark, .access-badge { border: 1px solid rgba(125, 135, 255, .25); border-radius: 999px; padding: 5px 9px; color: #b8b9ff; background: rgba(98, 88, 230, .1); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.invite-surface form, #supportRequestForm { display: grid; gap: 14px; padding: 20px; }
.invite-surface label, #supportRequestForm label { display: grid; gap: 6px; color: #dbe4fa; font-size: 10px; font-weight: 750; }
.invite-surface input, .invite-surface select, #supportRequestForm input, #supportRequestForm select, #supportRequestForm textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 12px; color: var(--text); background: #0b1322; outline: 0; resize: vertical; }
.invite-surface p { margin: 0; color: var(--muted); font-size: 9px; }
.account-overview-banner { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; border: 1px solid rgba(116, 108, 255, .28); border-radius: 15px; padding: 22px; background: linear-gradient(120deg, rgba(77, 77, 191, .2), rgba(16, 27, 49, .92) 58%, rgba(18, 80, 125, .15)); }
.account-overview-banner > span { display: grid; width: 58px; height: 58px; flex: none; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #8b6cff, #297fff); font-size: 21px; font-weight: 900; box-shadow: 0 12px 30px rgba(70, 85, 225, .28); }
.account-overview-banner h2 { margin: 1px 0; font-size: 20px; }
.account-overview-banner p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; }
.account-overview-banner mark { margin-left: auto; border-radius: 7px; padding: 6px 10px; color: #8ce4c2; background: rgba(36, 180, 130, .12); font-size: 9px; font-weight: 850; }
.account-center-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-center-grid .content-surface { min-height: 260px; padding-bottom: 20px; }
.account-center-grid .content-surface > button, .account-center-grid .content-surface > .account-data-actions { margin: 17px 20px 0; }
.account-detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 20px; background: var(--line); }
.account-detail-list > div { display: grid; gap: 4px; padding: 15px 0; background: #0d1627; }
.account-detail-list > div:nth-child(odd) { padding-right: 15px; }
.account-detail-list > div:nth-child(even) { padding-left: 15px; }
.account-detail-list span { color: var(--muted); font-size: 9px; }
.account-detail-list strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.account-center-grid .session-list { padding: 10px 20px; }
.security-score { display: flex; align-items: center; gap: 14px; padding: 20px; }
.security-score > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: conic-gradient(#47d5a2 82%, #263249 0); }
.security-score > span i { width: 34px; height: 34px; border-radius: 50%; background: #0d1727; }
.security-score strong { display: block; }
.security-score p, .account-security-card li { color: var(--muted); font-size: 10px; }
.account-security-card ul { display: grid; gap: 8px; margin: 0 20px; padding-left: 18px; }
.account-data-actions { display: flex; gap: 8px; }
.guide-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; border: 1px solid rgba(115, 104, 255, .28); border-radius: 16px; padding: 24px; background: linear-gradient(120deg, rgba(71, 68, 177, .2), rgba(10, 19, 35, .85)); }
.guide-hero > div { display: flex; align-items: center; gap: 15px; }
.guide-hero > div > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; color: #b5b1ff; background: rgba(118, 93, 246, .16); }
.guide-hero svg, .support-status-grid svg, .support-side svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.guide-hero h2 { margin: 0; font-size: 17px; }
.guide-hero p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.guide-hero .search { width: min(430px, 48%); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 18px; }
.guide-grid > button { display: flex; min-height: 150px; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 19px; color: var(--text); background: rgba(13, 21, 37, .8); text-align: left; transition: .18s ease; }
.guide-grid > button:hover { border-color: rgba(129, 124, 255, .38); background: rgba(21, 31, 53, .9); transform: translateY(-2px); }
.guide-grid > button > span { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 10px; color: #9e9bff; background: rgba(124, 92, 246, .12); }
.guide-grid svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.guide-grid strong { display: block; margin: 2px 0 5px; font-size: 12px; }
.guide-grid p { margin: 0 0 12px; color: var(--muted); font-size: 10px; }
.guide-grid small { color: #7f8daa; font-size: 9px; font-weight: 750; }
.guide-quickstart ol { display: grid; margin: 0; padding: 0; list-style: none; }
.guide-quickstart li { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 13px; min-height: 70px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.guide-quickstart li:last-child { border-bottom: 0; }
.guide-quickstart li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #a9adff; background: rgba(102, 91, 230, .12); font-size: 10px; font-weight: 850; }
.guide-quickstart strong { font-size: 11px; }
.guide-quickstart p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.guide-quickstart button { border: 0; color: #9eb8ff; background: transparent; font-size: 10px; font-weight: 800; }
.subscription-guide { margin-bottom: 18px; scroll-margin-top: 90px; transition: border-color .25s ease, box-shadow .25s ease; }
.subscription-guide > header { align-items: center; }
.subscription-guide > header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.subscription-guide code { border: 1px solid rgba(99, 150, 255, .2); border-radius: 5px; padding: 2px 5px; color: #dce9ff; background: rgba(61, 111, 211, .12); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.subscription-guide.is-highlighted { border-color: rgba(65, 165, 255, .7); box-shadow: 0 0 0 3px rgba(65, 165, 255, .12), 0 16px 50px rgba(18, 91, 180, .16); }
.support-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.support-status-grid article { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: rgba(13, 21, 37, .78); }
.support-status-grid article > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #7cd8bd; background: rgba(45, 190, 144, .1); }
.support-status-grid strong { display: block; font-size: 11px; }
.support-status-grid p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.support-side .content-surface > button { display: flex; width: calc(100% - 28px); align-items: center; gap: 12px; margin: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 13px; color: var(--text); background: rgba(15, 24, 42, .76); text-align: left; }
.support-side .content-surface > button > span { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 9px; color: #a6a8ff; background: rgba(108, 93, 232, .11); }
.support-side strong { display: block; font-size: 11px; }
.support-side p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.support-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.role-preview-control { display: flex; height: 38px; align-items: center; gap: 7px; border: 1px solid #26324a; border-radius: 9px; padding: 0 8px 0 10px; color: #91a0c1; background: rgba(14, 23, 39, .85); font-size: 9px; font-weight: 750; white-space: nowrap; }
.role-preview-control > svg { width: 15px; height: 15px; fill: none; stroke: #9c9cff; stroke-width: 1.8; }
.role-preview-control select { max-width: 128px; height: 30px; border: 0; padding: 0 25px 0 7px; color: #edf2ff; background: #111b2d; font-size: 9px; font-weight: 800; outline: 0; }
.role-preview-control.previewing { border-color: rgba(159, 137, 255, .55); color: #d4ceff; background: rgba(94, 66, 190, .16); }
.role-preview-banner { display: flex; align-items: center; gap: 10px; margin: 12px 34px 0; border: 1px solid rgba(159, 137, 255, .35); border-radius: 11px; padding: 10px 13px; color: #dcd9ff; background: linear-gradient(90deg, rgba(93, 63, 188, .2), rgba(19, 27, 46, .92)); }
.role-preview-banner > span { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 8px; color: #aaa6ff; background: rgba(132, 105, 245, .14); }
.role-preview-banner svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.role-preview-banner p { flex: 1; margin: 0; font-size: 10px; }
.role-preview-banner button { border: 1px solid rgba(174, 159, 255, .28); border-radius: 8px; padding: 7px 10px; color: #d8d4ff; background: rgba(91, 68, 180, .16); font-size: 9px; font-weight: 800; }
body[data-preview-role="editor"] [data-create], body[data-preview-role="moderator"] [data-create], body[data-preview-role="viewer"] [data-create], body[data-preview-role="editor"] #newBotButton, body[data-preview-role="moderator"] #newBotButton, body[data-preview-role="viewer"] #newBotButton { display: none !important; }
:root[data-theme="light"] .module-toolbar, :root[data-theme="light"] .content-surface, :root[data-theme="light"] .role-cards article, :root[data-theme="light"] .guide-grid > button, :root[data-theme="light"] .support-status-grid article { color: var(--text); background: rgba(255, 255, 255, .9); }
:root[data-theme="light"] .invite-surface input, :root[data-theme="light"] .invite-surface select, :root[data-theme="light"] #supportRequestForm input, :root[data-theme="light"] #supportRequestForm select, :root[data-theme="light"] #supportRequestForm textarea, :root[data-theme="light"] .account-detail-list > div { color: var(--text); background: #f8faff; }
:root[data-theme="light"] .account-overview-banner, :root[data-theme="light"] .guide-hero { background: linear-gradient(120deg, rgba(105, 100, 255, .12), rgba(255, 255, 255, .94)); }
:root[data-theme="light"] .role-preview-control { color: #52627f; background: #fff; }
:root[data-theme="light"] .role-preview-control select { color: #263451; background: #f1f4fa; }
:root[data-theme="light"] .role-preview-banner { color: #3e3774; background: linear-gradient(90deg, rgba(111, 91, 230, .12), rgba(255, 255, 255, .95)); }

@media (max-width: 1100px) {
    .role-cards, .guide-grid { grid-template-columns: repeat(2, 1fr); }
    .team-layout, .support-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .module-toolbar, .guide-hero { align-items: stretch; flex-direction: column; }
    .module-bot-select, .guide-hero .search { width: 100%; min-width: 0; }
    .role-cards, .guide-grid, .account-center-grid, .support-status-grid { grid-template-columns: 1fr; }
    .response-item { grid-template-columns: 1fr; gap: 9px; }
    .response-copy { white-space: normal; }
    .team-member { grid-template-columns: 40px 1fr auto; }
    .team-member-actions { grid-column: 2 / 4; }
}
@media (max-width: 1250px) { .role-preview-control > span, .last-update { display: none; } }
@media (max-width: 860px) { .role-preview-control select { max-width: 100px; } .role-preview-banner { margin-inline: 14px; } }
@media (max-width: 620px) { .role-preview-control { position: fixed; right: 14px; bottom: 14px; z-index: 24; box-shadow: 0 12px 35px rgba(0, 0, 0, .35); } .role-preview-banner { align-items: flex-start; flex-wrap: wrap; } .role-preview-banner button { margin-left: 38px; } }

/* Global announcements */
.notification-item.global { border: 1px solid rgba(89, 124, 224, .16); background: linear-gradient(135deg, rgba(50, 77, 151, .12), rgba(16, 27, 48, .18)); }
.notification-item.global > span { color: #b5c5ff; background: rgba(78, 111, 224, .16); }
.notification-item.success > span { color: #72ddb8; background: rgba(48, 198, 146, .1); }
.notification-item small { display: block; margin-top: 6px; color: #697791; font-size: 8px; }
.admin-announcement-composer, .admin-announcement-history { border: 1px solid #293650; border-radius: 13px; padding: 18px; background: linear-gradient(145deg, rgba(16, 27, 47, .9), rgba(10, 18, 33, .9)); }
.announcement-compose-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 180px; gap: 13px; }
.announcement-compose-grid label { display: grid; align-content: start; gap: 6px; color: #aeb9d1; font-size: 10px; font-weight: 700; }
.announcement-compose-grid input, .announcement-compose-grid select, .announcement-compose-grid textarea { width: 100%; border: 1px solid #30405d; border-radius: 9px; padding: 10px 11px; color: var(--text); background: rgba(7, 14, 27, .65); font: inherit; outline: 0; resize: vertical; }
.announcement-compose-grid input, .announcement-compose-grid select { height: 42px; }
.announcement-compose-grid input:focus, .announcement-compose-grid select:focus, .announcement-compose-grid textarea:focus { border-color: #5b72e8; box-shadow: 0 0 0 3px rgba(91, 114, 232, .09); }
.announcement-message-field { grid-column: 1 / -1; }
.announcement-message-field small { justify-self: end; color: #687692; font-size: 8px; font-weight: 500; }
.admin-announcement-composer > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 15px; border-top: 1px solid #293650; padding-top: 15px; }
.admin-announcement-composer > footer > span { color: #71809d; font-size: 9px; }
.admin-announcement-history { margin-top: 15px; }
.admin-announcement-history > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.admin-announcement-history h3 { margin: 0; font-size: 12px; }
.admin-announcement-history header p { margin: 3px 0 0; color: #75819b; font-size: 9px; }
.admin-announcement-history header > span { border: 1px solid #2e3c58; border-radius: 99px; padding: 5px 8px; color: #8d9ab6; font-size: 8px; }
.admin-announcement-list { display: grid; gap: 8px; }
.admin-announcement-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; border: 1px solid #293650; border-left: 3px solid #5f83ed; border-radius: 10px; padding: 13px; background: rgba(8, 16, 30, .54); }
.admin-announcement-item.success { border-left-color: #35c992; }
.admin-announcement-item.warning { border-left-color: #efa945; }
.admin-announcement-item.error { border-left-color: #eb4b70; }
.admin-announcement-item.expired { opacity: .55; }
.announcement-level-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #aabfff; background: rgba(73, 105, 211, .13); }
.announcement-level-icon .ui-icon { width: 17px; height: 17px; }
.admin-announcement-item > div { min-width: 0; }
.admin-announcement-item > div > header { display: flex; align-items: center; gap: 8px; }
.admin-announcement-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-announcement-item mark { border-radius: 5px; padding: 3px 5px; color: #9cb4ff; background: rgba(74, 105, 211, .11); font-size: 7px; font-weight: 800; }
.admin-announcement-item p { margin: 5px 0; color: #9ca8c0; font-size: 9px; white-space: pre-wrap; }
.admin-announcement-item small { color: #66738e; font-size: 8px; }
.admin-announcement-item > button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; color: #e8798e; background: rgba(225, 61, 91, .08); }
.admin-announcement-item > button:hover { color: #fff; background: #d9365d; }
.admin-announcement-item > button .ui-icon { width: 15px; height: 15px; }
:root[data-theme="light"] .admin-announcement-composer, :root[data-theme="light"] .admin-announcement-history, :root[data-theme="light"] .admin-announcement-item { background: #fff; }
:root[data-theme="light"] .announcement-compose-grid input, :root[data-theme="light"] .announcement-compose-grid select, :root[data-theme="light"] .announcement-compose-grid textarea { background: #f6f8fc; }

@media (max-width: 760px) {
    .announcement-compose-grid { grid-template-columns: 1fr 1fr; }
    .announcement-title-field, .announcement-message-field { grid-column: 1 / -1; }
    .admin-announcement-composer > footer { align-items: stretch; flex-direction: column; }
    .admin-announcement-composer > footer button { width: 100%; }
}
@media (max-width: 480px) {
    .announcement-compose-grid { grid-template-columns: 1fr; }
    .announcement-title-field, .announcement-message-field { grid-column: auto; }
    .admin-announcement-item { grid-template-columns: auto minmax(0, 1fr); }
    .admin-announcement-item > button { grid-column: 2; justify-self: end; }
}

.command-aliases { overflow: hidden; margin-top: 3px; color: #657491; font: 500 8px/1.3 "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.command-category.ai { color: #d1b7ff; background: rgba(153, 91, 237, .12); }
.command-category.configuration { color: #9dbaff; background: rgba(70, 112, 227, .11); }
.command-category.economy { color: #ffd080; background: rgba(223, 157, 50, .11); }
.command-category.fun { color: #f4a6d7; background: rgba(211, 81, 162, .1); }
.command-category.utility { color: #8dd9ef; background: rgba(55, 167, 199, .1); }
.command-category.general { color: #b9c3d9; background: rgba(127, 142, 173, .1); }
.command-row:has(.command-aliases) { min-height: 88px; }

/* Command list and section polish */
.page-view > .page-heading { margin-bottom: 24px; border-bottom: 1px solid rgba(45, 57, 82, .72); padding-bottom: 22px; }
.page-view > .page-heading .eyebrow { margin-bottom: 6px; color: #7184ae; }
.page-view > .page-heading h1 { line-height: 1.15; }
.page-view > .page-heading .secondary-button { background: rgba(20, 31, 52, .72); }
.dashboard-card, .data-surface, .control-layout, .audit-entry { transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.dashboard-card:hover { border-color: rgba(105, 130, 192, .3); box-shadow: 0 17px 40px rgba(0, 0, 0, .16); }
.dashboard-card > header { padding-bottom: 13px; border-bottom: 1px solid rgba(45, 57, 82, .55); }
.dashboard-card > header h2 { font-size: 16px; }
.control-layout { border-color: #283650; box-shadow: 0 18px 45px rgba(0, 0, 0, .14); }
.control-list { padding: 15px; }
.control-list > button { min-height: 58px; }
.control-console { padding: 26px; }

[data-page-view="commands-center"] .command-center-toolbar,
[data-page-view="activity-center"] > .activity-toolbar {
    min-height: 66px;
    margin-bottom: 12px;
    border: 1px solid #27344d;
    border-radius: 12px;
    padding: 12px;
    background: rgba(11, 20, 35, .72);
}
.command-center-toolbar .search { max-width: none; }
.command-center-toolbar select { min-width: 160px; }
.result-count { flex: none; border-left: 1px solid #2a3650; padding: 0 6px 0 15px; color: #75829f; font-size: 10px; font-weight: 700; white-space: nowrap; }
.command-list-surface { overflow: hidden; border: 1px solid #293750; border-radius: 13px; background: rgba(8, 15, 28, .74); box-shadow: 0 15px 38px rgba(0, 0, 0, .12); }
.command-list-header, .command-row { display: grid; grid-template-columns: minmax(220px, 1.05fr) minmax(240px, 1.35fr) minmax(175px, .8fr) 100px 178px; align-items: center; gap: 18px; }
.command-list-header { min-height: 43px; border-bottom: 1px solid #293750; padding: 0 18px; color: #65728e; background: rgba(17, 27, 46, .72); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.command-list { display: grid; }
.command-row { position: relative; min-height: 82px; border-bottom: 1px solid rgba(45, 57, 82, .62); padding: 13px 18px; background: rgba(13, 22, 38, .36); }
.command-row:last-child { border-bottom: 0; }
.command-row:hover { background: rgba(36, 55, 88, .3); }
.command-row.command-disabled { opacity: .58; }
.command-primary { display: grid; min-width: 0; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 11px; }
.command-primary > span:last-child { display: grid; min-width: 0; }
.command-primary code { overflow: hidden; color: #c7d0ff; font: 800 12px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.command-primary strong { overflow: hidden; margin-top: 3px; color: #8f9bb6; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.command-category { display: inline-flex; width: max-content; max-width: 86px; justify-content: center; overflow: hidden; border: 1px solid rgba(83, 155, 255, .15); border-radius: 6px; padding: 4px 7px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.command-description { display: -webkit-box; overflow: hidden; margin: 0; color: #8a96af; font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.command-rules { display: flex; flex-wrap: wrap; gap: 5px; }
.command-rules > span { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #29364f; border-radius: 6px; padding: 4px 6px; color: #8794b0; background: rgba(16, 27, 46, .7); font-size: 8px; white-space: nowrap; }
.command-rules .ui-icon { width: 12px; height: 12px; color: #8297e9; }
.command-row .command-state { position: static; display: inline-flex; width: max-content; align-items: center; gap: 6px; border-radius: 6px; padding: 5px 8px; color: #8792aa; background: rgba(113, 124, 151, .09); font-size: 8px; }
.command-row .command-state i { width: 6px; height: 6px; border-radius: 50%; background: #68738d; }
.command-row .command-state.enabled { color: #70dbb5; background: rgba(46, 190, 140, .09); }
.command-row .command-state.enabled i { background: #36d39b; box-shadow: 0 0 0 3px rgba(54, 211, 155, .09); }
.command-row > footer { display: flex; justify-content: flex-end; gap: 7px; }
.command-row > footer button { position: static; display: inline-flex; min-height: 34px; align-items: center; gap: 6px; border: 1px solid #2b3852; border-radius: 8px; padding: 0 9px; color: #99a7c4; background: rgba(15, 26, 45, .85); font-size: 9px; }
.command-row > footer button:hover { border-color: #465985; color: #eef2ff; background: #182843; }
.command-row > footer .command-configure { border-color: rgba(72, 130, 239, .3); color: #b5c8ff; background: rgba(45, 91, 184, .13); }
.command-row > footer .ui-icon { width: 14px; height: 14px; }
.command-simulator { margin-top: 16px; }

.data-surface { border-color: #293750; box-shadow: 0 15px 38px rgba(0, 0, 0, .1); }
.data-toolbar { min-height: 66px; padding: 12px 15px; background: rgba(13, 23, 40, .7); }
.pro-table tbody tr { transition: background .14s ease; }
.pro-table tbody tr:hover { background: rgba(53, 76, 122, .11); }
.pro-table th { height: 44px; font-size: 9px; }
.pro-table td { height: 58px; font-size: 10px; }
.audit-timeline { gap: 9px; }
.audit-entry { min-height: 72px; padding: 15px 16px; }
.audit-entry:hover { border-color: rgba(100, 125, 184, .32); background: rgba(19, 31, 53, .82); }
.system-grid { gap: 18px; }
.system-grid > .dashboard-card { min-height: 245px; }
.health-metrics > div { min-height: 62px; justify-content: center; }
.session-list article:last-child { border-bottom: 0; }
.preference-grid button:hover { border-color: rgba(108, 132, 194, .4); background: rgba(39, 55, 88, .34); }
.inline-empty { border-radius: 10px; padding: 24px; background: rgba(13, 22, 38, .32); }

:root[data-theme="light"] .command-list-surface,
:root[data-theme="light"] .command-row,
:root[data-theme="light"] [data-page-view="commands-center"] .command-center-toolbar,
:root[data-theme="light"] [data-page-view="activity-center"] > .activity-toolbar { background: rgba(255, 255, 255, .9); }
:root[data-theme="light"] .command-list-header { background: #f4f7fc; }
:root[data-theme="light"] .command-row:hover { background: #f4f7fc; }
:root[data-theme="light"] .command-primary code { color: #3a4d9d; }
:root[data-theme="light"] .command-rules > span,
:root[data-theme="light"] .command-row > footer button { background: #f6f8fc; }

@media (max-width: 1180px) {
    .command-list-header, .command-row { grid-template-columns: minmax(210px, 1fr) minmax(220px, 1.2fr) minmax(160px, .8fr) 90px 88px; gap: 13px; }
    .command-row > footer button span { display: none; }
    .command-row > footer button { width: 36px; justify-content: center; padding: 0; }
}
@media (max-width: 920px) {
    .command-center-toolbar { flex-wrap: wrap; }
    .command-center-toolbar .search { flex-basis: 100%; }
    .command-center-toolbar select { min-width: 0; flex: 1; }
    .command-list-header { display: none; }
    .command-row { grid-template-columns: minmax(210px, .9fr) minmax(0, 1fr) auto; gap: 12px; }
    .command-rules { grid-column: 1 / 3; }
    .command-row .command-state { grid-column: 3; grid-row: 1; }
    .command-row > footer { grid-column: 3; grid-row: 2; }
}
@media (max-width: 640px) {
    [data-page-view="commands-center"] .command-center-toolbar { display: grid; grid-template-columns: 1fr; }
    .command-center-toolbar .search { width: 100%; }
    .command-center-toolbar select { width: 100%; }
    .result-count { border-top: 1px solid #2a3650; border-left: 0; padding: 10px 2px 0; }
    .command-row { display: grid; grid-template-columns: 1fr auto; padding: 15px; }
    .command-primary, .command-description, .command-rules { grid-column: 1 / -1; }
    .command-primary { grid-template-columns: auto minmax(0, 1fr); }
    .command-description { margin-top: 2px; }
    .command-row .command-state { grid-column: 1; grid-row: auto; }
    .command-row > footer { grid-column: 2; grid-row: auto; }
    .command-simulator > div { grid-template-columns: 1fr; }
    [data-page-view="activity-center"] > .activity-toolbar { align-items: stretch; flex-direction: column; }
    .activity-toolbar .search { width: 100%; max-width: none; }
    .system-grid > .dashboard-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Layout inspired by modern bot-control consoles */
body { background: radial-gradient(circle at 72% 0, rgba(50, 78, 150, .08), transparent 32rem), #070b14; }
.app-shell { padding-left: 280px; }
.sidebar { width: 280px; padding: 24px 20px; border-right-color: #171d2b; background: #080a10; }
.brand { padding: 0 10px 42px; }
.brand-mark { width: 43px; height: 43px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #25b9ff, #573bf0 62%, #201152); box-shadow: 0 0 0 3px rgba(38, 143, 255, .12), 0 0 24px rgba(95, 72, 240, .24); }
.brand strong { color: #4b82ff; font-size: 20px; letter-spacing: -.02em; }
.brand small { color: #515b73; }
.nav-label { margin: 0 10px 9px; color: #68728b; font-size: 9px; }
.secondary-label { margin-top: 28px; }
.nav-item { min-height: 43px; border: 0; border-radius: 8px; padding: 0 10px; color: #99a7ca; }
.nav-item:hover { color: #dce5ff; background: rgba(55, 102, 203, .08); }
.nav-item.active { border: 0; color: #268cff; background: rgba(28, 103, 232, .08); box-shadow: none; }
.nav-icon, .nav-item.active .nav-icon { width: 20px; height: 20px; padding: 0; color: currentColor; background: transparent; }
.nav-item > span:last-child { display: block; font-size: 11px; font-weight: 720; }
.sidebar-create { min-height: 43px; margin-top: 9px; border: 1px solid rgba(72, 112, 215, .18); border-radius: 8px; color: #8fa8e6; background: rgba(31, 65, 142, .07); }
.sidebar-create > span:first-child { font-size: 16px; }
.sidebar-create > span:last-child { display: block; font-size: 10px; font-weight: 700; }
.sidebar-foot { border-top-color: #171d2b; }

.topbar { height: 64px; padding: 0 34px; border-bottom-color: #151b29; background: rgba(7, 11, 20, .94); }
.topbar-title small { color: #526078; }
.topbar-title strong { font-size: 11px; }
.icon-button { border-color: #242d40; color: #8996b4; background: #111725; }
.account-menu { background: #0e1524; }
.page { width: min(100%, 1260px); padding: 72px 30px 80px; }
.page-heading { padding: 0 0 28px; }
.page-heading h1 { font-size: 22px; letter-spacing: -.025em; }
.page-heading .hero-copy > p:last-child { margin-top: 4px; color: #8390ad; font-size: 10px; }
.page-heading .hero-copy > p:last-child span { color: #a7b4d0; }
.primary-button { border-color: #1d91ff; border-radius: 8px; background: linear-gradient(135deg, #168eff, #5864f2); box-shadow: 0 8px 22px rgba(24, 111, 234, .2); }

.stats-grid { grid-template-columns: repeat(5, 1fr); gap: 0; overflow: hidden; margin: 0 0 38px; border: 1px solid #29334a; border-radius: 12px; background: linear-gradient(110deg, #15182d, #102538); }
.stat-card { display: grid; min-height: 102px; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 10px; overflow: visible; border: 0; border-right: 1px solid #30384d; border-radius: 0; padding: 18px 24px; background: transparent; }
.stat-card:last-child { border-right: 0; }
.stat-card::after { display: none; }
.stat-card:hover { border-color: #30384d; background: rgba(255, 255, 255, .025); box-shadow: none; transform: none; }
.stat-card.active { border-color: #30384d; background: rgba(106, 67, 235, .08); box-shadow: inset 0 -2px #8b5cf6; }
.stat-top { grid-row: 1 / 3; align-self: center; }
.stat-icon { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #b392ff; background: linear-gradient(145deg, #7d35f2, #4a2ccf); font-size: 15px; }
.stat-trend { display: none; }
.stat-value { align-self: end; margin: 0; font-size: 22px; }
.stat-label { align-self: start; margin-top: 1px; color: #8a96b2; font-size: 8px; }
.stat-card.blue .stat-icon, .stat-card.violet .stat-icon, .stat-card.amber .stat-icon, .stat-card.red .stat-icon { color: #fff; background: linear-gradient(145deg, #8738f5, #512ed8); }

.bots-section { padding: 0; border: 0; background: transparent; box-shadow: none; }
.section-heading { align-items: end; margin-bottom: 14px; }
.section-heading h2 { font-size: 14px; }
.section-heading > div:first-child > span { color: #69758f; }
.list-tools { display: flex; width: min(580px, 100%); gap: 7px; margin: 0; padding: 0; border: 0; background: transparent; }
.search { flex: 1; height: 35px; border-color: #243049; background: #0c1423; }
.list-tools select { width: 125px; height: 35px; border-color: #243049; background: #0c1423; }
.bot-surface { margin-top: 0; }
.bot-collection { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bot-card { display: grid; grid-template-columns: minmax(210px, 1.05fr) minmax(220px, 1fr) minmax(190px, .75fr) auto; align-items: center; gap: 18px; min-height: 114px; border: 1px solid #2a354e; border-radius: 12px; padding: 17px 22px; background: linear-gradient(110deg, #171a30, #10283a); }
.bot-card:hover { border-color: #425071; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); transform: translateY(-1px); }
.bot-card.error { border-color: rgba(255, 77, 113, .35); }
.bot-card-head { justify-content: flex-start; }
.bot-avatar { width: 48px; height: 48px; border-radius: 50%; border-color: #206be2; background: radial-gradient(circle at 35% 25%, #1cc1ff, #3731d9 65%, #111848); box-shadow: 0 0 0 3px rgba(39, 117, 243, .11); }
.bot-avatar i { border-color: #161a30; }
.bot-name strong { font-size: 12px; }
.bot-name span { color: #6d7894; }
.bot-card-head .status-pill { position: absolute; margin: 42px 0 0 58px; }
.status-pill { padding: 3px 7px; border: 0; border-radius: 4px; }
.status-pill.online { color: #e8fff7; background: #0ba872; }
.status-pill.starting { color: #fff; background: #187fe4; }
.status-pill.error { color: #fff; background: #e72f5d; }
.status-pill:not(.online):not(.starting):not(.error) { color: #fff; background: #d72d58; }
.status-pill::before { display: none; }
.room-cell { margin: 0; padding: 0; border: 0; background: transparent; }
.room-cell:hover { border-color: transparent; }
.room-icon { color: #74819f; background: transparent; }
.room-cell small { color: #65718d; }
.room-cell strong { color: #288cff; font-size: 10px; }
.room-cell > i { color: #5a6681; }
.bot-metrics { display: grid; grid-template-columns: 1fr; gap: 5px; margin: 0; }
.bot-metrics > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; background: transparent; }
.bot-metrics small { color: #64708a; }
.bot-metrics strong { color: #a9b4cd; font-size: 9px; }
.bot-card-foot { justify-content: flex-end; margin: 0; padding: 0; border: 0; }
.configure-button { display: grid; width: 31px; height: 31px; min-height: 0; place-items: center; padding: 0; border-radius: 50%; color: #fff; background: #168df5; font-size: 0; }
.configure-button span { margin: 0; font-size: 11px; }
.row-actions button { width: 31px; height: 31px; border: 0; border-radius: 50%; color: #fff; background: #7c3aed; }
.row-actions .power.off { color: #fff; background: #10b981; }
.row-actions .power.on { color: #fff; background: #f59e0b; }
.row-actions .delete { color: #fff; background: #e72f5d; }
.empty-state { border: 1px dashed #28344d; border-radius: 12px; background: #0b1220; }

/* Full-screen bot editor */
#botModal { padding: 0; background: #070b14; backdrop-filter: none; }
.bot-workspace { width: 100%; height: 100vh; max-height: none; grid-template-columns: 282px minmax(0, 1fr); grid-template-rows: 58px minmax(0, 1fr); border: 0; border-radius: 0; background: #070b14; box-shadow: none; }
.bot-workspace > .modal-head { min-height: 58px; padding: 0 18px; border-bottom: 1px solid #242a39; background: #080a10; }
.editor-mark { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #1dbdff, #4b37e8 65%, #17124b); }
.editor-title .eyebrow { display: none; }
.editor-title h2 { font-size: 12px; }
.editor-title h2::before { content: "Editar bot · "; color: #8e99b2; font-weight: 500; }
.save-state { border-radius: 4px; padding: 4px 7px; color: #e7dcff; background: #7c3aed; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.save-state::before { display: none; }
.save-state.dirty { color: #fff; background: #d97706; }
.modal-tabs { grid-column: 1; grid-row: 2; padding: 18px 13px 76px; border-right: 1px solid #273149; background: linear-gradient(180deg, #0d1930, #0a1222); }
.modal-tabs > p { margin: 20px 11px 8px; color: #8c56ff; font-size: 8px; }
.modal-tabs > p:first-child { margin-top: 8px; }
.modal-tabs button { min-height: 41px; grid-template-columns: 24px minmax(0, 1fr); border-radius: 7px; padding: 0 11px; color: #9bb7ec; }
.modal-tabs button:hover { color: #fff; background: rgba(67, 99, 174, .12); }
.modal-tabs button.active { border: 0; color: #fff; background: linear-gradient(100deg, #7653ed, #932ee7); box-shadow: 0 7px 18px rgba(105, 46, 224, .2); }
.modal-tabs button > i, .modal-tabs button.active > i { width: 19px; height: 19px; color: currentColor; background: transparent; font-size: 7px; }
.modal-tabs button strong { font-size: 10px; }
.modal-tabs button small { display: none; }
#botForm { position: relative; grid-column: 2; grid-row: 2; padding-bottom: 67px; background: radial-gradient(circle at 80% 0, rgba(35, 54, 100, .07), transparent 28rem), #070b14; }
.tab-panel { width: 100%; max-width: none; margin: 0; padding: 18px 24px 28px; }
.form-intro { margin: 0 0 12px; padding-bottom: 14px; border-bottom: 1px solid #202738; text-align: center; }
.form-intro h3, .activity-toolbar h3 { font-size: 13px; }
.form-intro p, .activity-toolbar p { color: #7180a0; font-size: 8px; }
.form-card { margin: 0; border: 0; border-bottom: 1px solid #1d2536; border-radius: 0; padding: 16px 0; background: transparent; }
.form-card-title { margin: 0 0 12px 186px; }
.form-card-title h4 { font-size: 9px; }
.form-grid { grid-template-columns: 1fr; gap: 0; }
.form-grid .full { grid-column: auto; }
.bot-workspace .form-grid > label { position: relative; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; column-gap: 16px; min-height: 58px; padding: 7px 0; color: #f0f3fb; font-size: 9px; }
.bot-workspace .form-grid > label > input, .bot-workspace .form-grid > label > select, .bot-workspace .form-grid > label > .color-field { grid-column: 2; }
.bot-workspace .form-grid > label > small { grid-column: 2; margin-top: 3px; color: #86a7f4; }
.bot-workspace .form-grid > label > span { position: absolute; left: 158px; color: #ff4d71; }
.bot-workspace input, .bot-workspace select { height: 40px; border-color: #31415f; border-radius: 6px; background: #0b1424; }
.bot-workspace input:focus, .bot-workspace select:focus { border-color: #635dff; box-shadow: 0 0 0 2px rgba(99, 93, 255, .08); }
.switch-row { margin: 16px 0; border-color: #263149; border-radius: 7px; background: #0b1424; }
.appearance-preview, .game-card, .moderation-card, .moderation-general { border-color: #25314a; border-radius: 8px; background: #0b1424; }
.toggle-card, .game-toggle, .moderation-option, .compact-toggle { border-color: #25314a; background: #09111f; }
.modal-foot { position: fixed; right: 0; bottom: 0; left: 282px; z-index: 8; grid-template-columns: 1fr auto auto; margin: 0; padding: 10px 18px; border-top-color: #242a39; background: #080a10; }
.modal-foot button { min-width: 90px; }
.footer-hint { color: #59657e; }
.form-error { margin-left: 24px; }

/* Remaining views */
.login-overlay { background: radial-gradient(circle at 18% 20%, rgba(91, 73, 214, .2), transparent 32rem), #070b14; }
.auth-shell, .account-modal, .admin-modal, .maintenance-card { border-color: #28344d; background: #0c1322; }
.auth-showcase { background: radial-gradient(circle at 80% 15%, rgba(116, 65, 229, .3), transparent 20rem), linear-gradient(145deg, #152a52, #101327 70%); }
.auth-tabs button.active, .admin-tabs button.active { background: linear-gradient(100deg, rgba(75, 103, 230, .28), rgba(129, 55, 229, .26)); }
.account-profile-panel, .modal-tabs { border-color: #273149; }
.account-profile-avatar { background: linear-gradient(145deg, #168df5, #7138e9); }
.admin-stat, .admin-system-card { border-color: #28344d; background: #101a2c; }

@media (max-width: 1050px) {
    .bot-card { grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) auto; }
    .bot-metrics { display: none; }
    .list-tools { width: 500px; }
}

@media (max-width: 900px) {
    .app-shell { padding-left: 0; }
    .sidebar { width: min(280px, 86vw); }
    .page { padding-top: 42px; }
    .bot-workspace { grid-template-columns: 1fr; grid-template-rows: 58px auto minmax(0, 1fr); }
    .bot-workspace .modal-tabs { grid-column: 1; grid-row: 2; }
    #botForm { grid-column: 1; grid-row: 3; }
    .modal-foot { left: 0; }
}

@media (max-width: 720px) {
    .page-heading { align-items: flex-start; flex-direction: row; }
    .stats-grid { grid-template-columns: 1fr 1fr; border-radius: 10px; }
    .stat-card { border-right: 1px solid #30384d; border-bottom: 1px solid #30384d; }
    .stat-card:nth-child(even) { border-right: 0; }
    .stat-card:last-child { grid-column: 1 / -1; border-bottom: 0; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .list-tools { width: 100%; }
    .bot-card { display: grid; grid-template-columns: 1fr auto; }
    .bot-card .room-cell { grid-column: 1 / -1; grid-row: 2; }
    .bot-card-foot { grid-column: 2; grid-row: 1; }
    .bot-workspace .form-grid > label { grid-template-columns: 1fr; gap: 6px; }
    .bot-workspace .form-grid > label > input, .bot-workspace .form-grid > label > select, .bot-workspace .form-grid > label > .color-field, .bot-workspace .form-grid > label > small { grid-column: 1; }
    .bot-workspace .form-grid > label > span { display: none; }
    .form-card-title { margin-left: 0; }
}

@media (max-width: 480px) {
    .page { padding: 30px 14px 60px; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card, .stat-card:nth-child(even), .stat-card:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid #30384d; }
    .stat-card:last-child { border-bottom: 0; }
    .list-tools { display: grid; }
    .search { grid-column: 1 / -1; }
    .list-tools select { width: 100%; }
    .bot-card { padding: 15px; }
    .modal-foot { padding-inline: 12px; }
}

/* Readability and icon system */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon, .nav-icon svg, .icon-button svg, .primary-button svg, .sidebar-create svg, .search svg, .modal-tabs svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
body { font-family: "Segoe UI Variable Text", "Segoe UI Variable", Inter, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; }
.brand strong { font-size: 22px; }
.brand small { margin-top: 2px; font-size: 9px; }
.nav-label { font-size: 10px; }
.nav-item { min-height: 48px; font-size: 13px; }
.nav-item > span:last-child { font-size: 13px; }
.nav-icon { width: 24px; height: 24px; }
.nav-icon svg { width: 17px; height: 17px; }
.sidebar-create { min-height: 47px; }
.sidebar-create > span:first-child { display: grid; place-items: center; }
.sidebar-create > span:last-child { font-size: 12px; }
.system-state strong { font-size: 11px; }
.system-state small { font-size: 10px; }
.topbar-title small { font-size: 9px; }
.topbar-title strong { font-size: 13px; }
.last-update { font-size: 10px; }
.icon-button svg { width: 17px; height: 17px; }
.page { width: min(100%, 1320px); }
.page-heading h1 { font-size: 28px; }
.page-heading .hero-copy > p:last-child { font-size: 13px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 43px; padding-inline: 18px; font-size: 12px; }
.primary-button > span { display: inline-grid; margin-right: 5px; vertical-align: middle; }
.primary-button svg { width: 16px; height: 16px; }
.stats-grid { margin-bottom: 42px; }
.stat-card { min-height: 112px; grid-template-columns: 48px 1fr; column-gap: 12px; padding: 20px 24px; }
.stat-icon { width: 40px; height: 40px; }
.stat-icon .ui-icon { width: 19px; height: 19px; }
.stat-value { font-size: 28px; }
.stat-label { margin-top: 3px; font-size: 10px; letter-spacing: .06em; }
.section-heading { margin-bottom: 17px; }
.section-heading h2 { font-size: 18px; }
.section-heading > div:first-child > span { margin-top: 4px; font-size: 11px; }
.search, .list-tools select { height: 40px; }
.search input, .list-tools select { font-size: 12px; }
.search kbd { font-size: 9px; }
.search > span { display: grid; color: #8490ae; }
.search svg { width: 16px; height: 16px; }
.bot-card { min-height: 126px; padding: 20px 23px; }
.bot-name strong { font-size: 14px; }
.bot-name span { margin-top: 1px; font-size: 10px; }
.bot-card-head .status-pill { margin-top: 49px; }
.status-pill { padding: 4px 8px; font-size: 9px; letter-spacing: .025em; }
.room-icon .ui-icon { width: 17px; height: 17px; }
.room-cell small { font-size: 9px; letter-spacing: .07em; }
.room-cell strong { margin-top: 2px; font-size: 12px; }
.room-cell > i { display: grid; }
.room-cell > i .ui-icon { width: 15px; height: 15px; }
.bot-metrics small { font-size: 9px; }
.bot-metrics strong { font-size: 11px; }
.configure-button, .row-actions button { width: 35px; height: 35px; }
.configure-button .ui-icon, .row-actions .ui-icon { width: 16px; height: 16px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { font-size: 12px; }

.editor-title h2 { font-size: 14px; }
.save-state { padding: 5px 8px; font-size: 9px; }
.modal-tabs > p { margin-top: 24px; font-size: 10px; }
.modal-tabs button { min-height: 47px; grid-template-columns: 29px minmax(0, 1fr); }
.modal-tabs button > i, .modal-tabs button.active > i { width: 24px; height: 24px; }
.modal-tabs button > i svg { width: 17px; height: 17px; }
.modal-tabs button strong { font-size: 12px; }
.tab-panel { padding: 25px 30px 34px; }
.form-intro { margin-bottom: 18px; padding-bottom: 18px; }
.form-intro h3, .activity-toolbar h3 { font-size: 18px; }
.form-intro p, .activity-toolbar p { margin-top: 5px; font-size: 11px; }
.form-card { padding: 20px 0; }
.form-card-title { margin-bottom: 15px; }
.form-card-title h4 { font-size: 13px; }
.form-card-title p { margin-top: 4px; font-size: 10px; }
.bot-workspace .form-grid > label { grid-template-columns: 190px minmax(0, 1fr); min-height: 68px; column-gap: 20px; font-size: 12px; }
.bot-workspace .form-grid > label > small { margin-top: 4px; font-size: 10px; line-height: 1.4; }
.bot-workspace .form-grid > label > span { left: 176px; }
.bot-workspace input, .bot-workspace select { height: 43px; padding-inline: 13px; font-size: 12px; }
.form-card-title { margin-left: 210px; }
.switch-row, .toggle-card, .moderation-general, .game-toggle { padding: 15px 17px; }
.switch-row strong, .toggle-card strong, .game-toggle strong { font-size: 12px; }
.switch-row small, .toggle-card small, .game-toggle small { margin-top: 2px; font-size: 10px; }
.game-heading h3, .moderation-heading h3 { font-size: 19px; }
.game-heading p, .moderation-heading p { font-size: 11px; }
.game-heading > span, .moderation-heading > span { font-size: 9px; }
.game-card, .moderation-card { padding: 19px; }
.game-card-title h4, .moderation-card-title h4 { font-size: 13px; }
.game-card-title p, .moderation-card-title p { margin-top: 3px; font-size: 10px; }
.game-icon, .moderation-icon { width: 35px; height: 35px; }
.moderation-fields label, .moderation-inline-fields label, .manual-moderation-grid label { font-size: 11px; }
.moderation-fields label small, .moderation-option small, .compact-toggle small { font-size: 10px; }
.moderation-option strong, .compact-toggle strong { font-size: 11px; }
.command-tools button { height: 31px; font-size: 10px; }
.command-option > span { min-height: 54px; padding: 10px 10px 10px 30px; }
.command-option strong { font-size: 10px; }
.command-option small { margin-top: 2px; font-size: 9px; }
.forbidden-words-list > span, .word-count, .moderation-note, .moderation-action-result { font-size: 10px; }
.activity-item { padding: 13px; }
.activity-avatar { width: 34px; height: 34px; font-size: 9px; }
.activity-item strong, .activity-item p { font-size: 11px; }
.activity-item time { font-size: 9px; }
.activity-empty { font-size: 11px; }
.footer-hint { font-size: 10px; }
.form-error { font-size: 11px; }

.auth-form-head h1 { font-size: 30px; }
.auth-form-head > p:last-child { font-size: 12px; }
.auth-tabs button { font-size: 11px; }
.login-card label, .account-form-body label, .admin-maintenance-message { font-size: 11px; }
.login-card input { font-size: 13px; }
.auth-note { font-size: 10px; }
.verification-notice strong { font-size: 11px; }
.verification-notice p, .verification-notice button { font-size: 10px; }
.account-profile-panel > strong { font-size: 14px; }
.account-profile-panel > small, .account-profile-panel > div, .account-profile-panel > div b, .account-profile-panel > p { font-size: 10px; }
.danger-zone h3 { font-size: 13px; }
.danger-zone p { font-size: 10px; }
.admin-tabs button { font-size: 11px; }
.admin-stat span { font-size: 9px; }
.admin-system-title h3, .admin-section-heading h3 { font-size: 14px; }
.admin-system-title p, .admin-section-heading p, .admin-system-option small, .admin-system-foot span { font-size: 10px; }
.admin-system-option strong { font-size: 11px; }
th { font-size: 9px; }
td, .admin-actions button, .admin-user span, .admin-badge { font-size: 10px; }
.admin-user strong { font-size: 12px; }
.toast { font-size: 12px; }

@media (max-width: 720px) {
    .bot-workspace .form-grid > label { grid-template-columns: 1fr; }
    .form-card-title { margin-left: 0; }
}

/* Alerts and editor navigation */
.notification-control { position: relative; }
.notification-control > .icon-button { position: relative; }
.notification-badge { position: absolute; top: -5px; right: -5px; display: grid; min-width: 17px; height: 17px; place-items: center; border: 2px solid #070b14; border-radius: 99px; padding: 0 4px; color: #fff; background: #e83c68; font-size: 8px; font-weight: 800; }
.notifications-panel { position: absolute; top: 47px; right: 0; z-index: 48; width: min(390px, calc(100vw - 28px)); overflow: hidden; border: 1px solid #2d3954; border-radius: 12px; background: #0d1525; box-shadow: 0 24px 65px rgba(0, 0, 0, .45); }
.notifications-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 16px; border-bottom: 1px solid #242f46; background: #101a2d; }
.notifications-panel > header > span { display: grid; }
.notifications-panel > header strong { font-size: 13px; }
.notifications-panel > header small { color: #77839e; font-size: 10px; }
.notifications-panel > header button { border: 0; padding: 0; color: #8fa9f7; background: transparent; font-size: 10px; }
.notifications-list { max-height: 390px; overflow: auto; padding: 7px; }
.notification-item { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 10px; align-items: start; border-radius: 9px; padding: 11px; }
.notification-item:hover { background: rgba(255, 255, 255, .028); }
.notification-item > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #94adff; background: rgba(82, 112, 227, .12); }
.notification-item.error > span { color: #ff8ca1; background: rgba(232, 60, 104, .11); }
.notification-item.warning > span { color: #ffc876; background: rgba(234, 157, 47, .1); }
.notification-item .ui-icon { width: 17px; height: 17px; }
.notification-item strong { display: block; color: #e8ecf8; font-size: 11px; }
.notification-item p { margin: 3px 0 0; color: #8490aa; font-size: 10px; line-height: 1.4; }
.notifications-empty { display: grid; justify-items: center; padding: 34px 20px; text-align: center; }
.notifications-empty > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: #55d3a5; background: rgba(79, 209, 161, .1); }
.notifications-empty strong { margin-top: 10px; font-size: 12px; }
.notifications-empty p { margin: 3px 0 0; color: #76829c; font-size: 10px; }
.editor-search { display: flex; align-items: center; gap: 8px; margin: 0 3px 16px; border: 1px solid #2a3854; border-radius: 8px; padding: 0 10px; color: #8094c1; background: #09111f; }
.editor-search svg { width: 15px; height: 15px; }
.editor-search input { width: 100%; height: 37px; border: 0; padding: 0; color: #dfe6f7; background: transparent; box-shadow: none; font-size: 11px; }
.editor-search input:focus { border: 0; box-shadow: none; }
.editor-navigation { display: flex; align-items: center; gap: 8px; }
.editor-navigation button { display: grid; width: 34px; min-width: 0; height: 34px; place-items: center; border: 1px solid #2a3650; border-radius: 8px; color: #9aa9c9; background: #111a2b; }
.editor-navigation button:hover:not(:disabled) { border-color: #5267a1; color: #fff; }
.editor-navigation button:disabled { cursor: default; opacity: .35; }
.editor-navigation svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.editor-navigation span { min-width: 46px; color: #7f8ba5; font-size: 10px; text-align: center; }
.editor-title h2::before { content: none; }

@media (max-width: 720px) {
    .notifications-panel { position: fixed; top: 65px; right: 12px; }
    .editor-search { flex: 0 0 190px; margin: 0 4px 0 0; }
    .modal-tabs > p { display: none; }
}

@media (max-width: 480px) {
    .editor-navigation span { display: none; }
    .editor-navigation { gap: 4px; }
    .editor-navigation button { width: 31px; height: 31px; }
}

/* Final visual polish */
:root { --muted: #a2aec7; --muted-2: #7785a3; }
.dashboard-heading h1, .dashboard-card h2, .radio-console-head h2, .queue-panel h3 { color: #f4f7ff; }
.dashboard-heading .hero-copy > p:last-child { color: #9eabc5; }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-stats .stat-card:last-child { border-right: 0; }
.dashboard-card > header h2 { font-size: 17px; }
#fleetOverview strong, .mini-timeline strong { color: #e7ebf7; font-size: 11px; }
#fleetOverview small, .mini-timeline p, .now-playing-mini p { color: #939fba; font-size: 9px; }
.now-playing-mini strong { color: #f0f3ff; font-size: 14px; }
.professional-command-grid h3 { color: #eef2ff; font-size: 13px; }
.professional-command-grid p { color: #9ba7c1; font-size: 10px; }
.audit-entry p, .card-copy { color: #9da9c2; }
.control-list strong, .queue-list strong, .session-list strong { color: #edf1fb; font-size: 11px; }
.control-list small, .queue-list span, .session-list small { color: #929fba; font-size: 9px; }
.preference-grid strong, .health-metrics strong { color: #edf1fb; font-size: 10px; }
.preference-grid small, .health-metrics span { color: #909db8; font-size: 8px; }

@media (max-width: 800px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .main { width: 100%; }
    .page { width: 100%; max-width: none; padding: 34px 16px 60px; }
    .dashboard-heading, .page-heading { align-items: stretch; flex-direction: column; gap: 18px; }
    .dashboard-heading h1 { font-size: 29px; line-height: 1.08; }
    .heading-actions { width: 100%; }
    .heading-actions > button { flex: 1; justify-content: center; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stats .stat-card { min-width: 0; border-right: 1px solid #30384d; }
    .dashboard-stats .stat-card:nth-child(even) { border-right: 0; }
    .dashboard-stats .stat-card:last-child { grid-column: auto; }
    .dashboard-grid, .system-grid { grid-template-columns: minmax(0, 1fr); }
    .chart-card { grid-column: auto; }
    .professional-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .control-layout { grid-template-columns: minmax(0, 1fr); }
    .control-list { max-width: 100%; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .control-list > button { min-width: 210px; }
    .topbar { padding: 0 14px; }
    .top-actions { min-width: 0; gap: 7px; }
    .collapse-sidebar { display: none; }
    body.sidebar-collapsed .app-shell { padding-left: 0; }
    body.sidebar-collapsed .sidebar { width: min(280px, 86vw); padding-inline: 18px; }
    body.sidebar-collapsed .brand { justify-content: flex-start; }
    body.sidebar-collapsed .brand > span:last-child, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .nav-item > span:last-of-type, body.sidebar-collapsed .nav-item em, body.sidebar-collapsed .sidebar-create > span:last-child, body.sidebar-collapsed .system-state > span:last-child { display: block; }
    body.sidebar-collapsed .nav-item, body.sidebar-collapsed .sidebar-create { justify-content: flex-start; padding-inline: 10px; }
    body.sidebar-collapsed .sidebar-create { width: auto; }
}

@media (max-width: 520px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .dashboard-stats .stat-card, .dashboard-stats .stat-card:nth-child(even) { border-right: 0; }
    .dashboard-stats .stat-card:last-child { grid-column: auto; }
    .professional-command-grid { grid-template-columns: 1fr; }
    .dashboard-card { padding: 16px; }
    .bar-chart { height: 150px; gap: 4px; }
    .heading-actions { display: grid; grid-template-columns: 1fr; }
    .radio-player { grid-template-columns: 1fr; text-align: center; }
    .cover-placeholder { margin: auto; }
    .top-actions .top-divider, #themeButton { display: none; }
    .connection-test-results, .access-role-guide { grid-template-columns: 1fr; }
}

:focus-visible { outline: 2px solid #7da2ff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Final responsive rules for instance cards and configuration editor */
.bot-card { grid-template-columns: minmax(270px, 1.15fr) minmax(180px, .85fr) minmax(135px, .55fr) auto; gap: 20px; overflow: visible; }
.bot-card-head { position: static; min-width: 0; justify-content: flex-start; }
.bot-card-head .bot-cell { min-width: 0; flex: 1; }
.bot-card-head .status-pill { position: static; margin: 0; white-space: nowrap; }
.bot-card-state { display: flex; flex: none; align-items: center; gap: 7px; margin-left: auto; }
.bot-card-state .favorite-button { width: 31px; height: 31px; margin: 0; border: 1px solid transparent; }
.bot-card-foot { gap: 10px; }
.configure-button { display: flex; width: auto; height: 40px; min-width: 126px; align-items: center; justify-content: flex-start; gap: 9px; border: 1px solid rgba(48, 151, 255, .28); border-radius: 9px; padding: 0 12px; color: #edf7ff; background: linear-gradient(135deg, rgba(22, 142, 245, .95), rgba(77, 98, 239, .95)); font-size: inherit; box-shadow: 0 7px 18px rgba(17, 104, 215, .16); }
.configure-button:hover { border-color: rgba(125, 196, 255, .55); background: linear-gradient(135deg, #269cff, #6570f5); transform: translateY(-1px); }
.configure-button .configure-icon { display: grid; flex: none; place-items: center; }
.configure-button .configure-icon .ui-icon { width: 17px; height: 17px; }
.configure-copy { display: grid; min-width: 0; text-align: left; line-height: 1.15; }
.configure-copy strong { font-size: 11px; }
.configure-copy small { margin-top: 2px; color: rgba(235, 246, 255, .72); font-size: 8px; font-weight: 600; }
.row-actions { padding-left: 10px; border-left: 1px solid #2b3851; }
.row-actions button { width: 36px; height: 36px; }
.bot-workspace { grid-template-columns: 310px minmax(0, 1fr); }
.modal-tabs { padding: 14px 16px 82px; overflow-y: auto; }
.modal-tabs .editor-search { margin-bottom: 10px; }
.modal-tabs > p { margin: 20px 12px 7px; font-size: 9px; letter-spacing: .13em; }
.modal-tabs button { min-height: 57px; grid-template-columns: 28px minmax(0, 1fr); padding: 7px 12px; }
.modal-tabs button strong { font-size: 12px; }
.modal-tabs button small { display: block; overflow: hidden; margin-top: 2px; color: #7080a0; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.modal-tabs button.active small { color: rgba(255, 255, 255, .7); }
#botForm { grid-column: 2; }
.tab-panel { max-width: 1120px; margin: 0 auto; padding: 34px 42px 48px; }
.form-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 20px; padding: 0 0 20px; text-align: left; }
.form-intro .section-step { grid-column: 1; color: #7e8cff; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.form-intro h3 { grid-column: 1; margin: 5px 0 0; font-size: 21px; letter-spacing: -.025em; }
.form-intro p { grid-column: 1; max-width: 680px; margin: 5px 0 0; font-size: 11px; }
.form-intro > button { grid-column: 2; grid-row: 1 / 4; align-self: center; margin-left: 20px; }
.bot-workspace .form-card { margin-bottom: 14px; border: 1px solid #25314a; border-radius: 12px; padding: 21px 23px; background: linear-gradient(145deg, rgba(15, 25, 43, .94), rgba(10, 18, 33, .94)); }
.bot-workspace .form-card-title { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(45, 58, 84, .7); }
.bot-workspace .form-card-title h4 { font-size: 12px; }
.bot-workspace .form-card-title p { font-size: 9px; }
.bot-workspace .form-grid > label { grid-template-columns: 205px minmax(0, 1fr); min-height: 64px; column-gap: 22px; }
.bot-workspace .form-grid > label > span { left: 192px; }
.bot-workspace input, .bot-workspace select { height: 43px; font-size: 12px; }
.bot-workspace .form-grid > label > small { font-size: 9px; }
.embedded-switch { margin: 14px 0 0; border: 0; border-top: 1px solid rgba(45, 58, 84, .7); border-radius: 0; padding: 17px 0 0; background: transparent; }
.appearance-preview { border-radius: 12px; padding: 18px 21px; }
.modal-foot { left: 310px; }

@media (max-width: 1180px) {
    .bot-card { grid-template-columns: minmax(250px, 1fr) minmax(170px, .75fr) auto; }
    .bot-metrics { display: none; }
    .configure-copy small { display: none; }
    .configure-button { min-width: 108px; }
}
@media (max-width: 980px) {
    .bot-card { grid-template-columns: minmax(240px, 1fr) auto; }
    .bot-card .room-cell { grid-column: 1; grid-row: 2; }
    .bot-card-foot { grid-column: 2; grid-row: 1 / 3; align-items: flex-end; flex-direction: column; }
    .row-actions { padding: 8px 0 0; border-top: 1px solid #2b3851; border-left: 0; }
    .bot-workspace { grid-template-columns: 1fr; }
    #botForm { grid-column: 1; }
    .modal-foot { left: 0; }
}
@media (max-width: 720px) {
    .bot-card { display: block; }
    .bot-card .room-cell, .bot-card-foot { margin-top: 14px; }
    .bot-card-foot { display: flex; align-items: center; flex-direction: row; padding-top: 13px; border-top: 1px solid #29364f; }
    .configure-button { min-width: 124px; }
    .configure-copy small { display: block; }
    .row-actions { overflow-x: auto; margin-left: auto; padding: 0; border: 0; }
    .tab-panel { padding: 28px 20px 40px; }
    .bot-workspace .form-grid > label { grid-template-columns: 1fr; gap: 6px; }
    .bot-workspace .form-grid > label > input, .bot-workspace .form-grid > label > select, .bot-workspace .form-grid > label > .color-field, .bot-workspace .form-grid > label > small { grid-column: 1; }
    .bot-workspace .form-grid > label > span { display: none; }
}
@media (max-width: 520px) {
    .bot-card-head { align-items: flex-start; }
    .bot-card-state { align-items: flex-end; flex-direction: column-reverse; }
    .bot-card-foot { align-items: stretch; flex-direction: column; }
    .configure-button { width: 100%; justify-content: center; }
    .row-actions { width: 100%; justify-content: flex-end; }
    .form-intro { display: block; }
    .form-intro > button { width: 100%; margin: 14px 0 0; }
    .bot-workspace .form-card { padding: 17px; }
}

/* Acabado consolidado: mantener al cierre para ganar la cascada. */
.sidebar .collapse-sidebar {
    right: 10px;
    z-index: 4;
    width: 30px;
    height: 30px;
    border-color: #2a3852;
    background: #111b2d;
}
.sidebar .collapse-sidebar:hover { border-color: #4b6ba8; color: #dce8ff; background: #17243b; }
body.sidebar-collapsed .sidebar .collapse-sidebar {
    top: 68px;
    right: auto;
    left: 26px;
}

/* Tema oscuro de alto contraste y baja fatiga visual. */
:root:not([data-theme="light"]) {
    --bg: #09101c;
    --sidebar: #090f1a;
    --panel: #101a2b;
    --panel-2: #142238;
    --panel-3: #192a43;
    --line: rgba(174, 194, 230, .15);
    --line-strong: rgba(174, 194, 230, .27);
    --text: #f8faff;
    --muted: #d0d8e8;
    --muted-2: #aeb9cf;
}
:root:not([data-theme="light"]) body {
    color: #f8faff;
    background:
        radial-gradient(circle at 78% -8%, rgba(66, 112, 190, .16), transparent 34rem),
        radial-gradient(circle at 8% 92%, rgba(86, 72, 170, .1), transparent 38rem),
        linear-gradient(145deg, #09101c, #080d17 58%, #0a1220);
    font-family: Inter, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}
:root:not([data-theme="light"]) .sidebar {
    border-right-color: rgba(137, 159, 201, .15);
    background: linear-gradient(180deg, rgba(11, 18, 31, .99), rgba(7, 12, 22, .99));
}
:root:not([data-theme="light"]) .topbar {
    border-bottom-color: rgba(137, 159, 201, .14);
    background: rgba(10, 17, 29, .96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
:root:not([data-theme="light"]) :is(.dashboard-card, .content-surface, .data-surface, .audit-entry, .module-toolbar, .control-layout, .professional-command-grid > article) {
    border-color: rgba(150, 174, 216, .18);
    background: linear-gradient(145deg, rgba(20, 33, 54, .96), rgba(13, 23, 39, .97));
    box-shadow: 0 16px 42px rgba(0, 0, 0, .16);
}
:root:not([data-theme="light"]) :is(.bot-card, .stats-grid, .form-card, .moderation-card, .game-card) {
    border-color: rgba(150, 174, 216, .19);
    background: linear-gradient(120deg, rgba(23, 35, 58, .98), rgba(15, 36, 54, .96));
}
:root:not([data-theme="light"]) :is(.modal, .account-menu, .notifications-panel, .user-drawer aside) {
    border-color: rgba(157, 179, 220, .22);
    background: linear-gradient(145deg, #121d31, #0d1727);
}
:root:not([data-theme="light"]) :is(input, select, textarea, .search, .list-tools, .global-search) {
    border-color: rgba(155, 176, 216, .2);
    color: #f8faff;
    background-color: #0e192a;
}
:root:not([data-theme="light"]) input::placeholder,
:root:not([data-theme="light"]) textarea::placeholder { color: #909db5; }
:root:not([data-theme="light"]) .app-shell :is(h1, h2, h3, h4, strong, th, label) { color: #fbfcff; }
:root:not([data-theme="light"]) .app-shell :is(p, small, time, td, .card-copy, .form-grid small, .toggle-card small, .compact-toggle small) { color: #cbd4e5; }
:root:not([data-theme="light"]) :is(.nav-item, .account-menu > button, .modal-tabs button, .stat-label, .last-update, .save-state) { color: #dce4f3; }
:root:not([data-theme="light"]) .app-shell :is(.nav-label, .eyebrow, .section-step) { color: #aebfff; }
:root:not([data-theme="light"]) :is(.nav-item:hover, .nav-item.active, .modal-tabs button:hover, .modal-tabs button.active) { color: #fff; }
:root:not([data-theme="light"]) .app-shell .form-error { color: #ff9bad; }
:root:not([data-theme="light"]) .app-shell [data-chat-help].room-conflict { color: #ff8fa3; }
:root:not([data-theme="light"]) .app-shell [data-chat-help].room-checking { color: #9fc7ff; }
.bot-workspace .form-grid > label.compact-toggle {
    position: relative;
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 12px 14px;
    gap: 20px;
}
.bot-workspace .form-grid > label.compact-toggle > span {
    position: static;
    left: auto;
    grid-column: auto;
    color: inherit;
}
.bot-workspace .form-grid > label.compact-toggle > span:first-child {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 4px;
}
.bot-workspace .form-grid > label.compact-toggle > .panel-switch {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 22px;
}
.bot-workspace .form-grid > label.compact-toggle > .panel-switch input {
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.bot-workspace input.locked-input {
    border-color: rgba(88, 111, 153, .55);
    color: #8f9bb3;
    background: repeating-linear-gradient(-45deg, #0c1525, #0c1525 8px, #0e192b 8px, #0e192b 16px);
    cursor: not-allowed;
}
.bot-workspace input.locked-input:focus { border-color: rgba(88, 111, 153, .75); box-shadow: none; }
.bot-workspace input.room-conflict-input {
    border-color: rgba(239, 84, 115, .82);
    box-shadow: 0 0 0 3px rgba(239, 84, 115, .1);
}
.bot-workspace [data-chat-help].room-checking { color: #86a8d8; }
.bot-workspace [data-chat-help].room-conflict { color: #ff8297; font-weight: 700; }
#statsGrid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); overflow-x: auto; }
#statsGrid .stat-card { --stat-color: #7c5cff; --stat-soft: rgba(124, 92, 255, .14); min-width: 0; padding: 16px 13px; }
#statsGrid .stat-card.violet { --stat-color: #8b5cf6; --stat-soft: rgba(139, 92, 246, .15); }
#statsGrid .stat-card.blue { --stat-color: #2f8cff; --stat-soft: rgba(47, 140, 255, .15); }
#statsGrid .stat-card.green { --stat-color: #20be8a; --stat-soft: rgba(32, 190, 138, .14); }
#statsGrid .stat-card.amber { --stat-color: #e9aa32; --stat-soft: rgba(233, 170, 50, .14); }
#statsGrid .stat-card.red { --stat-color: #ef5473; --stat-soft: rgba(239, 84, 115, .14); }
#statsGrid .stat-card.orange { --stat-color: #f47b35; --stat-soft: rgba(244, 123, 53, .14); }
#statsGrid .stat-card.rose { --stat-color: #df4fb0; --stat-soft: rgba(223, 79, 176, .14); }
#statsGrid .stat-card .stat-icon { color: #fff; background: var(--stat-color); box-shadow: 0 0 0 5px var(--stat-soft); }
#statsGrid .stat-card:hover { background: var(--stat-soft); }
#statsGrid .stat-card.active { background: var(--stat-soft); box-shadow: inset 0 -2px var(--stat-color); }
.row-actions button[data-action="subscription-guide"] { color: #fff; background: #168fbd; }
.row-actions button[data-action="restart"] { background: #4568df; }
.row-actions button[data-action="subscription-guide"]:hover { background: #20a6d8; }
.row-actions button[data-action="restart"]:hover { background: #5c7bea; }
.bot-card .bot-metrics { min-width: 138px; }
.bot-card .bot-metrics > span { min-width: 0; gap: 14px; }
.bot-card .bot-metrics strong { flex: none; margin-left: auto; white-space: nowrap; }
.subscription-admin-modal > .modal-head { min-height: 92px; padding: 20px 24px; }
.subscription-admin-modal > .modal-head h2 { margin-top: 5px; }
.subscription-admin-modal > .modal-head p:last-child { margin-top: 5px; color: #8795b2; font-size: 10px; }
.subscription-admin-modal form { padding: 24px 26px 0; }
.subscription-admin-modal .subscription-current { margin: 0 0 24px; padding: 16px; }
.subscription-admin-modal .form-stack { display: grid; gap: 19px; }
.subscription-admin-modal .form-stack > label,
.subscription-admin-modal .subscription-duration-fields > label { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 0; }
.subscription-admin-modal .form-stack input,
.subscription-admin-modal .form-stack select { width: 100%; height: 44px; margin: 0; }
.subscription-admin-modal .subscription-duration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.subscription-admin-modal .subscription-duration-fields[hidden] { display: none; }
.subscription-admin-modal .modal-foot { min-height: 74px; margin: 8px -26px 0; padding: 14px 20px; }
@media (min-width: 1501px) {
    .bot-card { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(130px, .54fr) minmax(138px, .52fr) minmax(190px, .76fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell { display: flex; grid-column: 2; grid-row: 1; }
    .bot-card .bot-metrics { display: grid; grid-column: 3; grid-row: 1; }
    .bot-card .subscription-summary { grid-column: 4; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 5; grid-row: 1; margin: 0; padding: 0; border: 0; }
}
@media (min-width: 981px) and (max-width: 1500px) {
    .bot-card { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(190px, .72fr) auto; align-items: center; gap: 13px; }
    .bot-card-head { grid-column: 1; grid-row: 1; }
    .bot-card .room-cell, .bot-card .bot-metrics { display: none; }
    .bot-card .subscription-summary { grid-column: 2; grid-row: 1; margin: 0; }
    .bot-card .bot-card-foot { display: flex; grid-column: 3; grid-row: 1; align-items: center; flex-direction: row; margin: 0; padding: 0; border: 0; }
}
@media (max-width: 560px) {
    .subscription-admin-modal form { padding: 20px 18px 0; }
    .subscription-admin-modal .subscription-duration-fields { grid-template-columns: 1fr; }
    .subscription-admin-modal .modal-foot { margin-inline: -18px; }
}
