@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0d12;
  --bg-2: #0f1218;
  --panel: #151922;
  --panel-2: #1c212c;
  --border: #262d3a;
  --border-2: #303849;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --muted-2: #6c7589;
  --accent: #6c8cff;
  --accent-2: #4a6df0;
  --accent-glow: rgba(108, 140, 255, 0.18);
  --danger: #f25f63;
  --ok: #3ac478;
  --warn: #e8a93d;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 90% -10%, rgba(108, 140, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(108, 140, 255, 0.05), transparent 60%);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
code, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.container { max-width: 1080px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(15, 18, 24, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow), 0 0 0 4px rgba(108,140,255,0.08);
}
.user-area { display: flex; gap: 14px; align-items: center; }
.user-area .who { color: var(--muted); font-size: 13px; }

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 28px rgba(0,0,0,0.25);
}
.card.narrow { width: 380px; }
.card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.card h2 { margin: 0 0 16px; font-size: 14px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.card .lead { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }

.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); font-size: 13px; margin: 8px 0 0; }

label { display: block; margin: 12px 0; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
input[type=text], input[type=password], input:not([type]) {
  width: 100%; padding: 11px 13px; margin-top: 6px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit;
  transition: border-color .12s, box-shadow .12s;
}
input::placeholder { color: var(--muted-2); }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
button {
  background: var(--accent); color: white; border: 0;
  padding: 10px 16px; border-radius: var(--radius-sm); font: inherit; font-weight: 500; cursor: pointer;
  transition: background .12s, transform .05s;
}
button:hover { background: var(--accent-2); }
button:active { transform: translateY(1px); }
button.full { width: 100%; padding: 12px 16px; margin-top: 8px; font-weight: 600; }
button.btn-link { background: transparent; color: var(--muted); padding: 6px 8px; }
button.btn-link:hover { color: var(--text); background: var(--panel-2); }
button.danger {
  background: transparent; color: var(--danger); border: 1px solid var(--border);
  padding: 6px 12px; font-size: 12.5px;
}
button.danger:hover { background: rgba(242, 95, 99, 0.1); border-color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  background: rgba(255,255,255,0.01);
  transition: border-color .15s, background .15s;
}
.dropzone p { margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(108, 140, 255, 0.07);
}

.progress {
  margin-top: 16px; background: var(--panel-2); border-radius: 999px;
  height: 8px; position: relative; overflow: hidden;
}
.progress #bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #8aa6ff); transition: width .15s; border-radius: 999px; }
.progress #pct {
  position: absolute; right: 4px; top: -22px; font-size: 12px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.recent { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.recent li {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px;
}
.recent .link-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.recent .link-actions a { color: var(--accent); font-size: 12.5px; text-decoration: none; }
.recent .link-actions a:hover { text-decoration: underline; }
.recent code {
  background: rgba(255,255,255,.04); padding: 2px 6px; border-radius: 4px;
  font-size: 11.5px; color: var(--muted);
}

.meter { background: var(--panel-2); border-radius: 999px; height: 10px; overflow: hidden; }
.meter > div { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #8aa6ff); transition: width .25s; border-radius: 999px; }
.meter.warn > div { background: linear-gradient(90deg, var(--warn), #f5c172); }
.meter.crit > div { background: linear-gradient(90deg, var(--danger), #ff8b8e); }

.files-wrap { overflow-x: auto; margin: 0 -4px; }
.files { width: 100%; border-collapse: collapse; min-width: 760px; }
.files th, .files td {
  padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.files thead th { color: var(--muted-2); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.files tbody tr:hover td { background: rgba(255,255,255,0.015); }
.files tbody tr:last-child td { border-bottom: none; }
.files td.col-name { font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files td.col-size, .files th.col-size { white-space: nowrap; color: var(--muted); }
.files td.col-date, .files th.col-date { white-space: nowrap; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.files td.actions { text-align: right; white-space: nowrap; }
.files td.actions button { margin-left: 6px; }

.link-cell { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.link-cell a {
  color: var(--accent); text-decoration: none;
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.link-cell a:hover { text-decoration: underline; }

.copy-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  padding: 6px 11px; font-size: 12px; font-weight: 500;
  transition: background .12s, border-color .12s;
}
.copy-btn:hover { background: var(--border); border-color: var(--border-2); }
.copy-btn.copied { background: var(--ok); color: #fff; border-color: var(--ok); }

.dialog {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0;
  min-width: 360px;
  max-width: 90vw;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.dialog::backdrop { background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.dialog form { padding: 22px 24px; }
.dialog h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ok-msg { color: var(--ok); font-size: 13px; margin: 8px 0 0; }
