*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;color:#1f2937;background:#f5f7fb;letter-spacing:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.admin-body[data-auth="checking"] .login-screen,.admin-body[data-auth="guest"] .login-screen{display:grid}.admin-body[data-auth="authed"] .login-screen{display:none}.admin-body[data-auth="checking"] .platform-shell,.admin-body[data-auth="guest"] .platform-shell{display:none}.admin-body[data-auth="authed"] .platform-shell{display:grid}.login-screen{min-height:100vh;grid-template-columns:1fr 410px;gap:50px;align-items:center;padding:64px;background:#f4f8ff}.login-art{justify-self:end;max-width:680px}.brand-logo{font-weight:900;color:#2196f3;font-size:28px}.login-art h1{font-size:44px;margin:24px 0 14px}.login-art p{color:#64748b;font-size:17px;line-height:1.8}.login-metrics{display:flex;gap:10px}.login-metrics span{background:white;border:1px solid #e5eaf2;border-radius:4px;padding:8px 12px;color:#64748b}.login-card{background:white;border:1px solid #e5eaf2;border-radius:4px;padding:28px;box-shadow:0 16px 42px rgba(15,23,42,.12);display:grid;gap:16px}.login-card h2{margin:0}.login-card label{display:grid;gap:7px;font-size:13px;color:#334155}.login-card input{height:42px;border:1px solid #d8dee9;border-radius:4px;padding:0 11px}.login-card button,.primary{height:38px;border:0;border-radius:4px;background:#1e93ff;color:white;padding:0 14px}.form-tip{font-size:13px;color:#64748b}.form-tip.error{color:#dc2626}.form-tip.ok{color:#16a34a}.platform-shell{grid-template-columns:166px 1fr;min-height:100vh}.platform-sidebar{background:white;border-right:1px solid #edf0f5;min-height:100vh;box-shadow:6px 0 18px rgba(15,23,42,.03);z-index:3}.logo-box{height:70px;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid #edf0f5}.logo-mark{width:34px;height:34px;border-radius:8px;background:#2097ff;color:white;display:grid;place-items:center;font-weight:900}.logo-text{color:#2097ff;font-weight:900;font-size:14px}.side-item{margin:6px 7px}.side-main{width:100%;height:40px;border:0;background:white;color:#4b5563;display:flex;align-items:center;gap:12px;border-radius:4px;padding:0 16px;text-align:left;font-size:14px}.side-main:hover,.side-main.active{background:#1e93ff;color:white}.side-icon{width:16px;text-align:center}.side-caret{margin-left:auto;color:#b8c0cc}.sub-menu{padding:6px 0 6px 48px;display:grid;gap:4px}.sub-btn{height:34px;border:0;background:white;text-align:left;color:#111827;font-size:14px;border-radius:4px}.sub-btn:hover,.sub-btn.active{color:#1e93ff}.platform-main{min-width:0}.platform-topbar{height:70px;background:white;border-bottom:1px solid #edf0f5;display:flex;align-items:center;justify-content:space-between;padding:0 28px;box-shadow:0 5px 16px rgba(15,23,42,.04);position:sticky;top:0;z-index:2}.nav-days{font-size:14px;color:#333}.nav-days strong{font-size:20px;margin-left:8px}.top-actions{display:flex;align-items:center;gap:24px}.top-actions button{border:0;background:white;color:#334155;font-size:13px;display:grid;gap:4px}.platform-layout{display:grid;grid-template-columns:minmax(760px,1fr) 300px;gap:16px;padding:16px}.workspace{display:grid;gap:16px;min-width:0}.right-rail{display:grid;align-content:start;gap:0;background:white;border-radius:4px;box-shadow:0 4px 14px rgba(15,23,42,.06);padding:22px 18px;min-height:calc(100vh - 102px)}.hero-card,.panel{background:white;border-radius:4px;box-shadow:0 4px 14px rgba(15,23,42,.06)}.hero-card{padding:24px}.store-line{display:flex;align-items:center;justify-content:space-between;gap:20px}.store-brand{display:flex;align-items:center;gap:16px}.store-avatar{width:54px;height:54px;border-radius:14px;background:#444;color:#fff;display:grid;place-items:center;font-weight:900;font-size:22px;transform:rotate(45deg)}.store-avatar span{transform:rotate(-45deg)}.store-title h1{margin:0;font-size:28px}.store-title p{margin:6px 0 0;color:#64748b}.kpi-line{display:grid;grid-template-columns:repeat(4,1fr);min-width:480px}.kpi{text-align:center;border-left:1px solid #e5eaf2}.kpi strong{display:block;font-size:26px}.kpi span{font-size:13px;color:#475569}.notice-bar{margin-top:28px;border:1px solid #ff7a2f;background:#fff7ed;color:#ff6b1a;border-radius:4px;height:50px;display:flex;align-items:center;padding:0 18px;gap:12px}.dash-grid{display:grid;grid-template-columns: .8fr 1.2fr;gap:16px}.panel{padding:18px;min-height:0}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.panel-title h2{font-size:18px;margin:0;border-left:4px solid #1e93ff;padding-left:8px}.panel-title a{color:#168bff;font-size:13px;text-decoration:none}.chart-box{height:320px;position:relative;border-bottom:1px solid #111;margin:20px 4px 0;background:repeating-linear-gradient(to bottom, transparent 0, transparent 52px, #edf1f6 53px),repeating-linear-gradient(to right, transparent 0, transparent 70px, #edf1f6 71px)}.chart-zero{position:absolute;left:0;right:0;bottom:0;height:2px;background:#2297ff}.chart-dot{position:absolute;bottom:-4px;width:8px;height:8px;border-radius:50%;background:#2297ff}.empty-transaction{height:320px;display:grid;place-items:center;text-align:center;color:#475569}.empty-ill{width:120px;height:86px;margin:auto;background:linear-gradient(135deg,#eef2f7,#fff);border-radius:50%;opacity:.9}.guide-line{display:grid;grid-template-columns:repeat(5,1fr);gap:18px;margin-top:26px;text-align:center}.guide-step{position:relative;color:#334155}.guide-step:after{content:"";position:absolute;left:58%;right:-42%;top:28px;border-top:2px dotted #d8dee9}.guide-step:last-child:after{display:none}.guide-dot{width:14px;height:14px;border-radius:50%;background:#2097ff;border:3px solid #d7ecff;margin:16px auto 0}.rail-section{border-bottom:1px solid #edf0f5;padding-bottom:18px;margin-bottom:18px}.rail-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.rail-title h3{margin:0;font-size:18px}.rail-title a{color:#168bff;font-size:13px}.message-list{display:grid;gap:14px}.msg{font-size:14px;color:#334155}.msg .views{display:block;text-align:right;color:#64748b;font-size:13px;margin-top:4px}.app-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.app-card{display:grid;grid-template-columns:40px 1fr;gap:8px;align-items:center}.app-icon{width:40px;height:40px;border-radius:5px;background:#ff7a1a;color:white;display:grid;place-items:center;font-weight:900}.app-card.blue .app-icon{background:#2097ff}.phone{color:#168bff;font-size:18px;margin-top:10px}.module-head{display:flex;justify-content:space-between;align-items:center}.module-head h1{font-size:24px;margin:0}.module-head p{color:#64748b;margin:6px 0 0}.btn-row{display:flex;gap:8px;flex-wrap:wrap}.table-tools{display:flex;gap:10px;align-items:center}.table-tools input,.form-grid input,.form-grid textarea,.form-grid select{border:1px solid #d8dee9;border-radius:4px;padding:9px 10px;background:white}.table-tools input{height:38px;min-width:260px}.table{width:100%;border-collapse:collapse;font-size:14px}.table th,.table td{padding:12px 10px;border-bottom:1px solid #edf0f5;text-align:left}.table th{background:#fafbfc;color:#64748b;font-weight:600}.status{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:12px;background:#e9f8ef;color:#16a34a}.status.warn{background:#fff7ed;color:#f97316}.link-btn{border:1px solid #d8dee9;background:white;border-radius:4px;padding:6px 10px;color:#334155;text-decoration:none;display:inline-flex;margin-right:5px}.metric-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.mini-card{background:#fff;border-radius:4px;box-shadow:0 4px 14px rgba(15,23,42,.06);padding:16px}.mini-card strong{font-size:24px}.mini-card span{display:block;color:#64748b;margin-top:5px}.modal-mask{position:fixed;inset:0;background:rgba(15,23,42,.38);display:grid;place-items:center;z-index:20}.modal{width:min(720px,100%);background:white;border-radius:4px;padding:20px;box-shadow:0 22px 70px rgba(15,23,42,.25)}.modal-head{display:flex;justify-content:space-between;border-bottom:1px solid #edf0f5;padding-bottom:12px;margin-bottom:14px}.modal-head h2{margin:0}.icon-btn{border:0;background:white;font-size:24px}.form-grid{display:grid;gap:12px}.form-grid label{display:grid;gap:6px;font-size:13px;color:#334155}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #edf0f5;padding-top:14px}.modal-actions .form-tip{margin-right:auto}.empty-cell{text-align:center;color:#64748b;padding:34px!important}.watch-page{background:#0b1220;color:#fff;min-height:100vh}.live-watch{max-width:480px;margin:0 auto;min-height:100vh;background:#111827}.live-cover{aspect-ratio:16/9;background:#020617;display:grid;place-items:center}.live-cover video{width:100%;height:100%;object-fit:cover}.live-placeholder{text-align:center;color:#cbd5e1}.live-placeholder strong{display:block;font-size:18px;margin-bottom:8px}.live-content{padding:18px;display:grid;gap:14px}.live-content h1{font-size:22px;margin:0}.live-meta{display:flex;gap:8px;flex-wrap:wrap}.live-pill{font-size:12px;padding:4px 8px;border:1px solid rgba(255,255,255,.16);border-radius:999px;color:#cbd5e1}.live-notice,.comment-box{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:12px;color:#e5e7eb}.comment-box input{width:100%;height:40px;border-radius:6px;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.2);color:white;padding:0 10px}@media(max-width:1180px){.platform-layout{grid-template-columns:1fr}.right-rail{display:none}.kpi-line{min-width:0}}@media(max-width:860px){.platform-shell{grid-template-columns:1fr}.platform-sidebar{display:none}.platform-topbar{height:auto;gap:12px;align-items:flex-start;flex-direction:column;padding:14px}.dash-grid,.metric-cards,.guide-line{grid-template-columns:1fr}.store-line{align-items:flex-start;flex-direction:column}.kpi-line{grid-template-columns:repeat(2,1fr);width:100%}.form-row{grid-template-columns:1fr}}
.module-card{background:white;border-radius:4px;box-shadow:0 4px 14px rgba(15,23,42,.06);padding:18px 20px}.workspace>.metric-cards{margin-top:-4px}.workspace>.panel{margin-top:0}
.mini-card{min-height:92px}.metric-cards{align-items:stretch}.workspace .module-card{min-height:112px;display:flex;align-items:center}.workspace .module-card .module-head{width:100%}
/* full reference-style admin expansion */
.platform-shell{grid-template-columns:150px 1fr}.platform-sidebar{position:sticky;top:0;align-self:start;max-height:100vh;overflow:auto}.logo-box{height:58px}.side-item{margin:3px 6px}.side-main{height:34px;padding:0 10px;gap:8px;font-size:13px}.side-icon{width:18px;height:18px;border-radius:4px;background:#f1f5f9;color:#64748b;display:grid;place-items:center;font-size:11px;font-weight:800}.side-main.active .side-icon,.side-main:hover .side-icon{background:rgba(255,255,255,.22);color:white}.sub-menu{padding:3px 0 4px 34px;gap:1px}.sub-btn{height:27px;font-size:12px;color:#4b5563}.platform-topbar{height:58px;padding:0 18px;gap:12px}.top-left{display:flex;align-items:center;gap:14px;min-width:0}.nav-days{white-space:nowrap}.nav-days strong{font-size:17px}.global-search{height:34px;width:min(360px,32vw);border:1px solid #d8dee9;background:#f8fafc;border-radius:4px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#94a3b8}.global-search span{font-size:11px;border:1px solid #d8dee9;border-radius:3px;padding:1px 5px;background:#fff}.global-search input{border:0;outline:0;background:transparent;min-width:0;width:100%;font-size:13px}.top-actions{gap:10px;flex-wrap:wrap;justify-content:flex-end}.top-actions button{border:1px solid #d8dee9;border-radius:4px;background:white;height:32px;padding:0 9px;display:inline-flex;align-items:center;color:#334155}.top-actions .top-primary{background:#1e93ff;color:#fff;border-color:#1e93ff}.top-status{height:32px;border:1px solid #d8dee9;border-radius:4px;padding:0 9px;display:inline-flex;align-items:center;font-size:12px;color:#64748b;background:#fff}.top-status.ok{color:#16a34a;border-color:#bbf7d0;background:#f0fdf4}.platform-layout{grid-template-columns:minmax(760px,1fr) 286px;padding:12px;gap:12px}.workspace{gap:12px}.right-rail{padding:16px 14px;min-height:calc(100vh - 82px)}.module-card{min-height:86px!important;padding:16px 18px}.module-head h1{font-size:22px}.module-head p{font-size:13px}.home-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.stat-card{background:#fff;border-radius:4px;box-shadow:0 4px 14px rgba(15,23,42,.06);padding:14px;min-height:112px}.stat-card span{font-size:12px;color:#64748b}.stat-card strong{display:block;font-size:26px;margin:5px 0;color:#111827}.stat-card small{font-size:12px;color:#64748b}.spark{display:flex;gap:4px;align-items:end;height:22px;margin-top:8px}.spark i{width:18%;background:#cfe9ff;border-radius:2px}.spark i:nth-child(1){height:30%}.spark i:nth-child(2){height:55%}.spark i:nth-child(3){height:38%}.spark i:nth-child(4){height:75%}.spark i:nth-child(5){height:62%}.spark.up i{background:#bbf7d0}.spark.flat i{background:#dbeafe}.feed-list{display:grid;gap:0}.feed-row{height:48px;border-bottom:1px solid #edf0f5;display:flex;align-items:center;justify-content:space-between;color:#334155}.feed-row strong{font-size:18px}.chart-line{position:absolute;left:5%;right:5%;bottom:70px;height:3px;background:linear-gradient(90deg,#1e93ff,#38bdf8);border-radius:999px;transform:skewY(-8deg)}.chart-box.compact{height:220px}.table-panel{padding:0;overflow:auto}.table{min-width:760px}.table td small{color:#64748b}.ghost{height:38px;border:1px solid #d8dee9;border-radius:4px;background:white;color:#334155;padding:0 12px}.modal textarea{min-height:92px;resize:vertical}.toast{position:fixed;right:22px;bottom:22px;background:#111827;color:#fff;border-radius:4px;padding:10px 14px;font-size:13px;opacity:0;transform:translateY(8px);transition:120ms ease;z-index:60}.toast.show{opacity:1;transform:translateY(0)}code{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:2px 5px;color:#334155}.btn-row button{white-space:nowrap}@media(max-width:1280px){.home-stats{grid-template-columns:repeat(3,1fr)}.global-search{width:260px}.top-actions{gap:6px}.top-actions button,.top-status{height:30px;font-size:12px;padding:0 7px}}@media(max-width:980px){.platform-layout{grid-template-columns:1fr}.right-rail{display:none}.home-stats{grid-template-columns:repeat(2,1fr)}.top-left{width:100%;justify-content:space-between}.global-search{width:46vw}.platform-topbar{height:auto;align-items:flex-start}.top-actions{justify-content:flex-start}}@media(max-width:860px){.platform-shell{grid-template-columns:1fr}.platform-sidebar{display:none}.home-stats{grid-template-columns:1fr}.global-search{width:100%}.top-left{flex-direction:column;align-items:flex-start}.platform-layout{padding:10px}.login-screen{grid-template-columns:1fr;padding:24px}.login-art{justify-self:start}.login-art h1{font-size:32px}}
/* audit fix v2: override earlier flex centering that stretched module headers */
.platform-layout .workspace > .module-card{min-height:0!important;height:auto!important;display:block!important;align-items:normal!important;padding:16px 18px!important}.platform-layout .workspace > .module-card .module-head{min-height:0!important;height:auto!important}.platform-layout .workspace > .module-card .module-head h1{line-height:1.25}.platform-layout .workspace > .module-card .module-head p{margin-top:6px;margin-bottom:0}
/* audit fix v3: prevent workspace grid rows from stretching to right rail height */
.platform-layout{align-items:start!important}.platform-layout > .workspace{align-self:start!important;height:auto!important;align-content:start!important;align-items:start!important;grid-auto-rows:max-content!important}.platform-layout > .workspace > *{align-self:start!important}
