*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #A100FF;
  --brand-dark: #7B00C4;
  --brand-tint: #F5EBFF;
  --cta: #D1FF00;
  --cta-dark: #B8E000;
  --ink: #1A1A1A;
  --text: #2E2E33;
  --muted: #71717A;
  --border: #E5E3EA;
  --bg: #FAF9FC;
  --card: #FFFFFF;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(26,26,26,.04), 0 8px 28px rgba(161,0,255,.07);
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .drop-label, .btn-cta, .btn-outline, label, .progress-figure {
  font-family: 'Poppins', sans-serif;
}

.container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.header-inner { display: flex; align-items: center; }

.logo {
  height: 34px;
  width: auto;
  display: block;
}

/* MAIN */
main { flex: 1; padding: 56px 20px 64px; }
main .container { padding: 0; }

/* CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin: 24px 0;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--ink);
}

h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

#form-section .subtitle { margin-bottom: 32px; }

/* FORM */
form { display: flex; flex-direction: column; gap: 22px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.1px;
}

input[type="text"], input[type="tel"] {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

input::placeholder { color: #B4B2BC; }

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(161,0,255,.13);
}

input.invalid {
  border-color: #E11D48;
  box-shadow: 0 0 0 4px rgba(225,29,72,.10);
}

.hint { font-size: 13px; color: var(--muted); }

.field-tip {
  font-size: 13px;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border-radius: 8px;
  padding: 10px 13px;
  line-height: 1.5;
  margin-top: -2px;
}

/* DROP ZONE */
.drop-zone {
  border: 2px dashed #D8D4E2;
  border-radius: 14px;
  background: #FCFBFE;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.drop-icon {
  width: 36px;
  height: 36px;
  stroke: var(--brand);
  margin-bottom: 10px;
}

.drop-label {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.drop-hint { font-size: 14px; color: var(--muted); }

/* FILE SUMMARY */
.file-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--brand);
  border-radius: 12px;
  background: var(--brand-tint);
}

.file-summary-main { display: flex; align-items: center; gap: 12px; }

.file-summary-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--brand);
}

.file-summary-count {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
}

.file-summary-size { font-size: 13px; color: var(--muted); }

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover { color: var(--brand-dark); }

/* PROGRESS */
#progress-section .subtitle { margin-bottom: 30px; }

.progress-figure {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}

.progress-track {
  height: 12px;
  background: #EDEAF3;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) 0%, #C44BFF 100%);
  transition: width .35s cubic-bezier(.4,0,.2,1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* STATUS BADGES */
.status-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.status-badge svg { width: 34px; height: 34px; }

.status-success { background: var(--cta); }
.status-success svg { stroke: var(--ink); }

.status-error { background: #FFE4E9; }
.status-error svg { stroke: #E11D48; }

#success-section .hint { margin-top: 6px; }
#success-section .btn-outline,
#error-section .btn-cta { margin-top: 28px; }

/* BUTTONS */
.btn-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 26px;
  background: var(--cta);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .08s, box-shadow .15s;
  box-shadow: 0 2px 12px rgba(209,255,0,.35);
}

.btn-cta:active { transform: scale(.99); }
.btn-cta:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-cta:disabled .btn-cta-fill { transition: none; transform: scaleX(0); }

/* Warstwa wypełnienia — rozrasta się poziomo od punktu, w którym kursor
   wszedł na przycisk (--hover-x), aż pokryje cały przycisk. */
.btn-cta-fill {
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: var(--hover-x, 50%) center;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
  z-index: 0;
  pointer-events: none;
}

.btn-cta:hover .btn-cta-fill,
.btn-cta:focus-visible .btn-cta-fill {
  transform: scaleX(1);
}

.btn-cta-content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
  transition: color .3s ease;
}

.btn-cta:hover .btn-cta-content,
.btn-cta:focus-visible .btn-cta-content {
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  background: transparent;
  color: var(--brand);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}

.btn-outline:hover { background: var(--brand-tint); }

/* SPINNER */
.spinner { width: 19px; height: 19px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FORM ERROR */
.form-error {
  background: #FFE4E9;
  color: #9F1239;
  font-size: 14px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid #FECDD8;
}

/* UTILITIES */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* FOOTER */
footer {
  padding: 22px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* MOBILE */
@media (max-width: 520px) {
  .card { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  main { padding: 36px 16px 48px; }
  h1 { font-size: 23px; }
  .progress-figure { font-size: 44px; }
  .logo { height: 28px; }
  .progress-meta { font-size: 13px; }
}
