@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:         #060a10;
  --bg-2:       rgba(8, 14, 26, 0.92);
  --bg-3:       rgba(15, 22, 38, 0.85);
  --border:     rgba(0, 255, 136, 0.2);
  --border-2:   rgba(0, 255, 136, 0.35);
  --text:       #e8f4f8;
  --text-dim:   #b8dce8;
  --text-muted: #7ab4c4;
  --accent:     #00ff88;
  --accent-dim: #00b060;
  --warn:       #f0a020;
  --danger:     #e05050;
  --canary:     #ffef00;
  --mono:       'IBM Plex Mono', monospace;
  --sans:       'IBM Plex Sans', sans-serif;
}

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

html, body, #app {
  min-height: 100%;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  background-image: url('/bg-circuit.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: var(--sans);
  cursor: pointer;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,255,136,0.4); }

/* ── Buttons ─────────────────────────────────── */
.btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #04140a;
  font-weight: 500;
}
.btn-primary:hover { background: #33ffa0; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  border: 1px solid var(--border-2);
  color: var(--canary);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 255, 136, 0.07);
}
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-danger {
  border: 1px solid var(--danger);
  color: var(--danger);
  background: transparent;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── Login screen ────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 360px;
  padding: 44px 40px;
  background: rgba(4, 10, 20, 0.92);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.08), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.logo-icon { width: 28px; height: 28px; flex-shrink: 0; }

.sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.field input {
  font-family: var(--mono);
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
}
.field input:focus { border-color: var(--accent); }

.error {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--danger);
  padding: 8px 10px;
  background: rgba(224, 80, 80, 0.1);
  border: 1px solid rgba(224, 80, 80, 0.3);
  border-radius: 3px;
}

.submit {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── Main app shell ───────────────────────────── */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px;
  height: 52px;
  background: rgba(4, 10, 20, 0.92);
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.4);
}
.nav .left { display: flex; align-items: center; gap: 10px; }
.nav .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--canary);
  justify-self: center;
}
.nav .brand img { width: 20px; height: 20px; }
.nav .right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.nav .session-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.page {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 36px 24px;
  box-sizing: border-box;
}

.page-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--canary);
  margin: 0;
  text-shadow: 0 0 18px rgba(255, 239, 0, 0.25);
}
.page-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ── Dropzone ─────────────────────────────────── */
.dropzone {
  background: rgba(4, 10, 20, 0.85);
  border: 2px dashed rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 28px;
  transition: all 0.15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(0, 255, 136, 0.05);
}
.dropzone-icon { font-size: 32px; margin-bottom: 10px; }
.dropzone-text {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.dropzone-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.dropzone input[type="file"] { display: none; }

.upload-panel {
  background: rgba(4, 10, 20, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 8px;
  padding: 22px 26px;
  margin-top: -8px;
  margin-bottom: 28px;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.12);
}

.upload-panel-title {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--canary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-shadow: 0 0 14px rgba(255, 239, 0, 0.3);
}

.upload-panel-size {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.upload-panel-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.upload-panel-fill {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  border-radius: 5px;
  transition: width 0.15s ease;
}

.upload-panel-pct {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.upload-panel-error {
  border-color: rgba(224, 80, 80, 0.5);
  box-shadow: 0 0 30px rgba(224, 80, 80, 0.15);
}
.upload-panel-error .upload-panel-title { color: var(--danger); text-shadow: 0 0 14px rgba(224, 80, 80, 0.3); }
.upload-panel-error .upload-panel-size { color: var(--danger); }

.upload-panel-success {
  border-color: rgba(0, 255, 136, 0.5);
}
.upload-panel-success .upload-panel-title { color: var(--accent); text-shadow: 0 0 14px rgba(0, 255, 136, 0.4); }

/* ── File list ────────────────────────────────── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-card {
  background: rgba(4, 10, 20, 0.92);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.file-info { flex: 1; min-width: 0; }
.file-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--accent);
  background: rgba(0, 255, 136, 0.07);
  flex-shrink: 0;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.empty-state {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

.loading {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  padding: 40px 0;
  text-align: center;
}
