/* Homie Control — premium visual layer */
:root {
  --bg: #060812;
  --bg-elevated: #0a0e1c;
  --sidebar: rgba(7, 10, 21, .92);
  --surface: rgba(14, 19, 36, .78);
  --surface-solid: #10162a;
  --surface-soft: #151d34;
  --surface-hover: #1b2642;
  --input: rgba(7, 11, 23, .72);
  --line: rgba(151, 167, 211, .13);
  --line-strong: rgba(164, 178, 220, .25);
  --text: #f7f8ff;
  --text-soft: #cbd2e8;
  --muted: #8490ab;
  --accent: #7868ff;
  --accent-bright: #b2aaff;
  --accent-soft: rgba(120, 104, 255, .16);
  --cyan: #5adcf6;
  --green: #57e1a7;
  --amber: #f6c86b;
  --danger: #ff738c;
  --shadow: 0 30px 80px rgba(0, 0, 0, .38);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, .2);
  --pointer-x: 72vw;
  --pointer-y: 20vh;
}

:root[data-theme="light"] {
  --bg: #f3f5fb;
  --bg-elevated: #f8f9fd;
  --sidebar: rgba(249, 250, 255, .93);
  --surface: rgba(255, 255, 255, .86);
  --surface-solid: #fff;
  --surface-soft: #f4f6fc;
  --surface-hover: #edf0f9;
  --input: rgba(247, 248, 253, .92);
  --line: rgba(42, 51, 82, .11);
  --line-strong: rgba(42, 51, 82, .21);
  --text: #171b2b;
  --text-soft: #434b64;
  --muted: #727d98;
}

::selection { background: rgba(120,104,255,.38); color: white; }
body { background: var(--bg); }
body::before { opacity: .65; background-size: 42px 42px; }

.visual-canvas { position: fixed; z-index: -2; inset: 0; overflow: hidden; pointer-events: none; }
.visual-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(620px circle at var(--pointer-x) var(--pointer-y), rgba(120,104,255,.105), transparent 58%);
  transition: background .14s linear;
}
.visual-canvas > span { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; }
.visual-canvas > span:nth-child(1) { top: -160px; right: 8%; width: 380px; height: 380px; border: 1px solid rgba(120,104,255,.11); box-shadow: 0 0 100px rgba(120,104,255,.055), inset 0 0 100px rgba(120,104,255,.035); animation: visual-drift 18s ease-in-out infinite alternate; }
.visual-canvas > span:nth-child(2) { right: 24%; bottom: -240px; width: 520px; height: 520px; border: 1px solid rgba(90,220,246,.07); animation: visual-drift 23s ease-in-out infinite alternate-reverse; }
.visual-canvas > span:nth-child(3) { top: 46%; left: 39%; width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 28px 5px rgba(90,220,246,.14); animation: visual-pulse 5s ease-in-out infinite; }
@keyframes visual-drift { to { transform: translate3d(40px, 30px, 0) rotate(8deg) scale(1.08); } }
@keyframes visual-pulse { 50% { opacity: .16; transform: scale(.6); } }

.app-shell { opacity: 1; transition: opacity .3s ease, transform .3s ease; }

