/* AIforOperations — capture page + quotation generator (dark chrome).
   IMPORTANT: the quotation document (.doc and everything inside it) stays an
   explicit LIGHT sheet so the printed / saved PDF is clean and readable. */
:root {
  --bg: #07070b;
  --card: rgba(255,255,255,0.045);
  --card-2: rgba(255,255,255,0.07);
  --line: rgba(255,255,255,0.1);
  --line-2: rgba(255,255,255,0.17);
  --ink: #f2f2f6;
  --body: rgba(240,240,245,0.66);
  --mute: rgba(240,240,245,0.42);
  --red: #E1362F;
  --red-2: #991B1B;
  --coral: #F87171;
  --teal: #2DD4BF;
  --gold: #FBBF24;
  --green: #34D399;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}
/* cheap static red glow, no WebGL — fast first paint on venue wifi */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 420px at 50% -8%, rgba(225,54,47,0.16), transparent 60%),
    radial-gradient(560px 500px at 108% 12%, rgba(127,29,29,0.14), transparent 55%);
}
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; color: #fff; }
h2 { font-size: clamp(23px, 4.4vw, 32px); font-weight: 800; color: #fff; }
h3 { font-size: 19px; font-weight: 700; color: #fff; }
p { margin: 0 0 14px; color: var(--body); }
a { color: var(--coral); text-decoration: none; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.mute { color: var(--mute); font-size: 14px; }
.hide { display: none !important; }

/* ── brand wordmark ── */
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand .a { color: #fff; } .brand .f { color: var(--coral); } .brand .o { color: var(--red); }
.brand-sub { display: block; font-size: 11.5px; color: var(--mute); font-weight: 500; letter-spacing: .02em; margin-top: 2px; }

/* ── buttons ── */
@keyframes shimmer { 0% { transform: translateX(-120%) skewX(-15deg); } 100% { transform: translateX(260%) skewX(-15deg); } }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 16px 26px; border-radius: 12px; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 600; text-decoration: none; font-family: inherit;
  transition: transform .12s ease, box-shadow .25s ease, background .2s ease, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 11px 18px; font-size: 15px; border-radius: 10px; }
.gloss::after {
  content: ''; position: absolute; top: 0; left: 0; width: 42%; height: 100%;
  transform: translateX(-120%) skewX(-15deg); animation: shimmer 3.4s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent); pointer-events: none;
}
.btn-main {
  width: 100%; color: #fff; background: linear-gradient(135deg, var(--red) 0%, var(--red-2) 100%);
  border-top: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.16), 0 10px 30px -8px rgba(225,54,47,0.5);
}
.btn-main::after {
  content: ''; position: absolute; top: 0; left: 0; width: 42%; height: 100%;
  transform: translateX(-120%) skewX(-15deg); animation: shimmer 3.4s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent); pointer-events: none;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.22), 0 16px 44px -8px rgba(225,54,47,0.72); }
