/* Styles for the inventory app.
   This file is loaded from your own computer, so the page looks the same
   with no internet connection. */

:root {
  --ink: #16202c;
  --ink-soft: #5b6b7d;
  --line: #dde4ec;
  --surface: #ffffff;
  --page: #f2f5f9;
  --accent: #1f5fd0;
  --accent-soft: #e8f0fe;
  --warn: #b4401b;
  --warn-soft: #fdeee7;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */

.site-header {
  background: var(--ink);
  color: #fff;
  padding: 28px 0 24px;
}

.site-header .eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #9fb3c8;
}

.site-header h1 {
  margin: 4px 0 2px;
  font-size: 28px;
  letter-spacing: -0.01em;
}

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

.site-header .tagline {
  margin: 0;
  color: #9fb3c8;
  font-size: 14px;
}

/* ---- Search form ---- */

.search-form {
  display: flex;
  gap: 8px;
  margin: -18px 0 22px;
  background: var(--surface);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(22, 32, 44, 0.06);
}

.search-form input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: inherit;
}

button {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #1a4fae;
}

input:focus,
button:focus {
  outline: 3px solid #9cc0ff;
  outline-offset: 1px;
}

/* ---- Panels and messages ---- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 8px;
  box-shadow: 0 1px 2px rgba(22, 32, 44, 0.06);
}

.panel h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.summary {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
}

.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid #c6dbfb;
  border-radius: var(--radius);
  font-size: 15px;
}

.empty {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

code {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ---- Table ---- */

table.items {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.items th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}

table.items td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px;
  vertical-align: middle;
}

table.items tr:hover td {
  background: #f8fafd;
}

.sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
}

.muted {
  color: var(--ink-soft);
}

.num {
  text-align: right;
}

.pill {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.pill.low {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ---- Adjust form inside a row ---- */

.adjust-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.adjust-form input[type="text"] {
  width: 56px;
  padding: 6px 8px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  color: inherit;
}

.adjust-form button {
  padding: 6px 12px;
  font-size: 13px;
}

.back {
  margin: 18px 0;
  font-size: 14px;
}

.back a {
  color: var(--accent);
}

/* ---- Footer ---- */

.site-footer {
  margin: 28px 0 40px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

/* Hidden from the screen, still read aloud by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 680px) {
  table.items th:nth-child(4),
  table.items td:nth-child(4) {
    display: none;
  }
}
