:root {
  --bg: #0b0e14;
  --panel: #12161f;
  --panel-2: #171c28;
  --border: #232a3a;
  --text: #e6e9f0;
  --text-dim: #8891a5;
  --accent: #6ea8fe;
  --accent-2: #7c5cff;
  --success: #35d68a;
  --danger: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2033 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---- Login ---- */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lock-icon { font-size: 40px; margin-bottom: 8px; }

.login-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle { color: var(--text-dim); font-size: 13px; margin: 0 0 24px; }

#login-form { display: flex; flex-direction: column; gap: 12px; }

input[type="password"], input[type="text"] {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.1s, opacity 0.15s;
}
button:active { transform: scale(0.98); }

#login-form button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0e14;
}
#login-form button:hover { opacity: 0.9; }

.error { color: var(--danger); font-size: 13px; margin-top: 14px; }

/* ---- App ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 22, 31, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.lock-icon-small { font-size: 16px; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.ghost-btn:hover { color: var(--text); border-color: var(--accent); }

.content { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--panel);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: var(--panel-2);
}
.upload-icon { font-size: 28px; color: var(--accent); margin-bottom: 8px; }
.dropzone p { margin: 0; color: var(--text-dim); font-size: 14px; }

.upload-progress { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.2s; }
#progress-text { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0 14px;
}
.list-header h2 { margin: 0; font-size: 16px; }
.count-badge {
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.file-list { display: flex; flex-direction: column; gap: 8px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s, transform 0.1s;
}
.file-row:hover { border-color: #2f3850; }

.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

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

.icon-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 20px;
  font-size: 14px;
}
