:root{--brand: #e40422;--brand-dark: #b80019;--brand-soft: #fdeaed;--secondary: #ffce00;--bg: #f5f6f8;--surface: #ffffff;--sidebar: #14161c;--sidebar-muted: #9aa0ad;--sidebar-hover: #21242e;--text: #1a1d24;--text-muted: #6b7280;--border: #e6e8ec;--border-strong: #d3d7de;--ok: #14915b;--ok-soft: #e5f5ec;--warn: #b7791f;--radius: 10px;--radius-sm: 7px;--shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);--shadow-md: 0 4px 12px rgba(16, 24, 40, .08);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);--sidebar-w: 256px;--topbar-h: 62px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--text);-webkit-font-smoothing:antialiased}*{box-sizing:border-box}html,body,#root{margin:0;height:100%}body{background:var(--bg);font-size:14px;line-height:1.5}a{color:var(--brand);text-decoration:none}h1,h2,h3,h4{margin:0;line-height:1.25}.shell{display:flex;min-height:100%}.sidebar{width:var(--sidebar-w);background:var(--sidebar);color:#fff;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;z-index:40}.sidebar-brand{display:flex;align-items:center;gap:11px;padding:18px 20px;border-bottom:1px solid rgba(255,255,255,.08)}.sidebar-logo{width:34px;height:34px;border-radius:8px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px;flex:0 0 auto}.sidebar-brand-text b{display:block;font-size:14px;letter-spacing:.2px}.sidebar-brand-text span{display:block;font-size:11px;color:var(--sidebar-muted)}.sidebar-nav{padding:12px;overflow-y:auto;flex:1}.nav-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.9px;color:var(--sidebar-muted);padding:14px 12px 6px}.nav-item{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:8px;color:var(--sidebar-muted);font-weight:500;cursor:pointer;transition:background .12s,color .12s}.nav-item:hover{background:var(--sidebar-hover);color:#fff}.nav-item.active{background:var(--brand);color:#fff}.nav-item svg{flex:0 0 auto}.sidebar-foot{padding:14px 16px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:var(--sidebar-muted)}.main{flex:1;margin-left:var(--sidebar-w);display:flex;flex-direction:column;min-width:0}.topbar{height:var(--topbar-h);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 26px;position:sticky;top:0;z-index:30}.topbar-title{font-size:16px;font-weight:700}.topbar-title small{display:block;font-size:12px;font-weight:400;color:var(--text-muted)}.topbar-actions{display:flex;align-items:center;gap:10px}.saved-pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--ok);background:var(--ok-soft);padding:5px 10px;border-radius:50px;font-weight:600}.content{padding:26px;max-width:1200px;width:100%}.btn{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);padding:8px 14px;border-radius:var(--radius-sm);font-size:13px;font-weight:600;cursor:pointer;transition:all .12s;font-family:inherit}.btn:hover{background:#f3f4f6}.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn-primary:hover{background:var(--brand-dark)}.btn-ghost{border-color:transparent;background:transparent}.btn-ghost:hover{background:#f0f1f3}.btn-danger{color:var(--brand);border-color:transparent;background:transparent}.btn-danger:hover{background:var(--brand-soft)}.btn-sm{padding:6px 10px;font-size:12px}.btn-icon{padding:7px}.btn:disabled{opacity:.5;cursor:not-allowed}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);margin-bottom:22px;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border)}.panel-head h2{font-size:15px}.panel-head p{margin:2px 0 0;font-size:12.5px;color:var(--text-muted)}.panel-body{padding:20px}.item-list{display:flex;flex-direction:column;gap:10px}.item-row{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);transition:box-shadow .12s,border-color .12s}.item-row:hover{border-color:var(--border-strong);box-shadow:var(--shadow-sm)}.item-thumb{width:58px;height:44px;border-radius:6px;object-fit:cover;background:#eef0f3;flex:0 0 auto;border:1px solid var(--border)}.item-thumb.avatar{width:44px;border-radius:50%}.item-main{flex:1;min-width:0}.item-title{font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-sub{font-size:12px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-actions{display:flex;gap:4px;flex:0 0 auto}.grid{display:grid;gap:16px}.grid-2{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-4{grid-template-columns:repeat(4,1fr)}@media (max-width: 900px){.grid-3,.grid-4{grid-template-columns:repeat(2,1fr)}}.swatch{width:13px;height:13px;border-radius:4px;display:inline-block;border:1px solid rgba(0,0,0,.1);flex:0 0 auto}.badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:var(--text-muted);background:#f1f2f4;padding:3px 8px;border-radius:50px}.field{margin-bottom:15px}.field:last-child{margin-bottom:0}.field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:6px;color:#374151}.field .hint{font-weight:400;color:var(--text-muted);margin-left:4px}.field input,.field textarea,.field select{width:100%;padding:9px 11px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);font-size:13px;font-family:inherit;color:var(--text);background:#fff;transition:border-color .12s,box-shadow .12s}.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}.field textarea{resize:vertical;min-height:84px;line-height:1.5}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.checkbox-field{display:flex;align-items:center;gap:8px}.checkbox-field input{width:auto}.image-input{display:flex;gap:12px;align-items:flex-start}.image-input .preview{width:72px;height:56px;border-radius:6px;object-fit:cover;border:1px solid var(--border);background:#eef0f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c0c4cc' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.5-3.5L9 20'/%3E%3C/svg%3E") center / 26px no-repeat;flex:0 0 auto}.image-input .grow{flex:1}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#11141c80;display:flex;align-items:flex-start;justify-content:center;padding:40px 16px;z-index:60;overflow-y:auto}.modal{background:var(--surface);border-radius:12px;width:100%;max-width:560px;box-shadow:var(--shadow-lg);animation:pop .14s ease}.modal.wide{max-width:680px}@keyframes pop{0%{opacity:0;transform:translateY(8px) scale(.99)}}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}.modal-head h3{font-size:16px}.modal-body{padding:20px;max-height:65vh;overflow-y:auto}.modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid var(--border)}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:10px}.stat-icon{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;color:#fff}.stat-value{font-size:28px;font-weight:800;line-height:1}.stat-label{font-size:12.5px;color:var(--text-muted)}.page-intro{margin-bottom:22px}.page-intro h1{font-size:22px;margin-bottom:4px}.page-intro p{margin:0;color:var(--text-muted);font-size:13.5px}.empty{text-align:center;padding:30px;color:var(--text-muted);border:1px dashed var(--border-strong);border-radius:var(--radius-sm);font-size:13px}.user-menu{position:relative}.user-chip{display:flex;align-items:center;gap:9px;padding:4px 10px 4px 5px;border:1px solid var(--border);border-radius:50px;background:var(--surface);cursor:pointer;font-family:inherit}.user-chip:hover{background:#f7f8fa}.menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40}.menu-pop{position:absolute;right:0;top:calc(100% + 8px);min-width:180px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);padding:6px;z-index:50}.menu-item{display:flex;align-items:center;gap:9px;width:100%;padding:9px 10px;border:none;background:transparent;border-radius:6px;font-size:13px;font-weight:500;color:var(--text);cursor:pointer;font-family:inherit}.menu-item:hover{background:#f0f1f3}.menu-item.danger{color:var(--brand)}.menu-item.danger:hover{background:var(--brand-soft)}.menu-sep{height:1px;background:var(--border);margin:5px 2px}.saved-pill.saving{color:var(--warn);background:#fdf3e4}.saved-tag{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--ok);padding:6px 8px}.subpanel{border:1px solid var(--border);border-radius:var(--radius-sm);padding:16px;margin-bottom:14px;background:#fbfcfd}.subpanel:last-child{margin-bottom:0}.subpanel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}.media-tile{position:relative;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;background:#f3f4f6;cursor:pointer;transition:border-color .12s,box-shadow .12s}.media-tile:hover{border-color:var(--brand);box-shadow:var(--shadow-sm)}.media-tile.static{cursor:default}.media-tile.static:hover{border-color:var(--border-strong)}.media-tile img{width:100%;height:110px;object-fit:cover;display:block;background:#fff}.media-tile.selected{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}.media-check{position:absolute;top:6px;left:6px;background:var(--brand);color:#fff;border-radius:50%;width:22px;height:22px;display:grid;place-items:center}.media-del,.media-copy{position:absolute;top:6px;width:24px;height:24px;border:none;border-radius:6px;background:#14161cb8;color:#fff;display:grid;place-items:center;cursor:pointer;opacity:0;transition:opacity .12s}.media-del{right:6px}.media-copy{right:34px}.media-tile:hover .media-del,.media-tile:hover .media-copy{opacity:1}.media-del:hover{background:var(--brand)}.media-name{display:block;font-size:11px;color:var(--text);padding:6px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-top:1px solid var(--border);background:#fff}.media-name em{color:var(--text-muted);font-style:normal;margin-left:6px}.app-loading{min-height:100vh;display:grid;place-items:center;background:var(--bg)}.app-loading-box{display:flex;flex-direction:column;gap:12px;align-items:center;color:var(--text-muted);font-size:14px;font-weight:500}.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#14161c,#2a1116);padding:24px}.login-card{width:100%;max-width:400px;background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);padding:30px}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}.login-demo{margin-top:20px;padding-top:16px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:6px}.login-demo span{font-size:11.5px;color:var(--text-muted);margin-bottom:2px}.login-demo button{text-align:left;border:1px solid var(--border);background:#fafbfc;border-radius:6px;padding:7px 10px;font-size:12px;color:var(--text);cursor:pointer;font-family:inherit}.login-demo button:hover{border-color:var(--brand);background:var(--brand-soft)}.login-demo em{color:var(--brand);font-style:normal;font-weight:600}.user-chip-meta{display:flex;flex-direction:column;line-height:1.2}.user-chip-meta b{font-size:12.5px}.user-chip-meta span{font-size:11px;color:var(--text-muted)}.user-chip select{border:none;background:transparent;font-size:12px;color:var(--text-muted);cursor:pointer;max-width:34px;padding:2px;font-family:inherit}.user-chip select:focus{outline:none}.section-note{background:var(--brand-soft);border:1px solid #f6cdd4;color:#7a1421;border-radius:var(--radius-sm);padding:11px 14px;font-size:12.5px;margin-bottom:20px;display:flex;gap:8px;align-items:flex-start}
