:root {
  --orange: #E2541B;
  --orange-light: #FF8A3D;
  --cream: #FFF6EC;
  --ink: #2B2B2B;
  --muted: #8a8a8a;
  --line: #ececec;
  --danger: #d23b3b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream), #fff 320px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--orange); text-decoration: none; }
.muted { color: var(--muted); }
.center { justify-content: center; }
.inline { display: inline; margin: 0; }

/* TOPBAR */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.5px; }
.x { color: var(--orange); }
.topnav { display: flex; align-items: center; gap: 14px; }
.who { font-size: 14px; color: var(--muted); }

/* FLASH */
.flash { padding: 11px 16px; border-radius: 10px; font-size: 14px; margin: 14px auto; max-width: 920px; }
.flash-success { background: #e8f7ec; color: #1c7a3a; border: 1px solid #b8e6c5; }
.flash-error { background: #fdeaea; color: #b32424; border: 1px solid #f3c2c2; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform .05s, box-shadow .15s, background .15s; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--orange-light), var(--orange)); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(226,84,27,.32); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: #f4f4f4; color: var(--ink); }
.btn-ghost:hover { background: #ececec; }
.btn-ghost.ok { background: #e8f7ec; color: #1c7a3a; }
.btn-danger { background: #fdeaea; color: var(--danger); }
.btn-danger:hover { background: #f8dada; }
.btn-block { width: 100%; }
.btn-big { padding: 16px; font-size: 17px; }

/* AUTH / DOWNLOAD CARDS */
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px 18px; }
.auth-card {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow);
  padding: 38px 34px; width: 100%; max-width: 400px; text-align: center;
}
.auth-logo { margin-bottom: 6px; }
.auth-card h1 { margin: 6px 0 2px; font-size: 30px; letter-spacing: -1px; }
.subtitle { color: var(--muted); margin: 4px 0 22px; }
.form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.form label { font-size: 13px; font-weight: 600; color: #555; display: flex; flex-direction: column; gap: 6px; }
.form input {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit;
}
.form input:focus { outline: none; border-color: var(--orange-light); box-shadow: 0 0 0 3px rgba(255,138,61,.18); }
.note { font-size: 12px; color: var(--muted); margin-top: 18px; }

.download-card .dl-file { margin: 8px 0 18px; }
.dl-ico { font-size: 46px; }
.dl-name { font-size: 20px; margin: 8px 0 2px; word-break: break-word; }

/* CONTAINER / DASHBOARD */
.container { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 26px 18px 60px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.hero h1 { margin: 0 0 2px; font-size: 26px; }

/* UPLOAD */
.upload-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 26px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 2px dashed #e3c9b3; border-radius: var(--radius); padding: 30px 18px; cursor: pointer;
  background: var(--cream); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--orange); background: #fff2e6; }
.dz-emoji { font-size: 34px; }
.dz-title { font-weight: 600; }
.dz-hint { font-size: 12px; color: var(--muted); }
.picked { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.picked-item { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 12px; background: #faf7f3; border-radius: 8px; }
.picked-sum { font-size: 13px; font-weight: 600; color: var(--orange); padding: 2px 4px; }

/* FILE LIST */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-emoji { font-size: 46px; display: block; margin-bottom: 10px; }
.files { display: flex; flex-direction: column; gap: 10px; }
.file-row {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.file-main { display: flex; align-items: center; gap: 12px; min-width: 200px; flex: 1; }
.file-ico { font-size: 26px; }
.file-meta { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.file-sub { font-size: 12px; color: var(--muted); }
.file-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-field {
  width: 190px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 12px; color: #666; background: #fafafa;
}

/* FOOTER */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-top: 1px solid var(--line); background: #fff;
  font-size: 13px; color: #666; flex-wrap: wrap; gap: 6px;
}

@media (max-width: 620px) {
  .file-row { flex-direction: column; align-items: stretch; }
  .file-actions { justify-content: space-between; }
  .link-field { flex: 1; width: auto; }
  .file-name { max-width: 220px; }
}
