:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e2e8f0;
  --muted: #64748b;
  --accent: #6366f1;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 8px;
}

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

body {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

nav {
  padding: 0.875rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--surface);
}

nav .brand {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  margin-right: auto;
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.alert {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 13px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="password"],
input[type="datetime-local"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus { border-color: var(--accent); }

input[type="file"] {
  width: 100%;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
  display: block;
}

input[type="file"]:hover { border-color: var(--accent); }

.radio-group { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

input[type="radio"] { accent-color: var(--accent); cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { opacity: 0.85; }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }

.btn-secondary { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-secondary:hover { color: var(--text); border-color: #4a4d5a; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Dashboard */
.file-list { width: 100%; border-collapse: collapse; }

.file-list th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.file-list td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list tr:last-child td { border-bottom: none; }
.file-list tbody tr:hover td { background: rgba(255,255,255,0.025); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-view    { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-date    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-expired { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-viewed  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.badge-unseen  { background: rgba(100,116,139,0.15); color: #94a3b8; }

.token-code {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Upload per-file settings */
.file-settings-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.file-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.file-size { color: var(--muted); font-size: 12px; font-weight: 400; }

.expires-field { display: none; margin-top: 0.75rem; }
.expires-field.visible { display: block; }

/* Login */
.login-wrap { max-width: 360px; margin: 5rem auto; }
.login-wrap h1 { margin-bottom: 1.75rem; text-align: center; letter-spacing: -0.01em; }

/* Link box */
.link-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.625rem 0.5rem 0.875rem;
}

.link-box span {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  transition: background 0.15s;
  white-space: nowrap;
}

.copy-btn:hover { background: rgba(99,102,241,0.1); }

/* Info table in manage */
.info-table td {
  padding: 0.35rem 0;
  font-size: 13px;
  vertical-align: top;
}

.info-table td:first-child {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-right: 1.5rem;
  white-space: nowrap;
  padding-top: 0.45rem;
}

/* Empty state */
.empty { text-align: center; padding: 4rem 2rem; color: var(--muted); }
.empty a { color: var(--accent); text-decoration: none; }

/* Gone / error pages */
.error-wrap { text-align: center; padding: 6rem 2rem; }
.error-wrap h1 { font-size: 3rem; color: var(--muted); margin-bottom: 1rem; }
.error-wrap p { color: var(--muted); font-size: 13px; }

/* Actions row */
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
