:root{
  --helpdesk-bg:#0b1b2c;
  --helpdesk-panel:#10263a;
  --helpdesk-panel-soft:#0a1928;
  --helpdesk-ink:#f4f8fb;
  --helpdesk-muted:#a7b6c6;
  --helpdesk-line:rgba(148,197,222,.25);
  --helpdesk-cyan:#55c7cf;
  --helpdesk-gold:#f2c66d;
  --helpdesk-error:#fda4af;
  --helpdesk-success:#86efac;
}

.helpdesk-fab{
  position:fixed;
  right:max(14px,env(safe-area-inset-right));
  bottom:max(14px,env(safe-area-inset-bottom));
  z-index:10020;
  min-width:48px;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 14px 0 9px;
  border:1px solid rgba(85,199,207,.48);
  border-radius:999px;
  color:#06202a;
  background:linear-gradient(135deg,#8ee6df,var(--helpdesk-cyan));
  box-shadow:0 14px 38px rgba(0,0,0,.38);
  font:850 13px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
}
.helpdesk-has-bottom-nav .helpdesk-fab{bottom:calc(78px + env(safe-area-inset-bottom))}
.helpdesk-fab span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#eaffff;background:rgba(3,35,45,.84);font-size:17px;font-weight:950}
.helpdesk-fab:focus-visible,.helpdesk-close:focus-visible,.helpdesk-form button:focus-visible,.helpdesk-form a:focus-visible{outline:3px solid rgba(85,199,207,.52);outline-offset:3px}

.helpdesk-dialog{
  width:min(680px,calc(100% - 28px));
  max-height:calc(100dvh - 28px);
  margin:auto;
  padding:0;
  overflow:hidden;
  border:1px solid var(--helpdesk-line);
  border-radius:22px;
  color:var(--helpdesk-ink);
  background:var(--helpdesk-bg);
  box-shadow:0 30px 90px rgba(0,0,0,.62);
}
.helpdesk-dialog::backdrop{background:rgba(1,7,13,.78);backdrop-filter:blur(6px)}
.helpdesk-dialog:not([open]){display:none}
.helpdesk-dialog-open{overflow:hidden}
.helpdesk-dialog-shell{max-height:calc(100dvh - 28px);overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.helpdesk-heading{position:relative;padding:22px 68px 17px 22px;border-bottom:1px solid var(--helpdesk-line);background:linear-gradient(145deg,rgba(85,199,207,.11),rgba(10,25,40,.96))}
.helpdesk-heading span{display:block;margin-bottom:6px;color:var(--helpdesk-gold);font:900 10px/1.3 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.14em}
.helpdesk-heading h2{margin:0;color:var(--helpdesk-ink);font:850 clamp(22px,4vw,30px)/1.1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.035em}
.helpdesk-heading p{margin:8px 0 0;color:var(--helpdesk-muted);font:500 13px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.helpdesk-close{position:absolute;top:14px;right:14px;width:44px;min-height:44px;padding:0;border:1px solid var(--helpdesk-line);border-radius:50%;color:var(--helpdesk-ink);background:rgba(255,255,255,.045);font-size:25px;line-height:1;cursor:pointer}

.helpdesk-form{display:block;margin:0;padding:20px 22px;color:var(--helpdesk-ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.helpdesk-form[aria-busy="true"]{opacity:.84}
.helpdesk-form-fields[hidden],.helpdesk-result[hidden],.helpdesk-result-action[hidden]{display:none!important}
.helpdesk-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.helpdesk-field{min-width:0;display:grid;align-content:start;gap:6px}
.helpdesk-field-wide{grid-column:1/-1}
.helpdesk-field>span{color:#dce7ee;font-size:12px;font-weight:800;line-height:1.3}
.helpdesk-field>span b,.helpdesk-field>span em{display:inline-block;margin-left:4px;padding:2px 6px;border-radius:999px;font-size:8px;font-style:normal;font-weight:900;letter-spacing:.04em;text-transform:uppercase;vertical-align:1px}
.helpdesk-field>span b{color:#a5f3fc;background:rgba(34,211,238,.11)}
.helpdesk-field>span em{color:#a7b6c6;background:rgba(148,163,184,.12)}
.helpdesk-field input,.helpdesk-field select,.helpdesk-field textarea{
  width:100%;
  min-width:0;
  min-height:44px;
  box-sizing:border-box;
  padding:10px 11px;
  border:1px solid var(--helpdesk-line);
  border-radius:11px;
  color:var(--helpdesk-ink);
  background:var(--helpdesk-panel-soft);
  font:inherit;
  font-size:14px;
  font-weight:500;
  line-height:1.35;
  outline:none;
}
.helpdesk-field textarea{min-height:112px;resize:vertical}
.helpdesk-field input::placeholder,.helpdesk-field textarea::placeholder{color:#73879a}
.helpdesk-field input:focus,.helpdesk-field select:focus,.helpdesk-field textarea:focus{border-color:var(--helpdesk-cyan);box-shadow:0 0 0 3px rgba(85,199,207,.14)}
.helpdesk-field small{color:var(--helpdesk-muted);font-size:10px;line-height:1.35}
.helpdesk-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.helpdesk-safety{margin:14px 0 0;padding:10px 12px;border-left:3px solid rgba(242,198,109,.65);border-radius:0 10px 10px 0;color:#d3dbe3;background:rgba(242,198,109,.065);font-size:11px;line-height:1.45}
.helpdesk-actions{display:flex;align-items:center;gap:12px;margin-top:14px}
.helpdesk-submit,.helpdesk-result-action,.helpdesk-new{min-height:44px;border:0;border-radius:11px;font-weight:900;cursor:pointer}
.helpdesk-submit{min-width:160px;padding:0 17px;color:#061b24;background:var(--helpdesk-cyan)}
.helpdesk-submit:disabled{cursor:wait;opacity:.62}
.helpdesk-actions small{color:var(--helpdesk-muted);font-size:10px;line-height:1.35}
.helpdesk-status{min-height:18px;margin:9px 1px 0;color:var(--helpdesk-muted);font-size:11px;line-height:1.4}
.helpdesk-status[data-state="error"]{padding:9px 10px;border-radius:9px;color:#fecdd3;background:rgba(190,24,93,.13)}
.helpdesk-status[data-state="info"]{color:#bae6fd}

.helpdesk-result{display:grid;justify-items:start;gap:9px;padding:5px 0}
.helpdesk-result>span{color:var(--helpdesk-success);font-size:9px;font-weight:950;letter-spacing:.13em}
.helpdesk-result h3{margin:0;color:var(--helpdesk-ink);font-size:22px;line-height:1.15}
.helpdesk-result p{margin:0;color:var(--helpdesk-muted);font-size:12px;line-height:1.45}
.helpdesk-result>strong{width:100%;box-sizing:border-box;padding:12px;border:1px solid rgba(134,239,172,.3);border-radius:11px;color:#bbf7d0;background:rgba(22,101,52,.14);font:850 14px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere;user-select:all}
.helpdesk-result-action{display:inline-flex;align-items:center;justify-content:center;min-width:190px;padding:0 15px;color:#fff;background:#15803d;text-decoration:none;font-size:12px}
button.helpdesk-result-action{background:#164e63}
.helpdesk-new{padding:0 14px;border:1px solid var(--helpdesk-line);color:#dce7ee;background:transparent;font-size:11px}
.helpdesk-result-status{min-height:18px!important;color:var(--helpdesk-success)!important}

.helpdesk-page-card{max-width:820px;margin:0 auto;padding:0;border:1px solid var(--helpdesk-line);border-radius:22px;background:var(--helpdesk-bg);box-shadow:0 18px 54px rgba(0,0,0,.18);overflow:hidden}
.helpdesk-page-card .helpdesk-form{padding:24px}

@media(max-width:600px){
  .helpdesk-fab{right:max(8px,env(safe-area-inset-right));width:48px;height:48px;min-width:48px;min-height:48px;gap:0;padding:0;border-radius:50%;font-size:0}
  .helpdesk-fab span{width:32px;height:32px;font-size:17px}
  .helpdesk-fab strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .helpdesk-has-bottom-nav .helpdesk-fab{bottom:calc(76px + env(safe-area-inset-bottom))}
  .helpdesk-dialog{width:calc(100% - 14px);max-height:calc(100dvh - 14px);border-radius:18px}
  .helpdesk-dialog-shell{max-height:calc(100dvh - 14px)}
  .helpdesk-heading{padding:17px 60px 14px 15px}
  .helpdesk-heading h2{font-size:22px}
  .helpdesk-heading p{font-size:11px}
  .helpdesk-close{top:9px;right:9px}
  .helpdesk-form,.helpdesk-page-card .helpdesk-form{padding:14px 12px}
  .helpdesk-field-grid{grid-template-columns:1fr;gap:10px}
  .helpdesk-field-wide{grid-column:auto}
  .helpdesk-field input,.helpdesk-field select,.helpdesk-field textarea{font-size:16px}
  .helpdesk-field textarea{min-height:104px}
  .helpdesk-actions{display:grid;gap:7px}
  .helpdesk-submit,.helpdesk-result-action,.helpdesk-new{width:100%}
  .helpdesk-page-card{border-radius:17px}
}

@media(prefers-reduced-motion:reduce){
  .helpdesk-dialog-shell{scroll-behavior:auto}
}
