/* ═══════════════════════════════════════════════════
   FUEL BILL GENERATOR — self-contained stylesheet
   /tools/fuel/fuel.css
═══════════════════════════════════════════════════ */

:root {
  --bg:      #f5f5f7;
  --surface: #ffffff;
  --card:    #f9f9fb;
  --border:  #e2e2e8;
  --accent:  #4f46e5;
  --text:    #111118;
  --muted:   #888899;
  --mono:    'Courier Prime', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Instrument Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══════════════════════════════════════════════════
   TOOL PAGE LAYOUT
═══════════════════════════════════════════════════ */
.tool-page { display: flex; flex-direction: column; height: 100vh; }

/* ── Top bar ── */
.tool-bar {
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tool-bar-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
  text-decoration: none;
  padding: 5px 10px; border-radius: 6px;
  transition: all 0.2s;
}
.tool-bar-back:hover { background: var(--bg); color: var(--text); }
.tool-bar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 14px;
  color: var(--text); flex: 1;
}
.tool-bar-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }

/* ── Body ── */
.tool-body { display: flex; flex: 1; overflow: hidden; }

/* ── Form panel ── */
.form-panel {
  width: 360px; min-width: 360px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto; height: 100%;
  padding: 16px 16px 60px;
}

/* ── Preview panel ── */
.preview-panel {
  flex: 1;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 20px; overflow-y: auto;
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════════════ */
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent);
  margin: 18px 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}
.field { margin-bottom: 9px; }
.field label {
  display: block;
  font-size: 10px; color: var(--muted);
  margin-bottom: 3px; font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--text); font-size: 12.5px;
  outline: none; transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
