:root {
  --bg: #0f1115;
  --card: #171a21;
  --text: #e6e9ef;
  --muted: #8b93a3;
  --accent: #4f46e5;
  --border: #262b36;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

#app { max-width: 860px; margin: 8vh auto 0; padding: 0 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

h1 { margin: 0 0 4px; font-size: 22px; }
.muted { color: var(--muted); }
.error { color: #ff6b6b; min-height: 1.2em; margin: 8px 0 0; }
.result a { color: #8f9bff; word-break: break-all; }

header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.userbox { display: flex; gap: 12px; align-items: baseline; }

input[type="text"], input[type="url"], input[type="password"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  width: 100%;
}

button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
button.secondary { background: var(--border); }
button.danger { background: transparent; color: #ff6b6b; border: 1px solid var(--danger); }

#login-form { display: grid; gap: 12px; max-width: 340px; margin-top: 16px; }

#create-form { margin: 12px 0 4px; }
#create-form .row { display: flex; gap: 10px; }
#create-form input[type="url"] { flex: 1; }
#create-form details { margin-top: 10px; color: var(--muted); }
#create-form details label { display: block; margin: 8px 0; }
#create-form details input[type="text"] { max-width: 320px; display: block; margin-top: 4px; }
#create-form details .check input { width: auto; }

table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--border); }
td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
td.url { color: var(--muted); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td a { color: #8f9bff; text-decoration: none; }
.tag {
  margin-left: 8px; font-size: 11px; padding: 1px 7px;
  border-radius: 99px; border: 1px solid var(--muted); color: var(--muted);
}
