:root {
  --accent: #0068B7;
  --accent-2: #00A0E9;
  --ink: #1a2733;
  --muted: #5a6b7b;
  --line: #e2e8ef;
  --bg: #eef3f8;
  --card: #ffffff;
  --ok: #1f9d55;
  --err: #d64545;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0,160,233,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(0,104,183,.14), transparent 55%),
    var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(20,45,70,.12);
  padding: 34px 32px;
}
.card.wide { max-width: 760px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.brand .name { font-weight: 700; letter-spacing: .2px; }
.brand .sub { color: var(--muted); font-size: 12px; }
h1 { font-size: 20px; margin: 14px 0 4px; }
.lead { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input[type=email], input[type=password], input[type=text], select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fbfdff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(0,160,233,.15); }
.row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.check input { width: auto; }
a { color: var(--accent); text-decoration: none; font-size: 13px; }
a:hover { text-decoration: underline; }
button.primary {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #0059a0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover { filter: brightness(1.06); }
button.primary:disabled { opacity: .6; cursor: default; }
.msg { margin-top: 16px; font-size: 13.5px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.err { background: #fdeaea; color: var(--err); }
.msg.ok { background: #e9f7ee; color: var(--ok); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
/* admin */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.pill.admin { background: #e6f0fb; color: var(--accent); }
.pill.viewer { background: #eef1f4; color: var(--muted); }
.pill.invited { background: #fff3e0; color: #b26a00; }
.pill.active { background: #e9f7ee; color: var(--ok); }
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); }
.linkbtn { background: none; border: none; color: var(--err); cursor: pointer; font-size: 13px; padding: 0; }
.inviterow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.inviterow .grow { flex: 1 1 220px; }
.inviterow button { padding: 11px 18px; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; height: 43px; }
.section { margin-top: 26px; }
.section h2 { font-size: 15px; margin: 0 0 4px; }
.copybox { margin-top: 10px; font-size: 12px; word-break: break-all; background: #f5f8fb; border: 1px dashed var(--line); border-radius: 8px; padding: 10px; color: var(--muted); display: none; }
.copybox.show { display: block; }
