/* Measurements follow the provided shadcn-admin screenshots at a 1440px viewport. */
:root{--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;--surface:#fff;--soft:#f1f5f9;--r:10px}
html,body{font-size:14px;background:var(--surface);color:var(--ink)}
button{font:inherit}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible{outline:2px solid #94a3b8;outline-offset:3px}
.svg-icon{width:18px;height:18px;display:inline-block;vertical-align:middle;flex:none}.btn .svg-icon{width:16px;height:16px}.icon-button{display:inline-flex;justify-content:center;align-items:center;width:34px;height:34px;border:0;border-radius:7px;background:transparent;color:var(--ink)}.icon-button:hover{background:var(--soft)}.top-left>.icon-button{border:1px solid var(--line);box-shadow:0 1px 2px #0f172a10}
.sidebar{width:248px;background:var(--surface);border:0}.brand{width:100%;height:83px;background:none;text-align:left;border:0;gap:10px;padding:0 22px}.brand img{width:35px;height:35px}.brand strong{font-size:17px}.brand small{font-size:11px;color:var(--muted)}.brand-switch{display:flex}.nav-scroll{padding:5px 14px}.nav-group{margin:3px 0 13px}.nav-label{font-size:12px;font-weight:500;padding:14px 9px 8px}.nav-item{font-size:14px;height:39px;border-radius:8px;gap:11px;padding:9px 11px;color:var(--ink)}.nav-item.active{background:var(--soft);font-weight:500}.nav-item .ico,.nav-item .ico svg{width:18px;height:18px}.nav-item .count{color:#fff;background:#0f172a;border-radius:50%;font-size:11px}.profile{width:100%;text-align:left}.profile .avatar{border-radius:12px}.profile strong{font-size:13px}.profile small{font-size:11px}.profile-switch{display:flex}
.main{margin:8px 8px 8px 248px;border:1px solid var(--line);border-radius:16px;box-shadow:0 1px 2px #0f172a0a;min-height:calc(100vh - 16px);background:var(--surface);overflow:clip}.topbar{height:72px;padding:0 24px;background:var(--surface);border-radius:16px 16px 0 0}.top-actions{gap:13px}.top-search{width:250px;height:36px;background:#f8fafc;font-size:13px;text-align:left}.top-search span{flex:1}.top-search kbd{font:10px Inter,sans-serif}.top-nav{display:flex;gap:3px}.top-nav .btn{font-size:14px}.crumb{font-size:14px}.top-avatar{height:35px;width:35px}.content{padding:26px 24px 32px;max-width:none;min-height:calc(100vh - 104px);background:var(--surface)}.page-head{align-items:center;margin:9px 0 27px}.page-head h1{font-size:30px;line-height:36px;font-weight:700;letter-spacing:-.75px}.page-head p{font-size:14px;margin-top:5px;line-height:23px}.head-actions{gap:9px}
.btn{font-size:13px;min-height:36px;padding:7px 13px;border:1px solid var(--line);border-radius:7px;box-shadow:0 1px 2px #0f172a08;gap:7px;background:var(--surface);color:var(--ink)}.btn.primary{color:#fff}.btn.ghost{box-shadow:none}.btn.sm{font-size:12px;min-height:29px}.tabs{margin-bottom:24px;border-radius:8px;min-height:38px}.tab{font-size:14px;padding:7px 13px}.card{border-color:var(--line);border-radius:12px;background:var(--surface);box-shadow:0 1px 2px #0f172a10}.card.pad,.card .pad{padding:22px}.metric{padding:23px 24px;min-height:151px}.metric small{font-size:13px;font-weight:500}.metric b{font-size:30px;margin-top:20px}.metric em{font-size:12px}.metric-icon{width:20px!important;height:20px!important;top:25px!important}.grid{gap:17px}.panel-grid{grid-template-columns:1.5fr 1fr;gap:19px;margin-top:22px}.card-title{font-size:16px;padding:22px 24px 10px;border-bottom:0}.card-title span{font-size:12px;color:var(--muted);font-weight:400}.chart-panel{display:flex;padding:24px 30px 60px;min-height:320px;gap:20px}.chart-y{display:flex;flex-direction:column;justify-content:space-between;font-size:12px;color:var(--muted);height:215px}.bar-chart{height:215px;flex:1;gap:28px;padding:0}.bar-unit{max-width:90px;border-radius:5px 5px 0 0;background:var(--ink)}.bar-unit b{position:absolute;top:-24px;width:100%;text-align:center;font-size:13px}.bar-unit span{font-size:12px;bottom:-28px}.list-row{font-size:13px;padding:16px 0}.list-row b{font-size:13px}.list-row small{font-size:12px}.grow{flex:1}.quick-actions{display:flex;gap:12px;margin-top:24px}.avatar{width:34px;height:34px;font-weight:500;font-size:13px;border-radius:50%}
.toolbar{gap:9px;margin-bottom:17px;flex-wrap:wrap;background:transparent}.search-field{position:relative;width:255px}.search-field .svg-icon{position:absolute;left:10px;top:10px;color:var(--muted);width:16px;height:16px}.search-field input{width:100%;padding-left:34px}.input,.select,.textarea{border-color:var(--line);border-radius:7px;min-height:36px;font-size:13px;color:var(--ink);background:var(--surface)}.filter-field{position:relative}.filter-field>.svg-icon{position:absolute;left:10px;top:10px;width:16px;height:16px;pointer-events:none}.filter-field .select{padding-left:32px;max-width:165px;border-style:dashed}.table-card{border-radius:9px;box-shadow:none;overflow:hidden}.table{font-size:13px;white-space:nowrap}.table th{font-size:13px;font-weight:500;height:44px;padding:9px 13px;color:var(--ink);background:var(--surface)}.table td{padding:13px;line-height:22px;height:58px;color:var(--ink);max-width:480px;overflow:hidden;text-overflow:ellipsis}.table tbody tr:last-child td{border-bottom:0}.table tbody tr:hover{background:var(--soft)}.table tr.selected{background:var(--soft)}.table .secondary,.secondary{display:block;font-size:11px;color:var(--muted);line-height:17px;max-width:330px;overflow:hidden;text-overflow:ellipsis}.check-col{width:42px}input[type=checkbox]{appearance:none;width:15px;height:15px;margin:0;vertical-align:middle;border:1px solid #cbd5e1;border-radius:4px;background:var(--surface);flex:none;cursor:pointer}input[type=checkbox]:checked{background:#0f172a;border-color:#0f172a;position:relative}input[type=checkbox]:checked:after{content:'';position:absolute;left:4px;top:1px;width:4px;height:8px;border:solid white;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}.person-cell{display:flex;align-items:center;gap:10px}.person-cell .avatar{background:var(--soft)}.person-cell b{font-weight:500}.person-cell small{display:block;font-size:11px;color:var(--muted)}.sort-button{padding:0;border:0;background:none;color:inherit;display:flex;align-items:center;gap:8px;font-size:inherit;font-weight:500;min-height:28px}.sort-button .svg-icon{width:13px;height:13px;color:var(--muted)}.tag{font-size:11px;font-weight:500;padding:3px 7px;border:1px solid #e2e8f0;background:var(--soft)}.tag.good{background:#f0fdfa;border-color:#99f6e4;color:#0f766e}.tag.warn{background:#fffbeb;border-color:#fde68a}.tag.bad{background:#fff1f2;border-color:#fecdd3;color:#e11d48}.tag.gray{background:var(--soft);color:var(--muted)}
.pagination{padding:22px 8px 0;font-size:12px}.pagination>div{display:flex;align-items:center;gap:18px}.pagination label{display:flex;align-items:center;gap:8px}.pagination .select{width:65px}.pager{gap:6px!important}.pager>span{margin-right:14px;color:var(--ink)}.pager .btn{min-width:33px;height:33px;min-height:33px;padding:5px 9px}.pager .prev-page .svg-icon{transform:rotate(180deg)}.selection-bar{display:flex;align-items:center;gap:14px;padding:10px 14px;background:var(--soft);border-radius:7px;margin-bottom:12px}.empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:60px;color:var(--muted)}.empty>.svg-icon{width:30px;height:30px}.empty b{font-size:14px;color:var(--ink)}.empty p{margin:0 0 8px}.data-section .table-wrap{min-height:130px}
.overlay-open{overflow:hidden}.drawer-mask,.modal-mask{background:#02061765;backdrop-filter:blur(1px);animation:fade-in .16s ease-out}.drawer{width:min(600px,95vw);background:var(--surface);animation:slide-in .2s ease-out}.drawer.wide{width:min(950px,96vw)}.drawer-head,.modal-head{padding:23px 26px;background:var(--surface)}.drawer-head h2,.modal-head h2{font-size:20px;font-weight:600}.drawer-head p{font-size:12px;color:var(--muted)}.drawer-body{padding:22px 26px;display:block}.drawer-body>*{margin-bottom:18px}.drawer-body>.form-grid{margin-bottom:20px}.drawer-foot,.modal-foot{padding:17px 26px;background:var(--surface);flex-wrap:wrap}.drawer-foot .btn{font-size:13px}.field{font-size:13px;font-weight:500;gap:8px;margin-bottom:16px;color:var(--ink)}.field small{font-size:11px;font-weight:400;color:var(--muted);line-height:18px}.field small:empty{display:none}.textarea{font-family:inherit;line-height:21px;min-height:100px}.form-title{font-size:15px;font-weight:600;margin:24px 0 16px}.check-set{padding:0;border:0;margin:20px 0;display:flex;gap:11px 18px;flex-wrap:wrap}.check-set legend{font-size:13px;font-weight:500;margin-bottom:12px}.check-set label{display:flex;align-items:center;gap:7px;font-size:12px}.note{font-size:12px;line-height:20px;align-items:flex-start}.note>.svg-icon{margin-top:2px;width:16px;height:16px}.detail-list{margin:0}.detail-list>div{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.detail-list dt{color:var(--muted);flex:none}.detail-list dd{margin:0;text-align:right;overflow-wrap:anywhere}.formula{font-size:12px;line-height:21px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:450px;overflow:auto}.history-list>div{padding:12px 14px;border-left:2px solid var(--line);margin-bottom:4px;font-size:12px}.history-list p{margin:5px 0;color:var(--muted)}.history-list small{color:var(--muted)}.form-error{padding:12px;background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;border-radius:7px;font-size:12px;margin-top:14px}.modal{width:min(540px,92vw);animation:dialog-in .16s ease-out;background:var(--surface);border-radius:12px}.modal-mask{z-index:40}.dialog .table td{max-width:280px;white-space:normal}.dialog .table th{white-space:nowrap}.ack{display:flex;align-items:center;gap:8px;font-size:12px;margin:15px 0}.step{font-size:12px}.progress{padding:15px;box-shadow:none}.progress .num{width:24px;height:24px}.progress .num svg{width:14px;height:14px}.command-link{width:100%;justify-content:flex-start;border:0;box-shadow:none;height:42px;margin-bottom:2px}.command-link:hover{background:var(--soft)}.dropzone{border:1px dashed #94a3b8;border-radius:10px;padding:24px;text-align:center;display:flex;align-items:center;flex-direction:column;gap:12px;background:var(--soft);font-size:12px}.dropzone>svg{width:28px;height:28px}.dropzone input{font-size:12px}.rich-toolbar{display:flex;gap:5px;padding:7px;border:1px solid var(--line);border-radius:8px 8px 0 0;flex-wrap:wrap;margin-bottom:0!important}.rich-body{border:1px solid var(--line);border-top:0;border-radius:0 0 8px 8px;min-height:220px;padding:16px;font-size:14px;line-height:24px}.rich-body img,.article-preview img,.cover-preview{max-width:100%;max-height:360px;border-radius:7px}.article-preview{font-size:14px;line-height:25px}.article-preview h2{font-size:22px}.settings-nav .btn{justify-content:flex-start;box-shadow:none;gap:12px}.settings-layout{gap:44px;grid-template-columns:195px 1fr}.settings-content .field{margin:24px 0 8px;max-width:590px}.settings-content>h2{font-size:22px}.settings-content>p{font-size:13px}.settings-content>.btn{margin-top:24px}.password-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:500}.password-label .btn{width:auto!important;margin:0!important;min-height:28px}.password-input{position:relative}.password-input .input{width:100%;padding-right:40px}.password-input .icon-button{position:absolute;right:5px;top:5px}.login-template .login-logo{margin-bottom:65px}.login-template .login-box{width:375px}.login-template .login-box h2{font-size:25px}.login-template .login-box .field{margin-bottom:16px}.login-template .login-box .bottom{margin-top:50px}.login-preview{width:85%;height:540px;transform:translate(30px,0)}.preview-side{width:165px;padding:26px 13px}.preview-side span{display:flex;align-items:center;gap:7px;font-size:10px}.preview-side svg{width:13px;height:13px}.preview-side b{font-size:14px}.preview-main{padding:60px 22px 20px}.preview-main h3{font-size:25px}.preview-chart{height:255px}.preview-bars{height:185px}
#toast-host{position:fixed;bottom:24px;right:24px;z-index:60;display:flex;flex-direction:column;gap:8px;max-width:400px}.toast-item{display:flex;align-items:center;gap:10px;padding:14px 18px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 20px #0f172a15;font-size:13px;animation:dialog-in .18s}.toast-item .svg-icon{color:#0f766e}.toast-item.error .svg-icon{color:#b91c1c}
[data-theme=dark]{--ink:#f8fafc;--muted:#94a3b8;--line:#263349;--surface:#0f172a;--soft:#1e293b;--bg:#0f172a;--nav:#0f172a}[data-theme=dark] .brand strong,[data-theme=dark] .profile strong,[data-theme=dark] .metric small,[data-theme=dark] .metric b{color:var(--ink)}[data-theme=dark] .top-search,[data-theme=dark] .top-avatar,[data-theme=dark] .avatar,[data-theme=dark] .formula,[data-theme=dark] .note,[data-theme=dark] .tab.active{background:var(--soft);color:var(--ink)}[data-theme=dark] .tabs{background:#020617}[data-theme=dark] .btn.primary,[data-theme=dark] .step.active .num{background:#f8fafc;border-color:#f8fafc;color:#0f172a}[data-theme=dark] .metric-icon,[data-theme=dark] .profile,[data-theme=dark] .settings-nav button{background:var(--surface);color:var(--ink)}[data-theme=dark] .table th{background:var(--surface)}[data-theme=dark] .nav-item:hover{background:var(--soft);color:var(--ink)}[data-theme=dark] .note.warn{background:#422006;color:#fde68a;border-color:#854d0e}
@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes slide-in{from{transform:translateX(20px);opacity:.5}to{transform:translateX(0);opacity:1}}@keyframes dialog-in{from{transform:translateY(8px) scale(.98);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:1200px){.top-search{width:190px}.top-nav .btn{font-size:12px}.content{padding:24px}.filter-field .select{max-width:140px}.panel-grid{grid-template-columns:1fr 1fr}.metric{padding:19px}.metric b{font-size:25px}}
@media(max-width:1000px){.sidebar{width:210px}.main{margin-left:210px}.brand{padding:0 15px}.brand strong{font-size:15px}.nav-item{font-size:13px}.top-search{width:170px}.panel-grid{grid-template-columns:1fr}.top-nav{display:none}.head-actions{flex-shrink:0}.page-head h1{font-size:26px}.pagination{align-items:flex-start;gap:16px;flex-wrap:wrap}.login-preview{height:480px}.preview-side{width:125px}.preview-main{padding:45px 15px}}
@media(max-width:760px){.sidebar{width:60px}.main{margin-left:60px}.brand{padding:0 12px}.brand>div,.brand-switch,.nav-label,.nav-item>span:not(.ico),.sidebar-foot{display:none}.nav-item{justify-content:center;padding:8px}.content{padding:18px}.topbar{padding:0 15px}.top-search{display:none}.page-head{align-items:flex-start}.page-head h1{font-size:25px}.form-grid{grid-template-columns:1fr}.settings-layout{grid-template-columns:1fr;gap:20px}.settings-nav{flex-direction:row;flex-wrap:wrap}.drawer.wide{width:96vw}.drawer-body{padding:20px}.progress{overflow:auto;min-width:500px}.dialog .progress{min-width:0}.step:not(:last-child):after{margin:0 6px}.pagination>div{gap:10px}.top-actions{gap:5px}.login-template .login-panel{padding:30px}.quick-actions{flex-wrap:wrap}}
.pricing-editor{border:1px solid var(--line);border-radius:9px;padding:12px}.pricing-editor .table td{padding:8px;vertical-align:top}.pricing-editor .field{margin:0;max-width:145px}.pricing-editor .field .input{min-width:90px;width:100%}.pricing-editor .btn{margin-top:10px}.snapshot-bar{display:flex;align-items:center;gap:30px;padding:16px 18px;background:var(--soft);border:1px solid var(--line);border-radius:9px;margin-bottom:18px}.snapshot-bar .field{margin:0;min-width:210px}.snapshot-bar>div{display:flex;flex-direction:column;gap:3px}.snapshot-bar small,.snapshot-bar span{font-size:11px;color:var(--muted)}.snapshot-bar strong{font-size:13px}.snapshot-bar .select{background:var(--surface)}
