/* 管理画面。公開サイトと同じ Prism Rig のトークン (../../docs/DESIGN.md) */
:root {
  --bg: #0b0e17; --bg-deep: #070910; --surface: #111628; --surface-2: #171d35;
  --text: #e6eaf5; --muted: #8a93ad; --line: #232b47;
  --red: #ff2e63; --yellow: #ffe14d; --green: #2bff88; --cyan: #12e6ff; --violet: #b44dff;
  --rainbow: #ff2e63, #ff8a1f, #ffe14d, #2bff88, #12e6ff, #3d6bff, #b44dff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.7;
  font-family: "Zen Kaku Gothic New", sans-serif;
  background-image: linear-gradient(rgba(18, 230, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 230, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px; min-height: 100dvh;
}
a { color: var(--cyan); }
h1, h2 { font-family: "Chakra Petch", "Zen Kaku Gothic New", sans-serif; line-height: 1.3; margin: 0 0 12px; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; height: 60px;
  background: rgba(11, 14, 23, .9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--rainbow), transparent); }
.logo { font-family: "Chakra Petch", sans-serif; font-weight: 700; text-decoration: none; letter-spacing: .04em; }
.rgb { background: linear-gradient(90deg, var(--rainbow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--violet); }
.nav { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--cyan); }
.nav form { margin: 0; }
.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.link:hover { color: var(--text); }
.main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 64px; display: grid; gap: 24px; }
.title { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.card.narrow { max-width: 460px; width: 100%; margin: 6vh auto 0; }
.label { font-family: "JetBrains Mono", monospace; font-size: .72rem; letter-spacing: .1em; color: var(--muted); margin: 0 0 6px; }
.muted { color: var(--muted); }
.who { font-family: "JetBrains Mono", monospace; color: var(--cyan); font-size: .9rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 4px; border: 0;
  background: var(--violet); color: var(--text); font: 700 .95rem "Zen Kaku Gothic New", sans-serif; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.form { display: grid; gap: 14px; }
.form--row { grid-template-columns: 2fr 1fr 2fr auto; align-items: end; }
label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: 1rem "Zen Kaku Gothic New", sans-serif;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(18, 230, 255, .3); }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 6px 12px 10px; }
legend { font-size: .8rem; color: var(--muted); padding: 0 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text); margin-right: 12px; font-size: .88rem; }
.check input { width: auto; }
.err { color: var(--red); border: 1px solid rgba(255, 46, 99, .4); background: rgba(255, 46, 99, .08); padding: 8px 12px; border-radius: 8px; }
.ok { color: var(--green); border: 1px solid rgba(43, 255, 136, .35); background: rgba(43, 255, 136, .06); padding: 10px 12px; border-radius: 8px; display: grid; gap: 8px; }
.ok p { margin: 0; }
.ok textarea { color: var(--text); font-size: .85rem; }
.ok button, .actions button {
  justify-self: start; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; cursor: pointer; font: .8rem "Zen Kaku Gothic New", sans-serif;
}
.actions button:hover { border-color: var(--cyan); }
.actions button.danger:hover { border-color: var(--red); color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); background: var(--bg); transition: border-color .2s; }
.app:hover { border-color: var(--cyan); }
.app span { color: var(--muted); font-size: .88rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
td small { display: block; color: var(--muted); font-size: .75rem; }
td select { width: auto; padding: 4px 8px; font-size: .85rem; }
.badge { font-family: "JetBrains Mono", monospace; font-size: .72rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); }
.badge--active { color: var(--green); border-color: rgba(43, 255, 136, .5); }
.badge--invited { color: var(--yellow); border-color: rgba(255, 225, 77, .5); }
.badge--disabled { color: var(--muted); }
.audit { list-style: none; margin: 0; padding: 0; font-size: .82rem; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.audit time { font-family: "JetBrains Mono", monospace; color: var(--muted); }
.audit span { color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 860px) { .form--row { grid-template-columns: 1fr; } .nav { gap: 12px; font-size: .82rem; } }