.sidebar {
  padding: 20px 15px 17px;
  border-right-color: rgba(158,172,215,.14);
  background:
    radial-gradient(circle at 8% 3%, rgba(120,104,255,.12), transparent 25%),
    var(--sidebar);
  box-shadow: 14px 0 60px rgba(0,0,0,.11);
  scrollbar-width: thin;
  scrollbar-color: rgba(120,104,255,.2) transparent;
}
.sidebar::before { content: ""; position: absolute; inset: 0; border-right: 1px solid rgba(255,255,255,.025); pointer-events: none; }
.sidebar::after { height: 45%; background: linear-gradient(transparent, var(--accent), var(--cyan), transparent); opacity: .48; }
.brand { padding: 1px 6px 19px; }
.brand-mark { border-radius: 15px; background: linear-gradient(145deg, #8a7aff, #5a4ce7 62%, #477cd5); box-shadow: 0 13px 34px rgba(83,67,224,.34), inset 0 1px rgba(255,255,255,.3); }
.brand-copy strong { font-size: 18px; }
.brand-copy span { color: var(--accent-bright); font-size: 9px; font-weight: 750; }

.server-switcher { margin-bottom: 20px; padding: 11px; border-color: rgba(151,167,211,.16); background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(120,104,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.035); transition: border-color .2s, transform .2s, box-shadow .2s; }
.server-switcher:hover { border-color: rgba(178,170,255,.3); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,0,0,.13); }
.guild-avatar { border: 1px solid rgba(255,255,255,.14); box-shadow: 0 7px 18px rgba(67,95,210,.2); }
.server-select-wrap > span { color: var(--accent-bright); font-weight: 750; }

.nav { gap: 19px; }
.nav-label { color: #71809e; font-size: 9px; letter-spacing: .16em; }
.nav button { position: relative; gap: 10px; min-height: 43px; padding: 7px 9px; border-radius: 12px; font-weight: 600; }
.nav-icon { width: 28px; height: 28px; border: 1px solid transparent; border-radius: 9px; font-size: 15px; transition: background .2s, border-color .2s, transform .2s; }
.nav button:hover { color: var(--text); background: rgba(255,255,255,.032); transform: translateX(2px); }
.nav button:hover .nav-icon { background: rgba(120,104,255,.09); transform: scale(1.04); }
.nav button.active { border-color: rgba(178,170,255,.22); background: linear-gradient(90deg, rgba(120,104,255,.2), rgba(90,220,246,.035)); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 10px 26px rgba(0,0,0,.13); }
.nav button.active::before { content: ""; position: absolute; top: 11px; bottom: 11px; left: -10px; width: 3px; border-radius: 5px; background: linear-gradient(var(--accent-bright), var(--cyan)); box-shadow: 0 0 12px var(--accent); }
.nav button.active .nav-icon { border-color: rgba(178,170,255,.2); background: rgba(120,104,255,.15); }
.bot-identity { padding: 9px; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.025); }

html[data-layout="desktop"] .topbar { border-color: rgba(158,172,215,.15); background: linear-gradient(120deg, rgba(15,21,40,.92), rgba(11,16,31,.78)); box-shadow: 0 18px 52px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.04); }
:root[data-theme="light"][data-layout="desktop"] .topbar { background: rgba(255,255,255,.86); }
.eyebrow { color: #71809e; letter-spacing: .13em; }
h1 { font-weight: 780; text-wrap: balance; }
.quick-search { border-radius: 13px; background: rgba(5,9,20,.42); box-shadow: inset 0 1px 6px rgba(0,0,0,.12); }
:root[data-theme="light"] .quick-search { background: var(--input); }
.icon-button { border-color: rgba(151,167,211,.14); background: rgba(255,255,255,.035); }
.icon-button:hover { border-color: rgba(178,170,255,.32); background: rgba(120,104,255,.1); color: var(--accent-bright); box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.status-chip.online { border-color: rgba(87,225,167,.18); background: rgba(87,225,167,.055); }
.status-chip.online i { animation: status-breathe 2.4s ease-in-out infinite; }
@keyframes status-breathe { 50% { box-shadow: 0 0 0 7px rgba(87,225,167,.055), 0 0 13px rgba(87,225,167,.32); } }

.page-guide { padding: 19px 21px; border-color: rgba(146,132,255,.3); border-radius: 21px; background: radial-gradient(circle at 5% 20%, rgba(120,104,255,.18), transparent 28%), linear-gradient(115deg, rgba(21,25,53,.94), rgba(12,19,34,.85) 64%, rgba(24,63,74,.42)); box-shadow: 0 18px 52px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.05); }
:root[data-theme="light"] .page-guide { background: linear-gradient(115deg, rgba(238,235,255,.96), rgba(255,255,255,.88) 58%, rgba(230,250,255,.76)); }
.page-guide::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(100deg, rgba(255,255,255,.04), transparent 32%); pointer-events: none; }
.guide-icon { border-radius: 18px; background: linear-gradient(145deg, rgba(134,116,255,.5), rgba(72,172,220,.16)); box-shadow: 0 14px 32px rgba(57,48,184,.25), inset 0 1px rgba(255,255,255,.12); }
.guide-copy h2 { font-size: 17px; }
.guide-tips span { padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.028); }

