:root{
  --bg:#f4f7fc;
  --panel:#0f172e;
  --panel-soft:#16213f;
  --card:#ffffff;
  --line:#e8eef8;
  --text:#111827;
  --muted:#6b7280;
  --blue:#2563eb;
  --blue-soft:#eaf2ff;
  --success:#22c55e;
  --shadow:0 16px 36px rgba(15,23,42,.08);
  --radius:24px;
  --radius-md:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Inter,system-ui,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
body{min-height:100vh;background:linear-gradient(180deg,#f8fbff 0%,#f2f6fc 100%)}
body.sidebar-open{overflow:hidden}
.dashboard-shell{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh}
.sidebar{background:linear-gradient(180deg,#0f172e 0%,#131c35 100%);color:#fff;padding:28px 20px;display:flex;flex-direction:column;justify-content:space-between;gap:24px}
.sidebar-scroll{display:flex;flex-direction:column;justify-content:space-between;gap:24px;min-height:0;height:100%}
.brand-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:12px;font-size:1.7rem;font-weight:800}
.brand-mark{color:#5db3ff;font-size:1.2rem;letter-spacing:-4px}
.panel-badge{margin-top:24px;padding:18px;border-radius:20px;background:rgba(255,255,255,.08);font-weight:800;font-size:1.15rem}
.sidebar-nav{display:grid;gap:8px;margin-top:20px}
.sidebar-nav a,.sidebar-nav button{padding:14px 16px;border-radius:16px;color:#dbe4f5;font-weight:700;transition:.2s ease;background:none;border:none;text-align:left;cursor:pointer}
.sidebar-nav a.active,.sidebar-nav a:hover,.sidebar-nav button.active,.sidebar-nav button:hover{background:linear-gradient(180deg,#3776ff,#2563eb);color:#fff;box-shadow:0 10px 20px rgba(37,99,235,.28)}
.sidebar-help{padding:18px;border-radius:18px;background:rgba(255,255,255,.06)}
.sidebar-help h3{margin:0 0 8px}.sidebar-help p{margin:0;color:#c6d0e4;line-height:1.6}
.dashboard-main{padding:22px 26px 28px}
.topbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:24px}
.topbar-left{display:flex;gap:16px;align-items:flex-start}.topbar-left h1{margin:0 0 8px;font-size:2.2rem;letter-spacing:-.04em}.topbar-left p{margin:0;color:var(--muted)}
.topbar-right{display:flex;align-items:center;gap:14px}
.period-btn,.primary-btn,.secondary-btn,.icon-btn{border:none;cursor:pointer}
.period-btn,.secondary-btn,.icon-btn{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.period-btn{padding:14px 18px;border-radius:14px;font-weight:700;color:#334155}
.icon-btn{width:46px;height:46px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center}
.sidebar-close,.topbar [data-sidebar-open]{display:none}
.merchant-chip{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:16px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.avatar{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#dbeafe;color:#1d4ed8;font-weight:800}.merchant-chip small{display:block;color:var(--muted);margin-top:2px}
.content-grid{display:grid;gap:22px}.section-view{display:none;gap:22px}.section-view.active{display:grid}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.stat-card,.card{background:var(--card);border:1px solid rgba(232,238,248,.95);border-radius:var(--radius);box-shadow:var(--shadow)}
.stat-card{padding:22px;display:flex;gap:16px;align-items:flex-start}.stat-icon{width:54px;height:54px;border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:1.5rem;font-weight:700}.stat-card small{display:block;color:#4b5563;font-weight:600;margin-bottom:6px}.stat-card strong{display:block;font-size:2rem;letter-spacing:-.04em;margin-bottom:6px}.stat-card span:last-child{color:#16a34a;font-weight:700;font-size:.95rem}
.blue .stat-icon{background:#e0edff;color:#2563eb}.pink .stat-icon{background:#ffe6ed;color:#e11d48}.gold .stat-icon{background:#fff4d8;color:#d97706}.violet .stat-icon{background:#f0e7ff;color:#7c3aed}
.panel-grid{display:grid;grid-template-columns:1.1fr 1.6fr;gap:18px}.lower-grid{grid-template-columns:1.2fr 1fr}
.card{padding:24px}.card-head{display:flex;align-items:center;gap:12px;margin-bottom:18px}.card-head h2{margin:0;font-size:1.4rem;letter-spacing:-.03em}.card-head.between{justify-content:space-between}.card-head a{color:var(--blue);font-weight:700}
.pill{padding:8px 12px;border-radius:999px;font-size:.85rem;font-weight:800}.pill.success{background:#dcfce7;color:#166534}
.plan-body{display:grid;grid-template-columns:1.4fr .8fr;gap:18px;padding-bottom:18px;border-bottom:1px solid var(--line)}.plan-body strong{font-size:1.5rem;display:block;margin-bottom:8px}.plan-body p{margin:0;color:var(--muted)}
.plan-actions{display:flex;justify-content:space-between;align-items:center;padding-top:18px;gap:16px}.secondary-btn,.primary-btn{padding:13px 18px;border-radius:14px;font-weight:800}.secondary-btn{color:#1f2937}.primary-btn{background:linear-gradient(180deg,#3776ff,#2563eb);color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.22)}
.progress-bar{height:11px;border-radius:999px;background:#edf2fb;overflow:hidden;margin-bottom:10px}.progress-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#3776ff,#2563eb)}
.storage-used{margin:0 0 18px;color:#475569;font-weight:700}.storage-breakdown{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.storage-breakdown small{display:block;color:var(--muted);margin-bottom:6px}.storage-breakdown strong{font-size:1.05rem}
.activity-list,.top-products{list-style:none;padding:0;margin:0;display:grid;gap:14px}.activity-list li,.top-products li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}.activity-list li:last-child,.top-products li:last-child{border-bottom:none;padding-bottom:0}
.activity-main{display:flex;gap:12px;align-items:flex-start}.activity-badge{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--blue-soft);color:var(--blue);font-weight:800}.activity-copy strong,.product-copy strong{display:block;margin-bottom:4px}.activity-copy span,.product-copy span{color:var(--muted);font-size:.94rem}
.product-row{display:flex;gap:12px;align-items:center}.product-thumb{width:48px;height:48px;border-radius:12px;object-fit:cover;background:#edf2fb}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid label{display:grid;gap:8px;font-weight:700;color:#374151}.form-grid input,.form-grid select,.form-grid textarea{width:100%;padding:14px 15px;border-radius:14px;border:1px solid var(--line);background:#fbfdff;color:#111827}.form-grid textarea{min-height:120px;resize:vertical}.form-grid .full{grid-column:1/-1}.checklist{padding:16px;border-radius:16px;background:#eff6ff;color:#1d4ed8;display:flex;justify-content:space-between;align-items:center}.form-actions{display:flex;justify-content:flex-end}.simple-output{margin-top:18px;padding:16px;border-radius:16px;background:#f8fbff;border:1px solid var(--line);color:#334155;display:none}.simple-output.visible,.simple-output.always-visible{display:block}
.product-list-grid{display:grid;gap:16px}.product-item{display:grid;grid-template-columns:96px 1fr auto;gap:16px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:18px;background:#fbfdff}.product-item img{width:96px;height:96px;border-radius:18px;object-fit:cover;background:#eef4ff}.product-meta strong{display:block;font-size:1.1rem;margin-bottom:6px}.product-meta span{display:block;color:var(--muted);margin-bottom:4px}.product-actions{display:grid;gap:10px;justify-items:end}.status-pill{padding:8px 12px;border-radius:999px;background:#dcfce7;color:#166534;font-weight:800}.status-pill.inactivo{background:#fee2e2;color:#991b1b}.product-actions button{padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:#fff;cursor:pointer}
.plan-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.plan-detail-grid small{display:block;color:var(--muted);margin-bottom:6px}.storage-page{grid-template-columns:repeat(5,1fr)}
@media (max-width:1180px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-grid,.lower-grid{grid-template-columns:1fr}.storage-breakdown{grid-template-columns:repeat(2,1fr)}.storage-page{grid-template-columns:repeat(2,1fr)}}
@media (max-width:920px){.dashboard-shell{grid-template-columns:1fr}.sidebar{position:fixed;inset:0 auto 0 0;width:min(300px,88vw);z-index:1000;transform:translateX(-100%);transition:transform .25s ease;padding:0;overflow:hidden}.sidebar.open{transform:translateX(0)}.sidebar-scroll{padding:calc(18px + env(safe-area-inset-top,0px)) 16px calc(24px + env(safe-area-inset-bottom,0px));overflow-y:auto;-webkit-overflow-scrolling:touch;height:100dvh}.dashboard-main{padding:18px 16px 90px}.topbar{flex-direction:column}.topbar-right{width:100%;justify-content:space-between}.sidebar-close,.topbar [data-sidebar-open]{display:inline-flex}.product-item{grid-template-columns:80px 1fr}.product-actions{grid-column:1/-1;justify-items:start}}
@media (max-width:640px){.stats-grid{grid-template-columns:1fr}.topbar-left h1{font-size:1.8rem}.merchant-chip{padding:8px 10px}.storage-breakdown,.form-grid,.plan-detail-grid,.storage-page{grid-template-columns:1fr}.plan-body,.plan-actions{grid-template-columns:1fr;display:grid}.checklist{flex-direction:column;align-items:flex-start;gap:8px}}
