/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #0a0a0f;
    --bg-2:      #111118;
    --bg-3:      #1a1a24;
    --surface:   #16161f;
    --border:    rgba(255,255,255,0.08);
    --border-hi: rgba(255,255,255,0.15);
    --accent:    #ff5c35;
    --accent-2:  #ff8c42;
    --text:      #f0ede8;
    --text-muted:#8a8798;
    --text-dim:  #5a5768;
    --success:   #4ade80;
    --danger:    #f87171;
    --radius:    12px;
    --radius-lg: 20px;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 100;
}
.nav-brand {
    font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem;
    color: var(--text); text-decoration: none;
    display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.02em;
}
.brand-icon { color: var(--accent); }
.brand-tag {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
    background: rgba(255,92,53,0.15); color: var(--accent);
    padding: 0.2rem 0.5rem; border-radius: 4px; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 1.25rem; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover { color: var(--text); }
.nav-user { color: var(--text-muted); font-size: 0.875rem; font-weight: 500; }
.btn-nav-cta {
    background: var(--accent); color: #fff; text-decoration: none;
    padding: 0.5rem 1.1rem; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.btn-nav-cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-nav-logout {
    background: transparent; border: 1px solid var(--border-hi); color: var(--text-muted);
    padding: 0.45rem 1rem; border-radius: 8px; font-size: 0.875rem; cursor: pointer;
    font-family: inherit; font-weight: 500; transition: all 0.2s;
}
.btn-nav-logout:hover { border-color: var(--accent); color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative; min-height: calc(100vh - 64px);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 5rem 2rem 4rem; overflow: hidden; text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18; }
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #ff5c35, transparent 70%);
    top: -150px; left: -100px;
    animation: drift 12s ease-in-out infinite alternate;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #6c47ff, transparent 70%);
    bottom: -100px; right: -50px;
    animation: drift 15s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,30px) scale(1.05); } }
.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
    display: inline-block; background: rgba(255,92,53,0.12); border: 1px solid rgba(255,92,53,0.3);
    color: var(--accent-2); font-size: 0.8rem; font-weight: 600; padding: 0.35rem 1rem;
    border-radius: 100px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2rem;
    animation: fadeUp 0.6s ease both;
}
.hero-title {
    font-family: 'Syne', sans-serif; font-weight: 800;
    font-size: clamp(3rem,8vw,5.5rem); line-height: 1.05; letter-spacing: -0.04em;
    margin-bottom: 1.5rem; animation: fadeUp 0.6s 0.1s ease both;
}
.hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 2.5rem; font-weight: 300; animation: fadeUp 0.6s 0.2s ease both; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; animation: fadeUp 0.6s 0.3s ease both; }
.btn-primary {
    background: var(--accent); color: #fff; text-decoration: none;
    padding: 0.85rem 2rem; border-radius: var(--radius); font-weight: 700; font-size: 1rem;
    display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.2s;
    font-family: 'Syne', sans-serif;
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,92,53,0.35); }
.btn-ghost {
    background: transparent; border: 1px solid var(--border-hi); color: var(--text);
    text-decoration: none; padding: 0.85rem 2rem; border-radius: var(--radius);
    font-weight: 500; font-size: 1rem; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.feature-cards {
    position: relative; z-index: 1; display: flex; gap: 1.25rem; margin-top: 5rem;
    flex-wrap: wrap; justify-content: center; animation: fadeUp 0.6s 0.4s ease both;
}
.feat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 2rem; width: 220px; text-align: left; transition: border-color 0.2s, transform 0.2s;
}
.feat-card:hover { border-color: var(--border-hi); transform: translateY(-4px); }
.feat-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.feat-card h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.5rem; }
.feat-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

