/* TrueMile EV web | Report (views/report.js): the designer's controls on the left, the live paper
   preview on the right (two columns from 1100 px; stacked below; on a phone an Edit / Preview switch
   shows one at a time). Only .rpt / .rpt-* classes. The paper itself is styled in css/print.css. */

.rpt{min-width:0}
.rpt-switch{display:none;margin:0 0 12px}
.rpt-switch button{display:inline-flex;align-items:center;gap:6px}

.rpt-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.rpt-controls{display:flex;flex-direction:column;gap:12px;min-width:0}
.rpt-card{min-width:0}
.rpt-card .card-head .btn{margin-left:auto}

/* fields */
.rpt-field{margin:0 0 12px;min-width:0}
.rpt-field:last-child{margin-bottom:0}
.rpt-label{display:flex;align-items:baseline;gap:8px;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);font-weight:600;margin:0 0 6px}
label.rpt-field{display:block;text-transform:none;letter-spacing:normal;font-size:1rem;color:var(--ink);font-weight:400}
.rpt-count{margin-left:auto;font-variant-numeric:tabular-nums;letter-spacing:0;text-transform:none;color:var(--dim);font-weight:500}
.rpt-textfield textarea{resize:vertical;min-height:84px;line-height:1.45}
.rpt-static{font-weight:600}
.rpt-seg{margin:0 6px 6px 0}
.rpt-docs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%}
.rpt-docs button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border-radius:var(--r-tile);
  padding:6px 8px;line-height:1.2;text-align:center}
.rpt-filterrow{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-start;margin:4px 0 0}
.rpt-filterrow > div:empty{display:none}
.rpt-summary{margin:10px 0 0}

/* checkboxes */
.rpt-checks{display:grid;gap:2px}
label.rpt-check{display:flex;align-items:center;gap:10px;margin:0;min-height:36px;padding:2px 0;text-transform:none;letter-spacing:normal;
  font-size:.93rem;color:var(--ink);font-weight:500;cursor:pointer}
label.rpt-check input{width:18px;height:18px;flex:none;margin:0}
label.rpt-check input:disabled + span{color:var(--muted)}
.rpt-hint{margin:2px 0 12px}
.rpt-cols{margin:10px 0 0;border-top:1px solid var(--line);padding-top:8px}
.rpt-cols summary{cursor:pointer;font-weight:600;padding:6px 0;display:flex;align-items:center;gap:8px;list-style:none}
.rpt-cols summary::-webkit-details-marker{display:none}
.rpt-cols summary::before{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
  transform:rotate(-45deg);transition:transform .15s var(--ease,ease);margin:0 4px 0 2px}
.rpt-cols[open] summary::before{transform:rotate(45deg)}
.rpt-colcount{margin-left:auto;color:var(--muted);font-weight:500;font-size:.86em;font-variant-numeric:tabular-nums}
.rpt-cols .rpt-checks{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px;padding:0 0 4px}

/* accent swatches */
.rpt-swatches{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.rpt-swatch{--sw:#0E7490;width:32px;height:32px;min-height:0;padding:0;border-radius:50%;background:var(--sw);
  border:2px solid var(--card);box-shadow:0 0 0 1px var(--line)}
.rpt-swatch:hover{background:var(--sw);box-shadow:0 0 0 2px var(--muted)}
.rpt-swatch.on{box-shadow:0 0 0 2px var(--ink)}
.rpt-colorpick{position:relative;width:32px;height:32px;margin:0;border-radius:50%;overflow:hidden;
  box-shadow:0 0 0 1px var(--line);background:conic-gradient(#e11d48,#f59e0b,#22c55e,#06b6d4,#6366f1,#d946ef,#e11d48)}
.rpt-colorpick input{position:absolute;inset:-8px;width:48px;height:48px;padding:0;border:0;opacity:0;cursor:pointer}
.rpt-colorpick:focus-within{outline:2px solid var(--accent);outline-offset:2px}

/* logo */
.rpt-logo{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.rpt-logothumb{height:40px;width:auto;max-width:160px;object-fit:contain;background:#fff;border-radius:6px;padding:3px;border:1px solid var(--line)}
label.rpt-file{margin:0;text-transform:none;letter-spacing:normal;font-size:.88rem;color:var(--ink);cursor:pointer;position:relative}
label.rpt-file input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
label.rpt-file:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.rpt-logoopts{margin:10px 0 0}
.rpt-logomsg .msg,.rpt-msg .msg{margin:8px 0 0}
.rpt-msg .note{margin:8px 0 0}

/* actions */
.rpt-btns{display:flex;flex-wrap:wrap;gap:8px}
.rpt-btns .btn{flex:0 1 auto}
.rpt-sub{font-size:.9rem;margin:18px 0 4px}
.rpt-issued .scroll{margin-top:8px}
.rpt-issued td .btn{min-height:32px}

/* the stage and its paper */
.rpt-stagewrap{min-width:0;display:flex;flex-direction:column;gap:10px}
.rpt-stagebar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.rpt-stagenote{margin:0;flex:1 1 240px}
.rpt-stage{background:color-mix(in srgb,var(--card2) 70%,var(--bg));border-radius:var(--r-card);padding:20px;
  overflow:hidden;min-width:0;display:flex;justify-content:center}
.rpt-scaler{position:relative;flex:none;max-width:100%}
.rpt-paper{transform-origin:0 0;box-shadow:0 2px 6px rgba(0,0,0,.18),0 12px 32px rgba(0,0,0,.20);border-radius:2px}
.rpt-refused{width:100%;max-width:520px;align-self:flex-start}
.rpt-caption{margin:0;text-align:center}

@media (min-width:1100px){
  .rpt-layout{grid-template-columns:360px minmax(0,1fr)}
  .rpt-controls{position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto;overscroll-behavior:contain;
    padding-right:4px;scrollbar-width:thin}
}
@media (max-width:767px){
  .rpt-switch{display:inline-flex}
  .rpt-layout[data-mode="edit"] .rpt-stagewrap{display:none}
  .rpt-layout[data-mode="preview"] .rpt-controls{display:none}
  .rpt-stage{padding:10px}
  .rpt-docs{grid-template-columns:1fr}
  .rpt-cols .rpt-checks{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .rpt-cols summary::before{transition:none}
}
