* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f8fafc; color: #0f172a; }
a { color: inherit; text-decoration: none; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card, .panel, .stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 24px; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05); }
.auth-card { width: min(100%, 460px); padding: 32px; }
.auth-card h1 { margin-top: 0; margin-bottom: 8px; }
.muted { color: #64748b; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-size: 14px; color: #334155; }
input { width: 100%; height: 46px; border-radius: 16px; border: 1px solid #cbd5e1; padding: 0 14px; background: #fff; font-size: 15px; }
input:disabled { background: #f1f5f9; color: #475569; }
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: #0f172a; color: #fff; border-radius: 16px; padding: 12px 16px; cursor: pointer; }
.btn-secondary { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.btn-danger { background: #dc2626; }
.alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 16px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; background: #0f172a; color: #fff; }
.topbar h1 { margin: 0 0 6px; font-size: 32px; }
.topbar p { margin: 0; color: #cbd5e1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.container { max-width: 1320px; margin: 0 auto; padding: 24px; display: grid; gap: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.stat-card { padding: 20px; }
.stat-card span { display: block; color: #64748b; font-size: 14px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; white-space: nowrap; }
.stat-card small { display: block; margin-top: 8px; color: #64748b; }
.grid-2 { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.panel { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.panel-head h2 { margin: 0 0 4px; }
.panel-head p { margin: 0; color: #64748b; }
.empty-state { padding: 24px; border: 1px dashed #cbd5e1; border-radius: 20px; color: #64748b; }
.products-list { display: grid; gap: 14px; }
.product-card { border: 1px solid #e2e8f0; border-radius: 20px; padding: 0; background: #fff; overflow: hidden; }
.product-card summary { list-style: none; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.product-card summary::-webkit-details-marker { display: none; }
.product-card small { display: block; margin-top: 4px; color: #64748b; }
.product-body { border-top: 1px solid #e2e8f0; padding: 18px; display: grid; gap: 16px; }
.profit { font-weight: 700; white-space: nowrap; }
.profit-pos { color: #15803d; }
.profit-neg { color: #b91c1c; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.mini-stats div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 18px; padding: 12px; }
.mini-stats span { display: block; font-size: 13px; color: #64748b; }
.mini-stats strong { display: block; margin-top: 6px; white-space: nowrap; }
.actions-row { display: flex; gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
th { color: #475569; font-weight: 600; font-size: 14px; }
@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
