:root{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#202332;
  background:#f5f6fb;
  --primary:#667eea;
  --primary2:#764ba2;
  --accent:#f093fb;
  --accent2:#f5576c;
  --text:#202332;
  --muted:#727789;
  --line:#e6e8f0;
  --panel:#ffffff;
  --soft:#f8f9fd;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,#f7f8fc 0,#f3f4f8 100%);min-height:100vh}
.wrap{max-width:1240px;margin:auto;padding:46px 22px 64px}
.hero{margin-bottom:24px}
.eyebrow{display:inline-flex;align-items:center;min-height:26px;padding:0 10px;border-radius:999px;background:#eef0ff;color:#5b6bd8;font-size:10px;font-weight:800;letter-spacing:.12em}
.hero h1{font-size:clamp(30px,3.6vw,42px);line-height:1.08;margin:11px 0 9px;letter-spacing:-.025em;font-weight:780;background:linear-gradient(135deg,var(--primary),var(--primary2));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{font-size:15px;line-height:1.55;color:var(--muted);margin:0;max-width:760px}
.card{background:var(--panel);border:1px solid #eceef5;border-radius:24px;padding:26px;box-shadow:0 18px 55px rgba(44,48,78,.09)}
.drop{position:relative;display:flex;min-height:160px;border:2px dashed #cfd4e7;border-radius:18px;align-items:center;justify-content:center;flex-direction:column;gap:8px;cursor:pointer;background:linear-gradient(180deg,#fbfbfe,#f7f8fd);transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease,background .18s ease;text-align:center;padding:24px}
.drop:before{content:"+";display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:white;font-size:27px;font-weight:400;box-shadow:0 8px 22px rgba(102,126,234,.25);margin-bottom:2px}
.drop:hover,.drop.dragging{border-color:var(--primary);background:#f5f6ff;box-shadow:0 10px 30px rgba(102,126,234,.12);transform:translateY(-1px)}
.drop input{display:none}.drop strong{font-size:16px;font-weight:750}.drop span{color:var(--muted);font-size:13px}
.global-panel{position:relative;margin-top:20px;padding:18px;border:2px solid #b9c1d9;border-radius:17px;background:#f7f8fc;box-shadow:0 8px 22px rgba(61,74,120,.06), inset 0 0 0 1px rgba(255,255,255,.7)}
.global-panel::before{content:"";position:absolute;left:18px;top:18px;bottom:18px;width:4px;border-radius:999px;background:linear-gradient(180deg,var(--primary),var(--primary2));opacity:.85}
.global-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:14px;padding-left:16px}.global-title small,.file-head small,.item-price small,.summary-price small{display:block;color:var(--muted);margin-bottom:4px;font-size:13px;line-height:1.35}.global-title strong,.file-head strong{display:block;font-size:15px;line-height:1.35}.global-grid{display:grid;grid-template-columns:1.2fr 1fr auto;gap:12px;align-items:end;padding-left:16px}.global-grid label,.item-grid label{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:14px;color:#4b5061}
.global-grid select,.item-grid select,.item-grid input{width:100%;height:45px;border:1px solid #d9ddea;border-radius:11px;padding:0 12px;font:inherit;color:var(--text);background:#fff;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.global-grid select:focus,.item-grid select:focus,.item-grid input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(102,126,234,.13)}
.file-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;margin-top:20px}.file-card{min-width:0;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 6px 22px rgba(37,40,67,.05);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.file-card:hover{transform:translateY(-2px);border-color:#d9ddef;box-shadow:0 13px 32px rgba(37,40,67,.09)}
.file-head{display:flex;justify-content:space-between;align-items:center;padding:13px 15px;background:linear-gradient(180deg,#fff,#fafbfe);border-bottom:1px solid #eef0f5;gap:12px}.file-head>div{min-width:0}.file-head strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-body{display:block}.mini-preview{display:flex;align-items:center;justify-content:center;height:230px;padding:15px;background-image:linear-gradient(#f0f1f6 1px,transparent 1px),linear-gradient(90deg,#f0f1f6 1px,transparent 1px);background-size:20px 20px;background-color:#fbfbfd;border-bottom:1px solid #eef0f5;overflow:hidden}.mini-preview svg{width:100%;height:205px;display:block}.preview-status{color:var(--muted);font-size:13px}.file-content{padding:16px}.file-meta{display:inline-flex;max-width:100%;padding:7px 9px;border-radius:9px;background:#f6f7fb;color:#686e80;font-size:13px;margin-bottom:14px;line-height:1.4}.item-grid{display:grid;grid-template-columns:1.25fr 1fr .72fr;gap:10px}.item-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.item-actions .calc-one{min-width:145px}.item-price{min-width:0;text-align:right}.item-price small{margin:0 0 2px}.item-price strong{font-size:22px;display:block;color:#4d5fd0;line-height:1.1;font-weight:780}.item-price span{display:block;color:var(--muted);font-size:13px;font-weight:650;margin-top:3px}
.summary{margin-top:25px;padding-top:22px;border-top:1px solid #eceef4}.summary-price{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-top:16px;padding:19px 20px;border-radius:15px;background:linear-gradient(135deg,#f3f5ff,#f8f3ff);border:1px solid #dde1fb}.summary-price strong{font-size:30px;display:block;color:#4e60d0;font-weight:780}.summary-price span{font-size:14px;font-weight:700;color:#6f7485}.vat{color:var(--muted);font-size:13px;text-align:center;margin-bottom:0}.error{margin-top:12px;background:#fff2f3;color:#a52836;border:1px solid #ffd8dc;padding:12px;border-radius:10px;font-size:13px}.hidden{display:none!important}
button{min-height:44px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;font-size:14px;font-weight:750;cursor:pointer;padding:0 18px;box-shadow:0 5px 14px rgba(102,126,234,.16);transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}button:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(102,126,234,.27)}button:active{transform:translateY(0)}button:disabled{opacity:.55;cursor:wait;transform:none;box-shadow:none}.summary>button{width:100%;height:48px;font-size:15px}.secondary{color:#4d5365;background:#fff;border:1px solid #dcdfea;box-shadow:none}.secondary:hover{border-color:#c7cce0;box-shadow:0 6px 15px rgba(37,40,67,.07)}.small-btn{min-height:38px;height:38px;font-size:13px;font-weight:700}.apply-btn{height:45px;white-space:nowrap}.icon-btn{width:36px;min-height:36px;height:36px;padding:0;border-radius:9px;background:#f2f3f7;color:#747989;border:1px solid #e4e6ee;box-shadow:none;font-size:22px;line-height:1}.icon-btn:hover{color:#9d2937;background:#fff2f3;border-color:#ffd4d9;box-shadow:none}
.loading-overlay{display:none}.is-loading .loading-overlay{display:flex}
@media(max-width:980px){.file-list{grid-template-columns:1fr}.global-grid{grid-template-columns:1fr 1fr auto}.mini-preview{height:215px}}
@media(max-width:720px){.global-grid{grid-template-columns:1fr 1fr}.apply-btn{grid-column:1/-1;width:100%}.item-grid{grid-template-columns:1fr 1fr}.item-grid label:last-child{grid-column:1/-1}.item-actions{align-items:flex-start;flex-direction:column}.item-actions .calc-one{width:100%}.item-price{text-align:left}}
@media(max-width:560px){.wrap{padding:28px 12px 45px}.card{padding:15px;border-radius:18px}.hero h1{font-size:32px}.drop{min-height:145px;padding:18px}.global-grid,.item-grid{grid-template-columns:1fr}.item-grid label:last-child{grid-column:auto}.global-title{align-items:flex-start;flex-direction:column}.small-btn{width:100%}.file-head strong{max-width:250px;overflow-wrap:anywhere}.mini-preview{height:190px}.mini-preview svg{height:170px}.item-actions{gap:10px}.summary-price{align-items:flex-start;flex-direction:column}.summary-price strong{font-size:31px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.drop:hover,.file-card:hover,button:hover{transform:none}}

/* Esilehele embedditav versioon */
body.embed-mode{background:transparent}
body.embed-mode .wrap{max-width:none;padding:0}
body.embed-mode .card{box-shadow:none;border-radius:18px}
body.embed-mode .card{margin:0}
@media(max-width:560px){
  body.embed-mode .wrap{padding:0}
}