.field select option { background: #fff; color: var(--text); }
.field textarea { resize: vertical; min-height: 48px; }
.field input[readonly] { background: #f0f0f4; color: var(--muted); cursor: default; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }

/* Action buttons */
.print-btn {
  background: var(--card); color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px; width: 100%;
  font-size: 11px; letter-spacing: 1px;
  cursor: pointer; margin-top: 6px;
  text-transform: uppercase; transition: all 0.2s;
}
.print-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(79,70,229,0.04); }

/* ── Logo picker ── */
.logo-picker { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-bottom: 8px; }
.logo-opt {
  background: var(--card); border: 2px solid var(--border);
  border-radius: 8px; padding: 7px 3px;
  cursor: pointer; text-align: center; transition: all 0.2s;
}
.logo-opt:hover { border-color: #c0bff0; }
.logo-opt.active { border-color: var(--accent); background: rgba(79,70,229,0.06); }
.lo-svg { height: 30px; display: flex; align-items: center; justify-content: center; margin-bottom: 2px; }
.lo-name { font-size: 8px; color: var(--muted); font-family: var(--mono); }

/* ═══════════════════════════════════════════════════
   AD SLOTS
═══════════════════════════════════════════════════ */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  overflow: hidden;
}
.ad-slot-leaderboard { width: 100%; max-width: 728px; height: 90px; margin: 0 auto; border-radius: 8px; }

/* ═══════════════════════════════════════════════════
   THERMAL RECEIPT
═══════════════════════════════════════════════════ */
.thermal-wrap {
  display: flex; flex-direction: column;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}
.thermal-tear-top, .thermal-tear-bottom {
  height: 16px; background: #f5f5f5;
}
.thermal-tear-top {
  clip-path: polygon(0 100%,2% 0,4% 100%,6% 0,8% 100%,10% 0,12% 100%,14% 0,16% 100%,18% 0,20% 100%,22% 0,24% 100%,26% 0,28% 100%,30% 0,32% 100%,34% 0,36% 100%,38% 0,40% 100%,42% 0,44% 100%,46% 0,48% 100%,50% 0,52% 100%,54% 0,56% 100%,58% 0,60% 100%,62% 0,64% 100%,66% 0,68% 100%,70% 0,72% 100%,74% 0,76% 100%,78% 0,80% 100%,82% 0,84% 100%,86% 0,88% 100%,90% 0,92% 100%,94% 0,96% 100%,98% 0,100% 100%);
}
.thermal-tear-bottom {
  clip-path: polygon(0 0,2% 100%,4% 0,6% 100%,8% 0,10% 100%,12% 0,14% 100%,16% 0,18% 100%,20% 0,22% 100%,24% 0,26% 100%,28% 0,30% 100%,32% 0,34% 100%,36% 0,38% 100%,40% 0,42% 100%,44% 0,46% 100%,48% 0,50% 100%,52% 0,54% 100%,56% 0,58% 100%,60% 0,62% 100%,64% 0,66% 100%,68% 0,70% 100%,72% 0,74% 100%,76% 0,78% 100%,80% 0,82% 100%,84% 0,86% 100%,88% 0,90% 100%,92% 0,94% 100%,96% 0,98% 100%,100% 0);
}
.thermal {
  background: #fff; width: 340px;
  font-family: var(--mono); position: relative;
}
.thermal-body { padding: 6px 36px 20px 20px; }

.t-center { text-align: center; }
.t-logo { margin: 12px auto 4px; display: flex; justify-content: center; width: 120px; height: 120px; }
.t-logo svg, .t-logo img { width: 120px; height: 120px; object-fit: contain; }
.t-welcome { font-size: 11px; font-weight: 700; letter-spacing: 2px; margin: 10px 0 4px; }
.t-addr { font-size: 10.5px; line-height: 1.55; color: #222; }
.t-div { border: none; border-top: 1px dashed #999; margin: 9px 0; }
.t-div-solid { border: none; border-top: 2px solid #000; margin: 9px 0; }
.t-row { display: flex; justify-content: space-between; font-size: 11px; line-height: 1.8; color: #111; }
.t-row .lbl { font-weight: 700; }
.t-total-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; font-weight: 700;
  padding: 5px 0;
  border-top: 2px solid #000; border-bottom: 2px solid #000;
  margin: 5px 0; color: #000;
}
.t-stars { text-align: center; letter-spacing: 3px; font-size: 11px; margin: 8px 0 5px; color: #333; }
.t-footer { text-align: center; font-size: 10.5px; line-height: 1.7; margin-top: 10px; color: #333; }
.t-side-strip {
  position: absolute; right: 0;
  width: 18px; background: #888; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  padding: 10px 3px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  border-radius: 2px 0 0 2px;
  display: flex; align-items: center; justify-content: center;
}
.t-side-strip--top { top: 20px; }
.t-side-strip--bot { bottom: 20px; }
.t-draft {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-28deg);
  font-size: 56px; font-weight: 900;
  color: rgba(0,0,0,0.04); letter-spacing: 5px;
  pointer-events: none; white-space: nowrap;
  font-family: 'Syne', sans-serif;
}

/* ═══════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════ */
@media print {
  body { background: #fff !important; }
  .tool-bar, .form-panel, .ad-slot,
  .print-btn { display: none !important; }
  .tool-page { height: auto; display: block; }
  .tool-body { display: block; overflow: visible; }
  .preview-panel { padding: 0; background: none; display: block; overflow: visible; }
  .thermal { box-shadow: none !important; }
  .t-draft { display: none !important; }
  .thermal-wrap { filter: none; }
  .thermal-tear-top, .thermal-tear-bottom { display: none; }
  .t-side-strip { display: none; }
  .print-disclaimer {
    display: block !important;
    text-align: center;
    font-family: var(--mono);
    font-size: 9px; color: #aaa;
    padding: 8px 0 0;
    border-top: 1px dashed #ddd;
    margin-top: 10px;
  }
}
.print-disclaimer { display: none; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .tool-body { flex-direction: column; }
  .form-panel { width: 100%; min-width: unset; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .preview-panel { padding: 16px 12px; }
  .thermal { width: 100%; max-width: 340px; }
}
@media (max-width: 600px) {
  .logo-picker { grid-template-columns: repeat(4,1fr); }
  .ad-slot-leaderboard { height: 60px; }
}
