.tickets-page{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.tickets-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

.tickets-header h1{
  font-size:26px;
  font-weight:700;
}

.tickets-header p{
  margin-top:4px;
  color:#94a3b8;
  font-size:13px;
}

.tickets-stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:14px;
}

.stat-card{
  background: linear-gradient(180deg, #16233f, #0f172a);
  border: 1px solid rgba(255,255,255,.05);
  border-radius:16px;
  padding:14px 16px;
}

.stat-card.danger{
  border-color: rgba(239,68,68,.22);
}

.stat-label{
  color:#94a3b8;
  font-size:12px;
  margin-bottom:6px;
}

.stat-value{
  font-size:22px;
  font-weight:800;
  letter-spacing:.2px;
}

.stat-sub{
  margin-top:6px;
  color: rgba(255,255,255,.55);
  font-size:12px;
}

@media (max-width: 1050px){
  .tickets-stats{ grid-template-columns: repeat(2, 1fr); }
}

.tickets-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.table-wrap{
  overflow:auto;
  max-height: 650px;
}

/* Scrollbar clean */
.table-wrap::-webkit-scrollbar{ width: 10px; height:10px; }
.table-wrap::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.18); border-radius: 999px; border: 2px solid rgba(255,255,255,.06); }
.table-wrap::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,.28); }

.tickets-table{
  width:100%;
  border-collapse:collapse;
  min-width: 1100px;
}

.tickets-table thead{
  background: rgba(59,130,246,0.08);
}

.tickets-table th{
  text-align:left;
  padding:14px 16px;
  font-size:12.5px;
  font-weight:700;
  color:#cbd5e1;
}

.tickets-table td{
  padding:14px 16px;
  font-size:13px;
  color:#94a3b8;
  border-top: 1px solid rgba(255,255,255,0.05);
  vertical-align:top;
}

.tickets-table tr:hover{
  background: rgba(59,130,246,0.05);
}

.ticket-number{
  font-weight:800;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  display:inline-block;
}

.ticket-type{
  font-weight:700;
  color: rgba(255,255,255,.88);
}

.sub-info{
  margin-top:4px;
  font-size:12px;
  color: rgba(255,255,255,.50);
}

.ticket-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border: 1px solid rgba(255,255,255,.10);
}

.ticket-status.unpaid{
  background: rgba(234,179,8,.14);
  border-color: rgba(234,179,8,.25);
  color: rgba(255,255,255,.92);
}

.ticket-status.paid{
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.25);
  color: rgba(255,255,255,.92);
}

.ticket-status.void{
  background: rgba(148,163,184,.12);
  border-color: rgba(148,163,184,.18);
  color: rgba(255,255,255,.78);
}

.ticket-status.contested{
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.24);
  color: rgba(255,255,255,.92);
}

/* Modal */
.ticket-modal .modal-body{
  padding: 16px 18px;
}

.ticket-section{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.section-title{
  font-weight:900;
  letter-spacing:.2px;
  margin-bottom: 10px;
}

.ticket-body .grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.ticket-body .grid-3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
}

.form-group.full{
  grid-column: 1 / -1;
}

.speeding-box{
  margin-top:12px;
  background: rgba(29,78,216,.10);
  border: 1px solid rgba(29,78,216,.20);
  border-radius: 14px;
  padding: 12px;
  display:none;
}

.speeding-title{
  font-weight:900;
  margin-bottom: 10px;
}

/* Citizen picker */
.citizen-pick{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:12px;
  align-items:start;
}

.pick-results{
  margin-top:10px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(15,23,42,.65);
  max-height: 220px;
  overflow:auto;
}

.pick-results::-webkit-scrollbar{ width: 10px; }
.pick-results::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.18); border-radius: 999px; border: 2px solid rgba(255,255,255,.06); }
.pick-hint{
  padding: 12px;
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
}

.pick-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 10px 12px;
  cursor:pointer;
  border-top: 1px solid rgba(255,255,255,.05);
}

.pick-row:hover{
  background: rgba(255,255,255,.05);
}

