:root{
  --bg:#eef6f3;
  --panel:#ffffff;
  --line:#dfe9e5;
  --text:#162131;
  --muted:#7e8a97;
  --green:#14b38c;
  --green-soft:#effaf7;
  --danger:#ef7274;
  --danger-soft:#fff3f0;
  --blue:#31b8ff;
  --shadow:0 10px 24px rgba(27,55,44,.07);
  --radius:24px;
}
html[data-theme="dark"]{
  --bg:#10171c;
  --panel:#182227;
  --line:#24343a;
  --text:#edf3f7;
  --muted:#9aaab4;
  --green:#1bd3a3;
  --green-soft:#152922;
  --danger:#ff8487;
  --danger-soft:#312022;
  --blue:#40beff;
  --shadow:0 12px 28px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
body{margin:0;font-family:'Nunito',sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none}
.app-shell{min-height:100vh}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:20px 28px;background:var(--panel);border-bottom:3px solid #22b7a0;box-shadow:0 2px 14px rgba(22,179,140,.05);position:sticky;top:0;z-index:20}
.brand-wrap{display:flex;align-items:center;gap:14px}
.brand-logo{width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#30dc8c,#07c2a2);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;box-shadow:inset 0 0 0 3px rgba(255,255,255,.5)}
.brand-name{font-size:22px;font-weight:800;line-height:1}
.brand-tagline{color:var(--muted);font-size:14px;margin-top:4px}
.top-actions{display:flex;align-items:center;gap:12px}
.icon-btn{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--panel);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text);position:relative}
.theme-toggle .theme-dark-icon{display:none}
html[data-theme="dark"] .theme-toggle .theme-light-icon{display:none}
html[data-theme="dark"] .theme-toggle .theme-dark-icon{display:block}
.notif-dot{position:absolute;top:3px;right:0;background:#ff4855;color:#fff;border-radius:999px;font-size:11px;min-width:20px;height:20px;padding:0 6px;display:flex;align-items:center;justify-content:center;font-weight:800;border:2px solid var(--panel)}
.profile-block{text-align:right;margin-left:8px}
.profile-name{font-weight:800;font-size:16px}
.profile-email{color:var(--muted);font-size:13px}
.page-wrap{padding:28px;max-width:1440px;margin:0 auto}
.welcome-box h1{font-size:52px;line-height:1.08;margin:4px 0 10px;font-weight:900;letter-spacing:-.03em}
.welcome-box p{margin:0 0 24px;color:var(--muted);font-size:18px}
.alert-box{border:1px solid #f2d7d0;background:linear-gradient(90deg,var(--danger-soft),rgba(255,255,255,0));border-left:5px solid #f25c54;border-radius:18px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.alert-main{display:flex;align-items:center;gap:14px}.alert-icon{width:44px;height:44px;border-radius:50%;background:#fff3f2;color:#f16b67;display:flex;align-items:center;justify-content:center}
.alert-title{font-size:18px;font-weight:800;color:#c44747}.alert-subtitle{font-size:14px;color:#db7f7f}.alert-badge{display:inline-flex;align-items:center;justify-content:center;background:#ff494f;color:#fff;border-radius:99px;min-width:24px;height:24px;padding:0 7px;font-size:12px;margin-left:6px}
.alert-arrow{color:#e08686}
.section-block{margin-top:26px}.section-title{font-size:13px;font-weight:800;color:#9da8ae;letter-spacing:.12em;margin:0 0 18px 4px}
.menu-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:18px}
.menu-card{background:var(--panel);border:1px solid #edf1ef;border-radius:18px;min-height:140px;padding:22px 16px;box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}
.menu-card.active{border:1px solid #efd4b8;box-shadow:0 10px 22px rgba(235,168,79,.13)}
.menu-icon{width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f5f9ff;color:#4987ff}
.menu-card:nth-child(2) .menu-icon{background:#effcf6;color:#1cb66b}
.menu-card:nth-child(3) .menu-icon{background:#f8f0ff;color:#a448eb}
.menu-card:nth-child(4) .menu-icon{background:#fff1f6;color:#e25d90}
.menu-card:nth-child(5) .menu-icon{background:#fff6ea;color:#f19827}
.menu-card:nth-child(6) .menu-icon{background:#effcf9;color:#0bbf8b}
.menu-card:nth-child(7) .menu-icon{background:#fff1f1;color:#ea5252}
.menu-card:nth-child(8) .menu-icon{background:#f2efff;color:#7360ff}
.menu-label{font-weight:700;font-size:15px;line-height:1.35}
.content-grid{display:grid;grid-template-columns:2.1fr 1fr;gap:26px;margin-top:32px}
.panel{background:var(--panel);border-radius:26px;padding:28px;box-shadow:var(--shadow);border:1px solid rgba(220,231,226,.7)}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.panel-head h3{margin:0;font-size:18px;font-weight:800;display:flex;align-items:center;gap:10px}
.panel-head h3 i{color:#4e88ff}.top-product-head h3 i{color:#e3ae31}
.soft-select{border:1px solid var(--line);background:#f7faf8;color:var(--text);height:40px;padding:0 14px;border-radius:12px;font-weight:700;display:flex;align-items:center;gap:10px}
html[data-theme="dark"] .soft-select{background:#11181d}
.legend-row{display:flex;gap:30px;color:#6d7984;font-size:14px;font-weight:700;padding:8px 2px 2px}.dot{width:12px;height:12px;border-radius:50%;display:inline-block;margin-right:8px;vertical-align:middle}.dot-blue{background:var(--blue)}.dot-green{background:#2fcb8e}
.chart-wrap{height:360px;padding-top:14px}
.head-actions{display:flex;align-items:center;gap:8px}.icon-mini{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:#f7faf8;color:#7b8b8d;display:flex;align-items:center;justify-content:center}.small{height:34px;font-size:13px;padding:0 12px}
.product-list{display:flex;flex-direction:column;gap:8px;margin-top:8px}.product-item{display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid rgba(226,233,230,.8)}.product-item:last-child{border-bottom:none}
.product-rank{width:42px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;background:#f4f5f7;color:#6c7a85}.rank-1{background:#fff5d8;color:#d39a14}.rank-2{background:#f0f4f8;color:#6a7986}.rank-3{background:#fff0e3;color:#db8a33}
.product-name{font-weight:800;font-size:16px}.product-sold{font-size:13px;color:var(--muted);margin-top:3px}.product-price{font-weight:900;font-size:16px}.more-link{display:block;text-align:center;margin-top:20px;color:#4f7fe1;font-weight:800}
.footer-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:26px 0 40px}.footer-card{background:var(--panel);box-shadow:var(--shadow);border-radius:18px;border:1px solid rgba(220,231,226,.7);padding:20px 22px;display:grid;grid-template-columns:56px 1fr 24px;align-items:center;gap:16px}.footer-icon{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f3f6ff;color:#5988ff}.footer-card:nth-child(2) .footer-icon{background:#f8f0ff;color:#bf67ff}.footer-title{font-weight:800;font-size:18px}.footer-subtitle{font-size:14px;color:var(--muted)}
.editor-fab{position:fixed;right:22px;bottom:22px;width:62px;height:62px;border:none;border-radius:20px;background:linear-gradient(135deg,#0bc5a4,#0ca7ff);color:#fff;box-shadow:0 18px 35px rgba(12,167,255,.25);display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:31}
.editor-panel{position:fixed;top:0;right:-520px;width:500px;max-width:100%;height:100vh;background:var(--panel);box-shadow:-20px 0 50px rgba(0,0,0,.18);z-index:40;transition:.28s ease;padding:18px 20px 120px;overflow:auto}.editor-panel.open{right:0}.panel-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.22);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:.25s;z-index:39}.panel-backdrop.show{opacity:1;visibility:visible}
.editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:12px;border-bottom:1px solid var(--line);margin-bottom:12px}.editor-head h2{margin:0 0 6px;font-size:24px}.editor-head p{margin:0;color:var(--muted);font-size:14px}
.editor-form{display:flex;flex-direction:column;gap:16px}.editor-section{border:1px solid var(--line);border-radius:18px;padding:16px;background:rgba(247,250,248,.55)}html[data-theme="dark"] .editor-section{background:#131b20}.editor-section h4{margin:0 0 14px;font-size:16px}.editor-section label{display:block;font-size:13px;font-weight:800;color:#70808d;margin-bottom:12px}.editor-section input,.editor-section textarea,.editor-section select{width:100%;margin-top:8px;border-radius:12px;border:1px solid var(--line);padding:12px 14px;background:var(--panel);color:var(--text);font:inherit}.editor-section textarea{min-height:90px;resize:vertical}
.row-card{padding:12px;border-radius:14px;border:1px dashed var(--line);margin-bottom:10px}.three-col{display:grid;grid-template-columns:1.4fr .7fr 1fr;gap:10px}.section-flex{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.add-row,.save-btn{border:none;border-radius:12px;padding:12px 16px;font-weight:800;cursor:pointer}.add-row{background:#eaf6ff;color:#3d7bff}.editor-actions{position:sticky;bottom:-1px;background:linear-gradient(180deg,rgba(255,255,255,0),var(--panel) 30%);padding-top:18px}.save-btn{width:100%;background:linear-gradient(135deg,#12c78a,#0aaae2);color:#fff;font-size:16px}
@media (max-width:1200px){.menu-grid{grid-template-columns:repeat(4,1fr)}.content-grid{grid-template-columns:1fr}.chart-wrap{height:320px}}
@media (max-width:860px){.topbar{padding:16px;flex-direction:column;align-items:flex-start;gap:14px}.top-actions{width:100%;flex-wrap:wrap;justify-content:flex-end}.page-wrap{padding:16px}.welcome-box h1{font-size:34px}.welcome-box p{font-size:16px}.menu-grid{grid-template-columns:repeat(2,1fr);gap:14px}.menu-card{min-height:120px}.footer-cards{grid-template-columns:1fr}.editor-panel{width:100%}.profile-block{max-width:180px}.three-col{grid-template-columns:1fr}}
@media (max-width:520px){.brand-name{font-size:20px}.top-actions{justify-content:space-between}.profile-block{text-align:left;order:5;width:100%}.alert-box{align-items:flex-start}.alert-arrow{padding-top:10px}.panel,.footer-card{padding:18px}.chart-wrap{height:280px}.product-item{grid-template-columns:46px 1fr;grid-template-areas:'rank info' '. price';}.product-rank{grid-area:rank}.product-info{grid-area:info}.product-price{grid-area:price;padding-left:58px}.menu-grid{grid-template-columns:repeat(2, minmax(0,1fr))}}
