/* ═══════════════════════════════════════════════════════════════════════
   TTMS Front — Issue Ticket Form  v5.0
   Mobile-first · touch-optimised · Velzon-matched
   ═══════════════════════════════════════════════════════════════════════ */

/* Speed note: no Google Fonts here — already loaded by dashboard */
*, *::before, *::after { box-sizing: border-box; }

/* ── Root — Velzon vars ──────────────────────────────────────────────── */
:root {
  --f-primary: #637dff;
  --f-primary-dark: #4560e0;
  --f-success: #0ab39c;
  --f-warning: #f7b84b;
  --f-danger: #f06548;
  --f-border: #ced4da;
  --f-border-focus: #637dff;
  --f-muted: #878a99;
  --f-body-bg: #f3f3f9;
  --f-card-bg: #fff;
  --f-card-border: rgba(0,0,0,.06);
  --f-card-shadow: 0 1px 2px rgba(56,65,74,.15);
  --f-radius: 10px;
  --f-radius-sm: 7px;
  --f-t: .13s;
}

/* ── Container ───────────────────────────────────────────────────────── */
.ttms-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #212529;
  /* Prevent double-tap zoom on buttons/inputs */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 600px) { .ttms-wrap { padding: 16px; } }
@media (min-width: 768px) { .ttms-wrap { padding: 20px; } }

/* ── Cards ───────────────────────────────────────────────────────────── */
.ttms-card {
  background: var(--f-card-bg);
  border: 1px solid var(--f-card-border);
  border-radius: var(--f-radius);
  padding: 0;
  box-shadow: var(--f-card-shadow);
  animation: ttmsFadeIn .2s ease-out;
  overflow: hidden;
}

