* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f5f5f5; color: #333; padding: 2rem; max-width: 1200px; margin: 0 auto; }
h1 { margin-bottom: 1.5rem; color: #1a1a1a; }
h2 { margin: 1.5rem 0 0.75rem; color: #444; font-size: 1.1rem; }
.section-hint { font-size: 0.78rem; color: #999; margin: -0.5rem 0 0.75rem; line-height: 1.4; }
.role-edit-panel { background: #f8fafc; border-top: 2px solid #e5e7eb; }
.info-icon { display:inline-flex; align-items:center; justify-content:center; width:14px; height:14px; background:#94a3b8; color:#fff; border-radius:50%; font-size:9px; font-weight:700; cursor:help; position:relative; margin-left:4px; flex-shrink:0; vertical-align:middle; line-height:1; }
.info-icon::after { content:attr(data-tip); display:none; position:absolute; left:20px; top:50%; transform:translateY(-50%); background:#1e293b; color:#f8fafc; padding:0.45rem 0.65rem; border-radius:5px; font-size:0.73rem; font-weight:400; line-height:1.45; white-space:normal; width:230px; z-index:500; pointer-events:none; }
.info-icon:hover::after { display:block; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.sync-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-top: 0.75rem; }
.card { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card .label { font-size: 0.8rem; text-transform: uppercase; color: #888; margin-bottom: 0.25rem; }
.card .value { font-size: 1.8rem; font-weight: 700; }
.card .value.green { color: #16a34a; }
.card .value.yellow { color: #ca8a04; }
.card .value.red { color: #dc2626; }
.card .value.blue { color: #2563eb; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
th, td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f9fafb; font-size: 0.75rem; text-transform: uppercase; color: #666; }
td { font-size: 0.85rem; }
.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 0.8rem; }
.footer { margin-top: 2rem; font-size: 0.75rem; color: #999; }
.empty { color: #999; font-style: italic; padding: 1rem; }

/* Forms */
.form-section { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1.5rem; }
.admin-form { display: flex; flex-direction: column; gap: 0.6rem; }
.form-row { display: flex; align-items: center; gap: 0.75rem; }
.form-row label { min-width: 140px; font-size: 0.8rem; font-weight: 600; color: #555; }
.form-row input, .form-row select { flex: 1; padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.form-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.5rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.form-actions button { padding: 0.5rem 1.2rem; background: #2563eb; color: #fff; border: none; border-radius: 4px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.form-actions button:hover { background: #1d4ed8; }
.status-msg { font-size: 0.8rem; }
.status-msg.ok { color: #16a34a; }
.status-msg.err { color: #dc2626; }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.75rem; border: 1px solid #ddd; border-radius: 3px; cursor: pointer; background: #fff; }
.btn-small:hover { background: #f3f4f6; }
.btn-delete { color: #dc2626; border-color: #fca5a5; }
.btn-delete:hover { background: #fef2f2; }
.input-with-btn { flex: 1; display: flex; gap: 0.5rem; align-items: center; }
.input-with-btn select { flex: 1; padding: 0.4rem 0.6rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.85rem; }
.input-with-btn select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
details.add-role-details { margin-top: 1rem; }
details.add-role-details summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: #2563eb; }
details.add-role-details[open] summary { margin-bottom: 0.75rem; }

/* ── Top navigation ───────────────────────────────────────────────────────── */
body { padding-top: calc(52px + 2rem); }
.top-nav { position: fixed; top: 0; left: 0; right: 0; height: 52px; background: #1a1a1a; display: flex; align-items: center; gap: 0.75rem; padding: 0 1.25rem; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.nav-brand { color: #fff; font-weight: 600; font-size: 0.9rem; text-decoration: none; letter-spacing: 0.01em; }
.nav-burger { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 6px; border-radius: 4px; }
.nav-burger:hover { background: rgba(255,255,255,0.1); }
.nav-burger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
.nav-overlay.show { display: block; }
.nav-panel { position: fixed; top: 0; left: -260px; width: 240px; height: 100vh; background: #1a1a1a; z-index: 300; transition: left 0.22s ease; padding: 0.75rem 1rem 1.5rem; display: flex; flex-direction: column; }
.nav-panel.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,0.45); }
.nav-close { background: none; border: none; color: #888; font-size: 1.25rem; cursor: pointer; align-self: flex-end; padding: 0.3rem 0.5rem; border-radius: 4px; line-height: 1; }
.nav-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 1.25rem; }
.nav-link { color: #aaa; text-decoration: none; padding: 0.55rem 0.75rem; border-radius: 6px; font-size: 0.875rem; transition: background 0.15s, color 0.15s; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: rgba(37,99,235,0.25); color: #93c5fd; }
.nav-link-danger { color: #f87171; }
.nav-link-danger:hover { background: rgba(248,113,113,0.12); color: #fca5a5; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0.5rem 0; }

/* ── OIDC settings page ───────────────────────────────────────────────────── */
.page-subtitle { color: #666; font-size: 0.9rem; margin: -0.75rem 0 1.5rem; }
.notice { padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1.25rem; }
.notice-ok   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.notice-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.notice-warn { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.field-hint { font-size: 0.75rem; color: #888; padding-left: calc(140px + 0.75rem); margin-bottom: 0.4rem; line-height: 1.5; }
.field-hint code { background: #f3f4f6; padding: 0.1rem 0.3rem; border-radius: 3px; font-family: "SF Mono","Fira Code",monospace; font-size: 0.8rem; }
.toggle { display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { width: 36px; height: 20px; background: #d1d5db; border-radius: 10px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle input:checked + .toggle-track { background: #2563eb; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-track::after { left: 18px; }
.guide-steps { padding: 0.75rem 0 0.25rem; display: flex; flex-direction: column; gap: 1.25rem; }
.guide-step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num { min-width: 26px; height: 26px; background: #2563eb; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; margin-top: 0.15rem; }
.step-body { font-size: 0.85rem; line-height: 1.65; color: #444; }
.step-body ul { margin: 0.35rem 0 0 1.2rem; }
.step-body li { margin-bottom: 0.2rem; }
.step-body code { background: #f3f4f6; padding: 0.1rem 0.3rem; border-radius: 3px; font-family: "SF Mono","Fira Code",monospace; font-size: 0.8rem; }