.panel, .card { border-color: rgba(151,167,211,.135); background: linear-gradient(145deg, rgba(18,24,44,.86), rgba(12,17,32,.77)); box-shadow: 0 13px 36px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.035); }
:root[data-theme="light"] .panel, :root[data-theme="light"] .card { background: rgba(255,255,255,.88); }
.panel::after, .card::after { content: ""; position: absolute; top: -1px; right: 18px; left: 18px; height: 1px; background: linear-gradient(90deg, transparent, rgba(178,170,255,.24), transparent); opacity: .55; pointer-events: none; }
html[data-layout="desktop"] .card:hover { border-color: rgba(178,170,255,.29); background-image: linear-gradient(145deg, rgba(26,32,57,.9), rgba(13,19,35,.82)); box-shadow: 0 24px 60px rgba(0,0,0,.26), 0 0 0 1px rgba(120,104,255,.045); }
:root[data-theme="light"][data-layout="desktop"] .card:hover { background-image: linear-gradient(145deg,#fff,#f8f9fd); }
.card-icon, .metric-icon { border: 1px solid rgba(178,170,255,.12); background: linear-gradient(145deg, rgba(120,104,255,.17), rgba(90,220,246,.055)); box-shadow: inset 0 1px rgba(255,255,255,.035); }
.metric-card { min-height: 136px; }
.metric-card::before { content: ""; position: absolute; right: -35px; bottom: -50px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(120,104,255,.11), transparent 68%); pointer-events: none; }
.metric-value { font-size: 31px; background: linear-gradient(135deg, var(--text), var(--text-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero { min-height: 184px; padding: 25px; border-color: rgba(146,132,255,.28); background: radial-gradient(circle at 84% 18%, rgba(90,220,246,.14), transparent 30%), radial-gradient(circle at 10% 90%, rgba(120,104,255,.16), transparent 33%), linear-gradient(135deg, rgba(26,29,63,.9), rgba(11,17,32,.88)); }
:root[data-theme="light"] .hero { background: radial-gradient(circle at 85% 20%,rgba(90,220,246,.12),transparent 34%),linear-gradient(135deg,rgba(238,235,255,.95),rgba(255,255,255,.9)); }
.hero-avatar { border-color: rgba(255,255,255,.22); border-radius: 25px; background: linear-gradient(145deg,#8575ff,#4f67dc 55%,#45a8d2); box-shadow: 0 20px 50px rgba(61,59,191,.3), inset 0 1px rgba(255,255,255,.24); }
.hero h2 { font-size: clamp(24px,2.4vw,30px); letter-spacing: -.035em; }
.hero-orbit { border-color: rgba(178,170,255,.17); box-shadow: 0 0 80px rgba(90,220,246,.04); animation: orbit-soft 18s linear infinite; }
.hero-orbit::before { content: ""; position: absolute; top: 18px; left: 36px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
@keyframes orbit-soft { to { transform: rotate(360deg); } }

.button, button.primary { position: relative; overflow: hidden; border-color: rgba(255,255,255,.09); border-radius: 12px; background: linear-gradient(135deg,#8373ff,#5a50e2 65%,#4f73d9); box-shadow: 0 10px 28px rgba(84,68,224,.25), inset 0 1px rgba(255,255,255,.18); }
.button::after, button.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg,transparent 25%,rgba(255,255,255,.17) 46%,transparent 67%); transform: translateX(-120%); transition: transform .55s ease; }
.button:hover::after, button.primary:hover::after { transform: translateX(120%); }
.button:hover, button.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(84,68,224,.32); }
.button-secondary { border-color: rgba(151,167,211,.16); background: rgba(255,255,255,.04); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.button-secondary:hover { border-color: rgba(178,170,255,.3); background: rgba(120,104,255,.09); color: var(--text); }
.button-danger:hover { background: rgba(255,115,140,.17); }

.field, label.field { gap: 8px; color: var(--text-soft); font-weight: 680; }
.field small { line-height: 1.45; }
input, select, textarea, .emoji-picker-button { border-color: rgba(151,167,211,.15); border-radius: 12px; background: rgba(5,9,20,.55); box-shadow: inset 0 1px 7px rgba(0,0,0,.12); }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea, :root[data-theme="light"] .emoji-picker-button { background: rgba(247,248,253,.92); }
input:hover, select:hover, textarea:hover { border-color: rgba(178,170,255,.31); }
input:focus, select:focus, textarea:focus { border-color: rgba(146,132,255,.72); box-shadow: 0 0 0 4px rgba(120,104,255,.12), inset 0 1px 7px rgba(0,0,0,.09); }
.switch-field { border-color: rgba(151,167,211,.13); border-radius: 14px; background: rgba(5,9,20,.34); transition: border-color .2s, background .2s, transform .2s; }
:root[data-theme="light"] .switch-field { background: var(--surface-soft); }
.switch-field:hover { border-color: rgba(178,170,255,.25); background: rgba(120,104,255,.045); transform: translateY(-1px); }
.switch { width: 44px; height: 24px; flex-basis: 44px; }
.switch i { background: #293249; box-shadow: inset 0 2px 6px rgba(0,0,0,.2); }
.switch i::after { width: 18px; height: 18px; }
.switch input:checked + i { background: linear-gradient(90deg,var(--accent),#5e8fe8); box-shadow: 0 0 18px rgba(120,104,255,.24); }
.switch input:checked + i::after { transform: translateX(20px); }
.module-row, .activity-item, .list-item { border-color: rgba(151,167,211,.11); border-radius: 13px; background: rgba(5,9,20,.24); transition: border-color .2s, background .2s, transform .2s; }
:root[data-theme="light"] .module-row, :root[data-theme="light"] .activity-item, :root[data-theme="light"] .list-item { background: rgba(247,248,253,.7); }
.module-row:hover, .activity-item:hover, .list-item:hover { border-color: rgba(178,170,255,.2); background: rgba(120,104,255,.045); transform: translateX(2px); }
.progress { height: 9px; padding: 2px; border: 1px solid rgba(151,167,211,.1); background: rgba(5,9,20,.48); }
.progress span { box-shadow: 0 0 16px rgba(90,220,246,.22); }
.badge, .pill { box-shadow: inset 0 1px rgba(255,255,255,.025); }
.toast { border-radius: 16px; background: rgba(16,22,42,.94); backdrop-filter: blur(20px); box-shadow: 0 22px 65px rgba(0,0,0,.36); }
:root[data-theme="light"] .toast { background: rgba(255,255,255,.94); }
.empty-icon { border: 1px solid var(--line); background: linear-gradient(145deg,var(--surface-soft),var(--input)); }

.quick-search-results, .emoji-picker-panel, .help-drawer { border-color: rgba(178,170,255,.2); background: rgba(12,17,32,.96); box-shadow: 0 30px 90px rgba(0,0,0,.45); backdrop-filter: blur(26px); }
:root[data-theme="light"] .quick-search-results, :root[data-theme="light"] .emoji-picker-panel, :root[data-theme="light"] .help-drawer { background: rgba(255,255,255,.97); }
.quick-search-results button:hover { background: rgba(120,104,255,.1); }

html[data-layout="mobile"] .visual-canvas::before { display: none; }
html[data-layout="mobile"] .topbar { border-bottom: 1px solid rgba(151,167,211,.08); }
html[data-layout="mobile"] .panel, html[data-layout="mobile"] .card { background: linear-gradient(145deg,rgba(18,24,44,.92),rgba(10,15,29,.9)); }
:root[data-theme="light"][data-layout="mobile"] .panel, :root[data-theme="light"][data-layout="mobile"] .card { background: rgba(255,255,255,.92); }
html[data-layout="mobile"] .mobile-dock { border-color: rgba(178,170,255,.25); background: rgba(11,16,31,.94); box-shadow: 0 22px 70px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.07); }
:root[data-theme="light"][data-layout="mobile"] .mobile-dock { background: rgba(255,255,255,.95); }
html[data-layout="mobile"] .mobile-dock button.active { background: linear-gradient(145deg,rgba(120,104,255,.32),rgba(90,220,246,.1)); }

@media (max-width: 590px) {
  .page-guide { border-radius: 19px; }
  .hero { padding: 20px; border-radius: 20px; }
  .hero-avatar { width: 62px; height: 62px; flex-basis: 62px; border-radius: 20px; }
  .metric-card { min-height: 128px; }
  .toast-region { right: 12px; bottom: calc(90px + env(safe-area-inset-bottom)); left: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .visual-canvas > span, .status-chip.online i, .hero-orbit { animation: none !important; }
  .visual-canvas::before { display: none; }
}

/* Homie neon cockpit refresh — original dashboard styling inspired by clarity, not copied */
:root {
  --homie-cyan: #24e6ff;
  --homie-cyan-soft: rgba(36, 230, 255, .14);
  --homie-blue: #0c7dff;
  --homie-orange: #ff9f1c;
  --homie-orange-soft: rgba(255, 159, 28, .14);
  --homie-ink: #050713;
  --homie-panel: rgba(9, 15, 31, .82);
  --homie-panel-strong: rgba(13, 22, 44, .92);
  --accent: var(--homie-blue);
  --accent-bright: var(--homie-cyan);
  --accent-soft: var(--homie-cyan-soft);
  --cyan: var(--homie-cyan);
  --amber: var(--homie-orange);
  --line: rgba(108, 211, 255, .15);
  --line-strong: rgba(108, 211, 255, .32);
  --surface: var(--homie-panel);
  --surface-solid: #0b1227;
  --surface-soft: rgba(16, 28, 54, .76);
  --surface-hover: rgba(24, 43, 76, .86);
  --input: rgba(4, 9, 22, .68);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, .24);
}

:root[data-theme="light"] {
  --homie-panel: rgba(255, 255, 255, .88);
  --homie-panel-strong: rgba(255, 255, 255, .94);
  --line: rgba(27, 126, 199, .13);
  --line-strong: rgba(27, 126, 199, .25);
  --surface: var(--homie-panel);
  --surface-solid: #ffffff;
  --surface-soft: rgba(244, 249, 255, .9);
  --surface-hover: #edf7ff;
  --input: rgba(246, 250, 255, .94);
}

body {
  background:
    radial-gradient(900px circle at 80% -10%, rgba(36, 230, 255, .12), transparent 58%),
    radial-gradient(720px circle at 105% 16%, rgba(255, 159, 28, .1), transparent 55%),
    radial-gradient(700px circle at -10% 96%, rgba(12, 125, 255, .13), transparent 50%),
    var(--bg);
}

body::before {
  background-image:
    linear-gradient(rgba(36, 230, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 230, 255, .025) 1px, transparent 1px);
  background-size: 46px 46px;
}

.visual-canvas::before {
  background:
    radial-gradient(620px circle at var(--pointer-x) var(--pointer-y), rgba(36,230,255,.115), transparent 55%),
    linear-gradient(115deg, transparent 0 41%, rgba(36,230,255,.055) 41.15% 41.35%, transparent 41.5% 100%);
}

.visual-canvas::after {
  content: "";
  position: absolute;
  inset: 9% -6% auto 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36,230,255,.45), rgba(255,159,28,.42), transparent);
  box-shadow: 0 0 24px rgba(36,230,255,.2);
  opacity: .7;
}

.sidebar {
  border-right-color: rgba(36,230,255,.13);
  background:
    radial-gradient(circle at 16% 4%, rgba(36,230,255,.12), transparent 30%),
    radial-gradient(circle at 95% 18%, rgba(255,159,28,.08), transparent 28%),
    linear-gradient(180deg, rgba(7,12,27,.96), rgba(6,10,22,.9));
}

.brand {
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  overflow: hidden;
  border: 1px solid rgba(36,230,255,.32);
  border-radius: 17px;
  background: #030712;
  box-shadow:
    0 0 0 1px rgba(255,159,28,.13),
    0 0 28px rgba(36,230,255,.28),
    0 12px 34px rgba(0,0,0,.34);
}

.brand-mark::after,
.auth-logo::after,
.tour-mark::after {
  display: none;
}

.brand-mark img,
.auth-logo img,
.tour-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy strong {
  background: linear-gradient(90deg, #effcff, var(--homie-cyan) 45%, var(--homie-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.035em;
}

.brand-copy span {
  color: rgba(202, 233, 255, .72);
}

.server-switcher,
.topbar,
.panel,
.card,
.mobile-dock,
.help-drawer,
.quick-search-results,
.emoji-picker-panel,
.logout-confirm-card,
.tour-card,
.auth-card {
  border-color: rgba(70, 197, 255, .16);
  background:
    linear-gradient(145deg, rgba(14, 23, 46, .9), rgba(7, 13, 29, .82)),
    rgba(7, 13, 29, .82);
  box-shadow:
    0 18px 55px rgba(0,0,0,.28),
    inset 0 1px rgba(255,255,255,.045);
}

:root[data-theme="light"] .server-switcher,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .panel,
:root[data-theme="light"] .card,
:root[data-theme="light"] .mobile-dock,
:root[data-theme="light"] .help-drawer,
:root[data-theme="light"] .quick-search-results,
:root[data-theme="light"] .emoji-picker-panel,
:root[data-theme="light"] .logout-confirm-card,
:root[data-theme="light"] .tour-card,
:root[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, .9);
}

.server-switcher:hover,
html[data-layout="desktop"] .card:hover,
.module-row:hover,
.activity-item:hover,
.list-item:hover,
.switch-field:hover {
  border-color: rgba(36,230,255,.32);
  box-shadow:
    0 22px 70px rgba(0,0,0,.25),
    0 0 0 1px rgba(255,159,28,.045),
    inset 0 1px rgba(255,255,255,.05);
}

.nav button {
  isolation: isolate;
}

.nav-icon {
  color: rgba(206, 239, 255, .7);
}

.nav button.active {
  border-color: rgba(36,230,255,.22);
  background:
    linear-gradient(90deg, rgba(36,230,255,.14), rgba(12,125,255,.1) 56%, rgba(255,159,28,.055));
}

.nav button.active::before {
  background: linear-gradient(var(--homie-cyan), var(--homie-orange));
  box-shadow: 0 0 16px rgba(36,230,255,.5);
}

.nav button.active .nav-icon {
  color: #effcff;
  border-color: rgba(36,230,255,.25);
  background: rgba(36,230,255,.1);
  box-shadow: inset 0 1px rgba(255,255,255,.045);
}

.topbar {
  border-radius: 0 0 24px 24px;
}

.page-heading h1,
.hero h2,
.auth-copy h2,
.tour-copy h2 {
  letter-spacing: -.045em;
}

.section-kicker,
.eyebrow,
.nav-label,
.server-select-wrap > span {
  color: rgba(99, 223, 255, .78);
}

.quick-search {
  min-height: 42px;
  border: 1px solid rgba(70,197,255,.13);
}

.quick-search:focus-within {
  border-color: rgba(36,230,255,.4);
  box-shadow: 0 0 0 4px rgba(36,230,255,.08);
}

.status-chip.online {
  border-color: rgba(36,230,255,.22);
  background: rgba(36,230,255,.07);
}

.status-chip.online i,
.bot-avatar i {
  background: var(--homie-cyan);
}

.page-guide,
.hero,
.server-onboarding {
  border-color: rgba(36,230,255,.22);
  background:
    radial-gradient(circle at 86% 15%, rgba(255,159,28,.12), transparent 30%),
    radial-gradient(circle at 6% 18%, rgba(36,230,255,.16), transparent 32%),
    linear-gradient(135deg, rgba(13, 23, 48, .96), rgba(7, 13, 29, .88));
}

.guide-icon,
.card-icon,
.metric-icon,
.setup-step > span,
.setup-requirement-icon {
  color: var(--homie-cyan);
  border-color: rgba(36,230,255,.18);
  background: linear-gradient(145deg, rgba(36,230,255,.15), rgba(255,159,28,.075));
}

.metric-value {
  background: linear-gradient(135deg, #ffffff, var(--homie-cyan) 56%, var(--homie-orange));
  -webkit-background-clip: text;
  background-clip: text;
}

.button,
button.primary,
.discord-button {
  background: linear-gradient(135deg, #15dfff, #0c7dff 58%, #ff9f1c);
  color: #03101f;
  font-weight: 850;
  text-shadow: none;
  box-shadow:
    0 14px 34px rgba(36,230,255,.18),
    0 10px 30px rgba(255,159,28,.1),
    inset 0 1px rgba(255,255,255,.35);
}

.button:hover,
button.primary:hover,
.discord-button:hover {
  box-shadow:
    0 18px 42px rgba(36,230,255,.25),
    0 12px 34px rgba(255,159,28,.16),
    inset 0 1px rgba(255,255,255,.4);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(36,230,255,.28);
  outline-offset: 3px;
}

input,
select,
textarea,
.emoji-picker-button {
  border-color: rgba(70,197,255,.15);
  background: rgba(2, 7, 18, .66);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(36,230,255,.64);
  box-shadow: 0 0 0 4px rgba(36,230,255,.1), inset 0 1px 7px rgba(0,0,0,.12);
}

.auth-screen {
  background:
    radial-gradient(circle at 18% 22%, rgba(36,230,255,.1), transparent 34%),
    radial-gradient(circle at 84% 78%, rgba(255,159,28,.1), transparent 34%);
}

.auth-card {
  width: min(940px, 100%);
  min-height: 560px;
}

.auth-visual {
  background:
    radial-gradient(circle at 50% 43%, rgba(36,230,255,.22), transparent 26%),
    linear-gradient(160deg, rgba(3, 8, 20, .92), rgba(9, 20, 42, .78));
}

.auth-logo {
  width: 128px;
  height: 128px;
  overflow: hidden;
  border: 1px solid rgba(36,230,255,.34);
  border-radius: 38px;
  background: #030712;
  box-shadow:
    0 0 44px rgba(36,230,255,.36),
    0 0 0 1px rgba(255,159,28,.16),
    0 28px 80px rgba(0,0,0,.42);
}

.auth-wordmark {
  z-index: 2;
  width: min(300px, 78%);
  margin-top: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(36,230,255,.28));
}

.auth-logo span,
.brand-eye {
  display: none;
}

.auth-copy {
  padding: clamp(28px, 5vw, 54px);
}

.auth-copy p {
  max-width: 36rem;
}

.toast {
  border: 1px solid rgba(70,197,255,.18);
}

.loading-bar span,
.progress span {
  background: linear-gradient(90deg, var(--homie-cyan), var(--homie-blue), var(--homie-orange));
}

html[data-layout="mobile"] .topbar {
  border-radius: 0;
}

html[data-layout="mobile"] .mobile-dock {
  border-color: rgba(36,230,255,.2);
  background:
    linear-gradient(145deg, rgba(8, 15, 33, .96), rgba(5, 9, 20, .94));
}

html[data-layout="mobile"] .mobile-dock button.active {
  color: #f2fdff;
  background: linear-gradient(145deg, rgba(36,230,255,.2), rgba(255,159,28,.08));
}

@media (max-width: 830px) {
  .auth-card {
    min-height: auto;
  }

  .auth-wordmark {
    width: min(240px, 76%);
  }
}

@media (max-width: 590px) {
  .brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .auth-logo {
    width: 92px;
    height: 92px;
    border-radius: 28px;
  }
}

/* Homie clean control preview */
:root {
  --homie-clean-bg: #202832;
  --homie-clean-top: #1a212a;
  --homie-clean-rail: #1f2731;
  --homie-clean-card: #29313c;
  --homie-clean-card-hover: #303944;
  --homie-clean-card-soft: #242d37;
  --homie-clean-line: rgba(255, 255, 255, .055);
  --homie-clean-line-strong: rgba(255, 255, 255, .105);
  --homie-clean-text: #f3f6fb;
  --homie-clean-soft: #c0c8d2;
  --homie-clean-muted: #8893a0;
  --homie-clean-blue: #139df2;
  --homie-clean-cyan: #22d3ee;
  --homie-clean-orange: #ff9f1c;
  --bg: var(--homie-clean-bg);
  --sidebar: var(--homie-clean-rail);
  --surface: var(--homie-clean-card);
  --surface-solid: var(--homie-clean-card);
  --surface-soft: var(--homie-clean-card-soft);
  --surface-hover: var(--homie-clean-card-hover);
  --input: #202832;
  --line: var(--homie-clean-line);
  --line-strong: var(--homie-clean-line-strong);
  --text: var(--homie-clean-text);
  --text-soft: var(--homie-clean-soft);
  --muted: var(--homie-clean-muted);
  --accent: var(--homie-clean-blue);
  --accent-bright: var(--homie-clean-cyan);
  --accent-soft: rgba(19, 157, 242, .11);
  --cyan: var(--homie-clean-cyan);
  --amber: var(--homie-clean-orange);
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --shadow: none;
  --shadow-soft: none;
  --sidebar-width: 290px;
}

body {
  background: var(--homie-clean-bg);
  color: var(--homie-clean-text);
  font-size: 14px;
}

body::before,
.visual-canvas,
.ambient,
.panel::after,
.card::after,
.sidebar::before,
.sidebar::after,
.page-guide::before,
.auth-orbit,
.tour-orbit {
  display: none !important;
}

.app-shell {
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 0;
  background: rgba(31, 39, 49, .74);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .025);
  backdrop-filter: none;
}

.brand {
  min-height: 42px;
  padding: 0 7px 14px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 0;
  border-radius: 50%;
  background: #090d14;
  box-shadow: none;
}

.brand-copy strong {
  background: none;
  color: var(--homie-clean-text);
  font-size: 17px;
  letter-spacing: -.02em;
}

.brand-copy span,
.server-select-wrap > span,
.eyebrow,
.section-kicker {
  color: var(--homie-clean-muted);
}

.server-switcher {
  min-height: 40px;
  margin: 0 0 16px;
  padding: 6px 8px;
  border: 1px solid var(--homie-clean-line);
  border-radius: 999px;
  background: #252e38;
  box-shadow: none;
}

.guild-avatar,
.bot-avatar {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 50%;
}

.server-select-wrap > span {
  display: none;
}

.server-select {
  font-size: 12px;
}

.nav {
  gap: 12px;
}

.nav-group {
  gap: 2px;
}

.nav-label {
  padding: 9px 9px 5px;
  font-size: 9px;
  letter-spacing: .08em;
}

.nav button {
  min-height: 35px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: #b9c0ca;
  font-size: 13px;
  font-weight: 700;
  transform: none;
}

.nav button:hover {
  color: var(--homie-clean-text);
  background: rgba(255, 255, 255, .035);
  transform: none;
}

.nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, .075);
  box-shadow: none;
}

.nav button.active::before {
  display: none;
}

.nav-icon {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 0;
  background: none !important;
  color: currentColor;
  font-size: 13px;
  filter: none !important;
  box-shadow: none !important;
}

.sidebar-footer {
  gap: 8px;
  padding: 14px 4px 0;
}

.bot-identity,
.version-chip {
  opacity: .72;
}

.sidebar-logout {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 103, 131, .08);
  box-shadow: none;
}

.workspace {
  max-width: 860px;
  min-width: 0;
  padding: 0 16px 48px 28px;
}

.topbar {
  min-height: 86px;
  margin: 0;
  padding: 18px 0 15px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(var(--homie-clean-bg) 78%, rgba(32, 40, 50, 0));
  box-shadow: none;
}

.page-heading {
  gap: 13px;
}

.page-heading h1,
h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 850;
  letter-spacing: -.035em;
}

.page-heading p {
  margin-top: 5px;
  color: var(--homie-clean-soft);
  font-size: 15px;
}

.eyebrow {
  display: none;
}

.topbar-actions {
  gap: 7px;
}

.quick-search {
  width: min(230px, 22vw);
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #252e38;
}

.icon-button,
.button-secondary,
.button-danger,
button.primary,
.button,
.discord-button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  text-shadow: none;
}

.icon-button {
  width: 36px;
  height: 36px;
  background: #252e38;
}

.icon-button:hover,
.button-secondary:hover,
.button-danger:hover,
button.primary:hover,
.button:hover,
.discord-button:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.08);
}

