/* IronGate — vendored dark theme, no framework/CDN (platform convention).
   2026-09-04: repainted to the Novuman brand system v2 (cool/neon,
   dark-first). This is the FIRST page a user meets, so it wears the
   COMPANY's identity — IronGate appears only as a "secured by" footnote
   (see login.php). Tokens mirror novuman/public/css/site.css. */

:root {
    --bg: #05070F;
    --panel: #101728;
    --panel2: #161F35;
    --text: #EAF0FF;
    --muted: #8E9BBC;
    --accent: #4EE1FF;
    --accent2: #3DDC97;
    --danger: #FF5C7A;
    --warn: #FFB547;
    --border: rgba(120,170,255,.16);
    --violet: #8B5CF6;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 0 0 1rem; }

.error {
    background: #3a2020; border: 1px solid var(--danger); color: #f0c0c0;
    padding: .6rem .9rem; border-radius: 6px; margin-bottom: 1rem;
}
.notice {
    background: #20303a; border: 1px solid var(--accent); color: #c0dff0;
    padding: .6rem .9rem; border-radius: 6px; margin-bottom: 1rem;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }

.form label { display: block; margin-bottom: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password] {
    display: block; width: 100%; margin-top: .25rem;
    background: var(--panel2); color: var(--text);
    border: 1px solid var(--border); border-radius: 6px;
    padding: .5rem .7rem; font: inherit;
}
button {
    background: var(--accent); color: #10131a; font-weight: 600;
    border: 0; border-radius: 6px; padding: .55rem 1.1rem; cursor: pointer; font: inherit;
    width: 100%;
}
button:hover { filter: brightness(1.1); }

/* Login — the platform's front door. Novuman identity, aurora ground. */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@600;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

.login-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    position: relative; overflow: hidden;
}
.login-body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none;
    background:
        radial-gradient(40rem 24rem at 50% 22%, rgba(78,225,255,.18), transparent 62%),
        radial-gradient(28rem 18rem at 78% 6%, rgba(139,92,246,.16), transparent 65%),
        linear-gradient(rgba(120,170,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120,170,255,.05) 1px, transparent 1px);
    background-size: auto, auto, 60px 60px, 60px 60px;
    mask-image: radial-gradient(52rem 36rem at 50% 30%, #000 40%, transparent 100%);
}
.login-box { width: 100%; max-width: 390px; padding: 1.5rem; position: relative; z-index: 1; }
.login-box h1 {
    text-align: center; margin-bottom: .4rem;
    font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600;
    font-size: 1.7rem; letter-spacing: -.02em; color: var(--text);
}
/* novu●man: the dot is the human the name leaves out */
.login-box h1 .dot-u {
    display: inline-block; width: .32em; height: .32em; border-radius: 50%;
    background: var(--accent); margin: 0 .07em; vertical-align: middle;
    transform: translateY(-.04em); box-shadow: 0 0 10px rgba(78,225,255,.75);
}
.login-box h1 .tsym { color: var(--accent); margin-left: .18em; }
.login-sub {
    text-align: center; color: var(--muted); font-size: .84rem; margin: 0 0 1.6rem;
}
.login-sub strong { color: var(--text); font-weight: 600; }
.login-card {
    background: linear-gradient(180deg, rgba(22,31,53,.86), rgba(16,23,40,.72));
    border: 1px solid var(--border); padding: 1.5rem 1.4rem 1.3rem;
    position: relative; overflow: hidden;
}
.login-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6;
}
.login-secured {
    text-align: center; margin-top: 1.6rem;
    font-family: 'IBM Plex Mono', monospace; font-size: .66rem;
    letter-spacing: .14em; text-transform: uppercase; color: #5D6A8A;
}
.code-input { text-align: center; font-size: 1.4rem; letter-spacing: .4rem; font-family: 'IBM Plex Mono', monospace; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Topbar (welcome/admin/tenant-admin/audit) */
.ig-topbar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: .5rem; padding: .7rem 1.2rem;
    background: var(--panel); border-bottom: 1px solid var(--border);
}
.ig-brand { font-size: 1.15rem; font-weight: 600; font-family: 'Unbounded', system-ui, sans-serif; letter-spacing: -.01em; }
.ig-brand .tsym { color: var(--accent); }
.ig-brand .dot-u {
    display: inline-block; width: .32em; height: .32em; border-radius: 50%;
    background: var(--accent); margin: 0 .07em; vertical-align: middle;
    transform: translateY(-.04em); box-shadow: 0 0 10px rgba(78,225,255,.75);
}
.ig-brand .nv-tag {
    font-family: 'IBM Plex Mono', monospace; font-size: .62rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--muted); margin-left: .7rem;
}
.ig-nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.ig-tenant-chip {
    background: var(--panel2); border: 1px solid var(--border); border-radius: 12px;
    padding: .2rem .7rem; font-size: .8rem; color: var(--muted);
}
.ig-badge {
    background: var(--warn); color: #10131a; border-radius: 10px;
    padding: 0 .4rem; font-size: .72rem; font-weight: 700; margin-left: .2rem;
}

