:root{--color-bg:#f5f7fb;--color-surface:#fff;--color-surface-muted:#eef2ff;--color-border:#d9e1ef;--color-text:#0f172a;--color-text-muted:#64748b;--color-primary:#2563eb;--color-primary-strong:#1d4ed8;--color-success:#059669;--color-warning:#d97706;--color-danger:#dc2626;--color-purple:#7c3aed;--shadow-sm:0 10px 30px #0f172a0f;--shadow-lg:0 24px 60px #0f172a1f;--radius-md:16px;--radius-sm:12px}*{box-sizing:border-box;margin:0;padding:0}html,body{min-height:100%}body{background:linear-gradient(180deg, #f8fbff 0%, var(--color-bg) 100%);color:var(--color-text);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}img{max-width:100%;display:block}code,pre{font-family:SFMono-Regular,ui-monospace,Menlo,monospace}.dashboard-shell{min-height:100vh;display:flex}.dashboard-main{flex:1;min-width:0}.dashboard-content{padding:1.5rem}.sidebar{color:#e2e8f0;background:#0f172af5;gap:1.25rem;width:300px;height:100vh;padding:1.5rem;display:grid;position:sticky;top:0;overflow-y:auto}.sidebar-backdrop{display:none}.sidebar-brand,.section-row{justify-content:space-between;align-items:center;gap:.75rem;display:flex}.section-row-start{align-items:flex-start}.sidebar-nav,.sidebar-section,.page-stack,.page-stack-xs,.activity-list{gap:1rem;display:grid}.page-stack-xs{gap:.45rem}.sidebar-section-title,.eyebrow{color:#93c5fd;letter-spacing:.08em;text-transform:uppercase;font-size:.78rem;font-weight:700}.sidebar-link{color:#cbd5e1;border-radius:12px;justify-content:space-between;align-items:center;padding:.8rem .9rem;transition:background .18s,color .18s;display:flex}.sidebar-link:hover,.sidebar-link-active{color:#fff;background:#3b82f629}.sidebar-app-card{background:#ffffff0f;border:1px solid #ffffff14;border-radius:16px;gap:.75rem;padding:1rem;display:grid}.sidebar-app-card p{color:#94a3b8;font-size:.92rem}.sidebar-app-logo{object-fit:cover;border-radius:14px;width:48px;height:48px}.header{z-index:10;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#f5f7fbe0;border-bottom:1px solid #d9e1efcc;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.5rem;display:flex;position:sticky;top:0}.header-actions,.breadcrumbs,.header>div,.toolbar,.app-tabs,.table-actions,.quick-links{flex-wrap:wrap;align-items:center;gap:1rem;display:flex}.breadcrumbs{color:var(--color-text-muted)}.breadcrumb-item{align-items:center;gap:.5rem;display:inline-flex}.breadcrumb-separator{color:#94a3b8}.header-avatar{background:linear-gradient(135deg, var(--color-primary), #60a5fa);color:#fff;cursor:pointer;border:none;border-radius:999px;width:40px;height:40px;font-weight:700}.header-popover-wrap{position:relative}.header-popover{background:var(--color-surface);border:1px solid var(--color-border);width:min(360px,85vw);box-shadow:var(--shadow-lg);border-radius:16px;gap:.8rem;padding:1rem;display:grid;position:absolute;top:calc(100% + .75rem);right:0}.header-notification-item,.header-user-menu{gap:.4rem;display:grid}.header-notification-item span,.header-user-menu span{color:var(--color-text-muted);font-size:.92rem}.header-user-link{color:var(--color-primary);text-align:left;cursor:pointer;background:0 0;border:none;padding:0}.header-menu-button{display:none}.page-title-row{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}h1{font-size:clamp(2rem,4vw,2.8rem);line-height:1.05}h2{font-size:1.55rem}.dashboard-grid{gap:1.5rem;display:grid}.dashboard-grid-main{grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr)}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;display:grid}.stats-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid>.ui-card,.stats-grid-compact>div{min-height:100%}.stats-card-value,.ui-card-value{font-size:1.9rem;line-height:1}.app-grid,.bot-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;display:grid}.ui-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);gap:1rem;padding:1.25rem;display:grid}.ui-card-header,.ui-card-content{gap:.85rem;display:grid}.ui-card-title{font-size:1.1rem}.ui-card-description,.ui-field-hint,.quick-link-card span,.ui-table-wrap td span{color:var(--color-text-muted)}.ui-card-actions{flex-wrap:wrap;justify-content:space-between;gap:1rem;display:flex}.ui-badge{text-transform:capitalize;border-radius:999px;justify-content:center;align-items:center;padding:.28rem .7rem;font-size:.8rem;font-weight:700;display:inline-flex}.ui-badge-gray{color:#475569;background:#64748b26}.ui-badge-yellow{color:#b45309;background:#f59e0b26}.ui-badge-blue{color:#1d4ed8;background:#2563eb1f}.ui-badge-green{color:#047857;background:#0596691f}.ui-badge-red{color:#b91c1c;background:#dc26261f}.ui-badge-orange{color:#c2410c;background:#f973161f}.ui-badge-purple{color:#6d28d9;background:#7c3aed1f}.ui-button,.button-link{cursor:pointer;border:1px solid #0000;border-radius:12px;justify-content:center;align-items:center;gap:.5rem;padding:.78rem 1rem;font-weight:700;transition:transform .14s,background .14s,border-color .14s;display:inline-flex}.ui-button:hover,.button-link:hover{transform:translateY(-1px)}.ui-button-sm{padding:.55rem .8rem;font-size:.92rem}.ui-button-md{padding:.78rem 1rem}.ui-button-lg{padding:.95rem 1.15rem}.ui-button-full{width:100%}.ui-button-primary,.button-link{background:var(--color-primary);color:#fff}.ui-button-secondary{border-color:var(--color-border);color:var(--color-text);background:#fff}.ui-button-ghost{color:var(--color-text);background:0 0}.ui-button-danger{background:var(--color-danger);color:#fff}.ui-button:disabled{cursor:not-allowed;opacity:.6;transform:none}.ui-field{gap:.45rem;display:grid}.ui-field-label{font-weight:700}.ui-field-error{color:var(--color-danger);font-size:.88rem}.ui-input,.ui-textarea{border:1px solid var(--color-border);width:100%;color:var(--color-text);background:#fff;border-radius:12px;padding:.8rem .9rem}.ui-input:focus,.ui-textarea:focus,.ui-range:focus{outline-offset:2px;outline:2px solid #2563eb2e}.ui-input-error{border-color:#dc262673}.ui-textarea{resize:vertical;min-height:120px}.ui-range{width:100%}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;display:grid}.toolbar,.toolbar-bottom-align{align-items:end}.ui-table-wrap{width:100%;overflow-x:auto}.ui-table{border-collapse:collapse;width:100%;min-width:720px}.ui-table-head{text-align:left;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid var(--color-border);padding:.85rem .75rem;font-size:.82rem}.ui-table-cell{vertical-align:top;border-bottom:1px solid #d9e1efb3;padding:1rem .75rem}.ui-table-row:last-child .ui-table-cell{border-bottom:none}.table-sort-button{color:inherit;cursor:pointer;font:inherit;background:0 0;border:none;padding:0;font-weight:700}.table-sort-button-active{color:var(--color-primary)}.role-overview{background:linear-gradient(135deg,#7c3aed14,#2563eb0d)}.member-controls{grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;display:grid}.member-list-desktop{display:block}.member-list-mobile{display:none}.member-card-grid,.pending-invite-meta,.access-summary{gap:.5rem;display:grid}.member-card{min-height:100%}.pending-invite-item{background:#f8fafccc;border:1px solid #d9e1efcc;border-radius:14px;padding:1rem}.permission-matrix-table .ui-table{min-width:860px}.permission-matrix-symbol{align-items:center;font-size:1.05rem;font-weight:700;display:inline-flex}.permission-matrix-allowed{color:var(--color-success)}.permission-matrix-denied{color:var(--color-danger)}.access-summary p{color:var(--color-text-muted)}.ui-loading{color:var(--color-text-muted);align-items:center;gap:.75rem;padding:1rem 0;display:inline-flex}.ui-loading-spinner{border:3px solid #2563eb26;border-top-color:var(--color-primary);border-radius:999px;width:18px;height:18px;animation:.75s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.ui-tabs,.ui-tab-panel{gap:1rem;display:grid}.ui-tab-list{flex-wrap:wrap;gap:.75rem;display:flex}.ui-tab-trigger{border:1px solid var(--color-border);cursor:pointer;background:#fff;border-radius:999px;padding:.55rem .85rem}.ui-tab-trigger-active{color:var(--color-primary);background:#2563eb1a;border-color:#2563eb2e}.ui-toggle{text-align:left;background:0 0;border:none;justify-content:space-between;align-items:center;gap:1rem;width:100%;display:flex}.ui-toggle-copy{gap:.35rem;display:grid}.ui-toggle-track{background:#cbd5e1;border-radius:999px;width:52px;height:30px;transition:background .18s;position:relative}.ui-toggle-track-active{background:#2563ebe6}.ui-toggle-thumb{background:#fff;border-radius:999px;width:24px;height:24px;transition:transform .18s;position:absolute;top:3px;left:3px}.ui-toggle-thumb-active{transform:translate(22px)}.ui-modal-backdrop{z-index:30;background:#0f172a85;place-items:center;padding:1.5rem;display:grid;position:fixed;inset:0}.ui-modal{background:var(--color-surface);width:min(780px,100%);max-height:calc(100vh - 3rem);box-shadow:var(--shadow-lg);border-radius:20px;gap:1rem;padding:1.25rem;display:grid;overflow-y:auto}.ui-modal-header,.ui-modal-footer{justify-content:space-between;align-items:center;gap:1rem;display:flex}.ui-alert{border:1px solid var(--color-border);background:var(--color-surface);border-radius:16px;gap:.55rem;padding:1rem 1.1rem;display:grid}.ui-alert-yellow{background:#f59e0b14;border-color:#f59e0b33}.ui-alert-blue{background:#2563eb0f;border-color:#2563eb2e}.ui-alert-green{background:#05966914;border-color:#05966933}.ui-alert-red{background:#dc262614;border-color:#dc262633}.text-link{color:var(--color-primary);font-weight:700}.success-copy{color:var(--color-success);font-weight:700}.code-block,.code-inline{color:#e2e8f0;white-space:pre-wrap;word-break:break-word;background:#0f172a;border-radius:14px;padding:.9rem 1rem;overflow-x:auto}.code-inline{border-radius:999px;width:fit-content;padding:.25rem .55rem}.chart-card{background:var(--color-surface);border:1px solid var(--color-border);box-shadow:var(--shadow-sm);border-radius:20px;gap:1rem;padding:1.25rem;display:grid}.chart-bars{grid-template-columns:repeat(30,minmax(0,1fr));align-items:end;gap:.35rem;height:220px;display:grid}.chart-bar-wrap{align-items:end;height:100%;display:flex}.chart-bar{background:linear-gradient(#2563eb40,#2563ebd9);border-radius:999px 999px 4px 4px;width:100%}.chart-line{width:100%;height:110px}.chart-axis{color:var(--color-text-muted);justify-content:space-between;font-size:.9rem;display:flex}.activity-item,.quick-link-card,.moderation-check{background:#f8fafccc;border:1px solid #d9e1efcc;border-radius:14px;gap:.6rem;padding:.95rem;display:grid}.quick-links{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;display:grid}.quick-link-card strong{color:var(--color-text)}.app-card-title,.app-hero-title-row{align-items:center;gap:.9rem;display:flex}.app-card-logo,.app-hero-logo{object-fit:cover;border-radius:16px;width:56px;height:56px}.app-hero{background:linear-gradient(135deg,#2563eb1f,#0ea5e914);border:1px solid #2563eb24;border-radius:20px;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:1rem;padding:1.25rem;display:flex}.app-hero p{color:var(--color-text-muted);max-width:760px}.app-hero-stats{grid-template-columns:repeat(3,minmax(120px,1fr));gap:.75rem;display:grid}.app-hero-stats span{color:var(--color-text-muted);font-size:.85rem}.app-hero-stats strong{margin-top:.2rem;display:block}.app-tabs{border-bottom:1px solid var(--color-border);padding-bottom:.75rem}.app-tab{color:var(--color-text-muted);border-radius:999px;align-items:center;gap:.5rem;padding:.65rem .85rem;display:inline-flex}.app-tab-active{color:var(--color-primary);background:#2563eb1a}.moderation-preview{object-fit:cover;border-radius:16px;width:160px;height:120px}.moderation-copy{flex:1}.moderation-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem;display:grid}.member-role-cell{gap:.6rem;display:grid}.ui-toggle-disabled{cursor:not-allowed;opacity:.6}@media (max-width:1120px){.dashboard-grid-main,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:960px){.sidebar{z-index:25;transition:transform .18s;position:fixed;top:0;left:0;transform:translate(-100%)}.sidebar-open{transform:translate(0)}.sidebar-backdrop{opacity:0;pointer-events:none;z-index:20;background:#0f172a70;transition:opacity .18s;display:block;position:fixed;inset:0}.sidebar-backdrop-open{opacity:1;pointer-events:auto}.header-menu-button{display:inline-flex}}@media (max-width:760px){.dashboard-content,.header{padding:1rem}.stats-grid,.form-grid,.dashboard-grid-main,.member-controls{grid-template-columns:1fr}.app-hero-stats{grid-template-columns:1fr;width:100%}.toolbar{flex-direction:column;align-items:stretch}.moderation-preview{width:100%;height:180px}.member-list-desktop{display:none}.member-list-mobile{display:block}.section-row,.ui-modal-header,.ui-modal-footer{align-items:flex-start}}