button.primary,
.button,
.discord-button {
  background: var(--homie-clean-blue);
  color: #fff;
  font-weight: 800;
}

.button-secondary {
  background: #333d49;
  color: #f0f4fa;
}

.button-danger {
  background: #df3c47;
  color: #fff;
}

.status-chip,
.badge,
.pill {
  border: 0;
  background: #333d49;
}

.status-chip {
  height: 36px;
  padding: 0 10px;
}

.view {
  gap: 13px;
  animation: none;
}

.content-grid {
  gap: 10px;
}

.flow-grid {
  grid-auto-rows: 4px;
}

.page-guide {
  display: none;
}

.panel,
.card,
.module-row,
.activity-item,
.list-item,
.switch-field,
.setup-requirement-group,
.quick-search-results,
.emoji-picker-panel,
.help-drawer,
.mobile-dock,
.logout-confirm-card,
.tour-card,
.auth-card {
  border: 1px solid var(--homie-clean-line);
  border-radius: 9px;
  background: var(--homie-clean-card);
  box-shadow: none;
  backdrop-filter: none;
}

.panel {
  padding: 16px;
}

.card {
  padding: 14px;
}

html[data-layout="desktop"] .card:hover,
.module-row:hover,
.activity-item:hover,
.list-item:hover,
.switch-field:hover,
.server-switcher:hover {
  border-color: var(--homie-clean-line-strong);
  background: var(--homie-clean-card-hover);
  box-shadow: none;
}