.pick-name{
  font-weight:800;
  color: rgba(255,255,255,.92);
  font-size: 13px;
}

.pick-sub{
  margin-top:3px;
  font-size:12px;
  color: rgba(255,255,255,.55);
}

.pick-meta{
  color: rgba(255,255,255,.55);
  font-size: 12px;
  white-space:nowrap;
}

.citizen-picked{
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.16);
  padding: 12px;
  background: rgba(255,255,255,.02);
  min-height: 116px;
}

.picked-empty{
  color: rgba(255,255,255,.65);
  font-weight:800;
}
.picked-sub{
  margin-top:6px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  font-weight:500;
}

.picked-card .picked-name{
  font-size: 14px;
  font-weight:900;
  color: rgba(255,255,255,.92);
}

.picked-actions{
  margin-top:10px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}

/* Footer buttons */
.ticket-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* =========================
   INPUT / SELECT THEME (fix blanc)
========================= */

.tickets-page .input{
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;

  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);

  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.tickets-page .input::placeholder{
  color: rgba(255,255,255,.45);
}

.tickets-page .input:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
  background: rgba(15,23,42,.85);
}

/* SELECT (dropdown) */
.tickets-page select.input{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,.75) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* options (certains navigateurs only) */
.tickets-page select.input option{
  background: #0f172a;
  color: rgba(255,255,255,.92);
}

/* Date inputs (le texte/mm/dd/yyyy) */
.tickets-page input[type="date"].input,
.tickets-page input[type="datetime-local"].input{
  color-scheme: dark; /* rend le picker + texte cohérent dark */
}

/* Petit fix toolbar pour éviter que ça s’écrase */
.tickets-page .tickets-toolbar .input{
  min-width: 220px;
}

/* =========================
   CITIZEN PICKER INPUT FIX
========================= */

.ticket-section .input{
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;

  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);

  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.ticket-section .input::placeholder{
  color: rgba(255,255,255,.45);
}

.ticket-section .input:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
  background: rgba(15,23,42,.85);
}

.pick-results{
  margin-top:10px;
  border-radius:12px;
  overflow:hidden;

  background: rgba(15,23,42,.75);
  border: 1px solid rgba(255,255,255,.06);
}

/* =========================
   SELECT DROPDOWN DARK
========================= */

select.input{
  background: rgba(15,23,42,.75);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.08);
}

/* options dans la liste */
select.input option{
  background-color: #0f172a;
  color: rgba(255,255,255,.92);
}

/* option sélectionnée */
select.input option:checked{
  background-color: #1d4ed8;
  color: white;
}

/* hover (certains navigateurs) */
select.input option:hover{
  background-color: #1e40af;
}

/* =========================
   VIEW MODAL (beautiful)
========================= */

.ticket-view-modal .modal-body{
  padding: 16px 18px;
}

.view-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
}

.view-sub{
  margin-top:4px;
  font-size:12px;
  color: rgba(255,255,255,.55);
}

.view-badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.view-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
}

.view-badge.blue{
  background: rgba(59,130,246,.16);
  border-color: rgba(59,130,246,.28);
}

.view-badge.red{
  background: rgba(239,68,68,.16);
  border-color: rgba(239,68,68,.28);
}

.view-badge.green{
  background: rgba(34,197,94,.16);
  border-color: rgba(34,197,94,.28);
}

.view-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.view-card{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 14px;
  min-height: 110px;
}

.view-card.full{
  grid-column: 1 / -1;
}

.view-card-title{
  font-weight: 900;
  margin-bottom: 10px;
  color: rgba(255,255,255,.90);
  letter-spacing:.2px;
}

.view-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}

.view-row:first-child{
  border-top: 0;
  padding-top: 0;
}

.view-k{
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
}

.view-v{
  color: rgba(255,255,255,.92);
  font-weight: 800;
  font-size: 13px;
  text-align:right;
}

.view-note{
  color: rgba(255,255,255,.80);
  line-height: 1.35;
  white-space: pre-wrap;
}

.view-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

.confirm-modal{
  width: 520px;
  max-width: calc(100vw - 30px);
  border-radius: 16px;
}