@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root{font-family:'DM Sans',sans-serif;color:#e7eaf1;background:#0d1018;font-synthesis:none;text-rendering:optimizeLegibility;font-optical-sizing:auto;font-weight:400;--bg:#0d1018;--panel:#131722;--panel-soft:#171c29;--line:#232938;--muted:#8992a5;--accent:#9b8cff;--green:#65d6a0}
*{box-sizing:border-box}
body{margin:0;min-width:320px;min-height:100vh;background:var(--bg)}
button,a,input{font:inherit}
a{color:inherit;text-decoration:none}
.screen-loading{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:12px;color:#adb4c4;font-size:14px}
.spinner{width:18px;height:18px;border:2px solid #33394a;border-top-color:#a398ff;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.app-shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:248px;padding:26px 16px 15px;background:#10131c;border-right:1px solid #202533;display:flex;flex-direction:column;z-index:2}
.brand{display:flex;align-items:center;gap:11px;padding:0 9px 29px}
.brand-mark{width:35px;height:35px;border-radius:11px;object-fit:cover;flex:none}
.brand-copy{display:flex;flex-direction:column;gap:3px}.brand-copy strong{font:800 16px Manrope,sans-serif;letter-spacing:.11em;color:#f5f3ff}.brand-copy small{font-size:8px;letter-spacing:.15em;color:#777f93;font-weight:700}
.workspace-picker{display:flex;align-items:center;gap:10px;margin:0 2px 27px;padding:11px 10px;border:1px solid #252b3a;border-radius:10px;background:#151a25}
.workspace-avatar{width:31px;height:31px;border-radius:9px;background:#25302e;color:#7ee0b2;display:grid;place-items:center;font:700 13px Manrope,sans-serif}
.workspace-copy,.account-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.workspace-copy strong,.account-copy strong{font-size:11px;font-weight:600;color:#edf0f7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-copy small,.account-copy small{font-size:10px;color:#818a9d}.workspace-chevron{margin-left:auto;color:#828b9d;font-size:16px}
.nav-label{font-size:9px;font-weight:700;letter-spacing:.15em;color:#646d81;padding:0 11px;margin:0 0 9px}.nav-label-spaced{margin-top:27px}
.nav-item{height:39px;display:flex;align-items:center;gap:12px;padding:0 11px;margin:2px 0;border-radius:8px;font-size:12px;color:#98a0b2}.nav-item.active{background:#242238;color:#c3baff;font-weight:600;box-shadow:inset 2px 0 #a091ff}.nav-icon{width:16px;text-align:center;font-size:15px;color:#798297}.active .nav-icon{color:#b5aaff}.nav-disabled{cursor:default;color:#798194}.soon-dot{width:5px;height:5px;border-radius:50%;background:#4a5060;margin-left:auto}
.sidebar-bottom{margin-top:auto}.connection{height:37px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#929bad;font-size:10px;border-bottom:1px solid #222735;margin-bottom:11px}.status-dot{width:7px;height:7px;background:var(--green);border-radius:50%;box-shadow:0 0 9px #65d6a04a;display:inline-block;flex:none}.status-dot.muted{background:#7c8494;box-shadow:none}
.account-button{display:flex;align-items:center;gap:9px;width:100%;padding:8px;border:0;background:transparent;color:inherit;text-align:left;border-radius:8px;cursor:pointer}.account-button:hover{background:#1a1f2b}.user-avatar{width:29px;height:29px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#e4bc9d,#9976a5);color:#201a24;font-weight:700;font-size:12px;flex:none}.account-copy{flex:1}.logout-icon{color:#7d8798;font-size:16px}
.main-content{margin-left:248px;min-height:100vh}.topbar{height:66px;border-bottom:1px solid #202533;display:flex;align-items:center;justify-content:space-between;padding:0 42px;background:#10131c}.breadcrumbs{display:flex;align-items:center;gap:11px;font-size:11px;color:#828b9d}.breadcrumbs strong{font-weight:600;color:#e3e6ef}.crumb-divider{color:#4c5363}.topbar-right{display:flex;align-items:center;gap:14px}.owner-badge{font-size:8px;font-weight:700;letter-spacing:.12em;border:1px solid #3c365a;background:#211f32;color:#b9afff;border-radius:20px;padding:5px 8px}.top-avatar{width:28px;height:28px}
.page-content{max-width:1300px;margin:0 auto;padding:39px 42px 25px}.welcome-row{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:27px}.eyebrow{font-size:9px;font-weight:700;letter-spacing:.16em;color:#9a8df1;margin:0 0 9px}.welcome-row h1,.login-card h1{font:700 27px Manrope,sans-serif;letter-spacing:-.04em;color:#f0f2f8;margin:0}.wave{font-size:17px;color:#a99dff;margin-left:10px}.welcome-subtitle{color:#8b94a7;font-size:12px;margin:8px 0 0}.date-chip{display:flex;align-items:center;gap:9px;border:1px solid #252b3a;border-radius:8px;padding:9px 12px;font-size:10px;color:#aab1c0;background:#131722}.calendar-icon{color:#a498ff;font-size:14px}.inline-error{padding:11px 14px;margin-bottom:16px;border-radius:8px;color:#ffb7b7;background:#351d27;border:1px solid #57303b;font-size:12px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.stat-card{min-height:130px;padding:16px 17px;border:1px solid #252b3a;background:linear-gradient(145deg,#151a26,#121620);border-radius:11px}.stat-top{display:flex;align-items:center;justify-content:space-between}.stat-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:8px;font-size:14px}.violet{color:#b4a6ff;background:#2c2741}.teal{color:#79dbc0;background:#1e3434}.blue{color:#83bcff;background:#1e2e42}.amber{color:#e9bd71;background:#362f25}.stat-caption{font-size:8px;letter-spacing:.13em;font-weight:700;color:#737d90}.stat-value{display:block;font:700 25px Manrope,sans-serif;color:#f0f2f8;margin-top:14px;line-height:1}.stat-note{display:block;font-size:10px;color:#858ea1;margin-top:6px}
.content-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:14px;margin-top:16px}.panel-card{border:1px solid #252b3a;border-radius:11px;background:#131722;min-height:222px}.activity-card{padding:19px 20px}.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.section-heading h2,.next-card h2{margin:0;color:#eceef5;font:650 14px Manrope,sans-serif;letter-spacing:-.02em}.section-heading p{font-size:10px;color:#838c9f;margin:5px 0 0}.live-label{display:flex;align-items:center;gap:6px;padding:5px 7px;background:#1d2c2b;border-radius:5px;color:#78d6ae;font-size:8px;letter-spacing:.08em;font-weight:700}.live-label .status-dot{width:5px;height:5px}.activity-list{margin-top:16px}.activity-item{display:flex;align-items:center;gap:11px;min-height:42px;border-top:1px solid #222735}.activity-icon{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:#222437;color:#a89cff;font-size:13px}.activity-copy{display:flex;align-items:center;gap:5px;min-width:0;flex:1}.activity-copy strong{font-size:10px;color:#dfe2eb;font-weight:600}.activity-copy span{font-size:10px;color:#7f899d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.activity-item time{font-size:9px;color:#747d8f;white-space:nowrap}.empty-activity{min-height:137px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#7c8597;font-size:10px}.empty-activity strong{font-size:11px;color:#b6bdcb}.empty-icon{font-size:21px;color:#78718f}.activity-skeleton{display:grid;gap:12px;margin-top:22px}.activity-skeleton span{height:23px;border-radius:5px;background:linear-gradient(90deg,#1b202d,#222838,#1b202d);background-size:200% 100%;animation:shimmer 1.5s infinite}@keyframes shimmer{to{background-position:-200% 0}}
.next-card{padding:17px 19px;position:relative;overflow:hidden}.next-art{height:83px;margin:-2px -2px 11px;border-radius:8px;background:radial-gradient(ellipse at 48% 53%,#34305b 0,#211f38 31%,#171a28 72%);position:relative;display:grid;place-items:center;overflow:hidden}.orbit{position:absolute;border:1px solid #7b6fc04a;border-radius:50%;width:93px;height:42px;transform:rotate(-22deg)}.orbit-two{transform:rotate(24deg);width:120px;height:55px;border-color:#8072db36}.orb-core{width:37px;height:37px;border-radius:13px;background:linear-gradient(140deg,#b5a8ff,#7968d6);box-shadow:0 0 24px #9a8cff70;display:grid;place-items:center;color:white;font:800 12px Manrope,sans-serif;z-index:1}.sparkle{position:absolute;top:16px;right:31%;font-size:13px;color:#d9c5ff}.next-card .eyebrow{font-size:8px;margin-bottom:6px}.next-card h2{font-size:13px}.next-description{font-size:10px;line-height:1.55;color:#8992a5;margin:7px 0 11px}.next-status{display:flex;align-items:center;gap:7px;border-top:1px solid #252b38;padding-top:10px;font-size:9px;color:#9da5b5}
.modules-section{margin-top:26px}.modules-heading{align-items:center;margin-bottom:12px}.modules-count{font-size:8px;font-weight:700;letter-spacing:.1em;color:#788195}.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.module-card{min-height:76px;padding:13px;border:1px solid #242a38;border-radius:9px;background:#131722;display:flex;align-items:center;gap:11px;position:relative}.module-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;font-size:15px;flex:none}.module-color-0{background:#26243b;color:#aaa0ff}.module-color-1{background:#243342;color:#86bbec}.module-color-2{background:#392a34;color:#e995b0}.module-color-3{background:#243530;color:#82d3aa}.module-color-4{background:#383225;color:#d6b46f}.module-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.module-copy strong{font-size:10px;font-weight:600;color:#dfe3ec}.module-copy span{font-size:8px;color:#828b9e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.module-soon{font-size:6px;font-weight:700;letter-spacing:.08em;color:#777f90;border:1px solid #323849;border-radius:4px;padding:3px 4px;margin-left:auto;white-space:nowrap}.page-footer{display:flex;align-items:center;justify-content:space-between;padding-top:22px;margin-top:20px;border-top:1px solid #202533;color:#666f82;font-size:8px;letter-spacing:.09em}.page-footer span+span{letter-spacing:0;color:#727b8e}.footer-heart{color:#a18fff}
.login-screen{min-height:100vh;display:grid;place-items:center;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#18192b 0,#0d1018 55%)}.login-card{position:relative;z-index:1;width:min(430px,calc(100% - 32px));padding:36px;border:1px solid #2b2c41;background:#151722eF;border-radius:16px;box-shadow:0 28px 100px #0008}.login-brand{display:flex;align-items:center;gap:10px;margin-bottom:40px;font:700 13px Manrope,sans-serif;letter-spacing:.12em}.login-brand b{display:block;font:700 8px 'DM Sans',sans-serif;color:#7f879a;letter-spacing:.15em;margin-top:3px}.login-card .eyebrow{margin-bottom:10px}.login-card h1{font-size:26px;line-height:1.22}.login-copy{font-size:12px;color:#8e97aa;line-height:1.6;margin:10px 0 23px}.setup-label{display:flex;flex-direction:column;gap:8px;color:#bac1d0;font-size:11px;margin-bottom:14px}.setup-label input{padding:11px 12px;border:1px solid #34394b;border-radius:8px;background:#0f121b;color:#f1f2f7;outline:none}.setup-label input:focus{border-color:#9284ee}.discord-button{display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;border-radius:8px;background:#7367d9;color:white;font-size:12px;font-weight:600;box-shadow:0 7px 20px #6556d936}.discord-button:hover{background:#8175e8}.discord-button[aria-disabled=true]{opacity:.45;cursor:not-allowed}.discord-glyph{font-size:17px}.button-arrow{margin-left:auto;font-size:16px}.login-footnote{text-align:center;color:#717a8e;font-size:9px;margin:17px 0 0}.login-error{padding:10px;border-radius:7px;background:#38212c;color:#ffb9c5;font-size:11px}.login-glow{position:absolute;width:250px;height:250px;filter:blur(90px);border-radius:50%;background:#6455c91a}.glow-a{top:7%;left:11%}.glow-b{bottom:4%;right:8%;background:#478eaa14}
@media(max-width:1050px){.sidebar{width:218px}.main-content{margin-left:218px}.page-content{padding-left:27px;padding-right:27px}.topbar{padding:0 27px}.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.module-card:last-child{grid-column:span 2}}
@media(max-width:760px){.sidebar{position:relative;width:auto;height:auto;inset:auto;padding:13px 16px;border-right:0;border-bottom:1px solid #202533;display:block}.brand{padding:0 2px 12px}.workspace-picker,.sidebar nav{display:none}.sidebar-bottom{position:absolute;right:13px;top:12px;margin:0}.connection{display:none}.account-button{width:auto;padding:4px}.account-copy,.logout-icon{display:none}.main-content{margin:0}.topbar{height:48px;padding:0 18px}.page-content{padding:27px 17px 20px}.welcome-row{align-items:flex-start;gap:12px}.welcome-row h1{font-size:22px}.welcome-subtitle{font-size:11px;line-height:1.5}.date-chip{display:none}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat-card{min-height:115px;padding:13px}.stat-value{font-size:22px}.content-grid{grid-template-columns:1fr}.panel-card{min-height:auto}.activity-card{min-height:200px}.next-card{min-height:240px}.next-art{height:95px}.module-grid{grid-template-columns:1fr}.module-card:last-child{grid-column:auto}.page-footer{font-size:7px}.activity-copy{display:flex;flex-direction:column;align-items:flex-start;gap:1px}.activity-copy span{max-width:140px}}

/* ---- Portal additions (same tokens as the base panel styles) ---- */
.page-card{padding:19px 20px;margin-top:16px;min-height:0}
.form-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:14px}
.field{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#bac1d0;min-width:150px;flex:1}
.field input,.field select{padding:10px 11px;border:1px solid #34394b;border-radius:8px;background:#0f121b;color:#f1f2f7;outline:none;font-size:12px}
.field input:focus,.field select:focus{border-color:#9284ee}
.btn{border:0;border-radius:8px;padding:10px 15px;background:#7367d9;color:#fff;font-size:12px;font-weight:600;cursor:pointer;box-shadow:0 7px 20px #6556d936}
.btn:hover{background:#8175e8}.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-ghost{background:transparent;border:1px solid #3a2a33;color:#ff9fb0;box-shadow:none;padding:6px 10px;font-size:10px}.btn-ghost:hover{background:#38212c}
.table{width:100%;border-collapse:collapse;margin-top:14px}
.table th{font-size:8px;letter-spacing:.13em;color:#737d90;text-align:left;font-weight:700;padding:0 8px 9px}
.table td{font-size:11px;color:#dfe2eb;padding:11px 8px;border-top:1px solid #222735;vertical-align:middle}
.table td.muted,.muted-text{color:#7f899d}
.table td.actions{text-align:right;white-space:nowrap}
.badge{display:inline-block;font-size:8px;font-weight:700;letter-spacing:.1em;padding:4px 7px;border-radius:5px;background:#242238;color:#b9afff}
.badge.live{background:#1d2c2b;color:#78d6ae}.badge.twitch{background:#2c2741;color:#b4a6ff}.badge.youtube{background:#392a34;color:#e995b0}.badge.kick{background:#1f3322;color:#7ee08a}
.toast{position:fixed;right:20px;bottom:20px;max-width:340px;padding:11px 14px;border-radius:8px;font-size:12px;z-index:10;background:#1d2c2b;color:#9be7c4;border:1px solid #2a4a45}
.toast.error{background:#351d27;color:#ffb7b7;border-color:#57303b}
.guild-select{flex:1;min-width:0;background:transparent;border:0;color:#edf0f7;font-size:11px;font-weight:600;outline:none;cursor:pointer;appearance:none}
.guild-select option{background:#151a25}
.workspace-avatar img,.user-avatar img{width:100%;height:100%;border-radius:inherit;object-fit:cover}
.empty-note{padding:26px 0;text-align:center;color:#7c8597;font-size:11px}
.perm-desc{font-size:10px;color:#838c9f;margin:4px 0 0}
.logout-icon{cursor:pointer}
.nav-item{cursor:pointer}
@media(max-width:760px){.table .chan-col{display:none}.form-row{flex-direction:column;align-items:stretch}.workspace-picker,.sidebar nav{display:block!important}.sidebar{position:static}}
.row-select{padding:6px 8px;border:1px solid #34394b;border-radius:8px;background:#0f121b;color:#f1f2f7;font-size:11px;max-width:100%}
.btn-secondary{background:#222737;box-shadow:none;border:1px solid #34394b;color:#dfe2eb;align-self:flex-end}
.modal{width:min(520px,92vw);padding:20px;border:1px solid #252b3a;border-radius:11px;background:#131722;color:#eceef5}
.modal::backdrop{background:#0008}
.modal h2{margin:0 0 4px;font:650 14px Manrope,sans-serif}
.modal p{font-size:10px;margin:0 0 14px}
.modal textarea{padding:10px 11px;border:1px solid #34394b;border-radius:8px;background:#0f121b;color:#f1f2f7;font-size:12px;resize:vertical;font-family:inherit}
.modal form{display:grid;gap:12px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px}
.bulk-results{display:grid;gap:3px;font-size:11px;max-height:160px;overflow:auto}
.bulk-results:empty{display:none}
.bulk-ok{color:#9be7c4}.bulk-fail{color:#ffb7b7}
.check-col{width:28px}
.id-input{width:150px}
.bulk-bar{display:flex;align-items:center;gap:10px;margin-top:14px;padding:8px 12px;border:1px solid #34394b;border-radius:8px;background:#0f121b;font-size:11px;color:#dfe2eb}
.bulk-bar[hidden]{display:none}
.bulk-bar span{flex:1}
.filter-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.filter-row input{flex:1;min-width:160px}
.table[hidden],.empty-note[hidden]{display:none}

/* ---- Bots and creator pool ---- */
.bot-title{display:flex;align-items:center;gap:12px}.row-actions{display:flex;gap:8px;flex-wrap:wrap}
.badge.error{background:#3a2226;color:#f08a93}.badge.chip{margin:0 6px 4px 0}
.enroll-tree{display:flex;flex-direction:column;gap:12px;max-height:40vh;overflow:auto;margin:8px 0 12px}
.enroll-bot{border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.enroll-guilds{display:flex;flex-direction:column;gap:6px;margin:8px 0 0 24px}
.check-line{display:flex;align-items:center;gap:6px;cursor:pointer}
td .workspace-avatar{display:inline-grid;width:24px;height:24px;font-size:11px;vertical-align:middle}

/* ---- Message templates ---- */
.tpl-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,1fr);gap:16px;align-items:start}
.tpl-form{display:grid;gap:12px}.tpl-form .field{min-width:0}
.tpl-form textarea,.tpl-form .field input[type=text]{padding:10px 11px;border:1px solid #34394b;border-radius:8px;background:#0f121b;color:#f1f2f7;font-size:12px;font-family:inherit;resize:vertical}
.tpl-section{display:grid;gap:10px;padding-top:12px;border-top:1px solid #222735}.tpl-section h3,.tpl-preview-card h3{margin:0;font:650 12px Manrope,sans-serif;color:#dfe2eb}
.tpl-placeholders,.tpl-roles{display:flex;flex-wrap:wrap;gap:4px}
.tpl-ph{cursor:pointer;border:0;font-family:ui-monospace,monospace;text-transform:none;letter-spacing:0;font-size:10px}.tpl-ph:hover{background:#34305a}
.tpl-chip button{background:none;border:0;color:inherit;cursor:pointer;margin-left:4px;font-size:11px}
.tpl-fieldlist{display:grid;gap:10px}.tpl-fieldrow{display:grid;grid-template-columns:1fr 1fr auto auto;gap:8px;align-items:end;padding:10px;border:1px solid #222735;border-radius:8px}
.tpl-fieldrow .check-line{padding-bottom:10px}
.tpl-warnings:empty{display:none}.tpl-warning{margin:0;padding:8px 10px;border-radius:8px;background:#352c1d;color:#f0cf8f;font-size:10px}
.tpl-confirm{padding:8px 10px;border-radius:8px;background:#351d27;color:#ffb7b7;font-size:11px}.tpl-confirm[hidden]{display:none}
.tpl-preview-card{position:sticky;top:12px;display:grid;gap:12px}
.tpl-platforms{display:flex;gap:6px}.tpl-platforms .btn{align-self:auto;padding:7px 12px}.tpl-platforms .btn.active{background:#7367d9;border-color:#7367d9;color:#fff}
.tpl-msg{background:#313338;border-radius:8px;padding:12px 14px;color:#dbdee1;font-size:13px;display:grid;gap:6px}
.tpl-botline{display:flex;gap:6px;align-items:center}.tpl-botline strong{color:#fff;font-size:13px}
.tpl-content{white-space:pre-wrap;word-break:break-word}
.tpl-mention{background:#3c4270;color:#c9cdfb;border-radius:3px;padding:0 2px}
.tpl-embed{display:grid;grid-template-columns:1fr auto;gap:12px;background:#2b2d31;border-left:4px solid #7367d9;border-radius:4px;padding:10px 12px;max-width:432px}
.tpl-embed-main{display:grid;gap:6px;min-width:0}
.tpl-author{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:#fff}
.tpl-avatar{width:20px;height:20px;border-radius:50%;background:#555a66;flex:none}
.tpl-title{font-weight:650;color:#fff;word-break:break-word}.tpl-title.linked{color:#00a8fc}
.tpl-desc{font-size:12px;white-space:pre-wrap;word-break:break-word}
.tpl-fields{display:flex;flex-wrap:wrap;gap:8px}.tpl-field{flex:1 1 100%;display:grid;gap:2px;font-size:12px;min-width:0}.tpl-field.inline{flex:1 1 30%}.tpl-field strong{color:#fff;font-size:12px}.tpl-field span{word-break:break-word}
.tpl-img{display:grid;place-items:center;background:#1e1f22;color:#80848e;font-size:10px;border-radius:4px}.tpl-img.wide{height:120px}.tpl-img.thumb{width:64px;height:64px}
.tpl-footer{font-size:10px;color:#a3a6aa}
@media(max-width:1050px){.tpl-layout{grid-template-columns:1fr}.tpl-preview-card{position:static}.tpl-fieldrow{grid-template-columns:1fr}}