.card-header,
.section-header {
  margin-bottom: 11px;
}

.card-title {
  gap: 10px;
}

.card-icon,
.metric-icon,
.guide-icon,
.setup-step > span,
.setup-requirement-icon,
.activity-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  box-shadow: none;
}

.card h2,
.panel h2 {
  color: var(--homie-clean-text);
  font-size: 17px;
  font-weight: 800;
}

.card h3 {
  font-size: 14px;
}

.card-header p,
.section-header p,
p,
small {
  color: var(--homie-clean-soft);
}

.module-row,
.activity-item,
.list-item,
.switch-field {
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
}

.list,
.activity-list {
  gap: 7px;
}

input,
select,
textarea,
.emoji-picker-button {
  min-height: 36px;
  border: 1px solid var(--homie-clean-line);
  border-radius: 7px;
  background: #202832;
  color: var(--homie-clean-text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.quick-search:focus-within {
  border-color: rgba(34, 211, 238, .45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .08);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(34, 211, 238, .48);
  outline-offset: 2px;
}

.auth-screen {
  min-height: calc(100vh - 96px);
  background:
    radial-gradient(220px circle at 25% 60%, rgba(34, 211, 238, .22), transparent 62%),
    radial-gradient(260px circle at 78% 32%, rgba(19, 157, 242, .24), transparent 64%);
}

.auth-card {
  width: min(430px, calc(100vw - 32px));
  min-height: auto;
  grid-template-columns: 1fr;
  overflow: visible;
}

.auth-visual {
  min-height: 180px;
  padding: 28px 24px 8px;
  background: transparent;
}

.auth-logo {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 28px;
  background: #090d14;
  box-shadow: 0 0 36px rgba(34, 211, 238, .22);
}

.auth-wordmark {
  width: min(250px, 76%);
  margin-top: 16px;
  filter: none;
}

.auth-copy {
  padding: 8px 28px 30px;
  text-align: center;
}

.auth-copy p {
  margin-inline: auto;
}

.toast {
  border: 1px solid var(--homie-clean-line);
  border-radius: 9px;
  background: #29313c;
}

.loading-bar span,
.progress span {
  background: linear-gradient(90deg, var(--homie-clean-cyan), var(--homie-clean-blue), var(--homie-clean-orange));
}

@media (max-width: 1060px) {
  .app-shell {
    width: 100%;
  }

  .workspace {
    max-width: none;
    padding-right: 18px;
  }
}

@media (max-width: 920px) {
  .workspace {
    padding: 0 14px 86px;
  }

  .topbar {
    min-height: 76px;
    padding: 14px 0;
  }

  .page-heading h1,
  h1 {
    font-size: 26px;
  }
}

html[data-layout="mobile"] .sidebar {
  background: var(--homie-clean-rail);
}

html[data-layout="mobile"] .topbar,
html[data-layout="mobile"] .mobile-dock {
  border-radius: 0;
  background: var(--homie-clean-top);
}

html[data-layout="mobile"] .panel,
html[data-layout="mobile"] .card {
  background: var(--homie-clean-card);
}

/* Approved clean dashboard layout */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .025);
  background: var(--homie-clean-top);
}