.ig-launcher { max-width: 900px; margin: 0 auto; padding: 1.5rem; }
.ig-launcher h2 { font-size: 1.05rem; color: var(--accent); margin: 1.6rem 0 .7rem; }
.ig-launcher h2:first-of-type { margin-top: .8rem; }

.ig-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.ig-app-tile {
    display: flex; flex-direction: column; gap: .3rem;
    background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
    padding: 1rem; color: var(--text);
}
.ig-app-tile:hover { border-color: var(--accent); text-decoration: none; }
.ig-app-tile-admin { border-left: 3px solid var(--warn); }
.ig-app-tier { font-size: .72rem; color: var(--muted); text-transform: uppercase; }

/* Tenant picker (login + switch-tenant) */
.tenant-pick-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.tenant-pick-option {
    display: flex; align-items: center; gap: .6rem;
    background: var(--panel2); border: 1px solid var(--border); border-radius: 8px;
    padding: .6rem .8rem; cursor: pointer;
}
.tenant-pick-option input { width: auto; margin: 0; }
.tenant-pick-name { flex: 1; }
.tenant-pick-role { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.tenant-pick-current { border-color: var(--accent); }

/* Tables (admin/tenant-admin/audit) */
.ig-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-bottom: .5rem; }
.ig-table th, .ig-table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
.ig-table th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; }
.ig-table select { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: .2rem; font: inherit; }

