:root{
  --primary:#49a5e6;
  --primary-strong:#1973b8;
  --secondary:#2dcccd;
  --success:#5ac4a3;
  --danger:#f35c72;
  --warning:#f3b35d;
  --bg:#071420;
  --sidebar:#091a29;
  --surface:#0d2233;
  --surface-2:#112a3e;
  --border:#24435b;
  --border-soft:#19364c;
  --text:#f4f8fb;
  --muted:#8fa9bc;
  --shadow:0 22px 60px rgba(0,0,0,.25);
  --radius:16px;
}
*{box-sizing:border-box}
html{color-scheme:dark}
body{margin:0;min-height:100vh;background:
  radial-gradient(circle at 10% 10%,rgba(73,165,230,.10),transparent 25%),
  radial-gradient(circle at 90% 85%,rgba(45,204,205,.07),transparent 25%),var(--bg);
  color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline-offset:2px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--secondary)}
.hidden{display:none!important}
.w-100{width:100%}
.muted{color:var(--muted)}
.text-danger{color:#ff99a8!important}

.app-shell{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;padding:20px 14px;border-right:1px solid var(--border-soft);background:rgba(9,26,41,.96);display:flex;flex-direction:column;z-index:20}
.brand,.auth-brand{display:flex;align-items:center;gap:12px}
.brand{padding:4px 8px 22px}
.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--secondary));color:#032236;font-weight:900;letter-spacing:-1px;box-shadow:0 8px 24px rgba(73,165,230,.18)}
.brand-mark.large{width:52px;height:52px;border-radius:15px;font-size:17px}
.brand-copy,.auth-brand>div:last-child{display:grid;gap:2px}
.brand-copy strong,.auth-brand strong{font-size:14px}
.brand-copy span,.auth-brand span{font-size:10px;color:var(--muted)}
.nav{display:grid;gap:6px}
.nav-item{display:flex;align-items:center;gap:11px;min-height:44px;padding:0 12px;border-radius:11px;color:#a9bdcc;font-size:13px;font-weight:650;transition:.18s background,.18s color,.18s transform}
.nav-item>span:first-child{width:21px;text-align:center;font-size:18px;color:#7898ae}
.nav-item:hover{background:rgba(73,165,230,.07);color:var(--text)}
.nav-item.active{background:linear-gradient(90deg,rgba(73,165,230,.16),rgba(45,204,205,.06));color:#fff;border:1px solid rgba(73,165,230,.16)}
.nav-item.active>span:first-child{color:var(--primary)}
.sidebar-spacer{flex:1}
.sidebar-user{display:flex;align-items:center;gap:10px;padding:12px 8px;margin-top:16px;border-top:1px solid var(--border-soft)}
.sidebar-user>div:last-child{display:grid;min-width:0}
.sidebar-user strong{font-size:12px;overflow:hidden;text-overflow:ellipsis}
.sidebar-user span{font-size:10px;color:var(--muted)}
.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--border);color:var(--primary);font-weight:800;text-transform:uppercase}
.logout-form{padding:0 8px}
.mobile-backdrop{display:none}
.main{min-width:0;display:flex;flex-direction:column;min-height:100vh}
.topbar{min-height:84px;padding:18px 30px;display:flex;align-items:center;gap:14px;border-bottom:1px solid rgba(36,67,91,.45);background:rgba(7,20,32,.78);backdrop-filter:blur(14px);position:sticky;top:0;z-index:10}
.topbar h1{margin:0;font-size:23px;line-height:1.2}
.topbar p{margin:5px 0 0;font-size:11px;color:var(--muted)}
.mobile-menu{display:none;width:40px;height:40px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);cursor:pointer}
.content{width:min(1180px,100%);margin:0 auto;padding:28px 30px 42px;display:grid;gap:20px}
.content.narrow{width:min(760px,100%)}
.footer{margin-top:auto;padding:20px 30px;text-align:center;color:#5f7f94;font-size:10px}

.card,.stat-card{border:1px solid var(--border-soft);background:linear-gradient(180deg,rgba(13,34,51,.96),rgba(9,26,41,.96));border-radius:var(--radius);box-shadow:var(--shadow)}
.card{padding:22px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.card-head h2,.section-copy h2,.result-card h2{margin:4px 0 0;font-size:18px}
.eyebrow{display:inline-block;color:var(--primary);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.12em}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.stat-card{min-height:160px;padding:22px;display:flex;flex-direction:column;justify-content:center}
.stat-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:750}
.stat-value{font-size:48px;line-height:1;margin:10px 0 8px;letter-spacing:-.04em}
.stat-title{font-size:22px;margin:8px 0 18px}
.stat-meta{font-size:10px;color:var(--muted)}
.action-card{align-items:flex-start}

.btn{min-height:40px;padding:0 14px;border:1px solid transparent;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:800;cursor:pointer;transition:.16s transform,.16s filter,.16s background}
.btn:hover{filter:brightness(1.06)}
.btn:active{transform:translateY(1px)}
.btn-primary{background:linear-gradient(135deg,var(--primary),#68b7ef);color:#05263a}
.btn-success{background:var(--success);color:#062b22}
.btn-warning{background:var(--warning);color:#3d2602}
.btn-danger{background:var(--danger);color:#330711}
.btn-ghost{border-color:var(--border);background:rgba(255,255,255,.025);color:#b8ccd9}

.alert{padding:14px 16px;border-radius:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11px}
.alert strong{font-size:12px}
.alert span{color:var(--muted);flex:1}
.alert-error{border:1px solid rgba(243,92,114,.25);background:rgba(243,92,114,.08);color:#ffdbe1}
.alert-warning{border:1px solid rgba(243,179,93,.23);background:rgba(243,179,93,.07);color:#ffe6bc}

.history-list{display:grid}
.history-item{min-height:64px;padding:12px 4px;border-top:1px solid var(--border-soft);display:flex;align-items:center;justify-content:space-between;gap:20px}
.history-item:first-child{border-top:0}
.history-item>div:first-child{min-width:0;display:grid;gap:4px}
.history-item strong{font-size:12px}
.history-item span,.history-item small{font-size:10px;color:var(--muted);overflow-wrap:anywhere}
.history-state{display:grid;justify-items:end;gap:5px;flex:0 0 auto}
.badge{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800}
.badge-success{background:rgba(90,196,163,.12);color:#94f1d4;border:1px solid rgba(90,196,163,.18)}
.badge-danger{background:rgba(243,92,114,.10);color:#ff9cac;border:1px solid rgba(243,92,114,.18)}
.empty-state{padding:34px;text-align:center;border:1px dashed var(--border);border-radius:12px;color:var(--muted);font-size:11px}

.auth-body{min-height:100vh}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px 16px}
.auth-card{width:min(100%,480px);padding:28px;border:1px solid rgba(73,165,230,.16);border-radius:22px;background:rgba(13,34,51,.96);box-shadow:0 28px 90px rgba(0,0,0,.4)}
.auth-copy{margin:26px 0 20px}
.auth-copy h1{font-size:28px;margin:9px 0 7px}
.auth-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}
.auth-form{display:grid;gap:14px}
.auth-form label,.field{display:grid;gap:7px;font-size:10px;font-weight:750;color:#bdd0dc}
.auth-form input,.field input,.field select,.field textarea{width:100%;border:1px solid var(--border);border-radius:10px;background:#081a29;color:var(--text);padding:0 12px;transition:.16s border-color,.16s box-shadow}
.auth-form input,.field input,.field select{height:44px}
.field textarea{padding:12px;resize:vertical;min-height:100px}
.auth-form input:focus,.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(73,165,230,.10);outline:0}
.password-wrap{position:relative;display:block}
.password-wrap input{padding-right:48px}
.password-toggle{position:absolute;right:5px;top:5px;width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer}
.auth-submit{width:100%;margin-top:2px}
.auth-note{margin-top:17px;padding:12px;border:1px solid rgba(45,204,205,.12);background:rgba(45,204,205,.035);border-radius:11px;display:grid;gap:4px}
.auth-note strong{font-size:10px;color:var(--secondary)}
.auth-note span{font-size:9px;line-height:1.5;color:var(--muted)}

.wizard{padding:0;overflow:hidden}
.wizard-steps{list-style:none;margin:0;padding:18px 22px;display:grid;grid-template-columns:repeat(5,1fr);border-bottom:1px solid var(--border-soft);background:rgba(5,17,28,.35)}
.wizard-steps li{position:relative;display:grid;justify-items:center;gap:5px;color:#66869b}
.wizard-steps li:not(:last-child)::after{content:"";position:absolute;top:13px;left:calc(50% + 17px);right:calc(-50% + 17px);height:1px;background:var(--border)}
.wizard-steps span{position:relative;z-index:1;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--border);font-size:10px;font-weight:850}
.wizard-steps small{font-size:8px;font-weight:750}
.wizard-steps li.active,.wizard-steps li.done{color:var(--primary)}
.wizard-steps li.active span{border-color:var(--primary);box-shadow:0 0 0 4px rgba(73,165,230,.08)}
.wizard-steps li.done span{background:var(--primary);color:#05263a;border-color:var(--primary)}
.wizard-steps li.done::after{background:var(--primary)}
.wizard-panel{display:none;padding:26px 24px;min-height:390px}
.wizard-panel.active{display:block}
.section-copy{margin-bottom:22px}
.section-copy p{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field.full,.tow-fields.full{grid-column:1/-1}
fieldset.field{border:0;padding:0;margin:0}
.field legend{margin-bottom:8px;font-size:10px;font-weight:750;color:#bdd0dc}
.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.choice-card{position:relative;display:block;cursor:pointer}
.choice-card input{position:absolute;opacity:0;pointer-events:none}
.choice-card>span{min-height:74px;padding:14px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.02);display:grid;gap:5px;align-content:center;transition:.16s border-color,.16s background}
.choice-card strong{font-size:13px}
.choice-card small{font-size:9px;color:var(--muted)}
.choice-card input:checked+span{border-color:var(--primary);background:rgba(73,165,230,.09);box-shadow:0 0 0 2px rgba(73,165,230,.05)}
.tow-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding-top:4px}
.upload-zone{min-height:230px;border:1px dashed #35617f;border-radius:14px;background:rgba(73,165,230,.025);display:grid;place-items:center;align-content:center;gap:8px;text-align:center;padding:24px;cursor:pointer}
.upload-zone:hover{border-color:var(--primary);background:rgba(73,165,230,.05)}
.upload-zone input{position:absolute;opacity:0;pointer-events:none}
.upload-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(73,165,230,.12);color:var(--primary);font-size:22px}
.upload-zone strong{font-size:13px}
.upload-zone small{max-width:430px;color:var(--muted);font-size:10px;line-height:1.5}
.file-summary{margin-top:12px;color:var(--muted);font-size:10px}
.review-card{display:grid;gap:0;border:1px solid var(--border-soft);border-radius:13px;overflow:hidden}
.review-row{display:grid;grid-template-columns:150px 1fr;gap:18px;padding:12px 14px;border-top:1px solid var(--border-soft);font-size:11px}
.review-row:first-child{border-top:0}
.review-row span:first-child{color:var(--muted)}
.review-row span:last-child{font-weight:700;overflow-wrap:anywhere}
.submit-note{margin-top:14px;color:var(--muted);font-size:9px}
.wizard-actions{padding:16px 22px;border-top:1px solid var(--border-soft);display:flex;align-items:center;gap:9px;background:rgba(5,17,28,.28)}
.action-spacer{flex:1}

.result-card{text-align:center;padding:44px 28px}
.result-icon{width:64px;height:64px;margin:0 auto 16px;border-radius:50%;display:grid;place-items:center;font-size:30px;font-weight:900}
.result-icon.success{background:rgba(90,196,163,.12);color:var(--success);border:1px solid rgba(90,196,163,.22)}
.result-icon.error{background:rgba(243,92,114,.10);color:var(--danger);border:1px solid rgba(243,92,114,.20)}
.result-card p{color:var(--muted);font-size:11px;line-height:1.65}
.result-actions{margin-top:22px;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.result-actions form{margin:0}

@media(max-width:900px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:fixed;left:0;top:0;width:260px;transform:translateX(-105%);transition:transform .2s ease;box-shadow:20px 0 60px rgba(0,0,0,.32)}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .mobile-backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.52);z-index:19;opacity:0;pointer-events:none;transition:opacity .2s}
  body.sidebar-open .mobile-backdrop{opacity:1;pointer-events:auto}
  .mobile-menu{display:grid;place-items:center}
  .topbar{padding:14px 18px;min-height:74px}
  .content{padding:20px 16px 34px}
  .stats-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  .card{padding:17px}
  .card-head{align-items:flex-start;flex-direction:column}
  .auth-card{padding:22px 17px;border-radius:17px}
  .wizard-steps{padding:14px 10px}
  .wizard-steps small{display:none}
  .wizard-panel{padding:22px 16px;min-height:420px}
  .form-grid,.tow-fields,.choice-grid{grid-template-columns:1fr}
  .review-row{grid-template-columns:1fr;gap:4px}
  .wizard-actions{padding:13px 14px;flex-wrap:wrap}
  .action-spacer{display:none}
  .wizard-actions .btn{flex:1 1 calc(50% - 6px)}
  .history-item{align-items:flex-start}
  .history-state{justify-items:end}
  .topbar h1{font-size:20px}
}


/* Responsive readability pass */
:root{
  --fs-xs:clamp(.75rem,.70rem + .18vw,.86rem);
  --fs-sm:clamp(.875rem,.82rem + .20vw,1rem);
  --fs-md:clamp(1rem,.94rem + .22vw,1.125rem);
  --fs-lg:clamp(1.125rem,1.02rem + .42vw,1.375rem);
  --fs-xl:clamp(1.45rem,1.22rem + .85vw,2rem);
  --fs-2xl:clamp(1.8rem,1.42rem + 1.35vw,2.65rem);
}

body{font-size:var(--fs-md);line-height:1.5}
.app-shell{grid-template-columns:clamp(260px,20vw,300px) minmax(0,1fr)}
.sidebar{padding:clamp(18px,2vw,26px) clamp(14px,1.4vw,20px)}
.brand{padding:4px 8px clamp(20px,2vw,28px)}
.brand-mark{width:44px;height:44px;font-size:1rem}
.brand-mark.large{width:58px;height:58px;font-size:1.1rem}
.brand-copy strong,.auth-brand strong{font-size:var(--fs-md)}
.brand-copy span,.auth-brand span{font-size:var(--fs-xs)}
.nav{gap:8px}
.nav-item{min-height:50px;padding:0 14px;border-radius:12px;font-size:var(--fs-sm)}
.nav-item>span:first-child{width:24px;font-size:1.25rem}
.sidebar-user{gap:12px;padding:14px 8px}
.sidebar-user strong{font-size:var(--fs-sm)}
.sidebar-user span{font-size:var(--fs-xs)}
.avatar{width:40px;height:40px;font-size:var(--fs-sm)}

.topbar{min-height:92px;padding:clamp(16px,2vw,24px) clamp(18px,3vw,38px)}
.topbar h1{font-size:var(--fs-xl)}
.topbar p{font-size:var(--fs-sm);line-height:1.5}
.mobile-menu{width:46px;height:46px;font-size:1.2rem}
.content{width:min(1240px,100%);padding:clamp(20px,3vw,36px) clamp(16px,3vw,38px) clamp(34px,5vw,56px);gap:clamp(18px,2vw,26px)}
.content.narrow{width:min(820px,100%)}
.footer{padding:22px 30px;font-size:var(--fs-xs)}

.card{padding:clamp(20px,2.4vw,30px)}
.card-head{gap:18px;margin-bottom:22px}
.card-head h2,.section-copy h2,.result-card h2{font-size:var(--fs-lg)}
.eyebrow{font-size:var(--fs-xs);letter-spacing:.10em}
.stat-card{min-height:180px;padding:clamp(22px,2.5vw,30px)}
.stat-label{font-size:var(--fs-xs)}
.stat-value{font-size:clamp(3rem,5vw,4.5rem)}
.stat-title{font-size:var(--fs-xl)}
.stat-meta{font-size:var(--fs-sm)}

.btn{min-height:48px;padding:0 18px;border-radius:11px;font-size:var(--fs-sm)}
.alert{padding:16px 18px;font-size:var(--fs-sm);line-height:1.5}
.alert strong{font-size:var(--fs-sm)}
.history-item{min-height:76px;padding:15px 6px}
.history-item strong{font-size:var(--fs-sm)}
.history-item span,.history-item small{font-size:var(--fs-xs);line-height:1.45}
.badge{padding:5px 9px;font-size:var(--fs-xs)}
.empty-state{padding:38px;font-size:var(--fs-sm)}

.auth-shell{padding:clamp(20px,4vw,42px)}
.auth-card{width:min(100%,540px);padding:clamp(24px,4vw,38px)}
.auth-copy{margin:30px 0 24px}
.auth-copy h1{font-size:var(--fs-2xl)}
.auth-copy p{font-size:var(--fs-sm)}
.auth-form{gap:17px}
.auth-form label,.field{gap:8px;font-size:var(--fs-sm)}
.auth-form input,.field input,.field select{height:52px;font-size:var(--fs-md);padding:0 14px}
.field textarea{min-height:128px;padding:14px;font-size:var(--fs-md);line-height:1.5}
.password-toggle{width:40px;height:40px}
.auth-note{padding:14px}
.auth-note strong{font-size:var(--fs-sm)}
.auth-note span{font-size:var(--fs-xs)}

.wizard-steps{padding:20px clamp(14px,2.5vw,30px)}
.wizard-steps li{gap:7px}
.wizard-steps li:not(:last-child)::after{top:17px;left:calc(50% + 21px);right:calc(-50% + 21px)}
.wizard-steps span{width:35px;height:35px;font-size:var(--fs-sm)}
.wizard-steps small{font-size:var(--fs-xs)}
.wizard-panel{padding:clamp(24px,3vw,36px);min-height:420px}
.section-copy{margin-bottom:26px}
.section-copy p{font-size:var(--fs-sm);line-height:1.6}
.form-grid,.tow-fields{gap:clamp(14px,2vw,20px)}
.field legend{font-size:var(--fs-sm)}
.choice-grid{gap:14px}
.choice-card>span{min-height:88px;padding:18px}
.choice-card strong{font-size:var(--fs-md)}
.choice-card small{font-size:var(--fs-sm);line-height:1.4}
.upload-zone{min-height:260px;padding:clamp(26px,4vw,42px);gap:10px}
.upload-icon{width:52px;height:52px;font-size:1.6rem}
.upload-zone strong{font-size:var(--fs-md)}
.upload-zone small{font-size:var(--fs-sm);line-height:1.55}
.file-summary{margin-top:14px;font-size:var(--fs-sm)}
.review-row{grid-template-columns:minmax(150px,190px) 1fr;gap:20px;padding:14px 16px;font-size:var(--fs-sm)}
.submit-note{margin-top:16px;font-size:var(--fs-xs);line-height:1.5}
.wizard-actions{padding:18px clamp(16px,2.5vw,26px);gap:10px}
.result-card{padding:clamp(38px,6vw,64px) clamp(22px,4vw,42px)}
.result-card p{font-size:var(--fs-sm)}
.result-icon{width:72px;height:72px;font-size:2rem}

/* Adaptado del loader proporcionado por el usuario, originalmente atribuido a Uiverse.io / kat_2522 */
body.is-sending{overflow:hidden}
.sending-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(3,13,22,.86);
  backdrop-filter:blur(10px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
}
.sending-overlay.active{
  opacity:1;
  visibility:visible;
  pointer-events:all;
}
.sending-panel{
  width:min(92vw,560px);
  padding:clamp(28px,6vw,54px) clamp(22px,5vw,44px);
  display:grid;
  justify-items:center;
  gap:18px;
  text-align:center;
  border:1px solid rgba(73,165,230,.18);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(13,34,51,.98),rgba(7,20,32,.98));
  box-shadow:0 28px 90px rgba(0,0,0,.45);
}
.loader{
  max-width:fit-content;
  margin:0;
  color:rgb(242,255,240);
  font-size:clamp(2.6rem,8vw,4.2rem);
  line-height:1.1;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  position:relative;
  font-style:italic;
  font-weight:800;
  letter-spacing:-.03em;
}
.loader span{
  display:inline-block;
  animation:sendingCut 2s infinite;
  transition:1s cubic-bezier(.175,.885,.32,1.275);
}
.loader::after{
  position:absolute;
  content:"";
  width:100%;
  height:6px;
  border-radius:4px;
  background-color:#ff828291;
  top:0;
  filter:blur(10px);
  animation:sendingScan 2s infinite;
  left:0;
  z-index:0;
  transition:1s cubic-bezier(.175,.885,.32,1.275);
}
.loader::before{
  position:absolute;
  content:"";
  width:100%;
  height:5px;
  border-radius:4px;
  background-color:#ff8282;
  top:0;
  animation:sendingScan 2s infinite;
  left:0;
  z-index:1;
  filter:opacity(.9);
  transition:1s cubic-bezier(.175,.885,.32,1.275);
}
.sending-copy{margin:0;font-size:var(--fs-md);font-weight:700;color:var(--text)}
.sending-note{margin:0;font-size:var(--fs-sm);color:var(--muted)}
@keyframes sendingScan{
  0%,50%{top:0}
  25%,75%{top:1.1em}
}
@keyframes sendingCut{
  0%,75%,100%{clip-path:inset(0 0 0 0)}
  25%{clip-path:inset(100% 0 0 0)}
  50%{clip-path:inset(0 0 100% 0)}
}

@media(max-width:900px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{width:min(86vw,320px)}
  .topbar{min-height:78px;padding:14px 16px}
  .content{padding:20px 14px 34px}
  .stats-grid{grid-template-columns:1fr}
  .nav-item{min-height:52px}
}

@media(max-width:760px){
  .form-grid,.tow-fields,.choice-grid{grid-template-columns:1fr}
  .wizard-panel{min-height:auto}
  .review-row{grid-template-columns:1fr;gap:5px}
  .wizard-actions{flex-wrap:wrap;position:sticky;bottom:0;z-index:4;backdrop-filter:blur(12px)}
  .action-spacer{display:none}
  .wizard-actions .btn{flex:1 1 calc(50% - 6px)}
}

@media(max-width:620px){
  .card{padding:18px}
  .card-head{align-items:flex-start;flex-direction:column}
  .auth-card{padding:24px 18px;border-radius:18px}
  .wizard-steps{padding:14px 8px}
  .wizard-steps small{font-size:.72rem}
  .wizard-steps span{width:32px;height:32px}
  .wizard-steps li:not(:last-child)::after{top:15px;left:calc(50% + 19px);right:calc(-50% + 19px)}
  .wizard-panel{padding:22px 16px}
  .history-item{align-items:flex-start;gap:12px}
  .history-state{justify-items:end}
  .topbar h1{font-size:clamp(1.35rem,6vw,1.65rem)}
  .topbar p{font-size:.9rem}
  .auth-form input,.field input,.field select,.field textarea{font-size:1rem}
}

@media(max-width:420px){
  .wizard-steps small{display:none}
  .wizard-actions .btn{flex:1 1 100%}
  .history-item{display:grid}
  .history-state{justify-items:start}
  .sending-panel{border-radius:18px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
  .loader span,.loader::before,.loader::after{animation:none}
  .loader::before{top:50%}
  .loader::after{top:50%}
}


/* Wizard motion + persistent file previews */
.wizard-panel.step-enter-forward{
  animation:wizardStepForward .28s cubic-bezier(.2,.8,.2,1);
}
.wizard-panel.step-enter-back{
  animation:wizardStepBack .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes wizardStepForward{
  from{opacity:0;transform:translateX(28px)}
  to{opacity:1;transform:translateX(0)}
}
@keyframes wizardStepBack{
  from{opacity:0;transform:translateX(-28px)}
  to{opacity:1;transform:translateX(0)}
}
.choice-card input:checked+span{
  animation:choiceConfirm .22s ease-out;
}
@keyframes choiceConfirm{
  0%{transform:scale(.985)}
  70%{transform:scale(1.015)}
  100%{transform:scale(1)}
}

.file-preview-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:12px;
}
.file-preview-card{
  position:relative;
  min-width:0;
  padding:10px;
  display:grid;
  grid-template-columns:64px minmax(0,1fr);
  align-items:center;
  gap:11px;
  border:1px solid var(--border-soft);
  border-radius:13px;
  background:rgba(255,255,255,.025);
  animation:filePreviewIn .2s ease-out;
}
@keyframes filePreviewIn{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:translateY(0)}
}
.file-preview-visual{
  width:64px;
  height:64px;
  border-radius:10px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:#081a29;
  border:1px solid var(--border);
}
.file-preview-visual img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.file-type-badge{
  padding:6px 7px;
  border-radius:7px;
  background:rgba(73,165,230,.12);
  color:var(--primary);
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.04em;
}
.file-preview-meta{
  min-width:0;
  display:grid;
  gap:4px;
  padding-right:30px;
}
.file-preview-meta strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:var(--fs-sm);
}
.file-preview-meta small{
  color:var(--muted);
  font-size:var(--fs-xs);
}
.file-remove{
  position:absolute;
  top:7px;
  right:7px;
  width:30px;
  height:30px;
  border:1px solid rgba(243,92,114,.22);
  border-radius:50%;
  display:grid;
  place-items:center;
  padding:0;
  background:rgba(243,92,114,.10);
  color:#ff9cac;
  font-size:1.25rem;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease,transform .16s ease,border-color .16s ease;
}
.file-remove:hover{
  background:rgba(243,92,114,.20);
  border-color:rgba(243,92,114,.38);
  transform:scale(1.06);
}
.file-remove:active{transform:scale(.96)}

@media(max-width:620px){
  .file-preview-grid{grid-template-columns:1fr}
  .file-preview-card{grid-template-columns:72px minmax(0,1fr)}
  .file-preview-visual{width:72px;height:72px}
}

@media(prefers-reduced-motion:reduce){
  .wizard-panel.step-enter-forward,
  .wizard-panel.step-enter-back,
  .choice-card input:checked+span,
  .file-preview-card{animation:none}
}

/* Bootstrap Icons + UI refinements */
.nav-item>i{
  width:24px;
  flex:0 0 24px;
  text-align:center;
  font-size:1.12rem;
  color:#7898ae;
}
.nav-item.active>i{color:var(--primary)}
.password-toggle i{font-size:1.05rem}
.stat-icon{
  width:42px;
  height:42px;
  margin-bottom:14px;
  display:grid;
  place-items:center;
  border:1px solid rgba(73,165,230,.18);
  border-radius:12px;
  background:rgba(73,165,230,.08);
  color:var(--primary);
  font-size:1.25rem;
}
.action-card .stat-icon{
  color:var(--secondary);
  border-color:rgba(45,204,205,.18);
  background:rgba(45,204,205,.07);
}

/* Payment reminder modal: Dashboard only */
body.modal-open{overflow:hidden}
.payment-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(2,10,17,.76);
  backdrop-filter:blur(8px);
  animation:paymentBackdropIn .18s ease-out;
}
.payment-modal-backdrop.closing{
  opacity:0;
  transition:opacity .18s ease;
}
.payment-modal{
  position:relative;
  width:min(100%,500px);
  padding:clamp(26px,5vw,38px);
  border:1px solid rgba(73,165,230,.20);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(14,37,55,.995),rgba(7,22,34,.995));
  box-shadow:0 30px 90px rgba(0,0,0,.52);
  text-align:center;
  animation:paymentModalIn .24s cubic-bezier(.2,.8,.2,1);
}
.payment-modal-icon{
  width:62px;
  height:62px;
  margin:0 auto 16px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(73,165,230,.18),rgba(45,204,205,.12));
  border:1px solid rgba(73,165,230,.22);
  color:var(--primary);
  font-size:1.8rem;
}
.payment-modal h2{
  margin:8px 0 14px;
  font-size:var(--fs-xl);
}
.payment-modal-copy{
  margin:0;
  color:#d6e5ee;
  font-size:var(--fs-sm);
  line-height:1.7;
  white-space:pre-line;
}
.payment-modal-action{
  min-width:150px;
  margin-top:24px;
}
.payment-modal-close{
  position:absolute;
  top:14px;
  right:14px;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:50%;
  background:rgba(255,255,255,.025);
  color:var(--muted);
  font-size:1rem;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
.payment-modal-close:hover{
  background:rgba(255,255,255,.07);
  color:var(--text);
  transform:rotate(4deg);
}
@keyframes paymentBackdropIn{
  from{opacity:0}
  to{opacity:1}
}
@keyframes paymentModalIn{
  from{opacity:0;transform:translateY(18px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:620px){
  .payment-modal-backdrop{padding:14px}
  .payment-modal{padding:28px 18px 22px;border-radius:18px}
  .payment-modal-icon{width:56px;height:56px;font-size:1.55rem}
}
@media(prefers-reduced-motion:reduce){
  .payment-modal-backdrop,.payment-modal{animation:none}
}
