/* SEIPowersports — interface simple, lisible, sans framework JS */
* { box-sizing: border-box; }

body {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222;
  background: #f4f1ea;
  margin: 0;
}

a { color: #1a4d8c; }
a:hover { color: #0d2d54; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

header.site-header {
  background: #1a3a5c;
  color: #fff;
  padding: 12px 0;
  margin-bottom: 24px;
}

header.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 0;
}

header.site-header a { color: #fff; text-decoration: none; }
header.site-header a:hover { text-decoration: underline; }

.logo { font-size: 1.25rem; font-weight: bold; }

nav.main-nav a {
  margin-left: 14px;
  font-size: 0.95rem;
}

.user-bar {
  font-size: 0.85rem;
  opacity: 0.9;
}

h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.2rem; border-bottom: 1px solid #ccc; padding-bottom: 6px; }

.flash {
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid;
  border-radius: 4px;
}

.flash.success { background: #e8f5e9; border-color: #81c784; }
.flash.error { background: #ffebee; border-color: #e57373; }
.flash.info { background: #e3f2fd; border-color: #64b5f6; }

.card {
  background: #fff;
  border: 1px solid #ccc;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.dash-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.dash-card {
  display: block;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 14px 16px;
  text-decoration: none;
  color: #222;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-card:hover {
  border-color: #1a4d8c;
  box-shadow: 0 2px 8px rgba(26, 77, 140, 0.12);
  color: #222;
}

.dash-card strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #1a3a5c;
}

.dash-card span {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-top: 4px;
}

.dash-card-primary {
  border-color: #1a4d8c;
  background: #f0f6fc;
}

.dash-card-warn {
  border-color: #e6a800;
  background: #fffbf0;
}

.stock-ok { color: #2e7d32; font-size: 0.85rem; }
.stock-low { color: #e6a800; font-size: 0.85rem; }
.stock-out { color: #c62828; font-size: 0.85rem; }

.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.stock-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stock-pill-ok { background: #e8f5e9; color: #1b5e20; }
.stock-pill-ok .stock-pill-dot { background: #2e7d32; }
.stock-pill-low { background: #fff8e1; color: #e65100; }
.stock-pill-low .stock-pill-dot { background: #f9a825; }
.stock-pill-out { background: #ffebee; color: #b71c1c; }
.stock-pill-out .stock-pill-dot { background: #c62828; }
.stock-pill-unknown { background: #f5f5f5; color: #666; }
.stock-pill-unknown .stock-pill-dot { background: #999; }

.catalog-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.catalog-quick-filters a {
  padding: 6px 12px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}
.catalog-quick-filters a.active {
  background: #1a4d8c;
  color: #fff;
  border-color: #1a4d8c;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 8px;
  margin: 16px 0;
}
.empty-state-icon { font-size: 3rem; line-height: 1; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { margin: 0 0 8px; font-size: 1.25rem; }
.empty-state-message { color: #555; margin: 0 0 20px; max-width: 420px; margin-left: auto; margin-right: auto; }

.btn.is-loading { opacity: 0.85; cursor: wait; }
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.submit-success-banner {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-weight: 600;
}
.field-error {
  display: block;
  color: #c62828;
  font-size: 0.85rem;
  margin-top: 4px;
}
.input-invalid { border-color: #c62828 !important; }

.cockpit-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.cockpit-tile {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.cockpit-tile:hover { border-color: #1a4d8c; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cockpit-tile strong { display: block; font-size: 1.5rem; color: #1a3a5c; }
.cockpit-tile span { font-size: 0.85rem; color: #555; }

.status-flow-wrap {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f4f1ea;
  padding: 8px 0 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
}
.status-flow li { cursor: pointer; }
.status-flow li:focus { outline: 2px solid #1a4d8c; outline-offset: 2px; }
.timeline-tooltip {
  position: absolute;
  max-width: 280px;
  background: #1a3a5c;
  color: #fff;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.preview-table .preview-ok { background: #f1f8f4; }
.preview-table .preview-warn { background: #fffde7; }
.preview-table .preview-error { background: #ffebee; }
.preview-status { font-weight: 600; font-size: 0.85rem; }
.empty-hint { color: #666; font-style: italic; margin: 8px 0; }

.notif-bell summary[data-count="0"] {
  background: #888;
}
.notif-empty { color: #666; font-size: 0.9rem; }

td.stock-cell { text-align: right; white-space: nowrap; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ccc;
}

table.data th,
table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table.data th {
  background: #e8e4dc;
  font-weight: bold;
}

table.data tr:hover td { background: #faf8f5; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 3px;
  background: #ddd;
}

.badge.draft { background: #fff3cd; }
.badge.submitted { background: #cce5ff; }
.badge.signed { background: #d4edda; }
.badge.finalized { background: #c3e6cb; }
.badge.cancelled { background: #f8d7da; }

label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 480px;
  padding: 8px 10px;
  font-size: 1rem;
  border: 1px solid #999;
  margin-top: 4px;
}

textarea { max-width: 100%; min-height: 80px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  font-size: 1rem;
  background: #1a4d8c;
  color: #fff !important;
  border: none;
  cursor: pointer;
  text-decoration: none;
  margin-top: 12px;
  margin-right: 8px;
}

.btn:hover { background: #0d2d54; }
.btn.secondary { background: #666; }
.btn.danger { background: #a33; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  flex: 1;
  min-width: 120px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 12px;
  text-align: center;
}

.stat-box strong { display: block; font-size: 1.5rem; }

.messages .msg {
  background: #fff;
  border-left: 4px solid #1a4d8c;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.messages .msg .meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.dev-link {
  word-break: break-all;
  background: #fffde7;
  padding: 12px;
  border: 1px dashed #f9a825;
  margin-top: 12px;
}

footer.site-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #ccc;
  font-size: 0.85rem;
  color: #666;
}

.qty-input { width: 70px !important; max-width: 70px; }

.action-center { list-style: none; padding: 0; margin: 0 0 20px; }
.action-center .action-item { margin-bottom: 8px; }
.action-center a {
  display: block;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px 14px;
  border-radius: 4px;
}
.action-center .action-high a { border-left: 4px solid #c62828; }
.action-center a span { display: block; font-size: 0.85rem; color: #666; }

.status-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0 20px;
}
.status-flow li {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 8px;
  background: #eee;
  border-radius: 4px;
  font-size: 0.85rem;
}
.status-flow li.active { background: #1a4d8c; color: #fff; font-weight: 600; }
.status-flow li.done { background: #e8f5e9; }

.notif-bell { position: relative; display: inline-block; margin-left: 8px; }
.notif-bell summary {
  cursor: pointer;
  background: #c62828;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 0.75rem;
  list-style: none;
}
.notif-bell ul {
  position: absolute;
  right: 0;
  top: 28px;
  background: #fff;
  border: 1px solid #ccc;
  min-width: 220px;
  padding: 8px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.notif-bell li { margin: 4px 0; font-size: 0.9rem; }

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
.catalog-filters label { display: block; margin-top: 10px; font-size: 0.9rem; }
.catalog-filters .price-range { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.catalog-filters input[type="number"] { width: 80px; }
.suggest-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.suggest-item { display: block; padding: 8px 10px; text-decoration: none; color: #222; }
.suggest-item:hover { background: #eef3f9; }
.recent-searches { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; }
.purchase-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.purchase-stats .stat-box { background: #fff; border: 1px solid #ddd; padding: 12px; border-radius: 4px; }
.bar-chart { margin: 12px 0; }
.bar-chart .bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 0.9rem; }
.bar-chart .bar { height: 10px; background: #1a4d8c; border-radius: 2px; min-width: 4px; }

@media (max-width: 600px) {
  nav.main-nav a { margin-left: 8px; display: inline-block; }
  table.data { font-size: 0.9rem; }
  .status-flow li { min-width: 70px; font-size: 0.75rem; }
  .catalog-layout { grid-template-columns: 1fr; }
}