/* ── Auth pages ───────────────────────────────────────────────────────────── */
.auth-page { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 64px); }
.auth-left {
    background: linear-gradient(135deg, #0e0e17 0%, #1a0e1a 100%);
    padding: 4rem; display: flex; align-items: center; position: relative; overflow: hidden;
    border-right: 1px solid var(--border);
}
.auth-left::before {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,92,53,0.2), transparent 70%);
    top: -100px; left: -100px; border-radius: 50%;
}
.auth-left-content { position: relative; z-index: 1; }
.auth-brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--accent); margin-bottom: 3rem; }
.auth-left h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(2.5rem,5vw,4rem); letter-spacing: -0.04em; line-height: 1; margin-bottom: 1.5rem; }
.auth-left p { color: var(--text-muted); font-size: 1rem; max-width: 300px; line-height: 1.6; }
.auth-return-note { margin-top: 1.5rem; background: rgba(255,92,53,0.08); border: 1px solid rgba(255,92,53,0.2); border-radius: var(--radius); padding: 0.75rem 1rem; color: var(--accent-2); font-size: 0.85rem; font-weight: 500; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -0.03em; margin-bottom: 0.35rem; }
.auth-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input {
    background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.8rem 1rem; color: var(--text); font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s; outline: none; width: 100%;
}
.form-group input::placeholder { color: var(--text-dim); }
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,92,53,0.12); }
.field-error { color: #f87171; font-size: 0.8rem; }
.error-banner { background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.25); border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 1.25rem; color: #f87171; font-size: 0.875rem; }
.error-banner ul { list-style: none; }
.success-banner { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25); border-radius: var(--radius); padding: 0.85rem 1rem; margin-bottom: 1.5rem; color: var(--success); font-size: 0.875rem; }
.btn-submit {
    background: var(--accent); color: #fff; border: none; padding: 0.9rem 1.5rem;
    border-radius: var(--radius); font-size: 1rem; font-weight: 700; font-family: 'Syne', sans-serif;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    margin-top: 0.5rem; transition: all 0.2s; width: 100%;
}
.btn-submit:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,92,53,0.3); }
.auth-switch { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.auth-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.btn-microsoft {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%;
    padding: 0.85rem 1.5rem; background: #fff; color: #1a1a1a; border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; font-family: 'Syne', sans-serif;
    text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.btn-microsoft:hover { background: #f5f5f5; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,255,255,0.1); }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-dim); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard { max-width: 1000px; margin: 0 auto; padding: 3rem 2rem 5rem; }
.dash-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; animation: fadeUp 0.5s ease both; }
.dash-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.dash-name { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(2rem,5vw,3rem); letter-spacing: -0.04em; }
.dash-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.dash-badge { display: flex; align-items: center; gap: 0.5rem; background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); color: var(--success); padding: 0.5rem 1.1rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600; }
.dash-badge--provider { background: rgba(255,255,255,0.05); border-color: var(--border-hi); color: var(--text-muted); font-size: 0.78rem; }
.dash-badge--allowed { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.2); color: var(--success); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; animation: fadeUp 0.5s 0.1s ease both; transition: border-color 0.2s; }
.dash-card:hover { border-color: var(--border-hi); }
.dash-card--highlight { grid-column: span 2; background: linear-gradient(135deg, rgba(255,92,53,0.07), rgba(108,71,255,0.07)); border-color: rgba(255,92,53,0.2); }
.dash-card--highlight h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.4rem; margin-bottom: 0.6rem; }
.dash-card--highlight p { color: var(--text-muted); font-size: 0.95rem; }
.card-label { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; margin-bottom: 1.25rem; }
.identity-list { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.identity-list li { display: flex; flex-direction: column; gap: 0.2rem; }
.id-key { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; }
.id-val { font-size: 0.9rem; color: var(--text); word-break: break-all; }
.id-mono { font-family: 'Courier New', monospace; font-size: 0.78rem; color: var(--accent-2); }
.how-list { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 0.85rem; }
.how-list li { counter-increment: steps; display: flex; align-items: flex-start; gap: 0.75rem; color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; }
.how-list li::before { content: counter(steps); min-width: 22px; height: 22px; background: var(--bg-3); border: 1px solid var(--border-hi); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; color: var(--accent); font-family: 'Syne', sans-serif; margin-top: 1px; }
.how-list strong { color: var(--text); }
.dash-card--code .card-label { font-size: 0.95rem; }
.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; font-family: 'Courier New', monospace; font-size: 0.8rem; line-height: 1.7; overflow-x: auto; color: var(--text); white-space: pre; }
.c-comment { color: var(--text-dim); }
.c-kw { color: #c792ea; }
.c-string { color: #c3e88d; }
.dash-footer { margin-top: 2.5rem; display: flex; justify-content: flex-end; animation: fadeUp 0.5s 0.2s ease both; }
.btn-logout-full { background: transparent; border: 1px solid var(--border-hi); color: var(--text-muted); padding: 0.7rem 1.75rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: 'Syne', sans-serif; transition: all 0.2s; text-decoration: none; display: inline-block; }
.btn-logout-full:hover { border-color: #f87171; color: #f87171; }

/* ── Roles ────────────────────────────────────────────────────────────────── */
.roles-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.role-badge { padding: 0.25rem 0.75rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700; font-family: 'Syne', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }
.role-badge--admin    { background: rgba(255,92,53,0.15);  color: var(--accent);  border: 1px solid rgba(255,92,53,0.3);  }
.role-badge--internal { background: rgba(108,71,255,0.15); color: #a78bfa;        border: 1px solid rgba(108,71,255,0.3); }
.role-badge--external { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.25);}
.role-badge--manager  { background: rgba(251,191,36,0.12); color: #fbbf24;        border: 1px solid rgba(251,191,36,0.25);}
.role-badge--readonly { background: rgba(148,163,184,0.1); color: #94a3b8;        border: 1px solid rgba(148,163,184,0.2);}
.role-badge--none     { background: rgba(255,255,255,0.05);color: var(--text-dim);border: 1px solid var(--border); }
.roles-note { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.85rem; line-height: 1.5; }

/* ── Page access list ─────────────────────────────────────────────────────── */
.page-access-list { display: flex; flex-direction: column; gap: 0.5rem; }
.page-access-item { display: flex; justify-content: space-between; align-items: center; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; text-decoration: none; color: var(--text); font-size: 0.875rem; transition: border-color 0.2s; }
.page-access-item:hover { border-color: var(--border-hi); }
.page-role { font-size: 0.75rem; font-weight: 600; font-family: 'Syne', sans-serif; }
.page-role--allowed { color: var(--success); }
.page-role--denied  { color: var(--danger); }

/* ── Admin table ──────────────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--bg-3); padding: 1rem 1.25rem; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.user-cell { display: flex; flex-direction: column; gap: 0.2rem; }
.user-name { font-weight: 500; font-size: 0.9rem; }
.user-email { color: var(--text-muted); font-size: 0.8rem; }
.inline-role-form { display: flex; gap: 0.5rem; align-items: center; }
.role-input { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 0.4rem 0.75rem; color: var(--text); font-size: 0.8rem; font-family: inherit; outline: none; width: 180px; transition: border-color 0.2s; }
.role-input:focus { border-color: var(--accent); }
.btn-role-save { background: var(--accent); color: #fff; border: none; padding: 0.4rem 0.85rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: 'Syne', sans-serif; transition: background 0.2s; white-space: nowrap; }
.btn-role-save:hover { background: var(--accent-2); }
.admin-note { margin-top: 1.25rem; color: var(--text-muted); font-size: 0.825rem; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ── OIDC spinner ─────────────────────────────────────────────────────────── */
.oidc-status { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 3rem 0; color: var(--text-muted); font-size: 0.95rem; }
.oidc-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.oidc-error { color: #f87171; font-size: 0.9rem; text-align: center; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar { padding: 1rem 1.25rem; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right { padding: 2rem 1.25rem; }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-card--highlight { grid-column: span 1; }
    .feature-cards { flex-direction: column; align-items: center; }
    .feat-card { width: 100%; max-width: 320px; }
}

/* ── Microsoft SSO Button ─────────────────────────────────────────────────── */
.btn-microsoft {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    width: 100%; padding: 0.85rem 1.5rem;
    background: #fff; color: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    font-size: 0.95rem; font-weight: 600;
    font-family: 'Syne', sans-serif;
    text-decoration: none; transition: all 0.2s;
}
.btn-microsoft:hover { background: #f5f5f5; transform: translateY(-1px); }

.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-dim); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Badges & Roles ───────────────────────────────────────────────────────── */
.dash-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.dash-badge--provider { background: rgba(255,255,255,0.05); border-color: var(--border-hi); color: var(--text-muted); font-size: 0.78rem; }

.roles-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.roles-note  { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }

.role-badge {
    padding: 0.25rem 0.75rem; border-radius: 100px;
    font-size: 0.75rem; font-weight: 700; font-family: 'Syne', sans-serif;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.role-badge--admin    { background: rgba(255,92,53,0.15);  border: 1px solid rgba(255,92,53,0.35);  color: var(--accent); }
.role-badge--internal { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.35); color: #a5b4fc; }
.role-badge--external { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.3);  color: var(--success); }

/* ── Auth return note ─────────────────────────────────────────────────────── */
.auth-return-note {
    margin-top: 2rem; padding: 0.75rem 1rem;
    background: rgba(255,92,53,0.08); border: 1px solid rgba(255,92,53,0.2);
    border-radius: var(--radius); color: var(--accent-2);
    font-size: 0.85rem;
}

/* ── Brand tag ────────────────────────────────────────────────────────────── */
.brand-tag {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
    background: var(--accent); color: #fff;
    padding: 0.15rem 0.4rem; border-radius: 4px;
    text-transform: uppercase; vertical-align: middle;
}

/* ── Admin table ──────────────────────────────────────────────────────────── */
.admin-table-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 1.5rem; animation: fadeUp 0.5s 0.1s ease both;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left; padding: 1rem 1.25rem;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.user-cell { display: flex; flex-direction: column; gap: 0.2rem; }
.user-name  { font-weight: 600; font-size: 0.9rem; }
.user-email { font-size: 0.8rem; color: var(--text-muted); }

.inline-form { display: flex; gap: 0.5rem; align-items: center; }
.role-input {
    background: var(--bg-3); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.4rem 0.75rem;
    color: var(--text); font-size: 0.85rem; font-family: inherit;
    width: 200px; outline: none; transition: border-color 0.2s;
}
.role-input:focus { border-color: var(--accent); }
.btn-role-save {
    background: var(--accent); color: #fff; border: none;
    padding: 0.4rem 0.9rem; border-radius: 8px;
    font-size: 0.8rem; font-weight: 700; font-family: 'Syne', sans-serif;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.btn-role-save:hover { background: var(--accent-2); }

.admin-help {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem 2rem;
    animation: fadeUp 0.5s 0.15s ease both;
}

/* ── OIDC spinner ─────────────────────────────────────────────────────────── */
.oidc-status { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 3rem 0; color: var(--text-muted); font-size: 0.95rem; }
.oidc-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.oidc-error { color: #f87171; font-size: 0.9rem; text-align: center; }

/* ── Success banner ───────────────────────────────────────────────────────── */
.success-banner {
    background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25);
    border-radius: var(--radius); padding: 0.85rem 1rem;
    margin-bottom: 1.5rem; color: var(--success); font-size: 0.875rem;
}
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* ── Brand tag ────────────────────────────────────────────────────────────── */
.brand-tag { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; background: var(--accent); color: #fff; padding: 0.15rem 0.4rem; border-radius: 4px; text-transform: uppercase; vertical-align: middle; }

/* ── Auth return note ─────────────────────────────────────────────────────── */
.auth-return-note { margin-top: 2rem; background: rgba(255,92,53,0.08); border: 1px solid rgba(255,92,53,0.2); color: var(--accent-2); padding: 0.75rem 1rem; border-radius: var(--radius); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }

/* ── Roles ────────────────────────────────────────────────────────────────── */
.roles-list  { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.roles-note  { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.role-badge  { padding: 0.25rem 0.75rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700; font-family: 'Syne', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }
.role-badge--admin    { background: rgba(255,92,53,0.15);  border: 1px solid rgba(255,92,53,0.35);  color: #ff5c35; }
.role-badge--internal { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.35); color: #a5b4fc; }
.role-badge--external { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.3);  color: var(--success); }

/* ── Admin table ──────────────────────────────────────────────────────────── */
.admin-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table thead { background: var(--bg-3); }
.admin-table th { padding: 1rem 1.25rem; text-align: left; font-family: 'Syne', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.user-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.user-name  { font-weight: 600; color: var(--text); }
.user-email { font-size: 0.78rem; color: var(--text-muted); }
.inline-role-form { display: flex; gap: 0.5rem; align-items: center; }
.role-input { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.75rem; color: var(--text); font-size: 0.8rem; font-family: inherit; flex: 1; min-width: 0; outline: none; transition: border-color 0.2s; }
.role-input:focus { border-color: var(--accent); }
.btn-role-save { background: var(--accent); color: #fff; border: none; padding: 0.45rem 0.9rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; font-family: 'Syne', sans-serif; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.btn-role-save:hover { background: var(--accent-2); }
.admin-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

/* ── Success banner ───────────────────────────────────────────────────────── */
.success-banner { background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.25); color: var(--success); padding: 0.85rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.875rem; font-weight: 500; }

/* ── Microsoft button ─────────────────────────────────────────────────────── */
.btn-microsoft { display: flex; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; padding: 0.85rem 1.5rem; background: #fff; color: #1a1a1a; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; font-family: 'Syne', sans-serif; text-decoration: none; transition: all 0.2s; }
.btn-microsoft:hover { background: #f5f5f5; transform: translateY(-1px); }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-dim); font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── OIDC spinner ─────────────────────────────────────────────────────────── */
.oidc-status { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 3rem 0; color: var(--text-muted); font-size: 0.95rem; }
.oidc-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.oidc-error { color: #f87171; font-size: 0.9rem; text-align: center; }

/* ── Access denied ────────────────────────────────────────────────────────── */
.access-denied { max-width: 500px; margin: 8rem auto; text-align: center; padding: 2rem; }
.access-denied h1 { font-family: 'Syne', sans-serif; font-size: 3rem; font-weight: 800; margin-bottom: 1rem; }
.access-denied p { color: var(--text-muted); margin-bottom: 2rem; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
