/* =========================================================================
   E-Challan Checker — self-contained, theme-proof styles
   -------------------------------------------------------------------------
   Everything is scoped to .echk-wrap and forced with !important so the
   active WordPress theme (including its own dark mode / global colours)
   cannot bleed through or override the widget.
   ========================================================================= */

html body .echk-wrap{
  --echk-green-900:#062f22;
  --echk-green-800:#0a4632;
  --echk-green-700:#0f6b46;
  --echk-green-600:#128a57;
  --echk-gold:#c9a227;
  --echk-gold-ink:#7a5c00;
  --echk-bg:#f3f6f4;
  --echk-glow-a:rgba(15,107,70,.10);
  --echk-glow-b:rgba(201,162,39,.10);
  --echk-card:#ffffff;
  --echk-card-solid:#ffffff;
  --echk-field:#f5f8f6;
  --echk-line:rgba(10,70,50,.14);
  --echk-line-hi:rgba(10,70,50,.30);
  --echk-ink:#0e2119;
  --echk-muted:#5a6f66;
  --echk-danger:#c0293f;
  --echk-danger-bg:rgba(192,41,63,.07);
  --echk-ok:#0b8a5b;
  --echk-ok-bg:rgba(11,138,91,.08);
  --echk-amber:#a4720a;
  --echk-amber-bg:rgba(201,162,39,.13);
  --echk-plate-bg:#ffffff;
  --echk-plate-ink:#0c1729;
  --echk-shadow:0 22px 55px -30px rgba(10,50,35,.30);
  --echk-radius:20px;

  /* Tool button (Print / PDF / Image) — green in light mode */
  --echk-tool-bg:linear-gradient(135deg,#0f6b46,#062f22);
  --echk-tool-ink:#ffffff;
  --echk-tool-border:transparent;

  color-scheme:light;
  display:block !important;
  color:var(--echk-ink) !important;
  font-family:'Inter',system-ui,-apple-system,"Segoe UI",sans-serif !important;
  font-size:16px !important;
  line-height:1.55 !important;
  font-variant-numeric:tabular-nums;
  background:
    radial-gradient(1000px 560px at 6% -10%, var(--echk-glow-a), transparent 60%),
    radial-gradient(900px 600px at 100% -4%, var(--echk-glow-b), transparent 60%),
    var(--echk-bg) !important;
  border-radius:24px !important;
  overflow:hidden !important;
  isolation:isolate;
}

html body .echk-wrap[data-theme="dark"]{
  --echk-bg:#07130f;
  --echk-glow-a:rgba(18,138,87,.18);
  --echk-glow-b:rgba(201,162,39,.14);
  --echk-card:#0d2019;
  --echk-card-solid:#0e2117;
  --echk-field:#0a1a13;
  --echk-line:rgba(150,205,180,.15);
  --echk-line-hi:rgba(150,205,180,.32);
  --echk-ink:#eafaf1;
  --echk-muted:#8fb5a2;
  --echk-danger:#ff7d94;
  --echk-danger-bg:rgba(255,125,148,.10);
  --echk-ok:#3fdd9b;
  --echk-ok-bg:rgba(63,221,155,.10);
  --echk-amber:#e8c25b;
  --echk-amber-bg:rgba(232,194,91,.10);
  --echk-plate-bg:#f5f8fb;
  --echk-plate-ink:#0c1729;
  --echk-shadow:0 30px 70px -32px rgba(0,0,0,.7);

  /* Tool buttons invert: white background, deep green text */
  --echk-tool-bg:#ffffff;
  --echk-tool-ink:#0a4632;
  --echk-tool-border:#ffffff;

  color-scheme:dark;
}

/* ---- Neutralise theme styling on every element inside the widget ---- */
html body .echk-wrap *,
html body .echk-wrap *::before,
html body .echk-wrap *::after{
  box-sizing:border-box !important;
  float:none !important;
  text-shadow:none !important;
  letter-spacing:normal;
}
html body .echk-wrap h1,
html body .echk-wrap h2,
html body .echk-wrap h3{
  font-family:'Poppins',system-ui,sans-serif !important;
  text-transform:none !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  line-height:1.25 !important;
}
html body .echk-wrap p{margin:0;padding:0;color:inherit !important;font-size:inherit}
html body .echk-wrap a{box-shadow:none !important;text-decoration:none !important}
html body .echk-wrap dl,
html body .echk-wrap dt,
html body .echk-wrap dd{margin:0 !important;padding:0 !important}
html body .echk-wrap svg.i{
  width:1em !important;height:1em !important;flex:none !important;
  fill:none !important;stroke:currentColor !important;stroke-width:1.8 !important;
  stroke-linecap:round !important;stroke-linejoin:round !important;
  display:inline-block !important;vertical-align:middle !important;
}
/* Honeypot — hidden from humans, never display it */
html body .echk-wrap .echk-hp{
  position:absolute !important;left:-9999px !important;top:auto !important;
  width:1px !important;height:1px !important;overflow:hidden !important;
}

/* ---- Structure ---- */
html body .echk-wrap .echk-gov-strip{
  height:6px !important;width:100% !important;display:block !important;
  background:linear-gradient(90deg,var(--echk-green-800),var(--echk-green-600) 45%,var(--echk-gold) 100%) !important;
}
html body .echk-wrap .echk-inner{max-width:1180px !important;margin:0 auto !important;padding:30px 20px 46px !important}

html body .echk-wrap .echk-top{display:flex !important;align-items:flex-start !important;justify-content:space-between !important;gap:16px !important;margin-bottom:28px !important}
html body .echk-wrap h1{font-size:clamp(1.4rem,2.6vw,1.9rem) !important;font-weight:800 !important;letter-spacing:-.02em !important;color:var(--echk-green-800) !important}
html body .echk-wrap[data-theme="dark"] h1{color:var(--echk-ink) !important}
html body .echk-wrap .echk-sub{margin:5px 0 0 !important;color:var(--echk-muted) !important;font-size:.94rem !important}

html body .echk-wrap .echk-theme-toggle{display:inline-flex !important;align-items:center !important;border:1px solid var(--echk-line) !important;background:var(--echk-card) !important;border-radius:999px !important;padding:3px !important;flex:none !important;box-shadow:var(--echk-shadow) !important}
html body .echk-wrap .echk-theme-toggle button{border:0 !important;background:none !important;cursor:pointer !important;width:38px !important;height:38px !important;min-height:0 !important;border-radius:999px !important;display:grid !important;place-items:center !important;color:var(--echk-muted) !important;font-size:16px !important;padding:0 !important;transition:background .2s,color .2s !important}
html body .echk-wrap .echk-theme-toggle button.on{background:linear-gradient(135deg,var(--echk-green-700),var(--echk-green-900)) !important;color:#fff !important}
html body .echk-wrap[data-theme="dark"] .echk-theme-toggle button.on{background:#ffffff !important;color:var(--echk-green-800) !important}

html body .echk-wrap .echk-grid{display:grid !important;grid-template-columns:minmax(0,2fr) minmax(0,3fr) !important;gap:24px !important;align-items:start !important}
@media(max-width:900px){html body .echk-wrap .echk-grid{grid-template-columns:1fr !important}}

html body .echk-wrap .echk-card{background:var(--echk-card) !important;border:1px solid var(--echk-line) !important;border-radius:var(--echk-radius) !important;box-shadow:var(--echk-shadow) !important;overflow:hidden !important}
html body .echk-wrap .echk-card-h{padding:20px 24px !important;border-bottom:1px solid var(--echk-line) !important;background:linear-gradient(180deg,rgba(15,107,70,.06),transparent) !important}
html body .echk-wrap[data-theme="dark"] .echk-card-h{background:linear-gradient(180deg,rgba(18,138,87,.12),transparent) !important}
html body .echk-wrap .echk-card-h h2{font-size:1.08rem !important;font-weight:700 !important;color:var(--echk-ink) !important}
html body .echk-wrap .echk-card-h p{margin:3px 0 0 !important;color:var(--echk-muted) !important;font-size:.87rem !important}
html body .echk-wrap .echk-card-b{padding:24px !important}

/* ---- Mode switch ---- */
html body .echk-wrap .echk-seg{display:grid !important;grid-template-columns:1fr 1fr !important;gap:4px !important;padding:4px !important;background:var(--echk-field) !important;border:1px solid var(--echk-line) !important;border-radius:14px !important;margin-bottom:22px !important}
html body .echk-wrap .echk-seg-btn{font-family:'Poppins',sans-serif !important;font-weight:600 !important;font-size:.87rem !important;color:var(--echk-muted) !important;background:none !important;border:0 !important;cursor:pointer !important;padding:11px 8px !important;height:auto !important;min-height:0 !important;border-radius:11px !important;text-transform:none !important;box-shadow:none !important;transition:color .2s,background .2s !important}
html body .echk-wrap .echk-seg-btn:hover{color:var(--echk-ink) !important;background:none !important}
html body .echk-wrap .echk-seg-btn.on{color:#fff !important;background:linear-gradient(135deg,var(--echk-green-700),var(--echk-green-900)) !important;box-shadow:0 10px 22px -10px var(--echk-green-700) !important}
html body .echk-wrap[data-theme="dark"] .echk-seg-btn.on{color:var(--echk-green-800) !important;background:#ffffff !important;box-shadow:0 10px 22px -12px rgba(255,255,255,.5) !important}

/* ---- Fields ---- */
html body .echk-wrap .echk-field{margin-bottom:17px !important}
html body .echk-wrap .echk-field[hidden]{display:none !important}
html body .echk-wrap .echk-lb{display:block !important;font-size:.87rem !important;font-weight:600 !important;margin-bottom:8px !important;color:var(--echk-ink) !important;font-family:'Poppins',sans-serif !important;text-transform:none !important}
html body .echk-wrap .echk-req{color:var(--echk-danger) !important;margin-left:2px !important}
html body .echk-wrap .echk-input{position:relative !important;display:block !important}
html body .echk-wrap .echk-input>svg.i{position:absolute !important;left:15px !important;top:50% !important;transform:translateY(-50%) !important;font-size:17px !important;color:var(--echk-muted) !important;pointer-events:none !important;transition:color .2s !important;margin:0 !important}
html body .echk-wrap .echk-input input[type="text"],
html body .echk-wrap .echk-input input[type="tel"]{
  width:100% !important;height:52px !important;padding:0 15px 0 46px !important;margin:0 !important;
  font-family:'Inter',sans-serif !important;font-size:.98rem !important;font-weight:500 !important;
  color:var(--echk-ink) !important;background:var(--echk-field) !important;background-image:none !important;
  border:1.5px solid var(--echk-line) !important;border-radius:14px !important;outline:none !important;
  box-shadow:none !important;text-transform:none !important;line-height:normal !important;
  transition:border-color .2s,box-shadow .2s !important;
}
html body .echk-wrap .echk-input input::placeholder{color:var(--echk-muted) !important;opacity:.6 !important}
html body .echk-wrap .echk-input input:hover{border-color:var(--echk-line-hi) !important}
html body .echk-wrap .echk-input input:focus{border-color:var(--echk-green-600) !important;box-shadow:0 0 0 4px rgba(18,138,87,.18) !important;background:var(--echk-field) !important}
html body .echk-wrap[data-theme="dark"] .echk-input input:focus{border-color:#ffffff !important;box-shadow:0 0 0 4px rgba(255,255,255,.14) !important}
html body .echk-wrap .echk-input:focus-within>svg.i{color:var(--echk-green-700) !important}
html body .echk-wrap[data-theme="dark"] .echk-input:focus-within>svg.i{color:#ffffff !important}

/* ---- Alerts ---- */
html body .echk-wrap .echk-alert{display:flex !important;gap:10px !important;align-items:flex-start !important;font-size:.87rem !important;font-weight:600 !important;padding:13px 15px !important;border-radius:13px !important;margin:0 0 18px !important;border:1px solid transparent !important}
html body .echk-wrap .echk-alert svg.i{font-size:17px !important;margin-top:1px !important}
html body .echk-wrap .echk-alert.echk-err{color:var(--echk-danger) !important;background:var(--echk-danger-bg) !important;border-color:rgba(192,41,63,.35) !important}
html body .echk-wrap .echk-alert.echk-ok{color:var(--echk-ok) !important;background:var(--echk-ok-bg) !important;border-color:rgba(11,138,91,.35) !important}
html body .echk-wrap .echk-alert.echk-tip{color:var(--echk-gold-ink) !important;background:var(--echk-amber-bg) !important;border-color:rgba(201,162,39,.40) !important;font-weight:500 !important;margin:20px 0 0 !important}
html body .echk-wrap[data-theme="dark"] .echk-alert.echk-tip{color:var(--echk-amber) !important}
html body .echk-wrap .echk-alert.echk-tip b{font-weight:700 !important;font-family:'Poppins',sans-serif !important}

/* ---- Buttons ---- */
html body .echk-wrap .echk-actions{display:flex !important;gap:10px !important;margin-top:8px !important;flex-wrap:wrap !important}
html body .echk-wrap .echk-btn{
  font-family:'Poppins',sans-serif !important;font-weight:600 !important;font-size:.96rem !important;
  height:52px !important;min-height:0 !important;border-radius:14px !important;border:0 !important;cursor:pointer !important;
  display:inline-flex !important;align-items:center !important;justify-content:center !important;gap:9px !important;
  text-decoration:none !important;text-transform:none !important;padding:0 20px !important;margin:0 !important;
  transition:transform .15s,box-shadow .2s,opacity .2s,background .2s,color .2s !important;
}
html body .echk-wrap .echk-btn.echk-primary{flex:1 !important;min-width:160px !important;color:#fff !important;background:linear-gradient(135deg,var(--echk-green-700),var(--echk-green-900)) !important;box-shadow:0 16px 32px -14px var(--echk-green-700) !important}
html body .echk-wrap .echk-btn.echk-primary:hover{transform:translateY(-1px) !important;color:#fff !important}
html body .echk-wrap[data-theme="dark"] .echk-btn.echk-primary{color:var(--echk-green-800) !important;background:#ffffff !important;box-shadow:0 16px 32px -16px rgba(255,255,255,.55) !important}
html body .echk-wrap .echk-btn.echk-primary[disabled]{opacity:.6 !important;cursor:progress !important;transform:none !important}
html body .echk-wrap .echk-btn.echk-ghost{color:var(--echk-muted) !important;background:transparent !important;border:1px solid var(--echk-line) !important}
html body .echk-wrap .echk-btn.echk-ghost:hover{color:var(--echk-ink) !important;border-color:var(--echk-line-hi) !important}

/* Print / Download PDF / Download Image — green on light, inverted white on dark */
html body .echk-wrap .echk-btn.echk-tool{
  padding:0 18px !important;height:46px !important;font-size:.87rem !important;
  background:var(--echk-tool-bg) !important;
  color:var(--echk-tool-ink) !important;
  border:1px solid var(--echk-tool-border) !important;
  box-shadow:0 12px 26px -14px rgba(15,107,70,.85) !important;
}
html body .echk-wrap .echk-btn.echk-tool:hover{transform:translateY(-1px) !important;color:var(--echk-tool-ink) !important;opacity:.94 !important}
html body .echk-wrap[data-theme="dark"] .echk-btn.echk-tool{box-shadow:0 12px 26px -16px rgba(255,255,255,.6) !important}
html body .echk-wrap .echk-btn.echk-tool[disabled]{opacity:.55 !important;cursor:progress !important;transform:none !important}
html body .echk-wrap .echk-toolbar{display:flex !important;gap:10px !important;flex-wrap:wrap !important;padding:16px 24px !important;border-bottom:1px solid var(--echk-line) !important}

/* ---- Summary tiles ---- */
html body .echk-wrap .echk-stack{display:grid !important;gap:22px !important}
html body .echk-wrap .echk-tiles{display:grid !important;grid-template-columns:1fr 1fr !important;border-bottom:1px solid var(--echk-line) !important}
html body .echk-wrap .echk-tile{padding:18px 24px !important}
html body .echk-wrap .echk-tile+.echk-tile{border-left:1px solid var(--echk-line) !important}
html body .echk-wrap .echk-tile span{display:block !important;font-size:.82rem !important;color:var(--echk-muted) !important;font-weight:500 !important}
html body .echk-wrap .echk-tile b{display:block !important;font-family:'Poppins',sans-serif !important;font-size:1.7rem !important;font-weight:700 !important;margin-top:3px !important;white-space:nowrap !important;color:var(--echk-ink) !important}
html body .echk-wrap .echk-tile b.bad{color:var(--echk-danger) !important}
@media(max-width:520px){html body .echk-wrap .echk-tile{padding:16px !important}html body .echk-wrap .echk-tile b{font-size:1.35rem !important}}
html body .echk-wrap .echk-card-h.echk-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:12px !important}
html body .echk-wrap .echk-count{color:var(--echk-muted) !important;font-size:.85rem !important;font-weight:600 !important}

/* ---- Ticket ---- */
html body .echk-wrap .echk-ticket{padding:22px 24px !important;border-bottom:1px solid var(--echk-line) !important}
html body .echk-wrap .echk-ticket:last-child{border-bottom:0 !important}
html body .echk-wrap .echk-ticket-top{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:10px !important;flex-wrap:wrap !important;margin-bottom:10px !important}
html body .echk-wrap .echk-ticket-id-wrap{display:flex !important;align-items:center !important;gap:10px !important;flex-wrap:wrap !important}
html body .echk-wrap .echk-chip{display:inline-block !important;font-family:'Poppins',sans-serif !important;font-size:.77rem !important;font-weight:700 !important;padding:3px 10px !important;border-radius:8px !important;background:var(--echk-field) !important;border:1px solid var(--echk-line) !important;color:var(--echk-ink) !important}
html body .echk-wrap .echk-when{display:inline-flex !important;align-items:center !important;gap:5px !important;font-size:.79rem !important;color:var(--echk-muted) !important;font-weight:500 !important}
html body .echk-wrap .echk-status{font-family:'Poppins',sans-serif !important;font-size:.74rem !important;font-weight:600 !important;padding:4px 12px !important;border-radius:999px !important;text-transform:capitalize !important}
html body .echk-wrap .echk-status.st-pending{background:var(--echk-amber-bg) !important;color:var(--echk-gold-ink) !important}
html body .echk-wrap[data-theme="dark"] .echk-status.st-pending{color:var(--echk-amber) !important}
html body .echk-wrap .echk-status.st-paid{background:var(--echk-ok-bg) !important;color:var(--echk-ok) !important}
html body .echk-wrap .echk-status.st-cancel{background:var(--echk-field) !important;color:var(--echk-muted) !important}
html body .echk-wrap .echk-viol-line{margin:0 0 16px !important;font-weight:700 !important;color:var(--echk-danger) !important;font-size:.95rem !important}

html body .echk-wrap .echk-plate-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:14px !important;flex-wrap:wrap !important;margin-bottom:18px !important}
html body .echk-wrap .echk-plate{display:inline-block !important;padding:8px 18px !important;border-radius:10px !important;background:var(--echk-plate-bg) !important;color:var(--echk-plate-ink) !important;font-family:'Poppins',sans-serif !important;font-weight:700 !important;font-size:1.25rem !important;letter-spacing:.12em !important;white-space:nowrap !important;border:2.5px solid #0b1626 !important}
html body .echk-wrap .echk-fine{text-align:right !important}
html body .echk-wrap .echk-fine span{display:block !important;font-size:.78rem !important;color:var(--echk-muted) !important;font-weight:500 !important}
html body .echk-wrap .echk-fine strong{font-family:'Poppins',sans-serif !important;font-size:1.3rem !important;font-weight:700 !important;color:var(--echk-danger) !important}

html body .echk-wrap .echk-facts{display:grid !important;grid-template-columns:1fr 1fr !important;gap:1px !important;background:var(--echk-line) !important;border:1px solid var(--echk-line) !important;border-radius:14px !important;overflow:hidden !important;margin:0 0 16px !important}
html body .echk-wrap .echk-fact{background:var(--echk-card-solid) !important;padding:14px 16px !important;min-width:0 !important}
html body .echk-wrap .echk-fact dt{display:flex !important;align-items:center !important;gap:7px !important;font-size:.78rem !important;font-weight:500 !important;color:var(--echk-muted) !important}
html body .echk-wrap .echk-fact dt svg.i{font-size:14px !important;color:var(--echk-green-600) !important}
html body .echk-wrap[data-theme="dark"] .echk-fact dt svg.i{color:var(--echk-ok) !important}
html body .echk-wrap .echk-fact dd{margin:5px 0 0 !important;font-weight:600 !important;font-size:.94rem !important;color:var(--echk-ink) !important;overflow-wrap:anywhere !important}
@media(max-width:560px){html body .echk-wrap .echk-facts{grid-template-columns:1fr !important}}

/* ---- Login-required card ---- */
html body .echk-wrap .echk-ticket-lock{display:flex !important;align-items:center !important;gap:14px !important;flex-wrap:wrap !important;padding:16px 18px !important;border-radius:15px !important;background:var(--echk-field) !important;border:1px dashed var(--echk-line-hi) !important}
html body .echk-wrap .echk-lock-icon{width:38px !important;height:38px !important;border-radius:11px !important;flex:none !important;display:grid !important;place-items:center !important;font-size:17px !important;background:linear-gradient(135deg,var(--echk-green-700),var(--echk-green-900)) !important;color:#fff !important}
html body .echk-wrap[data-theme="dark"] .echk-lock-icon{background:#ffffff !important;color:var(--echk-green-800) !important}
html body .echk-wrap .echk-lock-copy{flex:1 !important;min-width:180px !important}
html body .echk-wrap .echk-lock-copy strong{display:block !important;font-family:'Poppins',sans-serif !important;font-weight:600 !important;font-size:.94rem !important;color:var(--echk-ink) !important}
html body .echk-wrap .echk-lock-copy span{display:block !important;color:var(--echk-muted) !important;font-size:.83rem !important;margin-top:2px !important}
html body .echk-wrap .echk-lock-btn{font-family:'Poppins',sans-serif !important;font-weight:600 !important;font-size:.87rem !important;color:#fff !important;background:linear-gradient(135deg,var(--echk-green-700),var(--echk-green-900)) !important;padding:12px 18px !important;border-radius:12px !important;display:inline-flex !important;align-items:center !important;gap:8px !important;white-space:nowrap !important;transition:transform .15s !important}
html body .echk-wrap[data-theme="dark"] .echk-lock-btn{color:var(--echk-green-800) !important;background:#ffffff !important}
html body .echk-wrap .echk-lock-btn:hover{transform:translateY(-1px) !important}
html body .echk-wrap .echk-lock-btn svg.i{font-size:15px !important}

/* ---- Empty state / footer ---- */
html body .echk-wrap .echk-empty{text-align:center !important;padding:70px 28px !important}
html body .echk-wrap .echk-ring{width:68px !important;height:68px !important;margin:0 auto 18px !important;border-radius:20px !important;display:grid !important;place-items:center !important;font-size:28px !important;color:var(--echk-green-700) !important;background:var(--echk-field) !important;border:1px dashed var(--echk-line-hi) !important}
html body .echk-wrap[data-theme="dark"] .echk-ring{color:var(--echk-ok) !important}
html body .echk-wrap .echk-empty h3{margin:0 0 5px !important;font-size:1.02rem !important;color:var(--echk-ink) !important}
html body .echk-wrap .echk-empty p{margin:0 auto !important;max-width:34ch !important;color:var(--echk-muted) !important;font-size:.88rem !important}
html body .echk-wrap .echk-foot{margin-top:30px !important;text-align:center !important;color:var(--echk-muted) !important;font-size:.8rem !important}
html body .echk-wrap .echk-foot strong{color:var(--echk-green-700) !important}
html body .echk-wrap[data-theme="dark"] .echk-foot strong{color:var(--echk-amber) !important}

@media(prefers-reduced-motion:reduce){html body .echk-wrap *{transition:none !important}}

/* ---- Print ---- */
@media print{
  body *{visibility:hidden !important}
  .echk-print-section,.echk-print-section *{visibility:visible !important}
  .echk-print-section{position:absolute !important;left:0 !important;top:0 !important;width:100% !important}
  .echk-toolbar{display:none !important}
}
