:root{--red:#ed1c24;--yellow:#ffd800;--blue:#323a8c;--navy:#11142f;--black:#050505;--card:#11131d;--line:#2a2f42}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#181d44,#050505 55%);color:#f5f5f5;font-family:Inter,system-ui,sans-serif;min-height:100vh}.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:1px}.brand img{width:52px;height:52px;object-fit:contain}.glass{background:rgba(17,19,29,.88);border:1px solid var(--line);box-shadow:0 20px 80px #0008;border-radius:24px}.app{max-width:1080px;margin:auto;padding:16px}.hero{text-align:center;padding:24px 8px}.hero h1{margin:6px 0;color:var(--yellow);font-size:clamp(1.5rem,4vw,2.5rem)}.muted{color:#aeb4c7}.progress-wrap{position:sticky;top:0;z-index:20;background:#0b0d16eF;padding:12px;border-radius:16px;margin-bottom:12px}.progress{height:12px;background:#24283a;border-radius:99px;overflow:hidden}.progress>i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--red),var(--yellow));transition:.4s}.steps{display:flex;justify-content:space-between;font-size:.72rem;color:#9ca3af;margin-top:8px}.step{display:none}.step.active{display:block;animation:in .35s ease}@keyframes in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}.section{padding:18px}.section h2{margin-top:0;color:var(--yellow);font-size:1.2rem}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.full{grid-column:1/-1}label{font-size:.82rem;font-weight:700;color:#d8dbea;display:block;margin-bottom:5px}input,select,textarea{width:100%;border:1px solid #363c51;background:#090b12;color:#fff;border-radius:12px;padding:13px;outline:0;transition:.2s}input:focus,select:focus{border-color:var(--yellow);box-shadow:0 0 0 3px #ffd80018}.actions{display:flex;gap:10px;justify-content:space-between;margin-top:18px}.btn{border:0;border-radius:12px;padding:13px 18px;font-weight:800;cursor:pointer}.primary{background:linear-gradient(90deg,var(--red),#f04b20);color:white}.secondary{background:#24283a;color:#fff}.choice{display:flex;gap:8px;flex-wrap:wrap}.choice button{border:1px solid #424960;background:#10131f;color:#fff;padding:11px 15px;border-radius:10px}.choice button.active{border-color:var(--yellow);background:#ffd80018;color:var(--yellow)}.address{border-left:3px solid var(--blue);padding-left:12px;margin-top:10px}.admin-nav{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#0b0d16;border-bottom:1px solid #292d3e}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid #292d3e;text-align:left;white-space:nowrap}th{color:var(--yellow)}.stat{padding:18px}.stat b{font-size:2rem;color:var(--yellow)}@media(max-width:700px){.grid{grid-template-columns:1fr}.full{grid-column:auto}.app{padding:10px}.section{padding:14px}.hero{padding:12px}.actions{position:sticky;bottom:0;background:#11131df5;padding:10px;border-top:1px solid #333}.btn{flex:1}.steps{font-size:.58rem}.admin-nav{position:sticky;top:0;z-index:10}}
/* ===== 234 SC EXPERIENCE v2 ===== */
:root{--red:#ef2028;--red2:#ff4b2e;--gold:#ffd52f;--blue:#27388f;--blue2:#566ad0;--ink:#07090f;--panel:#111622;--panel2:#151b2a;--muted:#9da8bd;--line:#2b3855;--ok:#31c48d}
body{background:radial-gradient(900px 500px at 50% -180px,#27367d 0%,#11182d 34%,#05070c 76%);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.01em}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.06;background-image:radial-gradient(circle at 25% 25%,#fff 0 1px,transparent 1.5px),radial-gradient(circle at 70% 70%,#fff 0 1px,transparent 1.5px);background-size:42px 42px,57px 57px}
.app{max-width:1120px;padding:18px 14px 120px}.hero{padding:30px 8px 26px}.hero h1{font-size:clamp(2rem,6vw,3.6rem);letter-spacing:-.04em;text-shadow:0 10px 40px #000}.hero .muted{font-size:1rem}.brand{font-size:1.05rem}.brand img{width:58px;height:58px;border-radius:50%;filter:drop-shadow(0 8px 18px #0008)}
.glass{background:linear-gradient(145deg,rgba(22,27,41,.96),rgba(12,15,24,.97));border:1px solid #2c3957;border-radius:28px;box-shadow:0 30px 100px #0008, inset 0 1px #ffffff08}.progress-wrap{top:8px;padding:14px 14px 12px;border:1px solid #17223c;background:#0b1020f5;box-shadow:0 16px 45px #0008}.progress-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:9px;gap:12px}.progress-head b{color:#fff}.progress-head strong{font-size:1.35rem;color:var(--gold)}.progress-head small{color:var(--muted);display:block}.progress{height:14px;border:1px solid #313b54;background:#20263a;box-shadow:inset 0 1px 5px #0008}.progress>i{background:linear-gradient(90deg,var(--red),#ff762c 46%,var(--gold));box-shadow:0 0 22px #ff5c2e77}.wizard-steps{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-top:12px}.wizard-steps button{appearance:none;border:0;background:transparent;color:#8f99ae;font-weight:700;font-size:.74rem;padding:8px 3px;border-radius:9px;cursor:pointer}.wizard-steps button.active{color:#fff;background:#273252}.wizard-steps button.done{color:var(--gold)}
.step.active{animation:wizardIn .45s cubic-bezier(.2,.8,.2,1)}@keyframes wizardIn{from{opacity:0;transform:translateX(20px) scale(.99)}to{opacity:1;transform:none}}.section{padding:24px}.section h2{font-size:1.35rem;margin-bottom:20px}.section h2:before{content:"";display:inline-block;width:8px;height:25px;border-radius:10px;background:linear-gradient(var(--red),var(--gold));vertical-align:-5px;margin-right:10px}.step-intro{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:22px}.step-intro p{margin:4px 0 0;color:var(--muted);font-size:.88rem}.step-badge{background:#222b46;border:1px solid #39476c;color:var(--gold);padding:8px 12px;border-radius:99px;font-weight:800;font-size:.75rem}
.grid{gap:15px}.full{grid-column:1/-1}label{font-size:.84rem;color:#d5dcec;margin:0 0 7px}label em{color:#ff6659;font-style:normal}input,select{background:#0b101a;border:1px solid #35425f;border-radius:14px;padding:14px 15px;min-height:51px;color:#f8fafc;font-size:.95rem}input::placeholder{color:#758198}input:hover,select:hover{border-color:#566785}input:focus,select:focus{border-color:var(--gold);box-shadow:0 0 0 4px #ffd80014}.field-hint{display:block;color:#90a2bf;margin-top:6px;font-size:.72rem}
.address-card{position:relative;border:1px solid #334364;border-left:4px solid var(--blue2);padding:18px;border-radius:18px;background:linear-gradient(110deg,#121a2b,#0d121c);margin:0}.address-title{display:flex;gap:12px;align-items:center;margin-bottom:18px}.address-title h3{margin:0;font-size:1.05rem}.address-title p{margin:3px 0;color:var(--muted);font-size:.78rem}.address-number{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(135deg,#30489f,#1c255d);font-weight:900;color:var(--gold)}
.choice{gap:10px}.choice button{min-width:86px;border:1px solid #3b4966;background:#121a2a;color:#e9eef8;padding:11px 18px;border-radius:12px;font-weight:800;cursor:pointer}.choice button.active{background:linear-gradient(135deg,#3b3310,#211e10);border-color:var(--gold);color:var(--gold);box-shadow:0 0 0 3px #ffd80012}.choice-title{margin-top:18px}.section hr{border:0;border-top:1px solid #3a4355;margin:18px 0}
.actions{position:sticky;bottom:10px;z-index:15;background:#111827f8;backdrop-filter:blur(16px);border-top:1px solid #34425e;border-radius:0 0 28px 28px;margin-top:0;padding:16px 24px}.btn{border-radius:14px;min-height:50px;padding:12px 21px;letter-spacing:.02em}.primary{background:linear-gradient(100deg,#ff2632,#ff5733);box-shadow:0 10px 24px #ef202844}.primary:hover{transform:translateY(-1px);filter:brightness(1.08)}.secondary{background:#222a3e;border:1px solid #394662}.btn:disabled{opacity:.45;cursor:not-allowed}
.ts-wrapper{width:100%}.ts-control{background:#0b101a!important;border:1px solid #35425f!important;border-radius:14px!important;padding:11px 14px!important;min-height:51px!important;box-shadow:none!important}.ts-wrapper.focus .ts-control{border-color:var(--gold)!important;box-shadow:0 0 0 4px #ffd80014!important}.ts-control input{min-height:25px!important;padding:0!important;border:0!important;box-shadow:none!important}.ts-dropdown{background:#121a28!important;border:1px solid #43506d!important;color:#fff!important;border-radius:13px!important;overflow:hidden;box-shadow:0 20px 50px #000b!important}.ts-dropdown .option{padding:11px 14px!important}.ts-dropdown .active{background:#263252!important;color:var(--gold)!important}.ts-wrapper.disabled .ts-control{opacity:.5}
.history-card{border:1px solid #33415e;border-radius:16px;padding:15px;background:#0c111c;margin-bottom:12px}.history-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px;color:var(--gold)}.history-remove{border:0;background:#321a20;color:#ff9292;border-radius:9px;padding:8px 10px;cursor:pointer}.check-line{display:flex;align-items:center;gap:8px;margin-top:12px}.check-line input{width:18px;min-height:18px}
.empty-notice{border:1px dashed #4a5b7d;border-radius:18px;padding:34px;text-align:center;background:#0c111c;color:#aeb9cf}.empty-notice i{display:block;font-size:2rem;color:var(--gold);margin-bottom:10px}.admin-nav{background:linear-gradient(90deg,#0b101b,#131a2c);border-bottom:1px solid #34415c}.admin-brand{display:flex;align-items:center;gap:10px}.admin-brand img{width:40px;height:40px;object-fit:contain}.admin-shell{max-width:1280px}.admin-header{display:flex;justify-content:space-between;align-items:end;gap:16px;margin:20px 0}.admin-header h1{margin:0;color:var(--gold)}.admin-header p{margin:5px 0;color:var(--muted)}.stat{position:relative;overflow:hidden;padding:20px}.stat:after{content:"";position:absolute;width:110px;height:110px;border-radius:50%;right:-35px;top:-40px;background:#384a9b33}.stat b{font-size:2.4rem}.filter-card{margin-top:16px}.filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:12px}.dataTables_wrapper{color:#d9e0ed}.dataTables_wrapper .dataTables_filter input,.dataTables_wrapper .dataTables_length select{background:#0b101a;color:#fff;border:1px solid #35425f;border-radius:10px;padding:8px}.dataTables_wrapper table.dataTable{border-collapse:collapse!important}.dataTables_wrapper .dataTables_paginate .paginate_button{color:#d9e0ed!important}.dataTables_wrapper .dataTables_paginate .paginate_button.current{background:#273252!important;color:var(--gold)!important;border:1px solid #43527a!important}.dataTables_wrapper .dt-buttons .dt-button{background:#232d46;color:#fff;border:1px solid #3d4c70;border-radius:9px;padding:8px 12px;margin-right:5px}.dataTables_empty{padding:28px!important;color:#aeb9cf!important}
@media(max-width:700px){.app{padding:10px 10px 100px}.hero{padding:17px 5px 18px}.hero h1{font-size:2rem}.brand{font-size:.84rem}.brand img{width:46px;height:46px}.progress-wrap{top:0;border-radius:0 0 18px 18px;margin:0 -2px 10px}.progress-head b{font-size:.9rem}.progress-head strong{font-size:1.15rem}.wizard-steps{overflow:auto;display:flex;gap:5px;padding-bottom:2px}.wizard-steps button{min-width:72px;white-space:nowrap;font-size:.68rem}.section{padding:17px 14px;border-radius:22px}.section h2{font-size:1.2rem}.grid{grid-template-columns:1fr}.full{grid-column:auto}.address-card{padding:14px}.actions{bottom:0;border-radius:0;padding:12px;gap:7px}.actions .btn{padding:10px 9px;font-size:.75rem}.filter-grid{grid-template-columns:1fr}.admin-header{align-items:start;flex-direction:column}.history-head{align-items:start;gap:10px;flex-direction:column}}

/* ===== Reliability fixes ===== */
.ts-wrapper{position:relative;z-index:1}
.ts-wrapper.focus{z-index:50}
.ts-control,.ts-control .item,.ts-control input{color:#f8fafc!important;text-shadow:none!important}
.ts-control .item{opacity:1!important}
.ts-dropdown{z-index:99999!important;background:#121a28!important;color:#f8fafc!important;max-height:300px!important}
.ts-dropdown .option{color:#f8fafc!important;background:#121a28!important}
.ts-dropdown .option.active,.ts-dropdown .option:hover{background:#263252!important;color:#ffd52f!important}
.ts-dropdown .create{color:#f8fafc!important}
.flatpickr-calendar{z-index:100000!important;background:#121a28!important;border:1px solid #43506d!important;box-shadow:0 24px 70px #000c!important}
.flatpickr-calendar *{color:#f8fafc!important}
.flatpickr-day:hover,.flatpickr-day.selected{background:#27388f!important;border-color:#27388f!important;color:#fff!important}
.flatpickr-months .flatpickr-month,.flatpickr-current-month input.cur-year{background:#121a28!important;color:#fff!important}
input.flatpickr-alt-input{background:#0b101a!important;color:#f8fafc!important;border:1px solid #35425f!important;min-height:51px!important;border-radius:14px!important;padding:14px 15px!important}
.progress-wrap{isolation:isolate}
#bar{min-width:0}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
      color: rgba(247, 191, 4, 0.9) !important;
      fill: rgba(247, 191, 4, 0.9) !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
      top: -13px;
      font-size: 14px;
}
.flatpickr-current-month .numInputWrapper {
      top: -13px;
      font-size: 14px;
}
/* ===== Final input / select / calendar polish ===== */
select{
  appearance:none!important;
  -webkit-appearance:none!important;
  background-image:linear-gradient(45deg,transparent 50%,#dfe7f5 50%),linear-gradient(135deg,#dfe7f5 50%,transparent 50%)!important;
  background-position:calc(100% - 19px) 22px,calc(100% - 13px) 22px!important;
  background-size:6px 6px,6px 6px!important;
  background-repeat:no-repeat!important;
  padding-right:42px!important;
  transition:border-color .2s ease,box-shadow .2s ease,background-position .2s ease;
}
select:focus{
  background-position:calc(100% - 19px) 21px,calc(100% - 13px) 21px!important;
}
.ts-wrapper .ts-control{padding-right:42px!important;position:relative!important}
.ts-wrapper.single .ts-control:after{
  content:"";position:absolute;right:14px;top:50%;width:7px;height:7px;
  border-right:2px solid #dfe7f5;border-bottom:2px solid #dfe7f5;
  transform:translateY(-65%) rotate(45deg);transition:transform .2s ease,border-color .2s ease;pointer-events:none;
}
.ts-wrapper.single.focus .ts-control:after{transform:translateY(-30%) rotate(225deg);border-color:var(--gold)}
.ts-wrapper.single .ts-control .item{padding-right:6px!important;color:#f8fafc!important}
.ts-dropdown{margin-top:5px!important}

/* Flatpickr: stable, centered header; no forced negative offsets. */
.flatpickr-calendar{font-family:inherit!important;border-radius:16px!important;overflow:hidden!important;width:330px!important;max-width:calc(100vw - 20px)!important}
.flatpickr-months{height:58px!important;display:flex!important;align-items:center!important;position:relative!important;background:#121a28!important;border-bottom:1px solid #2f3b58!important}
.flatpickr-months .flatpickr-month{height:58px!important;flex:1!important;overflow:visible!important}
.flatpickr-current-month{position:static!important;width:100%!important;height:58px!important;padding:0 48px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;box-sizing:border-box!important}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper{position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;height:38px!important;line-height:38px!important;border:1px solid #3d4d70!important;border-radius:10px!important;background:#0b101a!important;box-sizing:border-box!important}
.flatpickr-current-month .flatpickr-monthDropdown-months{width:138px!important;padding:0 28px 0 12px!important;color:#fff!important;font-size:15px!important;font-weight:700!important;outline:none!important}
.flatpickr-current-month .numInputWrapper{width:92px!important;display:flex!important;align-items:center!important}
.flatpickr-current-month input.cur-year{width:100%!important;height:36px!important;padding:0 24px 0 10px!important;background:#0b101a!important;color:var(--gold)!important;font-size:15px!important;font-weight:800!important;border:0!important;outline:none!important;box-sizing:border-box!important}
.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown{right:5px!important;width:18px!important;height:17px!important;opacity:1!important;border:0!important;background:transparent!important}
.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#f8fafc!important}
.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#f8fafc!important}
.flatpickr-current-month .numInputWrapper:hover span.arrowUp:after{border-bottom-color:var(--gold)!important}
.flatpickr-current-month .numInputWrapper:hover span.arrowDown:after{border-top-color:var(--gold)!important}
.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:absolute!important;top:0!important;width:44px!important;height:58px!important;display:grid!important;place-items:center!important;padding:0!important;color:var(--gold)!important;fill:var(--gold)!important;z-index:5!important}
.flatpickr-months .flatpickr-prev-month{left:0!important}.flatpickr-months .flatpickr-next-month{right:0!important}
.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:16px!important;height:16px!important;fill:currentColor!important}
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{background:#1b263c!important}
.flatpickr-weekdays{background:#121a28!important;height:34px!important}.flatpickr-weekday{color:#cbd5e6!important;font-weight:800!important;font-size:11px!important}
.flatpickr-days{width:100%!important}.dayContainer{width:100%!important;min-width:100%!important;max-width:100%!important;padding:7px!important;box-sizing:border-box!important}
.flatpickr-day{max-width:none!important;height:38px!important;line-height:38px!important;border-radius:10px!important;margin:1px!important;width:calc(14.2857% - 2px)!important;color:#eaf0fb!important}
.flatpickr-day.today{border-color:#8b7a16!important}.flatpickr-day.selected,.flatpickr-day.selected:hover{background:#293b92!important;border-color:#ffd52f!important;color:#fff!important}.flatpickr-day:hover{background:#222e4a!important}
input.flatpickr-alt-input{cursor:pointer!important}

/* Dedicated year-only picker: only year control is visible. */
.flatpickr-calendar.year-only-picker{width:250px!important}
.year-only-picker .flatpickr-months{height:64px!important}
.year-only-picker .flatpickr-current-month{height:64px!important;padding:0 52px!important}
.year-only-picker .flatpickr-current-month .flatpickr-monthDropdown-months{display:none!important}
.year-only-picker .flatpickr-current-month .numInputWrapper{width:130px!important;height:42px!important}
.year-only-picker .flatpickr-current-month input.cur-year{font-size:20px!important;height:40px!important;text-align:center!important;padding:0 26px 0 8px!important}
.year-only-picker .flatpickr-weekdays,.year-only-picker .flatpickr-days{display:none!important}
.year-only-picker .flatpickr-months .flatpickr-prev-month,.year-only-picker .flatpickr-months .flatpickr-next-month{height:64px!important}
.year-only-picker .flatpickr-months .flatpickr-prev-month{left:4px!important}.year-only-picker .flatpickr-months .flatpickr-next-month{right:4px!important}
.year-only-picker .flatpickr-months .flatpickr-prev-month svg,.year-only-picker .flatpickr-months .flatpickr-next-month svg{display:none!important}
.year-only-picker .flatpickr-months .flatpickr-prev-month:after,.year-only-picker .flatpickr-months .flatpickr-next-month:after{font-size:20px!important;font-weight:900!important;color:#f8fafc!important}
.year-only-picker .flatpickr-months .flatpickr-prev-month:after{content:'‹'}.year-only-picker .flatpickr-months .flatpickr-next-month:after{content:'›'}

@media(max-width:700px){
 select{background-position:calc(100% - 18px) 22px,calc(100% - 12px) 22px!important;padding-right:40px!important}
 .ts-wrapper .ts-control{padding-right:40px!important}
 .flatpickr-calendar{width:calc(100vw - 20px)!important}
 .flatpickr-current-month{padding:0 42px!important;gap:6px!important}
 .flatpickr-current-month .flatpickr-monthDropdown-months{width:calc(100% - 92px)!important;max-width:140px!important}
 .flatpickr-current-month .numInputWrapper{width:86px!important}
 .year-only-picker{width:230px!important}
}

/* ===== Final v5 fixes ===== */
.ts-wrapper.single .ts-control{
  position:relative!important;
  padding-right:48px!important;
  background:#0b101a!important;
  color:#f8fafc!important;
}
.ts-wrapper.single .ts-control:after{
  content:"\f078"!important;
  font-family:"Font Awesome 6 Free"!important;
  font-weight:900!important;
  position:absolute!important;
  right:15px!important;
  top:50%!important;
  width:18px!important;
  height:18px!important;
  margin:0!important;
  border:0!important;
  color:#dfe7f5!important;
  transform:translateY(-50%)!important;
  display:grid!important;
  place-items:center!important;
  line-height:1!important;
  transition:transform .2s ease,color .2s ease!important;
  pointer-events:none!important;
}
.ts-wrapper.single.focus .ts-control:after{
  content:"\f077"!important;
  transform:translateY(-50%)!important;
  color:var(--gold)!important;
}
.ts-wrapper.single .ts-control .item{color:#f8fafc!important;font-weight:600!important}
.ts-wrapper.single .ts-control input{color:#f8fafc!important}
.ts-wrapper.single .ts-control input::placeholder{color:#758198!important}
.ts-dropdown{z-index:10050!important;background:#121a28!important;color:#f8fafc!important}
.ts-dropdown .option{color:#eaf0fb!important}
.ts-dropdown .option.active,.ts-dropdown .option.selected{background:#273252!important;color:var(--gold)!important}
.ts-wrapper.disabled .ts-control{background:#0a0e17!important;color:#68758b!important}

/* Keep native selects visually aligned with TomSelect arrows. */
select{background-position:calc(100% - 22px) 22px,calc(100% - 16px) 22px!important;padding-right:48px!important}
select:focus{background-position:calc(100% - 22px) 21px,calc(100% - 16px) 21px!important}

/* Plate number blocks have intentionally different widths. */
.plate-grid{display:grid;grid-template-columns:minmax(62px,1fr) minmax(110px,2fr) minmax(78px,1.35fr);gap:10px}
.plate-grid input{text-align:center;font-weight:800;letter-spacing:.08em;text-transform:uppercase}

/* Year-only Flatpickr: no date/month grid at all. */
.flatpickr-calendar.year-only-picker{width:260px!important;max-width:calc(100vw - 24px)!important;z-index:10060!important;background:#111827!important;border:1px solid #3a4969!important}
.year-only-picker .flatpickr-months{height:76px!important;background:#121a28!important}
.year-only-picker .flatpickr-current-month{height:76px!important;padding:0 48px!important;display:flex!important;align-items:center!important;justify-content:center!important}
.year-only-picker .flatpickr-current-month .numInputWrapper{width:132px!important;height:44px!important;border:1px solid #53627f!important;border-radius:11px!important;background:#0b101a!important}
.year-only-picker .flatpickr-current-month input.cur-year{height:42px!important;background:transparent!important;color:var(--gold)!important;font-size:21px!important;font-weight:900!important;text-align:center!important;padding:0 27px 0 10px!important}
.year-only-picker .flatpickr-current-month .numInputWrapper span.arrowUp,.year-only-picker .flatpickr-current-month .numInputWrapper span.arrowDown{right:5px!important;width:20px!important;height:19px!important;opacity:1!important;background:transparent!important}
.year-only-picker .flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#f8fafc!important}
.year-only-picker .flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#f8fafc!important}
.year-picker-footer{padding:10px 12px;border-top:1px solid #2e3a55;background:#0d1422}
.year-picker-ok{width:100%;border:0;border-radius:10px;min-height:40px;background:linear-gradient(100deg,#ef2028,#ff5733);color:#fff;font-weight:900;cursor:pointer}
.year-picker-ok:hover{filter:brightness(1.08)}

/* Calendar always sits above the sticky wizard on desktop/mobile. */
.flatpickr-calendar{z-index:10050!important;background:#111827!important;border:1px solid #3a4969!important}
.flatpickr-months,.flatpickr-weekdays{background:#121a28!important}
.flatpickr-current-month .flatpickr-monthDropdown-months{background:#0b101a!important;color:#f8fafc!important;border:1px solid #3d4d70!important}
.flatpickr-current-month input.cur-year{background:#0b101a!important;color:var(--gold)!important}
.flatpickr-day{color:#eaf0fb!important}

/* SweetAlert follows the same 234 SC dark visual language. */
.swal234-popup,.swal2-popup.swal234-popup{background:linear-gradient(145deg,#151b2a,#0c111c)!important;color:#f8fafc!important;border:1px solid #35425f!important;border-radius:18px!important;box-shadow:0 24px 80px #000b!important}
.swal234-title,.swal2-title.swal234-title{color:#ffd52f!important}
.swal234-text,.swal2-html-container.swal234-text{color:#d9e1ef!important}
.swal234-confirm,.swal234-cancel{border-radius:10px!important;font-weight:800!important}
.swal2-icon.swal2-warning{border-color:#ffd52f!important;color:#ffd52f!important}
.swal2-icon.swal2-error{border-color:#ef2028!important;color:#ef2028!important}
.swal2-icon.swal2-success{border-color:#31c48d!important;color:#31c48d!important}
.swal2-timer-progress-bar{background:var(--gold)!important}

@media(max-width:700px){
 .plate-grid{grid-template-columns:minmax(54px,.8fr) minmax(90px,1.8fr) minmax(68px,1.1fr);gap:8px}
 .ts-wrapper.single .ts-control{padding-right:44px!important}
 .ts-wrapper.single .ts-control:after{right:13px!important}
 select{background-position:calc(100% - 20px) 22px,calc(100% - 14px) 22px!important;padding-right:44px!important}
 .flatpickr-calendar{max-width:calc(100vw - 16px)!important}
 .flatpickr-current-month{padding:0 42px!important}
 .year-only-picker .flatpickr-current-month{padding:0 42px!important}
}

/* ===== V6 reliability / upload / picker polish ===== */
.ts-wrapper.single .ts-control:before{content:none!important}
.ts-wrapper.single .ts-control:after{
 content:""!important;font-family:inherit!important;font-weight:normal!important;
 position:absolute!important;right:15px!important;top:50%!important;width:9px!important;height:9px!important;
 border-right:2px solid #dfe7f5!important;border-bottom:2px solid #dfe7f5!important;
 background:none!important;transform:translateY(-65%) rotate(45deg)!important;
 transition:transform .18s ease,border-color .18s ease!important;display:block!important;
}
.ts-wrapper.single.focus .ts-control:after{transform:translateY(-35%) rotate(225deg)!important;border-color:var(--gold)!important}
.ts-wrapper.single .ts-control{background-image:none!important}
.ts-wrapper.single .ts-control .item{color:#f8fafc!important}

/* Year picker presents real selectable years, not only an empty OK footer. */
.flatpickr-calendar.year-only-picker{width:300px!important;max-width:calc(100vw - 20px)!important}
.year-only-picker .year-choice-grid{
 display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:10px 12px;
 max-height:280px;overflow:auto;background:#111827;border-top:1px solid #2e3a55;border-bottom:1px solid #2e3a55;
}
.year-only-picker .year-choice{
 border:1px solid #33415f;background:#0b101a;color:#f8fafc;border-radius:9px;padding:9px 5px;
 font-weight:800;cursor:pointer;min-height:38px;
}
.year-only-picker .year-choice:hover{border-color:var(--gold);color:var(--gold);background:#172038}
.year-only-picker .year-choice.selected{background:#293b92;border-color:var(--gold);color:#fff}
.year-picker-footer{background:#0d1422!important;padding:10px 12px!important}

/* File drop zone */
.file-drop{position:relative;min-height:190px;border:1.5px dashed #465574;border-radius:16px;background:linear-gradient(145deg,#0d1421,#0a0f18);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:20px;text-align:center;cursor:pointer;transition:.2s ease;overflow:hidden}
.file-drop:hover,.file-drop.dragging,.file-drop:focus{border-color:var(--gold);box-shadow:0 0 0 4px #ffd80012;background:#111a2b}
.file-drop>i{font-size:30px;color:var(--gold);margin-bottom:4px}
.file-drop strong{color:#f8fafc;font-size:1rem}.file-drop span{color:#93a3bd;font-size:.85rem}
.file-drop-actions{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap;justify-content:center}
.file-drop-actions .btn{min-height:40px;padding:8px 14px;font-size:.8rem}
.file-drop-name{color:var(--gold)!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-drop input[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}

/* Crop modal */
.photo-crop-modal{position:fixed;inset:0;z-index:120000;background:#000b;display:grid;place-items:center;padding:14px}
.photo-crop-modal[hidden]{display:none}
.photo-crop-dialog{width:min(760px,96vw);max-height:94vh;background:#111827;border:1px solid #3a4969;border-radius:20px;overflow:hidden;box-shadow:0 30px 100px #000e;display:flex;flex-direction:column}
.photo-crop-dialog header,.photo-crop-dialog footer{padding:15px 18px;background:#121a28;border-bottom:1px solid #2e3a55;display:flex;align-items:center;justify-content:space-between}
.photo-crop-dialog footer{border-bottom:0;border-top:1px solid #2e3a55;justify-content:flex-end;gap:9px}
.photo-crop-dialog header strong{color:var(--gold);font-size:1.05rem}.photo-crop-dialog header button{border:0;background:none;color:#f8fafc;font-size:1.25rem;cursor:pointer}
.photo-crop-body{padding:14px;background:#080d15;min-height:380px;display:grid;place-items:center;gap:8px}
.photo-crop-stage{width:min(620px,90vw);height:min(68vh,560px);background:#05080d;display:grid;place-items:center;overflow:hidden}
.photo-crop-stage img{display:block;max-width:100%;max-height:100%}
.cropper-view-box,.cropper-face{border-radius:0}
@media(max-width:700px){
 .file-drop{min-height:170px}
 .photo-crop-dialog{width:100%;max-height:96vh}
 .photo-crop-body{min-height:330px;padding:8px}
 .photo-crop-stage{width:100%;height:62vh}
 .year-only-picker .year-choice-grid{grid-template-columns:repeat(3,1fr);max-height:250px}
}

/* ===== V7 reliability: file preview, NIK live check, year picker ===== */
.nik-input-wrap{position:relative}
.nik-input-wrap input{padding-right:52px!important}
.nik-status{position:absolute;right:16px;top:50%;transform:translateY(-50%);width:25px;height:25px;display:grid;place-items:center;font-size:19px;pointer-events:none}
.nik-status.available{color:#35e58a}.nik-status.used{color:#ff4d5a}.nik-status.checking{color:var(--gold)}.nik-status.error{color:#aab6ca}
.nik-status:empty{display:none}
.field-hint{display:block;margin-top:6px;color:#93a3bd;font-size:.78rem;line-height:1.4}
.file-drop.has-preview{padding:12px}
.file-drop-preview{width:100%;height:120px;object-fit:contain;border-radius:12px;border:1px solid #33415f;background:#05080d;display:block;margin:0 auto 5px;box-shadow:0 10px 30px #0007}
.file-drop.has-preview>i,.file-drop.has-preview>strong,.file-drop.has-preview>span{display:none}
.file-drop.has-preview .file-drop-actions{margin-top:3px}
.file-drop.has-preview .file-drop-name{font-size:.76rem}
.photo-crop-body{position:relative}
.crop-help{display:block;max-width:680px;color:#aebbd0;text-align:center;line-height:1.45;padding:8px 10px 2px}
.photo-crop-stage .cropper-container{max-width:100%;max-height:100%}
.year-only-picker{overflow:hidden!important}
.year-only-picker .year-choice-grid{display:grid!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:20!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px!important;padding:10px!important;max-height:310px!important;overflow-y:auto!important;background:#0b101a!important;border-top:1px solid #2e3a55!important;border-bottom:1px solid #2e3a55!important}
.year-only-picker .year-choice{display:block!important;visibility:visible!important;opacity:1!important;min-height:40px!important;background:#121a28!important;color:#f8fafc!important;border:1px solid #33415f!important}
.year-only-picker .year-choice.selected{background:#293b92!important;color:#fff!important;border-color:var(--gold)!important}
.year-only-picker .year-picker-footer{position:relative!important;z-index:21!important}
.year-only-picker .year-picker-ok{width:100%;border:0;border-radius:10px;background:#ff3b30;color:#fff;font-weight:900;padding:11px 16px;cursor:pointer}
@media(max-width:700px){
 .nik-input-wrap input{padding-right:48px!important}
 .file-drop-preview{height:110px}
 .year-only-picker .year-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:300px!important}
}


/* ===== V11: histories, multiple vehicles, crop rotation ===== */
.vehicle-section .field-hint{margin:6px 0 12px}
.vehicle-list{display:grid;gap:14px;margin:14px 0}
.vehicle-card{background:#0b111d;border:1px solid #33415f;border-radius:16px;padding:14px;box-shadow:0 10px 30px #0004}
.vehicle-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;color:var(--gold)}
.vehicle-remove,.history-remove{border:1px solid #5b3040!important;background:#321b25!important;color:#ff9aa2!important;border-radius:9px!important;padding:8px 11px!important;cursor:pointer}
.vehicle-card .grid{margin:0}
.vehicle-card .plate-grid{display:grid;grid-template-columns:minmax(70px,1fr) minmax(120px,1.8fr) minmax(80px,1.1fr);gap:10px}
.crop-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:10px 8px 2px}
.crop-tools .btn{min-height:40px}
@media(max-width:700px){.vehicle-card .plate-grid{grid-template-columns:.9fr 1.4fr 1fr}.crop-tools .btn{flex:1 1 30%}}

/* ===== V12 fixes ===== */
.name-symbol-field{text-transform:uppercase}
.crop-tools{align-items:center;background:#0d1421;border-top:1px solid #2e3a55;border-bottom:1px solid #2e3a55;padding:10px;gap:8px}
.crop-tools .btn{position:static!important;flex:0 0 auto}
.crop-angle{display:flex;align-items:center;gap:7px;color:#d9e1ef;font-size:.82rem;font-weight:800;background:#121a28;border:1px solid #35425f;border-radius:10px;padding:8px 10px}
.crop-angle input{width:130px;accent-color:#ffd52f}
.crop-angle output{min-width:42px;text-align:center;color:#ffd52f}
.year-only-picker .year-choice-grid{display:grid!important;grid-template-columns:repeat(4,1fr);gap:6px;padding:10px;max-height:310px;overflow:auto;background:#0b101a;border-top:1px solid #2e3a55}
.year-only-picker .year-choice{border:1px solid #35425f;background:#121a28;color:#f8fafc;border-radius:9px;padding:9px 4px;font-weight:800;cursor:pointer}
.year-only-picker .year-choice:hover,.year-only-picker .year-choice.selected{background:#293b92;border-color:#ffd52f;color:#fff}
.year-only-picker .year-picker-footer{padding:8px 10px;background:#121a28;border-top:1px solid #2e3a55}
.year-only-picker .year-picker-ok{width:100%;border:0;border-radius:10px;background:#ef2028;color:#fff;font-weight:900;padding:11px;cursor:pointer}
@media(max-width:700px){.crop-angle{flex:1 1 100%;justify-content:center}.crop-angle input{flex:1}.year-only-picker .year-choice-grid{grid-template-columns:repeat(3,1fr);max-height:270px}}

/* ===== V13 crop/vehicle fixes ===== */
.photo-crop-dialog{max-height:96vh}
.photo-crop-body{min-height:0;flex:1 1 auto}
.photo-crop-stage{flex:0 1 auto;max-height:58vh}
.crop-tools{position:static!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:58px!important;background:#0d1421!important;border-top:1px solid #2e3a55!important;border-bottom:1px solid #2e3a55!important;padding:9px 12px!important;gap:8px!important;overflow:visible!important}
.crop-tools .btn{position:static!important;float:none!important;flex:0 0 auto!important;white-space:nowrap!important}
.crop-angle{position:static!important;flex:0 1 320px!important;min-width:220px!important;justify-content:center!important}
.photo-crop-dialog footer{position:static!important;flex:0 0 auto!important;min-height:74px!important;padding:12px 18px!important;z-index:2}
@media(max-width:700px){.photo-crop-stage{max-height:52vh}.crop-tools{padding:8px!important}.crop-angle{flex:1 1 100%!important;min-width:0!important}.photo-crop-dialog footer{min-height:68px!important}}

/* V17: dynamic expiry Flatpickr */
#expiry input.expiry-picker,
#expiry input.flatpickr-alt-input { cursor:pointer; caret-color:transparent; }
#expiry input.expiry-picker[readonly],
#expiry input.flatpickr-alt-input[readonly] { user-select:none; }

/* V17: crop controls are their own responsive row; never overlap footer. */
.crop-tools{padding:12px 18px;background:#101827;border-top:1px solid #2e3a55;border-bottom:1px solid #2e3a55;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;position:relative;z-index:2}
.crop-tools .btn{min-height:40px;white-space:nowrap;flex:0 0 auto}
.crop-angle{display:flex;align-items:center;justify-content:center;gap:8px;min-width:280px;padding:7px 10px;border:1px solid #34425f;border-radius:12px;background:#0d1522;color:#f8fafc;font-weight:700}
.crop-angle input[type=range]{width:130px;accent-color:#ffd21a}
.crop-angle output{min-width:42px;text-align:right;color:#ffd21a}
@media(max-width:700px){.crop-tools{padding:10px}.crop-angle{min-width:min(100%,260px)}.crop-angle input[type=range]{width:110px}.crop-tools .btn{font-size:.78rem;padding:8px 10px}}
