/* price-monitor — минимальный CSS без фреймворка */
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 0; background: #f7f7f8; color: #1f2937;
  line-height: 1.5;
}
.topbar {
  background: #1f2937; color: #f9fafb; padding: 0.75rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.topbar a { color: #f9fafb; text-decoration: none; }
.topbar .brand { font-weight: 700; font-size: 1.1rem; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar .user-email { opacity: 0.8; font-size: 0.9rem; }
main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }

/* Forms */
form label { display: block; margin-bottom: 0.75rem; font-weight: 500; }
form input { display: block; margin-top: 0.25rem; padding: 0.5rem; width: 100%;
  border: 1px solid #d1d5db; border-radius: 4px; font-size: 1rem; }
button, .btn {
  padding: 0.5rem 1rem; border-radius: 4px; border: none; cursor: pointer;
  font-size: 0.95rem; background: #e5e7eb; color: #1f2937;
}
.btn-primary, button[type="submit"] { background: #2563eb; color: #fff; }
.btn-primary:hover, button[type="submit"]:hover { background: #1d4ed8; }

/* Login */
.login-container { max-width: 24rem; margin: 3rem auto; background: #fff;
  padding: 2rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.error { color: #dc2626; background: #fef2f2; padding: 0.5rem 1rem;
  border-radius: 4px; margin-bottom: 1rem; }
.hint { color: #6b7280; font-size: 0.85rem; }

/* Dashboard */
.dashboard-header { display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 1.5rem; }
.products-table { width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.products-table th, .products-table td { padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb; text-align: left; }
.products-table th { background: #f9fafb; font-weight: 600; }
.empty-state { text-align: center; padding: 3rem; background: #fff;
  border-radius: 8px; }

/* Marketplace badges */
.marketplace-badge { display: inline-block; padding: 0.15rem 0.5rem;
  border-radius: 10px; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; background: #e5e7eb; color: #1f2937; }
.mp-wb { background: #cb11ab; color: #fff; }
.mp-ozon { background: #005bff; color: #fff; }
.mp-ym { background: #fc3f1d; color: #fff; }
.mp-lamoda { background: #ff0066; color: #fff; }

/* Product detail */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; background: #fff; padding: 1rem; border-radius: 8px; margin: 1.5rem 0; }
.stats > div { padding: 0.5rem; }
.chart-wrapper { background: #fff; padding: 1.5rem; border-radius: 8px;
  margin: 1.5rem 0; }
.chart-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
}
@media (max-width: 640px) {
  .chart-container {
    aspect-ratio: 4 / 3;
    min-height: 200px;
  }
}
.actions { display: flex; gap: 1rem; align-items: center; }

/* Fragments */
.spinner { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.parse-failed, .duplicate-error { background: #fef2f2; padding: 1rem;
  border-radius: 4px; border: 1px solid #fecaca; }
.pending-row { color: #6b7280; }
.failed-row { color: #dc2626; }

/* Folder detail page (plan 07-03) */
.folder-detail-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.chart-toggle {
  display: flex; gap: 1.5rem; margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.chart-toggle label { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: normal; margin: 0; }
.chart-toggle input[type="radio"] { display: inline-block; margin: 0; width: auto; }
.folder-chart-link {
  display: inline-block; padding: 0.25rem 0.5rem;
  text-decoration: none; font-size: 1rem;
  border-radius: 4px; background: #e5e7eb;
}
.folder-chart-link:hover { background: #d1d5db; }
.folder-products { margin-top: 2rem; }