.ig-inline-form { display: flex; gap: .4rem; align-items: center; }
.ig-inline-form button { width: auto; padding: .3rem .7rem; font-size: .8rem; }
.ig-note-input { width: 140px !important; padding: .3rem .5rem !important; font-size: .8rem; }
.ig-btn-approve { background: var(--accent2) !important; }
.ig-btn-reject { background: var(--danger) !important; }
.ig-btn-secondary { background: var(--panel2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }

.ig-checkbox-label { display: flex !important; align-items: center; gap: .4rem; font-size: .82rem; }
.ig-checkbox-label input { width: auto !important; margin: 0 !important; }
.ig-resend-form { margin-top: -.5rem; margin-bottom: .8rem; }
.ig-resend-form button { width: auto; }

details { margin: .8rem 0 1.2rem; }
details summary { cursor: pointer; color: var(--accent); font-size: .88rem; margin-bottom: .5rem; }
details .form { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-top: .5rem; }
details .form button { width: auto; }

/* Welcome (legacy selector kept for older markup) */
.welcome-box { max-width: 480px; margin: 3rem auto; padding: 1.5rem; }
.welcome-box h1 span { color: var(--accent); }


/* ============================================================
   Welcome launcher — Novuman brand system v2 (2026-09-04).
   Matches novuman.com: near-black ground, aurora glow, glass tiles with
   luminous top edges, Unbounded display type. Scoped under
   body.nv-welcome so no other IronGate page is affected.
   ============================================================ */
body.nv-welcome {
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    min-height: 100vh;
    position: relative;
}
body.nv-welcome::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(46rem 26rem at 22% 0%, rgba(78,225,255,.15), transparent 62%),
        radial-gradient(34rem 22rem at 82% 4%, rgba(139,92,246,.15), transparent 65%),
        linear-gradient(rgba(120,170,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120,170,255,.045) 1px, transparent 1px);
    background-size: auto, auto, 62px 62px, 62px 62px;
    mask-image: radial-gradient(60rem 42rem at 50% 8%, #000 42%, transparent 100%);
}
body.nv-welcome .ig-topbar,
body.nv-welcome .ig-launcher { position: relative; z-index: 1; }

body.nv-welcome .ig-topbar {
    background: rgba(5,7,15,.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: .95rem 1.6rem;
}
body.nv-welcome .ig-nav { font-size: .85rem; }
body.nv-welcome .ig-nav a { color: var(--muted); }
body.nv-welcome .ig-nav a:hover { color: var(--accent); text-decoration: none; }
body.nv-welcome .ig-tenant-chip {
    background: rgba(22,31,53,.7); border: 1px solid var(--border); color: var(--muted);
    font-family: 'IBM Plex Mono', monospace; font-size: .7rem;
    letter-spacing: .06em; text-transform: uppercase; border-radius: 0;
}
body.nv-welcome .ig-badge { background: var(--accent); color: var(--bg); border-radius: 0; }

body.nv-welcome .ig-launcher { max-width: 1080px; padding: 2.4rem 1.6rem 3.5rem; }
body.nv-welcome .ig-launcher > p.muted:first-child {
    font-family: 'IBM Plex Mono', monospace; font-size: .74rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 2rem;
}
body.nv-welcome .ig-launcher > p.muted:first-child strong { color: var(--accent); font-weight: 500; }
body.nv-welcome .ig-launcher h2 {
    font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600;
    font-size: 1.45rem; letter-spacing: -.02em; color: var(--text);
    margin: 2.4rem 0 1.1rem;
}
body.nv-welcome .ig-launcher h2:first-of-type { margin-top: 0; }

body.nv-welcome .ig-app-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.1rem;
}
body.nv-welcome .ig-app-tile {
    background: linear-gradient(180deg, rgba(22,31,53,.85), rgba(16,23,40,.62));
    border: 1px solid var(--border); border-radius: 0;
    padding: 1.5rem 1.4rem 1.3rem; gap: 0;
    position: relative; overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.nv-welcome .ig-app-tile::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: .45; transition: opacity .18s ease;
}
body.nv-welcome .ig-app-tile:hover {
    border-color: rgba(78,225,255,.45); text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px rgba(78,225,255,.12);
}
body.nv-welcome .ig-app-tile:hover::after { opacity: 1; }
body.nv-welcome .nv-tile-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-bottom: 1.1rem;
    color: var(--accent);
}
body.nv-welcome .nv-tile-icon i {
    font-size: 2.1rem; line-height: 1;
    filter: drop-shadow(0 0 12px rgba(78,225,255,.45));
}
body.nv-welcome .ig-app-tile strong {
    font-family: 'Unbounded', system-ui, sans-serif; font-weight: 600;
    font-size: 1.05rem; color: var(--text); line-height: 1.25; letter-spacing: -.01em;
}
body.nv-welcome .ig-app-tier {
    font-family: 'IBM Plex Mono', monospace; font-size: .64rem;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .6rem;
}
/* admin tiles: violet edge, so privilege reads at a glance */
body.nv-welcome .ig-app-tile-admin { border-left: 2px solid var(--violet); }
body.nv-welcome .ig-app-tile-admin::after {
    background: linear-gradient(90deg, transparent, var(--violet), transparent);
}
body.nv-welcome .ig-app-tile-admin .nv-tile-icon { color: #A78BFA; }
body.nv-welcome .ig-app-tile-admin .nv-tile-icon i { filter: drop-shadow(0 0 12px rgba(139,92,246,.5)); }
body.nv-welcome .ig-app-tile-admin:hover {
    border-color: rgba(139,92,246,.5);
    box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px rgba(139,92,246,.14);
}

body.nv-welcome .nv-empty {
    background: linear-gradient(180deg, rgba(22,31,53,.85), rgba(16,23,40,.62));
    border: 1px solid var(--border); border-left: 2px solid var(--accent);
    padding: 1.2rem 1.4rem; color: var(--muted);
}
body.nv-welcome .nv-empty p { margin: 0; }
body.nv-welcome .ig-launcher > p.muted:last-child {
    font-size: .86rem; color: var(--muted);
    border-top: 1px solid var(--border); padding-top: 1.6rem; margin-top: 2.6rem;
}
body.nv-welcome .ig-launcher > p.muted:last-child a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
    body.nv-welcome .ig-app-tile { transition: none; }
    body.nv-welcome .ig-app-tile:hover { transform: none; }
}