:root{--bg:#f5f7fb;--surface:#fff;--surface2:#f0f3f8;--text:#15213d;--muted:#68758d;--border:#dfe5ef;--primary:#536dfe;--primary2:#4057dc;--accent:#14b8a6;--shadow:0 14px 45px rgba(20,33,61,.08);--radius:20px;color-scheme:light}
html[data-theme="dark"]{--bg:#0b1220;--surface:#121b2d;--surface2:#1a2538;--text:#eef3ff;--muted:#aab5ca;--border:#2a3850;--primary:#7184ff;--primary2:#8b9aff;--accent:#27cbb9;--shadow:0 18px 50px rgba(0,0,0,.28);color-scheme:dark}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);line-height:1.55}a{color:inherit}.site-header{min-height:76px;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:24px;padding:0 clamp(18px,5vw,72px);position:sticky;top:0;z-index:50}.brand,.footer-brand{display:inline-flex;align-items:center;gap:10px;text-decoration:none;font-weight:900;letter-spacing:-.4px}.brand{font-size:24px}.brand>span:last-child>span{color:var(--primary)}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--accent));font-size:20px}.site-nav{display:flex;gap:24px;margin-left:auto}.site-nav a{text-decoration:none;color:var(--muted);font-weight:700}.site-nav a:hover{color:var(--text)}.header-actions{display:flex;align-items:center;gap:10px}.icon-btn,.header-cta,.btn,.primary{border:0;border-radius:12px;font:inherit;font-weight:800;cursor:pointer}.icon-btn{width:42px;height:42px;background:var(--surface2);color:var(--text);border:1px solid var(--border)}.header-cta,.btn,.primary{display:inline-flex;align-items:center;justify-content:center;background:var(--primary);color:#fff;padding:12px 17px;text-decoration:none;box-shadow:0 8px 20px rgba(83,109,254,.18)}.header-cta:hover,.btn:hover,.primary:hover{background:var(--primary2);transform:translateY(-1px)}
main{min-height:65vh}.hero{max-width:1150px;margin:auto;text-align:center;padding:110px 20px 80px}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 22%,var(--border));border-radius:999px;padding:7px 12px;font-weight:900;letter-spacing:1.8px;font-size:12px}.hero h1{font-size:clamp(48px,7vw,82px);line-height:1.02;letter-spacing:-3px;margin:22px 0 20px}.hero h1 span{background:linear-gradient(90deg,var(--primary),var(--accent));-webkit-background-clip:text;background-clip:text;color:transparent}.hero p:not(.eyebrow){max-width:720px;margin:0 auto;color:var(--muted);font-size:20px}.hero .btn{margin-top:28px}.hero-stats{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:38px}.stat{padding:10px 15px;border:1px solid var(--border);background:var(--surface);border-radius:999px;color:var(--muted);font-size:14px;font-weight:700}
section#tools{max-width:1280px;margin:auto;padding:40px 22px 90px}h2{text-align:center;font-size:42px;letter-spacing:-1.5px;margin:10px 0 12px}.section-lead{text-align:center;color:var(--muted);margin:0 auto 30px;max-width:680px}.tool-toolbar{display:flex;gap:12px;max-width:850px;margin:0 auto 28px;flex-wrap:wrap}.tool-search{flex:1;min-width:240px}.category-filter{display:flex;gap:8px;overflow:auto;padding-bottom:4px;margin-bottom:25px}.filter-btn{white-space:nowrap;border:1px solid var(--border);background:var(--surface);color:var(--muted);padding:9px 13px;border-radius:999px;font-weight:800;cursor:pointer}.filter-btn.active{background:var(--text);color:var(--bg)}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:22px;text-decoration:none;min-height:155px;box-shadow:var(--shadow);transition:.18s;overflow:hidden}.card:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--primary),var(--accent));opacity:0;transition:.18s}.card:hover{transform:translateY(-4px)}.card:hover:before{opacity:1}.card b{display:block;font-size:18px;margin-bottom:10px}.card span{display:block;color:var(--muted);font-size:14px;line-height:1.5}.card.hidden{display:none}.about{padding:80px 22px;background:var(--surface);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.points{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;max-width:1200px;margin:30px auto 0}.points div{padding:22px;text-align:center;border:1px solid var(--border);border-radius:16px;background:var(--surface2);font-weight:700}
.tool{max-width:980px;margin:auto;padding:45px 20px 90px}.back{display:inline-flex;align-items:center;gap:7px;margin-bottom:22px;text-decoration:none;color:var(--muted);font-weight:800}.tool h1{font-size:clamp(38px,5vw,58px);line-height:1.1;letter-spacing:-1.5px;margin:10px 0}.tool>p,.page-subtitle{font-size:18px;color:var(--muted);line-height:1.65}.box,.card,.form-panel,.preview-panel,.section{background:var(--surface)!important;border-color:var(--border)!important;box-shadow:var(--shadow)}input,select,textarea{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:11px}.result{background:var(--surface2)!important;color:var(--text)}button:disabled{opacity:.6}.site-footer{background:var(--surface);border-top:1px solid var(--border);padding:38px clamp(18px,5vw,72px) 22px;color:var(--muted)}.footer-main{max-width:1280px;margin:auto;display:flex;justify-content:space-between;gap:40px}.footer-brand{color:var(--text);font-size:21px}.footer-main p{max-width:430px;margin:8px 0 0}.footer-links{display:flex;gap:15px;flex-wrap:wrap;align-content:flex-start;justify-content:flex-end}.footer-links a{font-weight:700;text-decoration:none}.footer-bottom{max-width:1280px;margin:25px auto 0;padding-top:18px;border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;font-size:13px}.footer-bottom strong{color:var(--text)}
.legal{max-width:900px;margin:auto;padding:55px 20px 90px}.legal h1{font-size:50px;letter-spacing:-1.5px}.legal h2{font-size:27px;text-align:left;margin-top:35px}.legal p,.legal li{color:var(--muted);line-height:1.75}.legal .legal-card{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:28px;box-shadow:var(--shadow)}
@media(max-width:1050px){.grid{grid-template-columns:repeat(3,1fr)}.points{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.site-header{padding:10px 15px;flex-wrap:wrap;gap:10px}.site-nav{order:3;width:100%;overflow:auto;margin:0;padding-bottom:4px;gap:18px}.header-cta{display:none}.hero{padding:80px 18px 65px}.hero h1{letter-spacing:-2px}.hero p:not(.eyebrow){font-size:17px}.grid{grid-template-columns:repeat(2,1fr)}.footer-main{flex-direction:column}.footer-links{justify-content:flex-start}}@media(max-width:520px){.brand{font-size:21px}.brand-mark{width:34px;height:34px}.grid,.points{grid-template-columns:1fr}.tool{padding-top:30px}.hero h1{font-size:43px}.legal h1{font-size:38px}h2{font-size:34px}.card{min-height:auto}}


/* ===== V40.1 Colorful Advanced UI ===== */
:root{
  --primary:#5b5ff7;--primary2:#7c3aed;--accent:#06b6d4;
  --pink:#ec4899;--orange:#f97316;--green:#10b981;--yellow:#eab308;
}
body{background:
  radial-gradient(circle at 8% 8%,rgba(91,95,247,.10),transparent 25%),
  radial-gradient(circle at 92% 18%,rgba(6,182,212,.10),transparent 24%),
  var(--bg)}
.hero{position:relative;overflow:hidden;padding-top:125px;padding-bottom:95px}
.hero:before,.hero:after{content:"";position:absolute;border-radius:50%;filter:blur(4px);pointer-events:none;z-index:-1}
.hero:before{width:280px;height:280px;left:-100px;top:70px;background:rgba(236,72,153,.13)}
.hero:after{width:330px;height:330px;right:-120px;top:30px;background:rgba(6,182,212,.13)}
.hero .eyebrow{background:linear-gradient(90deg,rgba(91,95,247,.12),rgba(6,182,212,.12));box-shadow:0 8px 25px rgba(91,95,247,.08)}
.hero .btn,.header-cta,.primary{background:linear-gradient(135deg,#5b5ff7,#7c3aed 55%,#06b6d4);box-shadow:0 12px 28px rgba(91,95,247,.25)}
.hero-stats .stat:nth-child(1){border-color:rgba(91,95,247,.28);background:rgba(91,95,247,.07)}
.hero-stats .stat:nth-child(2){border-color:rgba(16,185,129,.28);background:rgba(16,185,129,.07)}
.hero-stats .stat:nth-child(3){border-color:rgba(236,72,153,.28);background:rgba(236,72,153,.07)}
.hero-stats .stat:nth-child(4){border-color:rgba(249,115,22,.28);background:rgba(249,115,22,.07)}
section#tools{position:relative}
section#tools:before{content:"";display:block;width:110px;height:6px;margin:0 auto 24px;border-radius:99px;background:linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4)}
.tool-toolbar{max-width:1100px;margin:0 auto 20px}
.tool-search{
  width:100%;height:64px;min-width:0;padding:0 22px 0 24px;font-size:18px;font-weight:650;
  border:2px solid transparent!important;
  background:linear-gradient(var(--surface),var(--surface)) padding-box,
             linear-gradient(90deg,#5b5ff7,#ec4899,#f97316,#06b6d4) border-box!important;
  border-radius:18px!important;outline:none;
  box-shadow:0 12px 35px rgba(91,95,247,.12),inset 0 0 0 1px rgba(255,255,255,.25);
  transition:.2s ease
}
.tool-search::placeholder{color:var(--muted);opacity:.85}
.tool-search:focus{box-shadow:0 0 0 5px rgba(91,95,247,.12),0 16px 40px rgba(91,95,247,.16);transform:translateY(-1px)}
.category-filter{justify-content:center;gap:10px;margin:0 auto 32px;flex-wrap:wrap;overflow:visible}
.filter-btn{padding:11px 18px;font-size:14px;transition:.18s;border-radius:999px;background:var(--surface);box-shadow:0 5px 15px rgba(20,33,61,.05)}
.filter-btn:hover{transform:translateY(-2px);border-color:var(--primary);color:var(--text)}
.filter-btn.active{background:linear-gradient(135deg,#5b5ff7,#7c3aed);color:#fff;border-color:transparent;box-shadow:0 9px 22px rgba(91,95,247,.22)}
.filter-btn:nth-child(3).active{background:linear-gradient(135deg,#ec4899,#f97316)}
.filter-btn:nth-child(4).active{background:linear-gradient(135deg,#06b6d4,#0ea5e9)}
.filter-btn:nth-child(5).active{background:linear-gradient(135deg,#10b981,#06b6d4)}
.filter-btn:nth-child(6).active{background:linear-gradient(135deg,#f97316,#eab308)}
.filter-btn:nth-child(7).active{background:linear-gradient(135deg,#8b5cf6,#ec4899)}
.grid{gap:20px}
.card{min-height:165px;border-radius:20px;box-shadow:0 12px 32px rgba(20,33,61,.07);transition:transform .2s,box-shadow .2s,border-color .2s}
.card:after{content:"→";position:absolute;right:18px;bottom:15px;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--surface2);color:var(--primary);font-weight:900;opacity:0;transform:translateX(-5px);transition:.2s}
.card:hover{transform:translateY(-6px);box-shadow:0 18px 42px rgba(20,33,61,.12);border-color:color-mix(in srgb,var(--primary) 35%,var(--border))}
.card:hover:after{opacity:1;transform:translateX(0)}
.card:before{height:4px;opacity:1;background:linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4)}
.card b{font-size:18px;line-height:1.35;padding-right:25px}
.card span{max-width:92%}
@media(max-width:760px){.tool-search{height:58px;font-size:16px}.category-filter{justify-content:flex-start;flex-wrap:nowrap;overflow:auto;padding:4px 2px 10px}.filter-btn{padding:10px 15px}.hero{padding-top:90px}}

/* ===== V40.2 File Upload UI ===== */
input[type="file"]{
  display:block;
  width:100%;
  min-height:64px;
  padding:8px 12px;
  margin:8px 0 18px;
  border:2px dashed color-mix(in srgb,var(--primary) 42%,var(--border)) !important;
  border-radius:18px !important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 6%,var(--surface)),color-mix(in srgb,var(--accent) 5%,var(--surface))) !important;
  color:var(--muted);
  font:600 16px/1.4 inherit;
  cursor:pointer;
  transition:.2s ease;
}
input[type="file"]:hover{
  border-color:var(--primary) !important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 10%,var(--surface)),color-mix(in srgb,var(--pink) 7%,var(--surface))) !important;
  box-shadow:0 10px 28px rgba(91,95,247,.10);
}
input[type="file"]:focus{
  outline:none;
  border-color:var(--accent) !important;
  box-shadow:0 0 0 5px rgba(6,182,212,.12),0 12px 30px rgba(91,95,247,.10);
}
input[type="file"]::file-selector-button{
  margin-right:14px;
  padding:12px 20px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,#5b5ff7,#7c3aed 55%,#06b6d4);
  color:#fff;
  font:800 15px/1 inherit;
  cursor:pointer;
  box-shadow:0 7px 18px rgba(91,95,247,.22);
}
input[type="file"]::-webkit-file-upload-button{
  margin-right:14px;
  padding:12px 20px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg,#5b5ff7,#7c3aed 55%,#06b6d4);
  color:#fff;
  font:800 15px/1 inherit;
  cursor:pointer;
}
.box input[type="file"],.card input[type="file"]{width:100%;}
@media(max-width:520px){
  input[type="file"]{min-height:58px;font-size:14px;padding:6px 8px;}
  input[type="file"]::file-selector-button,input[type="file"]::-webkit-file-upload-button{padding:10px 14px;font-size:14px;margin-right:9px;}
}

/* ===== V40.3 GLOBAL FILE UPLOAD UI ===== */
input[type="file"]{
  display:block !important;
  width:100% !important;
  min-width:100% !important;
  height:66px !important;
  padding:8px !important;
  margin:0 0 18px !important;
  border:2px dashed transparent !important;
  border-radius:16px !important;
  background:
    linear-gradient(var(--surface),var(--surface)) padding-box,
    linear-gradient(90deg,#5b5ff7,#ec4899,#f97316,#06b6d4) border-box !important;
  color:var(--text) !important;
  font:700 15px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
  cursor:pointer !important;
  box-shadow:0 8px 24px rgba(91,95,247,.09) !important;
  transition:all .2s ease !important;
}
input[type="file"]::file-selector-button{
  height:48px !important;
  margin-right:14px !important;
  padding:0 20px !important;
  border:0 !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,#5b5ff7,#7c3aed 55%,#06b6d4) !important;
  color:#fff !important;
  font:800 15px Inter,ui-sans-serif,system-ui,sans-serif !important;
  cursor:pointer !important;
  box-shadow:0 7px 18px rgba(91,95,247,.22) !important;
  transition:transform .18s ease,filter .18s ease !important;
}
input[type="file"]::-webkit-file-upload-button{
  height:48px !important;
  margin-right:14px !important;
  padding:0 20px !important;
  border:0 !important;
  border-radius:12px !important;
  background:linear-gradient(135deg,#5b5ff7,#7c3aed 55%,#06b6d4) !important;
  color:#fff !important;
  font:800 15px Inter,ui-sans-serif,system-ui,sans-serif !important;
  cursor:pointer !important;
}
input[type="file"]:hover{
  border-style:solid !important;
  transform:translateY(-1px) !important;
  box-shadow:0 12px 30px rgba(91,95,247,.14) !important;
}
input[type="file"]:focus{
  outline:none !important;
  border-style:solid !important;
  box-shadow:0 0 0 5px rgba(91,95,247,.12),0 12px 30px rgba(91,95,247,.14) !important;
}
input[type="file"]::file-selector-button:hover{filter:brightness(1.08);transform:translateY(-1px)}
.box>input[type="file"],.card>input[type="file"],.form-panel>input[type="file"]{margin-bottom:18px !important}
@media(max-width:600px){
  input[type="file"]{height:62px !important;font-size:13px !important}
  input[type="file"]::file-selector-button,input[type="file"]::-webkit-file-upload-button{height:44px !important;padding:0 14px !important;margin-right:10px !important;font-size:13px !important}
}


/* ===== V40.4 ADVANCED FORM CONTROLS ===== */
/* Large, readable controls for passwords, URLs, text fields and quality settings */
.box input[type="text"],
.box input[type="password"],
.box input[type="number"],
.card input[type="text"],
.card input[type="password"],
.card input[type="number"]{
  box-sizing:border-box !important;
  width:100% !important;
  min-width:0 !important;
  min-height:58px !important;
  padding:0 18px !important;
  margin:0 0 16px !important;
  border:2px solid transparent !important;
  border-radius:14px !important;
  background:
    linear-gradient(var(--surface),var(--surface)) padding-box,
    linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4) border-box !important;
  color:var(--text) !important;
  font:600 17px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
  box-shadow:0 6px 18px rgba(91,95,247,.08) !important;
  transition:.2s ease !important;
}
.box input[type="text"]::placeholder,
.box input[type="password"]::placeholder,
.box input[type="number"]::placeholder,
.card input[type="text"]::placeholder,
.card input[type="password"]::placeholder,
.card input[type="number"]::placeholder{
  color:var(--muted) !important;
  opacity:.9;
}
.box input[type="text"]:focus,
.box input[type="password"]:focus,
.box input[type="number"]:focus,
.card input[type="text"]:focus,
.card input[type="password"]:focus,
.card input[type="number"]:focus{
  outline:none !important;
  border-color:transparent !important;
  box-shadow:0 0 0 5px rgba(91,95,247,.12),0 10px 26px rgba(91,95,247,.12) !important;
  transform:translateY(-1px);
}

/* Bigger select/dropdown controls */
.box select,
.card select,
select{
  box-sizing:border-box !important;
  min-height:56px !important;
  padding:0 16px !important;
  border:2px solid transparent !important;
  border-radius:14px !important;
  background:
    linear-gradient(var(--surface),var(--surface)) padding-box,
    linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4) border-box !important;
  color:var(--text) !important;
  font:700 16px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
}

/* Quality label and slider */
.box label,
.card label{
  display:block !important;
  margin:4px 0 10px !important;
  color:var(--text) !important;
  font-size:17px !important;
  font-weight:700 !important;
}
.box input[type="range"],
.card input[type="range"],
input[type="range"]{
  display:block !important;
  width:100% !important;
  height:42px !important;
  margin:0 0 18px !important;
  accent-color:#6d4aff !important;
  cursor:pointer !important;
}
.box input[type="range"]::-webkit-slider-runnable-track,
.card input[type="range"]::-webkit-slider-runnable-track{
  height:10px;
  border-radius:999px;
  background:linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4);
}
.box input[type="range"]::-webkit-slider-thumb,
.card input[type="range"]::-webkit-slider-thumb{
  width:24px;
  height:24px;
  margin-top:-7px;
  border:3px solid #fff;
  border-radius:50%;
  background:#6d4aff;
  box-shadow:0 3px 12px rgba(91,95,247,.35);
  -webkit-appearance:none;
}
.box input[type="range"]::-moz-range-track,
.card input[type="range"]::-moz-range-track{
  height:10px;
  border-radius:999px;
  background:linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4);
}
.box input[type="range"]::-moz-range-thumb,
.card input[type="range"]::-moz-range-thumb{
  width:22px;
  height:22px;
  border:3px solid #fff;
  border-radius:50%;
  background:#6d4aff;
  box-shadow:0 3px 12px rgba(91,95,247,.35);
}

/* Buttons stay comfortable beside/under the larger controls */
.box button.primary,
.card button.primary{
  min-height:52px !important;
  padding:0 22px !important;
  border-radius:13px !important;
  font-size:16px !important;
}

@media(max-width:700px){
  .box input[type="text"],
  .box input[type="password"],
  .box input[type="number"],
  .card input[type="text"],
  .card input[type="password"],
  .card input[type="number"]{
    min-height:56px !important;
    font-size:16px !important;
  }
  .box select,.card select,select{
    min-height:54px !important;
  }
}

/* ===== V40.5 LARGE FORM CONTROLS ===== */
/* Date of birth / date controls */
.box input[type="date"],
.box input[type="datetime-local"],
.box input[type="time"]{
  width:100% !important;
  min-height:60px !important;
  padding:0 18px !important;
  margin:0 0 16px !important;
  border:2px solid transparent !important;
  border-radius:14px !important;
  background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4) border-box !important;
  color:var(--text) !important;
  font:700 18px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
  box-shadow:0 6px 18px rgba(91,95,247,.08) !important;
}
.box input[type="date"]:focus{outline:none !important;box-shadow:0 0 0 5px rgba(91,95,247,.12),0 10px 26px rgba(91,95,247,.12) !important}

/* Invoice generator: make every user-facing control comfortably large */
.invoice-app .form-panel input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
.invoice-app .form-panel select,
.invoice-app .form-panel textarea{
  min-height:52px !important;
  padding:12px 15px !important;
  font:600 16px/1.35 Inter,ui-sans-serif,system-ui,sans-serif !important;
  border:1.5px solid #cbd5e1 !important;
  border-radius:12px !important;
  background:var(--surface) !important;
  color:var(--text) !important;
}
.invoice-app .form-panel textarea{min-height:105px !important;resize:vertical !important}
.invoice-app .form-panel label{font-size:16px !important;margin:0 0 8px !important;color:var(--text) !important}
.invoice-app .form-panel .section{padding:20px !important}
.invoice-app .form-panel .section h3{font-size:20px !important;margin-bottom:18px !important}
.invoice-app .form-panel .grid2{gap:18px !important}
.invoice-app .form-panel input[type="file"]{min-height:62px !important;font-size:15px !important;padding:7px 9px !important}
.invoice-app .form-panel input[type="file"]::file-selector-button{height:46px !important;padding:0 18px !important;font-size:15px !important}
.invoice-app .form-panel input[type="checkbox"]{width:20px !important;height:20px !important;min-height:20px !important;padding:0 !important}
.invoice-app .form-panel input[type="color"]{width:70px !important;height:52px !important;padding:4px !important;border-radius:12px !important}
.invoice-app .form-panel .item-table input{min-height:48px !important;padding:9px 10px !important;font-size:15px !important}
.invoice-app .form-panel .item-table .num{max-width:none !important}
.invoice-app .form-panel .smallbtn,
.invoice-app .form-panel .template-btn,
.invoice-app .form-panel button.primary{min-height:48px !important;padding:10px 16px !important;font-size:15px !important}
.invoice-app .form-panel .actions .primary{min-height:54px !important;font-size:16px !important}

@media(max-width:700px){
  .box input[type="date"]{min-height:56px !important;font-size:16px !important}
  .invoice-app .form-panel .grid2{grid-template-columns:1fr !important}
  .invoice-app .form-panel input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
  .invoice-app .form-panel select,
  .invoice-app .form-panel textarea{font-size:16px !important}
}

/* ===== FINAL CONTROL POLISH ===== */
.back{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  min-height:42px !important;
  padding:6px 12px !important;
  margin-bottom:10px !important;
  font-size:18px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  border-radius:10px !important;
}
.back:hover{background:color-mix(in srgb,var(--primary) 8%,transparent) !important}
#pages{
  display:block !important;
  width:100% !important;
  min-height:60px !important;
  box-sizing:border-box !important;
  padding:0 18px !important;
  margin:0 0 16px !important;
  border:2px solid transparent !important;
  border-radius:14px !important;
  background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(90deg,#5b5ff7,#ec4899,#06b6d4) border-box !important;
  color:var(--text) !important;
  font:600 17px/1.2 Inter,ui-sans-serif,system-ui,sans-serif !important;
}
#pages::placeholder{color:var(--muted);opacity:.9}
#pages:focus{outline:none !important;box-shadow:0 0 0 5px rgba(91,95,247,.12),0 10px 26px rgba(91,95,247,.12) !important}
.size-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:4px}
.size-grid>div{padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.size-grid span{display:block;color:var(--muted);font-size:13px;margin-bottom:4px}
.size-grid b{font-size:16px;color:var(--text)}
.success{color:#126b3a}
.error{color:#a12a2a}
@media(max-width:760px){.size-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.back{font-size:17px}}
@media(max-width:480px){.size-grid{grid-template-columns:1fr}.back{font-size:16px}}

.brand-mark img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}