/* Collapsible header */
.ttms-card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; cursor: pointer; user-select: none;
  background: var(--f-card-bg); transition: background .12s;
}
@media (min-width: 768px) { .ttms-card-hdr { padding: 14px 20px; } }
.ttms-card-hdr:hover { background: #f8f9fb; }
.ttms-card-hdr h3 {
  margin: 0; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: #495057; display: flex; align-items: center; gap: 8px;
  flex: 1;
}
.ttms-card-hdr .ttms-chev {
  font-size: 11px; color: #9ca3af;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0; margin-left: 8px;
}
.ttms-card.open > .ttms-card-hdr .ttms-chev { transform: rotate(180deg); }
.ttms-card.open > .ttms-card-hdr { border-bottom: 1px solid #f0f1f5; }
.ttms-card-hdr .ttms-sec-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d1d5db; flex-shrink: 0; transition: background .2s;
}
.ttms-card-hdr .ttms-sec-dot.filled { background: #0ab39c; }

/* Collapsible body */
.ttms-card-body {
  display: none; padding: 14px 14px 16px;
}
@media (min-width: 480px) { .ttms-card-body { padding: 16px 18px 18px; } }
@media (min-width: 768px) { .ttms-card-body { padding: 18px 22px 22px; } }
.ttms-card.open > .ttms-card-body { display: block; }

/* Driver card opens by default; Actions card always open */
.ttms-card h4 { margin: 16px 0 10px; font-size: 13px; font-weight: 600; color: #374151; }
.ttms-card-full { grid-column: 1 / -1; }

/* ── Grid ────────────────────────────────────────────────────────────── */
.ttms-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .ttms-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* ── Labels ──────────────────────────────────────────────────────────── */
label {
  display: block; margin-bottom: 10px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  color: #495057;
}
@media (max-width: 480px) {
  label { font-size: 12px; margin-bottom: 8px; }
}
label > span.ttms-hint { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: var(--f-muted); text-transform: none; letter-spacing: 0; }

/* ── Inputs — Velzon-matched, prevents iOS zoom ──────────────────────── */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100%; min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--f-border);
  border-radius: var(--f-radius-sm);
  font-size: 14px;           /* 16px on mobile to prevent iOS zoom handled per-breakpoint */
  font-family: inherit;
  color: #212529; background: #fff;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--f-t), box-shadow var(--f-t);
  line-height: 1.4;
}
/* Prevent iOS auto-zoom (font-size must be >= 16px on mobile) */
@media (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="number"],
  input[type="tel"], input[type="date"], input[type="datetime-local"],
  input[type="search"], select, textarea {
    font-size: 16px !important; min-height: 48px; padding: 12px 14px;
  }
}
/* Stop browser zoom on focus entirely */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select, textarea, input { font-size: 16px !important; }
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--f-primary);
  box-shadow: 0 0 0 3px rgba(99,125,255,.12);
}
input::placeholder { color: #adb5bd; font-size: .9em; }
input[readonly], input:disabled { background: #f8f9fa; color: #6c757d; cursor: not-allowed; }
textarea { min-height: 76px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 32px; cursor: pointer;
}

/* ── Row grids ───────────────────────────────────────────────────────── */
.ttms-row2, .ttms-row3, .ttms-row4 {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px;
}
.ttms-row2 label, .ttms-row3 label, .ttms-row4 label { margin-bottom: 0; }
@media (min-width: 560px)  { .ttms-row2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 680px)  { .ttms-row3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 560px)  { .ttms-row4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px)  { .ttms-row4 { grid-template-columns: repeat(4, 1fr); } }
/* Full-width stacking on small phones */
@media (max-width: 420px) {
  .ttms-row2, .ttms-row3, .ttms-row4 { grid-template-columns: 1fr !important; }
  .ttms-card-body { padding: 12px 14px 14px !important; }
  .ttms-wrap { padding: 8px !important; }
}

/* ── Officer header strip ────────────────────────────────────────────── */
.ttms-officer-header {
  background: linear-gradient(135deg, #1e2335, #2d3a5e);
  color: #fff; padding: 11px 16px; border-radius: 8px;
  margin-bottom: 14px; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  grid-column: 1 / -1;
}
.ttms-officer-breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ttms-officer-breadcrumb > span { display: flex; align-items: center; gap: 4px; }
.ttms-officer-breadcrumb > span::after { content: '·'; margin-left: 8px; opacity: .45; }
.ttms-officer-breadcrumb > span:last-child::after { display: none; }
.ttms-officer-edit-link { color: rgba(168,181,251,.8); text-decoration: none; font-size: 12px; }
.ttms-officer-edit-link:hover { color: #fff; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
button,
.ttms-primary,
.ttms-secondary,
.ttms-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--f-radius-sm);
  font-family: inherit; font-weight: 600; cursor: pointer;
  transition: all var(--f-t); text-decoration: none;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
  min-height: 38px; padding: 8px 18px; font-size: 13px;
}
@media (max-width: 768px) {
  button, .ttms-primary, .ttms-secondary { min-height: 44px; font-size: 15px; }
}
.ttms-primary   { background: var(--f-primary); color: #fff; box-shadow: 0 2px 6px rgba(99,125,255,.3); }
.ttms-primary:hover { background: var(--f-primary-dark); transform: translateY(-1px); }
.ttms-secondary { background: #f8f9fa; color: #374151; border: 1px solid var(--f-border); }
.ttms-secondary:hover { background: #e9ecef; border-color: #adb5bd; }
.ttms-mini { min-height: 32px; padding: 6px 12px; font-size: 12px; background: #f3f3f9; color: #495057; border: 1px solid #e9ebec; }
.ttms-mini:hover { background: #e9ebec; }
.ttms-retry-btn { min-height: 38px; padding: 8px 12px; font-size: 18px; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 7px; cursor: pointer; flex-shrink: 0; }

/* Button rows */
.ttms-btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 479px) { .ttms-btn-row { flex-direction: column; } .ttms-btn-row button { width: 100%; } }

/* ── Lookup row (identifier input + search icon) ─────────────────────── */
.ttms-id-search-wrap {
  position: relative; display: flex; align-items: stretch;
}
/* Two buttons (camera + search) = 84px total right padding */
.ttms-id-search-wrap input {
  flex: 1; min-width: 0; margin-bottom: 0; padding-right: 88px !important;
}

/* Search icon — rightmost button */
#ttms_driver_id_search_btn {
  position: absolute; right: 0; top: 0; bottom: 0; width: 42px;
  background: none; border: none;
  border-left: 1px solid var(--f-border);
  border-radius: 0 var(--f-radius-sm) var(--f-radius-sm) 0;
  color: var(--f-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--f-t), color var(--f-t), border-color var(--f-t);
  min-height: unset; padding: 0;
}
#ttms_driver_id_search_btn:hover  { background: rgba(99,125,255,.08); color: var(--f-primary); border-color: var(--f-primary); }
#ttms_driver_id_search_btn.searching { animation: ttmsSpin .55s linear infinite; color: var(--f-primary); }

/* Camera scan icon — left of search button */
#ttms_scan_licence_btn {
  position: absolute; right: 42px; top: 0; bottom: 0; width: 44px;
  background: none; border: none;
  border-left: 1px solid var(--f-border);
  color: var(--f-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--f-t), color var(--f-t);
  min-height: unset; padding: 0;
}
#ttms_scan_licence_btn:hover  { background: rgba(10,179,156,.08); color: var(--f-success); }
#ttms_scan_licence_btn.scanning { color: var(--f-success); animation: ttmsScanPulse 1s ease-in-out infinite; }
@keyframes ttmsScanPulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
.ttms-lookup-row { display: flex; gap: 8px; align-items: stretch; }
.ttms-lookup-row input { flex: 1; min-width: 0; margin-bottom: 0; }
.ttms-lookup-row button { flex-shrink: 0; }

/* DLA-locked field */
.ttms-id-search-wrap input[readonly] { background: #f8f9fa !important; cursor: not-allowed !important; }

/* ── Plate lookup ────────────────────────────────────────────────────── */
.ttms-plate-lookup-row {
  margin: 12px 0; padding: 12px 16px;
  background: rgba(99,125,255,.06); border: 1px solid rgba(99,125,255,.2);
  border-radius: 8px;
}
.ttms-plate-lookup-row label { color: var(--f-primary); font-size: 12px; font-weight: 700; margin-bottom: 8px; }

/* ── Offence search dropdown ─────────────────────────────────────────── */
.ttms-offence-dropdown {
  position: absolute; z-index: 1000;
  background: #fff; border: 1px solid var(--f-border);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  max-height: 320px; overflow-y: auto; width: 100%; margin-top: 4px;
}
.ttms-offence-option {
  padding: 12px 16px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f3f3f9; line-height: 1.4;
}
.ttms-offence-option:hover { background: rgba(99,125,255,.06); }
.ttms-offence-option:last-child { border-bottom: none; }
.ttms-offence-option strong { color: var(--f-primary); font-weight: 700; display: block; font-size: 12px; }
.ttms-offence-option em { color: var(--f-muted); font-size: 12px; font-style: normal; }

/* ── Offence rows ────────────────────────────────────────────────────── */
.ttms-offence-row { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #e9ebec; }
.ttms-offence-row:last-child { border-bottom: none; }
#ttms_offence_total { margin-top: 10px; padding: 10px 16px; background: rgba(99,125,255,.06); border: 1px solid rgba(99,125,255,.2); border-radius: 7px; font-weight: 700; color: var(--f-primary); font-size: 15px; }

/* ── GPS ─────────────────────────────────────────────────────────────── */
.ttms-gps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
#ttms_location_inner { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { #ttms_location_inner, .ttms-location-grid { grid-template-columns: 1fr 1fr; } }
#ttms_gps_btn { width: 100%; background: rgba(99,125,255,.06); color: var(--f-primary); border: 1px solid rgba(99,125,255,.2); }
#ttms_gps_btn:hover { background: rgba(99,125,255,.12); }
#ttms_map { height: 160px !important; }
@media (min-width: 700px) { #ttms_map { height: 220px !important; } }

/* ── Evidence ────────────────────────────────────────────────────────── */
.ttms-dropzone {
  border: 2px dashed #d1d5db; border-radius: 8px; padding: 24px 16px;
  text-align: center; transition: all var(--f-t); cursor: pointer; background: #f9fafb;
}
.ttms-dropzone:hover { border-color: var(--f-primary); background: rgba(99,125,255,.04); }
.ttms-dropzone input[type="file"] { display: none; }
.ttms-dropzone-hint { color: var(--f-muted); font-size: 13px; margin-bottom: 10px; }
.ttms-evidence-list { list-style: none; padding: 0; margin: 10px 0 0; }
.ttms-evidence-list li { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: #fff; border: 1px solid #e9ebec; border-radius: 7px; margin-bottom: 7px; font-size: 12px; gap: 8px; }

/* ── Actions row ─────────────────────────────────────────────────────── */
.ttms-actions-row { display: flex; gap: 12px; margin-bottom: 14px; padding: 12px 16px; background: #f8f9fa; border-radius: 8px; flex-wrap: wrap; align-items: center; }
.ttms-check-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; margin: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.ttms-check-label input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; cursor: pointer; accent-color: var(--f-primary); flex-shrink: 0; }
.ttms-email-label { flex: 1; min-width: 200px; margin: 0; }

/* ── Status / messages ───────────────────────────────────────────────── */
#ttms_messages { margin-top: 12px; }
.ttms-notice { padding: 11px 16px; border-radius: 7px; margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.ttms-notice.ttms-success { background: rgba(10,179,156,.08); border: 1px solid rgba(10,179,156,.25); color: #065f46; }
.ttms-notice.ttms-error   { background: rgba(240,101,72,.08); border: 1px solid rgba(240,101,72,.25); color: #991b1b; }
.ttms-notice.ttms-warning { background: rgba(247,184,75,.08); border: 1px solid rgba(247,184,75,.3);  color: #92400e; }
.ttms-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--f-muted); font-weight: 400; line-height: 1.4; text-transform: none; letter-spacing: 0; }

/* ── DLA status text ─────────────────────────────────────────────────── */
#ttms_driver_id_status, #ttms_driver_plate_status,
#ttms_vehicle_status   { font-size: 12px; font-weight: 500; margin-top: 5px; display: block; }

/* ── Preview ─────────────────────────────────────────────────────────── */
.ttms-preview-card { margin-top: 20px; border: 2px solid var(--f-primary); }
.ttms-preview-card h3 { color: var(--f-primary); }
#ttms_preview_iframe { width: 100%; height: 600px; border: 1px solid #e9ebec; border-radius: 7px; background: #fff; }
@media (min-width: 768px) { #ttms_preview_iframe { height: 800px; } }

/* ── Outstanding balance card ────────────────────────────────────────── */
.ttms-balance-card { background: rgba(247,184,75,.08); border: 1px solid rgba(247,184,75,.3); border-left: 4px solid var(--f-warning); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; grid-column: 1 / -1; }
.ttms-balance-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ttms-balance-title  { font-size: 12px; font-weight: 700; color: #92400e; }
.ttms-balance-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (min-width: 480px) { .ttms-balance-grid { grid-template-columns: repeat(4, 1fr); } }
.ttms-balance-item   { background: rgba(255,255,255,.7); border-radius: 5px; padding: 6px 8px; text-align: center; }
.ttms-balance-label  { font-size: 9px; font-weight: 700; text-transform: uppercase; color: #92400e; margin-bottom: 2px; letter-spacing: .4px; }
.ttms-balance-value  { font-size: 15px; font-weight: 800; color: #78350f; }
.ttms-balance-amount { color: #991b1b; }
.ttms-balance-details { background: rgba(255,255,255,.8); border-radius: 5px; padding: 8px; font-size: 11px; max-height: 150px; overflow-y: auto; }
.ttms-balance-ticket { display: flex; justify-content: space-between; padding: 5px 4px; border-bottom: 1px solid rgba(247,184,75,.3); font-size: 11px; }
.ttms-balance-ticket:last-child { border-bottom: none; }
.ttms-balance-ticket-no { font-weight: 600; color: #92400e; }

/* ── Owner from vehicle ──────────────────────────────────────────────── */
.ttms-owner-from-vehicle { margin-top: 14px; padding: 14px; background: rgba(10,179,156,.06); border: 1px solid rgba(10,179,156,.2); border-radius: 8px; }
.ttms-owner-from-vehicle h4 { margin-top: 0; color: #065f46; }

/* ── DLA fields ──────────────────────────────────────────────────────── */
.ttms-dmv-fields { background: #f8f9fa; padding: 14px; border-radius: 8px; border: 1px solid #e9ebec; }
.ttms-dmv-fields .ttms-row4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .ttms-dmv-fields .ttms-row4 { grid-template-columns: repeat(4, 1fr); } }

/* ── Demerit badge ───────────────────────────────────────────────────── */
#ttms_demerit_badge { grid-column: 1 / -1; margin-bottom: 10px; }

/* ── Owner picker ────────────────────────────────────────────────────── */
#ttms_owner_picker_list > div {
  padding: 12px 14px; border: 1px solid #e9ebec; border-radius: 7px;
  cursor: pointer; font-size: 13px; background: #fff; transition: all var(--f-t);
}
#ttms_owner_picker_list > div:hover { border-color: var(--f-primary); background: rgba(99,125,255,.04); }

/* ── New person form inputs ──────────────────────────────────────────── */
.ttms-np-input {
  width: 100%; min-height: 36px; padding: 7px 10px;
  border: 1px solid #ced4da; border-radius: 6px;
  font-size: 13px; font-family: inherit;
  transition: border-color var(--f-t), box-shadow var(--f-t);
}
.ttms-np-input:focus { border-color: var(--f-primary); box-shadow: 0 0 0 3px rgba(99,125,255,.1); outline: none; }

/* ── Public pages ────────────────────────────────────────────────────── */
.ttms-public h2 { margin-top: 0; font-size: 20px; color: #16213e; border-bottom: 2px solid var(--f-primary); padding-bottom: 10px; margin-bottom: 16px; }
.ttms-public table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ttms-public table th { background: #f8f9fb; padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; border-bottom: 1px solid #e9ebec; text-transform: uppercase; letter-spacing: .4px; }
.ttms-public table td { padding: 10px 12px; border-bottom: 1px solid #f3f3f9; }
.ttms-public table tr:hover td { background: #f8f9fb; }
@media (max-width: 600px) { .ttms-public .ttms-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid #e9ebec; } .ttms-public table { min-width: 500px; } }

/* ── Loading ─────────────────────────────────────────────────────────── */
.ttms-loading { opacity: .55; pointer-events: none; }
.ttms-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid rgba(99,125,255,.2); border-top-color: var(--f-primary); border-radius: 50%; animation: ttmsSpin .7s linear infinite; }

/* ── Offence search ──────────────────────────────────────────────────── */
#ttms_offence_search { font-size: 14px !important; }
@media (max-width: 768px) { #ttms_offence_search { font-size: 16px !important; min-height: 48px !important; } }

/* ── Create button ───────────────────────────────────────────────────── */
#ttms_create_btn { background: var(--f-success); font-size: 15px; min-height: 44px; flex: 2; }
#ttms_create_btn:hover { background: #099387; }
#ttms_preview_btn { flex: 1; }

/* ── Floating clear button ───────────────────────────────────────────── */
#ttms-clear-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--f-danger); color: #fff; border: none;
  border-radius: 50px; padding: 10px 18px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(240,101,72,.35);
  display: none; align-items: center; gap: 6px;
  transition: transform var(--f-t), box-shadow var(--f-t);
  min-height: unset;
}
#ttms-clear-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240,101,72,.45); }

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes ttmsFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ttmsSpin   { to { transform: rotate(360deg); } }

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  .ttms-wrap { max-width: 100%; }
  .ttms-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  button, .ttms-btn-row, .ttms-dropzone, .ttms-plate-lookup-row, .ttms-officer-edit-link, #ttms-clear-btn { display: none !important; }
}

/* ── Mobile spacer label fix ─────────────────────────────────────────── */
@media (max-width: 519px) { label[style*="visibility:hidden"] { display: none !important; } }

/* ── Dashboard inner-page compat ─────────────────────────────────────── */
.ttms-dash-content input[type="text"],
.ttms-dash-content input[type="email"],
.ttms-dash-content input[type="number"],
.ttms-dash-content input[type="tel"],
.ttms-dash-content input[type="date"],
.ttms-dash-content select,
.ttms-dash-content textarea { min-height: 38px; font-size: 13px; padding: 8px 12px; }

/* ── Mobile: prevent zoom & improve touch targets ──────────────────────── */
@media (max-width: 767px) {
  /* Prevent select zoom on iOS */
  select { font-size: 16px !important; min-height: 44px !important; }
  /* Wider tap targets for buttons */
  .ttms-btn, button[type="button"], button[type="submit"] { min-height: 48px; }
  /* Full-width card bodies on small screens */
  .ttms-card-body { padding: 12px 12px 14px !important; }
  /* Ensure ID value field is tall enough to tap */
  .ttms-id-search-wrap input { min-height: 48px; font-size: 16px; }
  /* Driver row full width on mobile */
  .ttms-row2 { gap: 8px; }
  /* Address textarea taller on mobile for easier editing */
  textarea#ttms_driver_address { min-height: 88px; }
  /* New person form better spacing */
  #ttms-new-person-form .ttms-row2,
  #ttms-new-person-modal .ttms-row2 { grid-template-columns: 1fr; }
}
/* Extra: ensure no input is ever smaller than 44px tall (accessibility) */
input, select, textarea { min-height: 44px; }
textarea { min-height: 80px; }
