/* QuoteGen — PC Cool product chrome.
   Palette and type taken from pccool.com: the #0a0e14 ground, the "ice" and
   "heat" accents the company is named for, Sora / Inter / JetBrains Mono.

   Single dark theme on purpose — it matches the site, and the one thing that
   must NOT follow it is the quote document. A quote is printed on white paper
   and carries the customer's own branding, so .paper-wrap is an explicit white
   sheet on a dark desk, and quotes/_quote_styles.html keeps its own print
   colours untouched. Product chrome and quote paper never merge. */
:root {
  color-scheme: dark;

  --bg:        #0a0e14;
  --surface:   #111722;
  --surface-2: #17202e;
  --raised:    #1b2431;
  --line:      #1f2a3a;
  --line-2:    #2b3849;

  --ink:       #e6edf5;
  --muted:     #8b97a8;
  --dim:       #6b7787;

  --ice:       #4dd6ff;
  --ice-dim:   rgba(77, 214, 255, .12);
  --heat:      #ff3b52;
  --thermal:   linear-gradient(90deg, var(--heat) 0%, #b06bff 45%, var(--ice) 100%);

  --ok:        #5fd39a;
  --ok-bg:     #10241a;
  --ok-line:   #1d4433;
  --warn:      #e7b768;
  --warn-bg:   #241d10;
  --warn-line: #4a3a1a;
  --bad:       #ff8a7a;
  --bad-bg:    #2a1512;
  --bad-line:  #50231d;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- chrome ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px; background: #070b10; color: var(--ink);
  position: relative;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--thermal);
}
.topbar .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
/* The logo is a white-background JPEG — it gets a plate, not a raw placement. */
.topbar .brand img { height: 30px; width: auto; display: block; background: #fff; padding: 3px 5px; border-radius: 4px; }
.topbar .brand .app { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.topbar .brand .app em { font-style: normal; color: var(--ice); }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.topbar nav a:hover { color: var(--ice); }

main { max-width: 940px; width: 100%; margin: 0 auto; padding: 24px; flex: 1; }

.sitefoot {
  background: #070b10; color: var(--muted); border-top: 1px solid var(--line);
  padding: 20px 24px; margin-top: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: .84rem;
}
.sitefoot a { color: var(--muted); text-decoration: none; }
.sitefoot a:hover { color: var(--ice); }
.sitefoot .hosted { display: flex; align-items: center; gap: 9px; }
.sitefoot .hosted img { height: 22px; width: auto; display: block; background: #fff; padding: 2px 5px; border-radius: 3px; }
.sitefoot .sep { color: var(--line-2); }

/* ---------- type ---------- */

h1 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; color: var(--ink); }
h2 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 28px 0 10px; color: var(--ink); }
.sub { color: var(--muted); margin: 0 0 20px; }
a { color: var(--ice); }

/* ---------- surfaces ---------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 20px; margin-bottom: 20px;
}

label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 14px; color: var(--ink); }
input[type=text], input[type=email], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px;
  font: inherit; background: #0d131c; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ice); outline-offset: 1px; border-color: transparent;
}
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.errorlist { color: var(--bad); font-size: 13px; margin: 4px 0 0; padding-left: 18px; }

button, .btn {
  display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--ice);
  background: var(--ice); color: #06131a; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { background: #6fdfff; border-color: #6fdfff; }
button.secondary, .btn.secondary {
  background: transparent; color: var(--ice); border-color: var(--line-2);
}
button.secondary:hover, .btn.secondary:hover { background: var(--ice-dim); border-color: var(--ice); }
button.danger {
  background: transparent; color: var(--bad); border-color: var(--line-2); padding: 4px 8px; font-weight: 500;
}
button.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
button.linkish { background: none; border: none; color: var(--muted); padding: 0; cursor: pointer; font: inherit; font-weight: 400; }
button.linkish:hover { color: var(--ice); background: none; }
form.inline { display: inline; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font: 500 .7rem/1 var(--font-mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--dim); padding-bottom: 10px;
}
td { color: var(--ink); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td input { padding: 6px 8px; }

/* ---------- feedback ---------- */

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li {
  padding: 10px 14px; border-radius: 6px; margin-bottom: 8px;
  background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line);
}
.messages li.warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.messages li.error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge.final { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.badge.review { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }

.empty { color: var(--muted); padding: 24px; text-align: center; }

/* ---------- the quote document ----------
   Deliberately NOT themed. This is a white sheet on a dark desk: the preview
   must match what WeasyPrint prints, and the print styles in
   quotes/_quote_styles.html are light by definition. Colours are set
   explicitly here so nothing above can leak in. */
.paper-wrap {
  background: #ffffff; color: #1a1d21;
  border: 1px solid var(--line); border-radius: 8px; padding: 40px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.paper-wrap a { color: #1f4e79; }
.paper-wrap .help { color: #6b7280; }
.paper-wrap input, .paper-wrap textarea, .paper-wrap select {
  background: #fbfcfe; color: #1a1d21; border-color: #c9d2db;
}
.paper-wrap th { color: #6b7280; }
.paper-wrap td { color: #1a1d21; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar nav { gap: 14px; font-size: .88rem; }
  main { padding: 18px 16px; }
  .paper-wrap { padding: 22px 16px; }
}
