:root {
  --navy: #103a5b;
  --blue: #174e78;
  --blue-2: #2f7da8;
  --yellow: #f4b91f;
  --ink: #1f2933;
  --muted: #6b7785;
  --line: #dce3e8;
  --bg: #f4f7f9;
  --white: #ffffff;
  --success: #2e7d4f;
  --danger: #b42318;
  --warn-bg: #fff7dd;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; }

.topbar {
  min-height: 88px;
  background: var(--white);
  border-bottom: 4px solid var(--yellow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-row { display: flex; align-items: center; gap: 18px; }
.brand-center { justify-content: center; }
.brand-logo { width: 245px; max-width: 48vw; height: auto; display: block; }
.brand-title { border-left: 1px solid var(--line); padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.brand-title strong { color: var(--navy); font-size: 19px; }
.brand-title span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.clock-box { text-align: right; display: flex; flex-direction: column; color: var(--navy); }
.clock-box span { font-size: 12px; color: var(--muted); }
.clock-box strong { font-size: 18px; }
.logout-link, .settings-link { color: var(--blue); text-decoration: none; font-weight: 600; font-size: 13px; }
.settings-link:hover, .logout-link:hover { text-decoration: underline; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 28px auto 64px; }
.status-strip {
  background: var(--navy);
  color: var(--white);
  padding: 14px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.status-dot { width: 9px; height: 9px; background: #66d18f; border-radius: 999px; display: inline-block; margin-right: 8px; }
.status-strip .muted { color: #c9d7e2; font-size: 12px; margin-left: 8px; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 8px 30px rgba(16,58,91,.06); }
.section-heading { display: flex; justify-content: space-between; margin-bottom: 18px; }
.eyebrow { color: var(--blue-2); font-weight: 800; font-size: 11px; letter-spacing: .12em; }
h1, h2, h3 { margin: 0; color: var(--navy); }
h2 { margin-top: 4px; font-size: 24px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
input, select {
  width: 100%;
  border: 1px solid #bac7d1;
  background: var(--white);
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 9px;
  outline: none;
}
input:focus, select:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(47,125,168,.12); }
.hint { font-size: 12px; color: var(--muted); margin-top: 9px; }

.btn { border: 0; border-radius: 9px; min-height: 44px; padding: 0 18px; cursor: pointer; font-weight: 750; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.primary { background: var(--blue); color: var(--white); }
.btn.secondary { background: var(--yellow); color: var(--navy); }
.btn.ghost { background: #edf2f5; color: var(--blue); }
.btn.full { width: 100%; }

.or-divider { display: flex; align-items: center; gap: 14px; color: #9aa7b2; margin: 18px 0; font-weight: 800; font-size: 11px; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.selector-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.selector-grid label { font-size: 12px; color: var(--muted); font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
.browse-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.hidden { display: none !important; }

.message-box { margin-top: 18px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
.message-box.error { border-color: #efb4ad; color: var(--danger); background: #fff7f6; }
.message-box.warning { border-color: #efd37d; background: var(--warn-bg); color: #755800; }
.message-box.success { border-color: #b7ddc7; background: #f1fbf5; color: var(--success); }

.results { display: grid; gap: 16px; margin-top: 18px; }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 30px rgba(16,58,91,.06); }
.product-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 22px; background: linear-gradient(135deg, var(--navy), var(--blue)); color: var(--white); }
.product-card-head h3 { color: var(--white); font-size: 21px; }
.product-code { font-family: Consolas, monospace; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 8px 10px; border-radius: 8px; font-weight: 800; }
.card-body { display: grid; grid-template-columns: 1.3fr .7fr; gap: 0; }
.specs, .pricing { padding: 20px 22px; }
.pricing { border-left: 1px solid var(--line); background: #fbfcfd; }
.detail-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef2f4; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-row strong { font-size: 13px; overflow-wrap: anywhere; }
.price-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #e8edf0; }
.price-row span { color: var(--muted); }
.price-row strong { color: var(--navy); }
.price-row.sales { padding-top: 16px; }
.price-row.sales strong { font-size: 20px; color: var(--blue); }
.price-row.profit strong { color: var(--success); font-size: 18px; }

.login-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(145deg,#eef3f6,#ffffff); padding: 20px; }
.login-card { width: min(430px, 100%); background: var(--white); border-radius: 18px; box-shadow: 0 20px 65px rgba(16,58,91,.14); border-top: 5px solid var(--yellow); padding: 34px; }
.login-copy { text-align: center; margin: 28px 0 22px; }
.login-copy h1 { font-size: 27px; }
.login-copy p { color: var(--muted); margin: 6px 0 0; }
.login-form { display: grid; gap: 10px; }
.login-form label { color: var(--muted); font-size: 12px; font-weight: 700; }
.alert { border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.alert.error { color: var(--danger); background: #fff1ef; }

@media (max-width: 760px) {
  .topbar { padding: 12px 14px; }
  .brand-title { display: none; }
  .brand-logo { width: 190px; max-width: 46vw; }
  .clock-box span { display: none; }
  .clock-box strong { font-size: 14px; }
  .page-shell { width: min(100% - 20px, 1180px); margin-top: 14px; }
  .status-strip { align-items: stretch; flex-direction: column; }
  .selector-grid { grid-template-columns: 1fr; }
  .search-row { grid-template-columns: 1fr; }
  .browse-actions { flex-direction: column; }
  .card-body { grid-template-columns: 1fr; }
  .pricing { border-left: 0; border-top: 1px solid var(--line); }
  .product-card-head { align-items: flex-start; flex-direction: column; }
  .detail-row { grid-template-columns: 120px 1fr; }
}


/* Settings / password management */
.settings-shell { width: min(720px, calc(100% - 32px)); margin: 42px auto 64px; }
.settings-panel { padding: 28px; }
.settings-intro { color: var(--muted); margin: -4px 0 22px; line-height: 1.55; }
.password-form { display: grid; gap: 9px; }
.password-form label { color: var(--muted); font-size: 12px; font-weight: 700; margin-top: 8px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.settings-message { margin: 0 0 16px; }
.security-note { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafb; display: grid; gap: 4px; }
.security-note strong { color: var(--navy); font-size: 13px; }
.security-note span { color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 760px) {
  .settings-shell { width: min(100% - 20px, 720px); margin-top: 18px; }
  .settings-panel { padding: 20px; }
  .settings-actions { flex-direction: column-reverse; }
  .settings-actions .btn { width: 100%; }
}
