/* ===========================================================================
   SKV Trip Sheet generator + printable card  (rebuilt 2026-05-30)
   Dark-navy glass UI to match the site; white card prints at 21 x 14 cm.
   =========================================================================== */

:root{
  --ts-ink:#0b1430;
  --ts-navy:#2b3aa0;
  --ts-teal:#2f9e7d;
  --ts-line:#9aa3b2;
}

.trip-sheet-page{ background:#050B16; }

.ts-shell{ max-width:1200px; margin:28px auto 60px; padding:0 18px; }

.ts-glass{
  background:linear-gradient(180deg,rgba(22,32,58,.72),rgba(10,16,30,.72));
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  padding:26px;
  box-shadow:0 30px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(14px);
}
.ts-glass.ts-narrow{ max-width:520px; margin:0 auto; }

.ts-header{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.ts-header h2{ margin:0; font-size:26px; color:#fff; letter-spacing:.3px; }
.ts-header p{ margin:6px 0 0; color:#9fb0cf; font-size:13.5px; }
.ts-user{ display:flex; align-items:center; gap:12px; color:#cdd8ee; font-size:13px; }

.ts-content{ display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
@media (max-width:960px){ .ts-content{ grid-template-columns:1fr; } }

.ts-panel{
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:20px;
  margin-top:18px;
}
.ts-content > .ts-panel{ margin-top:0; }
.ts-panel h3{ margin:0 0 14px; color:#fff; font-size:17px; }

.ts-glass label{ display:block; margin:12px 0 5px; font-size:12px; color:#9fb0cf; letter-spacing:.3px; }
.ts-glass input, .ts-glass select{
  width:100%; padding:11px 13px; border-radius:11px;
  background:rgba(7,12,24,.7); border:1px solid rgba(255,255,255,.12);
  color:#eef3ff; font-size:14px; outline:none; transition:border-color .15s, box-shadow .15s;
}
.ts-glass input:focus, .ts-glass select:focus{ border-color:var(--ts-teal); box-shadow:0 0 0 3px rgba(47,158,125,.18); }
.ts-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
.ts-grid-3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:0 14px; }
@media (max-width:560px){ .ts-grid-2,.ts-grid-3{ grid-template-columns:1fr; } }

.ts-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.ts-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:11px 20px; border-radius:11px; border:1px solid transparent;
  background:linear-gradient(135deg,var(--ts-teal),#1f7d63); color:#fff;
  font-weight:600; font-size:14px; cursor:pointer; text-decoration:none;
  transition:transform .12s ease, box-shadow .2s ease, filter .2s;
  box-shadow:0 14px 30px -14px rgba(47,158,125,.8);
}
.ts-btn:hover{ transform:translateY(-1px); filter:brightness(1.06); }
.ts-btn.ghost{ background:transparent; border-color:rgba(255,255,255,.18); color:#dfe7f7; box-shadow:none; }
.ts-btn.ghost:hover{ border-color:var(--ts-teal); color:#fff; }

.ts-alert{ padding:12px 15px; border-radius:11px; font-size:13.5px; margin-bottom:14px; }
.ts-alert.ok{ background:rgba(47,158,125,.14); border:1px solid rgba(47,158,125,.4); color:#bff0dd; }
.ts-alert.err{ background:rgba(229,77,90,.12); border:1px solid rgba(229,77,90,.4); color:#ffc9ce; }

.ts-preview-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.ts-note{ color:#8aa; font-size:12px; }

.ts-table-wrap{ overflow-x:auto; }
.ts-table{ width:100%; border-collapse:collapse; font-size:13.5px; color:#dbe4f5; }
.ts-table th, .ts-table td{ text-align:left; padding:9px 10px; border-bottom:1px solid rgba(255,255,255,.07); white-space:nowrap; }
.ts-table th{ color:#9fb0cf; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.4px; }
.ts-empty{ text-align:center; color:#8aa; padding:18px; }
.ts-rowacts{ display:flex; gap:12px; align-items:center; }
.ts-inline{ display:inline; }
.ts-link{ color:var(--ts-teal); text-decoration:none; font-weight:600; background:none; border:none; cursor:pointer; font-size:13.5px; padding:0; }
.ts-link:hover{ text-decoration:underline; }
.ts-link.danger{ color:#ff8a93; }
.ts-userform .ts-btn{ width:100%; }

.ts-toolbar{ display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; color:#fff; flex-wrap:wrap; }
.ts-toolbar h2{ margin:0; font-size:22px; }
.ts-toolbar p{ margin:4px 0 0; color:#9fb0cf; font-size:13px; }

/* ---- The printable card (matches the printed SKV pad) -------------------- */
.ts-print-area{ display:flex; justify-content:center; }
.ts-card{
  width:210mm; max-width:100%; aspect-ratio:210/140;
  background:#fff; color:#111; border-radius:10px; overflow:hidden;
  padding:9mm 11mm; box-sizing:border-box;
  font-family:"Segoe UI",Arial,sans-serif;
  box-shadow:0 30px 70px -30px rgba(0,0,0,.7);
  border:1px solid #e6e8ef;
}
.ts-card-head{ display:flex; justify-content:space-between; align-items:flex-start; }
.ts-brand{ display:flex; flex-direction:column; gap:3px; }
.ts-logo{ display:flex; align-items:center; gap:8px; }
.ts-logo-img{ height:16mm; width:auto; object-fit:contain; }
.ts-logo-mark{ width:24mm; height:14mm; }
.ts-logo-text{ display:flex; align-items:center; gap:5px; line-height:.92; }
.ts-skv{ font-size:26pt; font-weight:800; color:var(--ts-navy); letter-spacing:1px; }
.ts-tc{ font-size:8.5pt; font-weight:800; color:var(--ts-teal); letter-spacing:.5px; }
.ts-site{ font-size:9.5pt; color:#555; margin-left:1mm; }
.ts-phone{ font-size:13pt; font-weight:800; color:#111; white-space:nowrap; }
.ts-phone-ic{ color:var(--ts-teal); }

.ts-badge{
  margin:5mm auto 4mm; width:max-content; padding:2mm 9mm;
  background:var(--ts-navy); color:#fff; border-radius:7px;
  font-family:Georgia,"Times New Roman",serif; font-weight:700; font-size:16pt; letter-spacing:1px;
  box-shadow:0 6px 16px -8px rgba(43,58,160,.9);
}

.ts-rows{ display:flex; flex-direction:column; gap:3.4mm; margin-top:2mm; }
.ts-row{ display:flex; align-items:baseline; gap:2mm; font-size:11.5pt; }
.ts-l{ color:#111; font-weight:600; white-space:nowrap; }
.ts-l-r{ margin-left:auto; }
.ts-v{
  border-bottom:1.4px dotted #555; min-width:18mm; flex:0 0 auto;
  padding:0 2mm 1px; min-height:1em; font-weight:600; color:#0b1430;
}
.ts-v.ts-grow{ flex:1 1 auto; }
.ts-row-foot{ margin-top:2mm; }
.ts-sign{ flex:0 0 42mm; }

/* ---- Print ---------------------------------------------------------------- */
@media print{
  @page{ size:210mm 140mm; margin:0; }
  body{ background:#fff !important; }
  body.trip-sheet-page header,
  body.trip-sheet-page footer,
  body.trip-sheet-page .bg-grid,
  .no-print, .ts-toolbar, .ts-preview-header, .ts-header,
  .ts-content > .ts-panel:first-child{ display:none !important; }
  .ts-shell, .ts-glass, .ts-panel, .ts-preview-panel{
    margin:0 !important; padding:0 !important; border:none !important;
    background:transparent !important; box-shadow:none !important; backdrop-filter:none !important; max-width:none !important;
  }
  .ts-content{ display:block !important; }
  .ts-print-area{ display:block; }
  .ts-card{
    width:210mm; height:140mm; aspect-ratio:auto; border-radius:0;
    box-shadow:none; border:none; page-break-after:always;
  }
}
