:root {
  --bg: #0d0d0f;
  --panel: #17171b;
  --panel-2: #1f1f25;
  --line: #2b2b33;
  --text: #f2f2f4;
  --muted: #9a9aa6;
  --accent: #ff5a1f;
  --ok: #3ecf8e;
  --warn: #f5b942;
  --err: #ff5d5d;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.8rem; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 440px; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { font-weight: 800; letter-spacing: -.01em; color: var(--text); font-size: 1.05rem; }
.brand span { color: var(--accent); }
.topbar form { margin: 0; }

/* panels */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* forms */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: .95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.list li:first-child { border-top: 0; }
.name { overflow-wrap: anywhere; }

.transfer-card {
  display: block; color: var(--text); padding: 16px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); margin-bottom: 10px;
}
.transfer-card:hover { border-color: var(--muted); text-decoration: none; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.badge.sent { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge.draft { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.badge.expired, .badge.deleted { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line); }
.flash.ok { border-color: var(--ok); }
.flash.error { border-color: var(--err); color: #ffd0d0; }

.linkbox {
  display: flex; gap: 8px; align-items: stretch;
}
.linkbox input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

/* uploader */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop input { display: none; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upload-item { padding: 10px 0; border-top: 1px solid var(--line); }
.upload-item:first-child { border-top: 0; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.table-wrap { overflow-x: auto; }

/* public download page */
.hero { text-align: center; padding: 32px 0 8px; }
.hero .kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin: 8px 0; }
.player { width: 100%; border-radius: var(--radius); background: #000; display: block; max-height: 70vh; }
.message { white-space: pre-wrap; }
footer.site { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px; }