.btn-main[disabled] { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.btn-main[disabled]::after { display: none; }
.btn-ghost { color: var(--ink); background: var(--card-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.32); transform: translateY(-2px); }
.btn-wa { color: #fff; background: linear-gradient(135deg, #21B15C 0%, #147040 100%); border-top: 1px solid rgba(255,255,255,0.2); }

/* ── capture page — sized to fit one screen, no scroll ── */
.cap-page { min-height: 100dvh; display: flex; flex-direction: column; }
.cap-top { padding: 18px 20px 0; }
.cap-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 20px 20px; }
.cap-card {
  width: 100%; max-width: 560px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 24px 26px 22px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.06), 0 24px 60px -20px rgba(0,0,0,0.7);
}
.cap-card h1 { margin-bottom: 7px; }
.cap-card > p { margin-bottom: 14px; }
.eyebrow {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 11px;
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.32);
}
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 11px 0 5px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: inherit; color: var(--ink);
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--line); border-radius: 11px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: rgba(240,240,245,0.3); }
select option { color: #111; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,54,47,0.18); }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cap-grid label { margin-top: 0; }
@media (max-width: 460px) { .cap-grid { grid-template-columns: 1fr; gap: 0; } .cap-grid label { margin-top: 11px; } }
.phone-row { display: grid; grid-template-columns: 108px 1fr; gap: 9px; }
.err { color: #FCA5A5; font-size: 13px; margin-top: 6px; min-height: 14px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 11px 0 3px; }
.consent input { width: 19px; height: 19px; flex: none; margin-top: 2px; accent-color: var(--red); }
.consent span { font-size: 13.5px; color: var(--body); line-height: 1.45; }
.recall { background: rgba(255,255,255,0.05) !important; border: 1px solid var(--line); color: var(--body); }

/* ── generator: nav + editor chrome (dark) ── */
.nav {
  position: sticky; top: 0; z-index: 20; background: rgba(7,7,11,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; max-width: var(--wrap); margin: 0 auto; }
.tool { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; padding: 24px 0 60px; }
@media (max-width: 900px) { .tool { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.panel h3 { color: #fff; margin-bottom: 4px; }
.fld2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.items { width: 100%; border-collapse: collapse; margin-top: 8px; }
.items th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); text-align: left; padding: 6px 4px; }
.items td { padding: 3px 2px; vertical-align: top; }
.items input { padding: 10px; font-size: 15px; }
.items .num input { text-align: right; }
.row-x { background: none; border: 0; color: var(--mute); font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; }
.row-x:hover { color: #FCA5A5; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tool-actions .btn { flex: 1 1 180px; }
input[type="file"] { color: var(--body); font-size: 14px; }
input[type="file"]::-webkit-file-upload-button, input[type="file"]::file-selector-button {
  background: var(--card-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 12px; margin-right: 12px; cursor: pointer; font-family: inherit;
}

/* ══════════════════════════════════════════════════════════════════════════
   THE QUOTATION DOCUMENT — always light. This is what becomes the PDF.
   Explicit light colours (not theme variables) so it never inherits the dark UI.
   ══════════════════════════════════════════════════════════════════════════ */
.doc-wrap { position: sticky; top: 74px; }
/* renders as a real A4 page (210:297) so it looks like a proper quotation */
.doc {
  width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 210 / 297;
  background: #ffffff; color: #1A2837; border-radius: 4px;
  padding: 52px 48px; font-size: 12.5px; line-height: 1.5;
  box-shadow: 0 24px 64px -14px rgba(0,0,0,0.65);
}
@media (max-width: 900px) { .doc { aspect-ratio: auto; padding: 40px 30px; } }
.doc h1, .doc h2, .doc h3 { color: inherit; }
.doc a { color: #B5641E; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 3px solid #10233B; padding-bottom: 16px; }
.doc-logo { max-height: 62px; max-width: 190px; object-fit: contain; }
.doc-co { font-size: 21px; font-weight: 800; color: #10233B; letter-spacing: -0.01em; }
.doc-meta { text-align: right; font-size: 12px; color: #56687C; }
.doc-title { font-size: 26px; font-weight: 800; color: #B5641E; letter-spacing: .12em; text-transform: uppercase; }
.doc-to { margin: 20px 0 16px; }
.doc-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #8A9AAC; font-weight: 700; margin-bottom: 3px; }
table.lines { width: 100%; border-collapse: collapse; margin-top: 6px; }
table.lines th {
  background: #10233B; color: #fff; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 10px; text-align: left;
}
table.lines th.r, table.lines td.r { text-align: right; }
table.lines td { padding: 9px 10px; border-bottom: 1px solid #EDF1F5; color: #1A2837; }
table.lines tbody tr:nth-child(even) { background: #FAFBFD; }
.totals { margin-left: auto; margin-top: 14px; width: 260px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; color: #1A2837; }
.totals .grand { border-top: 2px solid #10233B; margin-top: 6px; padding-top: 10px; font-size: 17px; font-weight: 800; color: #10233B; }
.doc-terms { margin-top: 26px; border-top: 1px solid #EDF1F5; padding-top: 14px; font-size: 11.5px; color: #56687C; white-space: pre-wrap; }
.doc-foot { margin-top: 26px; text-align: center; font-size: 10.5px; color: #93A2B2; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  body::before { display: none !important; }
  .no-print, .nav { display: none !important; }
  .tool { display: block; padding: 0; }
  .doc-wrap { position: static; }
  .doc { border: 0; border-radius: 0; box-shadow: none; padding: 0; font-size: 12px; color: #1A2837; }
  table.lines th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