.app-topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1120px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
}

.app-topbar-brand,
.dashboard-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #fff;
  font-weight: 850;
}

.app-topbar-brand img,
.dashboard-user-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  overflow: hidden;
  border-radius: 50%;
  background: #090d14;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-user {
  justify-self: end;
  max-width: 260px;
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.dashboard-user #dashboardUserName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user:hover {
  background: rgba(255, 255, 255, .035);
}

.app-topbar .server-switcher {
  justify-self: center;
  width: min(300px, 34vw);
  margin: 0;
}

.app-topbar .server-select {
  font-weight: 850;
}

.app-shell {
  min-height: calc(100vh - 48px);
}

.sidebar {
  top: 48px;
  height: calc(100vh - 48px);
}

html[data-layout="desktop"] .sidebar .brand {
  display: none;
}

.workspace {
  width: min(860px, 100%);
  max-width: 860px;
}

.topbar {
  position: sticky;
  top: 48px;
  z-index: 18;
  min-height: 98px;
}

.topbar::before {
  display: none;
}

.topbar .page-heading::before {
  content: attr(data-page-icon);
}

.page-heading::before {
  display: none;
}

.page-heading {
  align-items: flex-start;
}

.page-heading h1::first-letter {
  color: inherit;
}

.content-grid > .hero {
  border-color: var(--homie-clean-line);
  background: var(--homie-clean-card);
}

