:root {
  --bg: #0f1420;
  --panel: #161d2e;
  --panel-2: #1d2740;
  --border: #2a3451;
  --text: #e8ecf6;
  --text-dim: #93a0c0;
  --accent: #5b8cff;
  --accent-dim: #3a5bcc;
  --danger: #ff6b6b;
  --success: #52d68a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2540 0%, var(--bg) 60%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(22, 29, 46, 0.7);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--text);
}
.brand .logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #8f6bff);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}

.topbar .user-chip {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.page.narrow { max-width: 420px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

h1, h2, h3 { margin-top: 0; }
h2.title { font-size: 22px; margin-bottom: 4px; }
.subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

input[type=text], input[type=password] {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 18px;
}
input:focus { outline: none; border-color: var(--accent); }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--accent-dim); text-decoration: none; }

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

.alert {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 18px;
}
.alert-error { background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.4); color: var(--danger); }
.alert-success { background: rgba(82,214,138,0.12); border: 1px solid rgba(82,214,138,0.4); color: var(--success); }

.foot-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.doc-item .doc-meta { display: flex; align-items: center; gap: 10px; }
.doc-item .doc-icon {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(91,140,255,0.15);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.doc-item .doc-id { font-size: 12px; color: var(--text-dim); }

.doc-view pre {
  white-space: pre-wrap;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13.5px;
  color: var(--text);
}
.breadcrumb { margin-bottom: 18px; font-size: 13px; }

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