:root{color-scheme:light dark;--bg:#f5f7f9;--surface:#fff;--ink:#243246;--muted:#8390a0;--line:#e9edf2;--soft:#f4f6f8;--accent:#29846b;--tint:#eaf5ef;--danger:#c45c61;--sidebar:#fff}*{box-sizing:border-box}body{margin:0;font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{display:inline-flex;gap:8px;align-items:center;justify-content:center;padding:10px 16px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);cursor:pointer;white-space:nowrap;transition:background .18s,transform .18s}button:hover{background:var(--soft)}button:active{transform:translateY(1px)}button:disabled{opacity:.45;cursor:default}.primary{background:var(--accent);color:white;border-color:var(--accent)}.primary:hover{background:var(--accent);filter:brightness(.95)}.danger{color:var(--danger)}.text-button{border:0;background:transparent;padding:7px 9px;color:var(--muted)}a{color:var(--accent);text-decoration:none}h1,h2,h3,p{margin-top:0}h1{font-size:28px;letter-spacing:-.6px;margin-bottom:8px;font-weight:650}h2{font-size:17px;font-weight:600;margin-bottom:6px}h3{font-size:14px;font-weight:600;margin-bottom:15px}p{color:var(--muted);margin-bottom:20px}.muted,small{color:var(--muted)}small{font-size:12px}.eyebrow{font-size:11px;letter-spacing:1.2px;color:var(--muted);display:block;margin-bottom:8px}.logo{display:grid;place-items:center;background:var(--accent);color:#fff;border-radius:12px;font-size:22px;font-weight:650;width:40px;height:40px;flex-shrink:0}.sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:var(--sidebar);border-right:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);font-size:17px;font-weight:650;padding:0 8px 30px}.brand small{display:block;font-weight:400;font-size:10px;letter-spacing:1px}.nav-caption{color:var(--muted);font-size:11px;padding:18px 14px 10px}nav{display:grid;gap:5px}nav a{color:var(--muted);display:flex;align-items:center;padding:11px 14px;gap:12px;border-radius:10px;font-size:13px}nav a.active{background:var(--tint);color:var(--accent);font-weight:600}nav a:hover{background:var(--soft)}nav i{font-style:normal;width:22px;text-align:center;font-size:21px;line-height:1}.sidebar-bottom{margin-top:auto;padding:20px 12px 0;color:var(--muted);font-size:11px}.sidebar-bottom small{display:block;margin-top:9px;font-size:10px}.status-dot{display:inline-block;background:#49a07e;width:6px;height:6px;border-radius:50%;margin-right:5px}.workspace{margin-left:224px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:76px;border-bottom:1px solid var(--line);background:var(--surface);display:flex;align-items:center;padding:0 36px;gap:22px;font-size:12px}#breadcrumb{color:var(--muted);flex-shrink:0}#global-search{display:flex;align-items:center;gap:8px;margin-left:auto;max-width:350px;width:35%;color:var(--muted)}#global-search input{background:transparent;border:0;padding:8px;font-size:12px}.admin-chip{display:flex;align-items:center;gap:9px;color:var(--accent);font-weight:650}.admin-chip span{font-weight:400;color:var(--ink)}.content{padding:36px;max-width:1580px;width:100%;margin:0 auto;flex:1}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}.page-heading p{margin:0;font-size:12px}.page-heading button{font-size:12px}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:24px;min-width:0}.card-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.card-title h2{margin:0}.card-title small{font-size:11px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}.stat-label{font-size:12px;color:var(--muted)}.stat-value{font-size:33px;font-weight:600;line-height:1.3;margin:14px 0 6px;letter-spacing:-1px}.stat-foot{font-size:11px;color:var(--muted)}.stat-icon{float:right;display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--tint);color:var(--accent);font-size:18px}.grid-two{display:grid;grid-template-columns:1.5fr 1fr;gap:24px;margin-bottom:24px}.grid-equal{display:grid;grid-template-columns:1fr 1fr;gap:24px}.notice-strip{border-radius:10px;background:var(--tint);padding:14px 18px;font-size:12px;color:var(--accent);margin-bottom:24px}.chart{height:180px;display:flex;align-items:flex-end;gap:14px;padding-top:20px;border-bottom:1px solid var(--line)}.chart-col{height:100%;flex:1;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;gap:5px;position:relative}.chart-bar{width:42%;max-width:42px;min-height:2px;background:#8dc6b0;border-radius:5px 5px 0 0}.chart-col span{font-size:10px;color:var(--muted)}.chart-labels{display:flex;justify-content:space-around;color:var(--muted);font-size:10px;margin-top:10px}.service-row{padding:14px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:12px}.service-row:last-child{border:0}.badge{font-size:10px;display:inline-block;padding:3px 8px;border-radius:5px;background:var(--soft);color:var(--muted);white-space:nowrap}.badge.green{background:var(--tint);color:var(--accent)}.badge.red{color:var(--danger);background:#c45c6112}.badge.amber{color:#b28b48;background:#b28b4812}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}th{font-weight:400;color:var(--muted);background:var(--soft);font-size:11px;white-space:nowrap}th,td{padding:15px 14px;border-bottom:1px solid var(--line)}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:var(--soft)}td small{display:block;font-size:10px;margin-top:2px}.user-cell{display:flex;align-items:center;gap:10px}.avatar{display:grid;place-items:center;width:36px;height:36px;background:var(--tint);border-radius:11px;color:var(--accent);font-weight:600;font-size:16px;object-fit:cover}.avatar.large{width:64px;height:64px;border-radius:18px;font-size:26px}.row-actions{display:flex;gap:6px;white-space:nowrap}.row-actions button{padding:5px 9px;font-size:11px;border:0;background:transparent;color:var(--accent)}.empty{padding:60px 20px!important;text-align:center;color:var(--muted);font-size:12px}.empty-symbol{font-size:32px;color:#a9bab2;margin-bottom:10px}.filters{display:flex;gap:12px;margin-bottom:24px;flex-wrap:wrap}.filters input{flex:1;min-width:180px}.filters select{width:150px}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding-top:20px;font-size:11px;color:var(--muted)}.pagination .total{margin-right:auto}.pagination button{padding:6px 12px;font-size:11px}input,select,textarea{width:100%;background:var(--soft);border:1px solid transparent;border-radius:8px;padding:11px 13px;color:var(--ink);outline:none;transition:border-color .18s}input:focus,select:focus,textarea:focus{border-color:var(--accent)}input::placeholder{color:var(--muted)}textarea{min-height:90px;resize:vertical}label{display:grid;gap:8px;color:var(--ink);font-size:12px;margin-bottom:20px}label small{font-size:11px;line-height:1.7}input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent)}label.check{display:flex;align-items:center;gap:8px}.form-page{max-width:680px}.form-page p{font-size:12px}.form-actions{display:flex;gap:12px}.divider{border:0;border-top:1px solid var(--line);margin:24px 0}.activity{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.activity:last-child{border:0}.activity-dot{width:7px;height:7px;margin-top:7px;background:var(--accent);border-radius:50%;flex-shrink:0}.activity strong{font-size:12px;font-weight:500;display:block}.activity p{margin:4px 0 0;font-size:11px}.workspace-footer{padding:22px 36px;color:var(--muted);font-size:10px;border-top:1px solid var(--line)}dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:24px;width:min(94vw,480px);max-height:88vh;padding:28px;overflow:auto}dialog::backdrop{background:#14203366;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}.dialog-heading h2{margin:0;font-size:18px}.dialog-heading button{border:0;padding:4px 8px;background:var(--soft)}dialog p{font-size:12px;overflow-wrap:anywhere}.dialog-actions{display:flex;gap:12px;margin-top:24px}.dialog-actions button{flex:1}.user-dialog{width:min(94vw,840px)}.profile-header{display:flex;align-items:center;gap:18px;margin-bottom:24px}.profile-header h2{font-size:22px;margin-bottom:4px}.profile-header p{margin:0;font-size:12px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.detail-box{padding:20px;border:1px solid var(--line);border-radius:12px;margin-bottom:18px}.detail-row{display:flex;justify-content:space-between;gap:20px;margin:12px 0;font-size:12px}.detail-row span:first-child{color:var(--muted);flex-shrink:0}.detail-row span:last-child{text-align:right;overflow-wrap:anywhere;min-width:0}.detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}.detail-actions button{font-size:11px}.error{color:var(--danger)!important}.integration-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.integration-grid p{font-size:12px;min-height:64px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:100;padding:14px 22px;background:var(--ink);color:var(--surface);border-radius:12px;max-width:90vw;font-size:13px}#login-view{min-height:100vh;display:flex;flex-direction:column}.login-brand{display:flex;align-items:center;gap:12px;padding:36px 5vw;font-size:18px;font-weight:600}.login-brand>span:last-child{font-size:12px;font-weight:400;color:var(--muted);border-left:1px solid var(--line);padding-left:14px;margin-left:5px}.login-panel{width:min(92%,430px);margin:auto;padding:34px;border:1px solid var(--line);background:var(--surface);border-radius:22px}.login-panel h1{font-size:30px}.login-panel p{font-size:12px}.login-panel form{margin-top:28px}.login-panel button{width:100%;justify-content:space-between}.login-panel small{display:block;text-align:center;font-size:10px;margin-top:26px}#login-view footer{text-align:center;padding:30px;font-size:10px;color:var(--muted)}[hidden]{display:none!important}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}@media(prefers-color-scheme:dark){:root{--bg:#131b24;--surface:#1b2530;--ink:#e1e7ed;--muted:#91a0af;--line:#2a3744;--soft:#222f3b;--accent:#7cbea5;--tint:#263c36;--danger:#e08a8e;--sidebar:#18222c}.primary,.logo{color:#14251e}.chart-bar{background:#527f6e}.empty-symbol{color:#577064}}@media(max-width:1100px){.sidebar{width:190px}.workspace{margin-left:190px}.content{padding:26px}.topbar{padding:0 26px;gap:14px}.stats{gap:12px}.stat-value{font-size:28px}.grid-two{grid-template-columns:1fr}.integration-grid{grid-template-columns:1fr}.card{padding:20px}}@media(max-width:760px){.sidebar{position:relative;width:100%;padding:14px 16px;border-right:0;border-bottom:1px solid var(--line)}.brand{padding-bottom:14px}.sidebar nav{display:flex;overflow:auto;gap:5px}.sidebar nav a{white-space:nowrap;padding:8px 10px;font-size:11px}.sidebar nav i{font-size:17px}.nav-caption,.sidebar-bottom{display:none}.workspace{margin-left:0}.topbar{padding:0 18px;height:64px}.topbar #breadcrumb{display:none}#global-search{width:100%;max-width:none}.admin-chip span{display:none}.content{padding:24px 16px}.stats{grid-template-columns:1fr 1fr}.stat-value{font-size:30px}.grid-equal,.detail-grid{grid-template-columns:1fr}h1{font-size:24px}.card{padding:18px}.filters{gap:8px}.filters select{width:calc(50% - 4px)}.filters input{width:100%;flex:auto}.workspace-footer{padding:20px}.page-heading{gap:15px}.page-heading p{font-size:11px}.login-brand{padding:24px}.login-brand>span:last-child{display:none}}

.nav-icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.tutorial-dialog{width:min(96vw,1120px)}.editor-meta{display:grid;grid-template-columns:2fr 1fr;gap:18px}.editor-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}.block-editor{padding:18px;border:1px solid var(--line);border-radius:12px;margin-bottom:14px}.block-toolbar{display:flex;gap:8px;align-items:center;margin-bottom:12px}.block-toolbar select{max-width:150px}.block-toolbar input{flex:1;min-width:90px;font-size:11px}.block-toolbar button{padding:6px 10px;font-size:11px}.block-editor textarea{min-height:110px}.editor-preview{padding:24px;background:var(--soft);border-radius:14px}.editor-preview p{white-space:pre-wrap;line-height:1.9;color:var(--ink)}.editor-preview .tip{padding:18px;border-left:3px solid var(--accent)}.editor-preview .warning{padding:18px;border-left:3px solid #b28b48}.editor-preview img,.editor-preview video{max-width:100%;max-height:500px;border-radius:10px;object-fit:contain}.backup-note{max-width:720px;line-height:1.8}.restore-check{padding:14px;border-radius:12px;background:var(--tint);color:var(--accent);font-size:12px;margin-bottom:18px}.history-inline{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.history-inline button{font-size:11px;padding:6px 10px}.editor-status{font-size:12px;margin-bottom:16px;color:var(--muted)}@media(max-width:700px){.editor-meta{grid-template-columns:1fr}.block-toolbar{flex-wrap:wrap}.block-toolbar input{flex-basis:100%}.sidebar nav{max-height:none}.sidebar{padding-bottom:8px}}

.document-editor{background:var(--surface);max-width:820px;margin:auto;padding:32px 48px;border:1px solid var(--line)}.document-toolbar{position:sticky;top:0;background:var(--surface);display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--line);z-index:2;margin-bottom:28px}.document-toolbar span{margin-right:auto;color:var(--muted);font-size:12px}.document-editable{outline:none;border-radius:6px;min-height:1.6em;padding:6px 8px;margin-left:-8px}.document-editable:hover{background:var(--soft)}.document-editable:focus{box-shadow:0 0 0 2px var(--accent);background:var(--soft)}.document-editable:empty:before{content:attr(data-placeholder);color:var(--muted)}.document-editor>section{margin:22px 0}.document-editor h1{line-height:1.5}.document-editor [hidden]{display:none!important}@media(max-width:700px){.document-editor{padding:20px}.document-toolbar span{width:100%}}