.hero,
.server-onboarding,
.page-guide {
  box-shadow: none;
}

.hero-copy {
  align-items: center;
}

.hero-avatar {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
}

.metric-card {
  min-height: 104px;
}

.metric-value {
  background: none;
  color: var(--homie-clean-text);
  -webkit-text-fill-color: currentColor;
}

.form-grid,
.module-list,
.setup-checklist,
.flow-list,
.audit-list,
.settings-studio {
  gap: 8px;
}

.field {
  gap: 6px;
}

.field > span,
.field > small,
.form-note {
  color: var(--homie-clean-muted);
}

.role-inventory-list {
  max-height: 684px;
  overflow: auto;
  padding-right: 4px;
}

.role-colour {
  border-radius: 999px;
}

.module-row > div,
.activity-item > div,
.list-item > div {
  min-width: 0;
}

.module-row strong,
.activity-item strong,
.list-item strong {
  color: var(--homie-clean-text);
}

.module-row span,
.activity-item span,
.list-item span {
  color: var(--homie-clean-soft);
}

.tabs,
.segmented,
.settings-tabs {
  border: 1px solid var(--homie-clean-line);
  border-radius: 8px;
  background: var(--homie-clean-card-soft);
}

.tabs button,
.segmented button,
.settings-tabs button {
  border-radius: 6px;
}

