/* ---------- SecureSend portal ---------- */
* { box-sizing: border-box; }
:root {
  --bg: #0b1220;
  --bg-2: #0e1628;
  --bg-3: #111a2f;
  --line: #1e2a44;
  --text: #e2e8f0;
  --muted: #7b8aa8;
  --acc1: #0ea5e9;
  --acc2: #6366f1;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }

a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: linear-gradient(180deg, #0d1426 0%, #0b1220 100%);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: 0.2px; line-height: 1; }
.brand-tag { font-size: 10px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; margin-top: 4px; }
.topnav { display: flex; gap: 6px; margin-left: 24px; }
.topnav a {
  color: #cbd5e1; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 14px;
}
.topnav a:hover { background: rgba(255,255,255,0.04); }
.topnav a.active { color: #fff; background: rgba(14, 165, 233, 0.15); }
.user { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.user-name { font-weight: 500; color: #cbd5e1; }

.container { max-width: 1200px; margin: 0 auto; padding: 28px; }
.footer { text-align: center; padding: 28px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); margin-top: 48px; }

/* ---------- Page head ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0 0 4px; font-size: 28px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.req { color: var(--red); }

/* ---------- Buttons ---------- */
.btn-primary, button.btn-primary {
  background: linear-gradient(90deg, var(--acc1), var(--acc2));
  color: #fff; border: 0; padding: 10px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
  transition: transform 0.05s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4); text-decoration: none; }
.btn-ghost {
  background: transparent; color: #cbd5e1; border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: #2a395a; }
.btn-danger {
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff; border: 0; padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn-sm { padding: 6px 10px; font-size: 12px; }

/* ---------- Cards / forms ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.section-title { color: #fff; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; margin: 22px 0 12px; }
.section-title:first-child { margin-top: 0; }

.form .field { display: block; margin-bottom: 16px; }
.field span { display: block; color: #cbd5e1; font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; background: #0a1120; border: 1px solid var(--line);
  border-radius: 8px; color: #fff; font-size: 14px; font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--acc1); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.field small { color: var(--muted); font-size: 12px; margin-top: 6px; display: block; }
textarea { resize: vertical; min-height: 80px; font-family: 'Menlo','Consolas',monospace; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #2a395a; border-radius: 14px; padding: 36px;
  text-align: center; cursor: pointer; transition: all 0.15s ease;
  background: rgba(14, 165, 233, 0.03);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--acc1); background: rgba(14, 165, 233, 0.07); }
.dz-icon { font-size: 32px; opacity: 0.7; margin-bottom: 6px; }
.dz-title { color: #fff; font-weight: 600; }
.dz-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

.file-list { list-style: none; padding: 0; margin: 14px 0 0; }
.file-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #0a1120; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px;
}
.file-list .fl-name { flex: 1; color: #fff; font-weight: 500; word-break: break-all; }
.file-list .fl-meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.file-list .fl-x { background: transparent; border: 0; color: var(--red); font-size: 18px; cursor: pointer; padding: 0 4px; }
.file-list.static li { background: transparent; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.table th { color: var(--muted); font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 1.3px; background: rgba(255,255,255,0.02); }
.table tr:last-child td { border-bottom: 0; }
.table .cell-strong { color: #fff; font-weight: 600; }
.table.compact th, .table.compact td { padding: 8px 12px; font-size: 13px; }

.chip { display: inline-block; min-width: 22px; padding: 2px 8px; border-radius: 999px; background: rgba(14,165,233,0.15); color: #7dd3fc; font-weight: 600; font-size: 11px; text-align: center; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.badge-amber { background: rgba(251,191,36,0.15); color: #fcd34d; }
.badge-blue { background: rgba(59,130,246,0.18); color: #93c5fd; }
.badge-green { background: rgba(52,211,153,0.18); color: #6ee7b7; }
.badge-gray { background: rgba(148,163,184,0.18); color: #cbd5e1; }
.badge-red { background: rgba(239,68,68,0.18); color: #fca5a5; }

.event { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.04); color: #cbd5e1; text-transform: uppercase; letter-spacing: 0.5px; }
.event-accessed, .event-pin_success { background: rgba(52,211,153,0.18); color: #6ee7b7; }
.event-pin_failed, .event-revoked, .event-expired { background: rgba(239,68,68,0.18); color: #fca5a5; }
.event-requested_pin, .event-sent_to_recipient { background: rgba(59,130,246,0.18); color: #93c5fd; }
.event-purged { background: rgba(148,163,184,0.18); color: #cbd5e1; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 48px; opacity: 0.5; margin-bottom: 8px; }
.empty h2 { margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; }

.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { color: #fff; font-weight: 500; text-align: right; }

.link-box { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: #0a1120; border: 1px solid var(--line); border-radius: 8px; }
.link-box code { color: #7dd3fc; font-size: 13px; flex: 1; word-break: break-all; }

.inline-form { display: inline; }
.inline-form input, .inline-form select { padding: 6px 8px; background: #0a1120; border: 1px solid var(--line); color: #fff; border-radius: 6px; font-size: 12px; max-width: 180px; }

/* ---------- Auth ---------- */
.auth { background: #0b1220; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; }
.auth-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(14,165,233,0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(99,102,241,0.18), transparent 40%);
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, #111a2f 0%, #0e1628 100%);
  border: 1px solid var(--line); border-radius: 18px; padding: 36px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand img { display: block; margin: 0 auto 10px; }
.auth-brand h1 { margin: 0; font-size: 26px; letter-spacing: 0.3px; }
.auth-tag { color: var(--muted); font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 6px; }
.auth-form .field { margin-bottom: 14px; }
.auth-form .btn-primary { width: 100%; padding: 12px; font-size: 15px; }
.auth-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 11px; margin-top: 18px; letter-spacing: 0.3px; }