#tutorial-editor>[hidden]{display:none!important}
#action-fields [hidden]{display:none!important}

.detail-box p{white-space:pre-wrap;overflow-wrap:anywhere}

/* Keep every navigation entry reachable on short desktop windows. */


/* Sidebar: fixed header/tools, independently scrolling task groups. */
.sidebar{width:244px;height:100vh;height:100dvh;padding:0;overflow:hidden;display:flex;flex-direction:column}
.sidebar-header{display:flex;align-items:center;flex-shrink:0;padding:24px 20px 20px}
.sidebar .brand{padding:0;gap:10px;font-size:16px}.sidebar .brand small{font-size:10px;letter-spacing:.5px}
.sidebar-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent;padding:6px 14px 20px}
.sidebar nav{display:block;overflow:visible;max-height:none}
.nav-group+.nav-group{margin-top:28px}.sidebar .nav-caption{display:block;padding:0 12px;margin:0 0 9px;font-size:11px;font-weight:500;letter-spacing:.7px;color:var(--muted)}
.sidebar nav a{min-height:42px;padding:9px 12px;margin:3px 0;gap:11px;color:#566473;font-size:13px;white-space:nowrap;border-radius:10px}
.sidebar nav a:hover{background:var(--soft);color:var(--ink)}
.sidebar nav a.active,.sidebar .upgrade-entry.active{background:#243e35;color:#fff;font-weight:600}
.sidebar nav a.active:hover{background:#243e35;color:#fff}
.sidebar a:focus-visible,.sidebar button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sidebar-bottom{display:block;flex-shrink:0;margin:0;padding:12px 14px max(14px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--sidebar)}
.external-mark{margin-left:auto;font-size:13px;color:var(--muted)}
.upgrade-entry{display:flex;align-items:center;gap:10px;padding:12px;margin-top:12px;border-radius:12px;background:var(--tint);color:var(--accent);font-size:13px;font-weight:600}
.upgrade-entry>span:first-of-type{flex:1}.upgrade-entry small{display:block;margin-top:2px;color:inherit;opacity:.8;font-size:10px;font-weight:400}
.upgrade-entry:hover{filter:brightness(.96)}
.workspace{margin-left:244px}.sidebar-toggle,.sidebar-close,.sidebar-backdrop{display:none}
@media(prefers-color-scheme:dark){.sidebar nav a{color:#b2bdc7}.sidebar nav a.active,.sidebar nav a.active:hover,.sidebar .upgrade-entry.active{background:#b6dfcc;color:#152b23}}
@media(max-width:760px){
.sidebar{position:fixed;inset:0 auto 0 0;width:min(288px,86vw);border-right:1px solid var(--line);border-bottom:0;z-index:60;transform:translateX(-100%);visibility:hidden;transition:transform .24s cubic-bezier(.2,.8,.2,1),visibility .24s}
.sidebar.is-open{transform:translateX(0);visibility:visible}.sidebar-header{padding:20px}.sidebar-scroll{padding-bottom:20px}.sidebar-bottom{display:block}
.sidebar-close{display:inline-flex;margin-left:auto;border:0;background:transparent;padding:4px 10px;font-size:24px;color:var(--muted)}
.sidebar-toggle{display:inline-flex;width:38px;height:38px;padding:0;flex-shrink:0;border:0;background:var(--soft);font-size:20px;color:var(--ink)}
.sidebar-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:50;border:0;border-radius:0;background:#10192166;cursor:default}
.workspace{margin-left:0}.topbar{position:sticky;top:0;z-index:15;gap:10px;padding:0 14px}#global-search{min-width:0}#global-search input{min-width:0;padding:8px 2px}.admin-chip{display:none}
body.sidebar-open{overflow:hidden}
}
@media(max-height:560px){.sidebar-header{padding:12px 20px}.sidebar-bottom{padding-top:6px;padding-bottom:8px}.sidebar-bottom nav a{min-height:34px;padding-top:5px;padding-bottom:5px}.upgrade-entry{padding:8px 12px;margin-top:6px}}

/* Shared component dimensions and readable, horizontally scrollable data tables. */
:root{--radius-control:10px;--radius-panel:16px;--radius-dialog:24px;--radius-badge:6px}
button,input,select,textarea,.sidebar nav a,.document-editable{border-radius:var(--radius-control)}
.card,.login-panel, .detail-box,.block-editor,.editor-preview,.upgrade-entry{border-radius:var(--radius-panel)}
dialog{border-radius:var(--radius-dialog)}.badge{border-radius:var(--radius-badge)}
.notice-strip,.restore-check,#toast,.logo,.stat-icon,.editor-preview img,.editor-preview video{border-radius:var(--radius-control)}
.avatar,.avatar.large{border-radius:50%}
.workspace{min-width:0}.content,.card,.grid-two>*,.grid-equal>*{min-width:0}
.card-title{gap:12px 24px;align-items:flex-start;flex-wrap:wrap;margin-bottom:20px}
.card-title h2{flex-shrink:0;line-height:1.5}.card-title small{max-width:560px;text-align:right;line-height:1.7;margin-left:auto}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;border-radius:var(--radius-control)}
.table-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
table{table-layout:auto;line-height:1.65}th,td{vertical-align:top;padding:14px 16px}
td{word-break:normal;overflow-wrap:anywhere}th{line-height:1.5}
td button{margin:0 6px 6px 0}td small{line-height:1.7;margin-top:5px}
.audit-table td:first-child,.audit-table td:nth-child(2),.audit-table td:nth-child(3),.audit-table td:last-child{white-space:nowrap}
.audit-table td:nth-child(4){min-width:320px;max-width:640px}
.card>button+.table-wrap,.card>.form-actions+.table-wrap,.card>.filters+.table-wrap{margin-top:20px}
.card>.table-wrap+p{margin-top:20px;margin-bottom:0;font-size:12px;line-height:1.85;max-width:100ch}
.card>.table-wrap+.pagination{margin-top:4px}.card>p:last-child{margin-bottom:0}
.form-actions,.detail-actions{align-items:center;flex-wrap:wrap;gap:10px}
.service-row{gap:16px;align-items:flex-start}.service-row> :last-child{min-width:0;overflow-wrap:anywhere;text-align:right}
.page-heading{align-items:flex-start;gap:16px}.page-heading>div{min-width:0}.page-heading>button{flex-shrink:0}
@media(max-width:760px){
 .card-title small{flex-basis:100%;max-width:none;text-align:left;margin-left:0}
 .card-title{gap:6px;margin-bottom:18px}.card{padding:18px}
 .page-heading{gap:12px}.page-heading p{line-height:1.7}
 .detail-row{flex-wrap:wrap;gap:6px}.detail-row span:last-child{text-align:left}
 .dialog-actions{flex-wrap:wrap}.dialog-actions button{min-width:100px}
}

/* Default matches Android AccountManager accent: #335EEA. */
:root{--brand:#335eea;--accent:var(--brand);--tint:color-mix(in srgb,var(--brand) 10%,var(--surface))}
.sidebar nav a.active,.sidebar nav a.active:hover,.sidebar .upgrade-entry.active{background:var(--brand);color:#fff}
.primary,.logo{color:#fff}.chart-bar{background:color-mix(in srgb,var(--brand) 65%,var(--surface))}
@media(prefers-color-scheme:dark){:root{--accent:color-mix(in srgb,var(--brand) 65%,white);--tint:color-mix(in srgb,var(--brand) 20%,var(--surface))}}
input:not([type=checkbox]):not([type=radio]):not([type=color]),select{min-height:44px;padding:10px 12px}
select{appearance:auto;line-height:1.5}input[type=checkbox]{width:18px;height:18px;min-height:18px;flex-shrink:0}
label:has(>input[type=checkbox]){display:flex;align-items:center;gap:10px;min-height:44px}
#action-dialog{width:min(94vw,860px);max-height:calc(100dvh - 40px);padding:0;overflow:hidden}
#action-dialog[open]{display:flex}
#action-form{display:flex;flex-direction:column;width:100%;max-height:calc(100dvh - 40px);min-height:0}
#action-form>.dialog-heading{flex-shrink:0;margin:0;padding:22px 24px;border-bottom:1px solid var(--line)}
.dialog-body{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;padding:20px 24px}
.dialog-footer{flex-shrink:0;padding:16px 24px;background:var(--surface);border-top:1px solid var(--line)}
.dialog-footer .dialog-actions{margin:0;justify-content:flex-end}.dialog-footer .dialog-actions button{flex:0 1 140px;min-height:44px}
#action-error:empty{display:none}#action-error{margin:0 0 12px}
#action-help{margin:20px 0 0;font-size:12px;line-height:1.8}#action-target{margin-bottom:18px}
.modal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;align-items:start}
.modal-grid>label{margin:0;min-width:0;line-height:1.7;align-self:start}
.modal-grid>div,.modal-grid>p,.modal-grid>label:has(textarea){grid-column:1/-1}
.modal-subgrid{display:contents}.modal-grid textarea{min-height:88px}
.product-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 14px}
.product-checks label{margin:0}.color-choices{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
input[type=color]{width:100%;height:44px;padding:4px;cursor:pointer}
#user-dialog,#tutorial-dialog{padding:0;overflow:hidden;max-height:calc(100dvh - 40px)}
#user-dialog[open],#tutorial-dialog[open]{display:flex;flex-direction:column}
#user-dialog>.dialog-heading,#tutorial-dialog>.dialog-heading{padding:22px 24px;margin:0;flex-shrink:0;border-bottom:1px solid var(--line)}
#user-detail,#tutorial-editor{padding:24px;min-height:0;overflow-y:auto}
@media(max-width:640px){
 #action-dialog,#user-dialog,#tutorial-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 #action-form{max-height:calc(100dvh - 24px)}
 .modal-grid{grid-template-columns:minmax(0,1fr);gap:16px}.product-checks{grid-template-columns:repeat(2,minmax(0,1fr))}
 .dialog-body,#user-detail,#tutorial-editor{padding:18px}
 #action-form>.dialog-heading,#user-dialog>.dialog-heading,#tutorial-dialog>.dialog-heading{padding:18px}
 .dialog-footer{padding:14px 18px;padding-bottom:max(14px,env(safe-area-inset-bottom))}
 .dialog-footer .dialog-actions button{flex:1}
}

.primary,.primary:hover,.logo{background:var(--brand);border-color:var(--brand);color:var(--on-brand,#fff)}
.sidebar nav a.active,.sidebar nav a.active:hover,.sidebar .upgrade-entry.active{color:var(--on-brand,#fff)}
.modal-grid>label:has(>input[type=checkbox]){grid-column:1/-1}
body:has(dialog[open]){overflow:hidden}

.announcement-preview{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9}.announcement-preview h2{font-size:22px}