.tabs button.active,
.segmented button.active,
.settings-tabs button.active {
  background: rgba(255, 255, 255, .11);
  color: #fff;
}

.switch,
.toggle {
  box-shadow: none;
}

.badge.accent {
  background: rgba(19, 157, 242, .16);
  color: #d9f3ff;
}

.badge.warning {
  background: rgba(255, 159, 28, .16);
  color: #ffe1ae;
}

.success-text {
  color: #8cf7a0;
}

.danger-text,
.error-text {
  color: #ff9298;
}

.auth-screen {
  place-items: center;
  padding: 52px 16px;
}

html.no-guilds .app-topbar .server-switcher {
  opacity: .5;
}

html.auth-mode,
html.auth-mode body {
  min-height: 100%;
  overflow: hidden;
}

html.auth-mode .app-topbar,
html.auth-mode .sidebar,
html.auth-mode .topbar,
html.auth-mode .mobile-dock,
html.auth-mode .mobile-backdrop,
html.auth-mode .drawer-backdrop,
html.auth-mode .help-drawer,
html.auth-mode .loading-bar,
html.auth-mode #view {
  display: none !important;
}

html.auth-mode .app-shell,
html.auth-mode .workspace {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

html.auth-mode .auth-screen {
  display: grid;
  min-height: 100vh;
  width: 100%;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
}

html.auth-mode .auth-card {
  margin: 0;
}

@media (min-width: 1280px) {
  .app-shell,
  .app-topbar-inner {
    width: 1120px;
  }
}

@media (max-width: 980px) {
  .app-topbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .app-topbar .server-switcher {
    width: auto;
  }

  .dashboard-user-avatar {
    display: none;
  }

  .workspace {
    width: auto;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .app-topbar {
    height: 48px;
  }

  .app-topbar-inner {
    display: flex;
    gap: 8px;
    padding: 0 14px;
  }

  .app-topbar-brand {
    flex: 0 0 25px;
  }

  .app-topbar .server-switcher {
    display: flex;
    flex: 1 1 0;
    width: 0;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 3px 6px;
    gap: 6px;
    overflow: hidden;
  }

  .app-topbar .guild-avatar {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 10px;
  }

  html[data-layout="mobile"] .app-topbar .server-select {
    height: 28px;
    min-height: 28px;
    padding-right: 16px;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .dashboard-user {
    flex: 0 0 28px;
    justify-content: center;
    min-width: 28px;
    padding-inline: 2px;
    font-size: 12px;
  }

  .app-topbar-brand strong,
  .dashboard-user #dashboardUserName {
    display: none;
  }

  .topbar {
    top: 48px;
    min-height: 86px;
  }

  .quick-search,
  .status-chip {
    display: none;
  }
}
