.dash-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 73px); }
@media (max-width: 820px) { .dash-layout { grid-template-columns: 1fr; } }

.sidebar { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 820px) { .sidebar { border-right: none; border-bottom: 1px solid var(--line); flex-direction: row; overflow-x: auto; } }
.sidebar-store { padding: 6px 12px 18px; }
.sidebar-store .name { font-family: 'Fraunces'; font-weight: 600; font-size: 15.5px; }
.sidebar-store .plan-badge { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; background: var(--primary-soft); color: var(--primary); padding: 3px 9px; border-radius: 100px; }
.sidebar-btn {
  text-align: left; background: transparent; border: none; color: var(--muted); padding: 11px 14px;
  border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap;
  font-family: 'Work Sans'; display: flex; align-items: center; gap: 9px;
}
.sidebar-btn:hover { background: var(--primary-soft); color: var(--ink); }
.sidebar-btn.active { background: var(--primary); color: #E9FBF4; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .sidebar-foot { margin-top: 0; border-top: none; } }

.dash-content { padding: 30px 34px; }
@media (max-width: 600px) { .dash-content { padding: 22px 16px; } }
.dash-content h2 { font-size: 22px; font-weight: 600; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 22px 0 30px; }
.stat-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.stat-card .value { font-family: 'Fraunces'; font-size: 24px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }

.plan-limit-note { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 20px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.product-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-card img { width: 100%; height: 150px; object-fit: cover; background: var(--paper); }
.product-card .body { padding: 14px 16px; }
.product-card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--primary); font-weight: 700; }
.product-card h4 { font-size: 14.5px; font-weight: 600; margin: 4px 0 8px; font-family: 'Work Sans'; }
.product-card .price-row { display: flex; justify-content: space-between; align-items: center; }
.product-card .price { color: var(--primary); font-weight: 700; font-size: 15px; }
.product-card .stock-badge { font-size: 11.5px; background: var(--primary-soft); color: var(--primary); padding: 3px 8px; border-radius: 100px; }
.product-card .del-btn { margin-top: 10px; width: 100%; padding: 7px; background: transparent; border: 1px solid var(--accent2); color: var(--accent2); border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600; }

.order-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.order-top h4 { font-size: 14.5px; margin: 0; font-family: 'Work Sans'; font-weight: 700; }
.order-meta { color: var(--muted); font-size: 13px; margin: 3px 0; }
.status-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; text-transform: uppercase; }
.status-en_attente, .status-EN_ATTENTE { background: var(--accent-soft); color: var(--accent); }
.status-paye, .status-PAYE { background: var(--primary-soft); color: var(--primary); }
.status-livre, .status-LIVRE { background: #E4E9F7; color: #3355CC; }
.order-actions { display: flex; gap: 8px; margin-top: 12px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,15,13,0.55); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.modal-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-pop); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
.form-input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 14.5px; font-family: inherit; }
.form-input:focus { outline: none; border-color: var(--primary); }

.img-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.img-preview-item { position: relative; width: 68px; height: 68px; }
.img-preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.img-preview-item button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent2); color: white; border: none; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.upload-progress { height: 7px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.upload-progress-bar { height: 100%; width: 0%; background: var(--primary); transition: width .2s ease; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 10px; padding: 14px 20px; font-weight: 600; z-index: 1000; box-shadow: var(--shadow-pop); font-size: 14px; }
.toast.error { border-color: var(--accent2); color: var(--accent2); }
