/* OHMS portal — shell chrome + application launcher.
   Shares the void+cyan brand palette with the public gate page (ohms.au). */

:root {
    --ohms-void:   #050810;
    --ohms-deep:   #08101a;
    --ohms-panel:  #0c1620;
    --ohms-cyan:   #00e5ff;
    --ohms-lume:   #e6f8fb;
    --ohms-dim:    rgba(220, 245, 250, 0.55);
    --ohms-line:   rgba(0, 229, 255, 0.18);
    --ohms-hair:   rgba(0, 229, 255, 0.10);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--ohms-void);
    color: var(--ohms-lume);
    font-family: "Chakra Petch", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Shell ────────────────────────────────────────────────── */
.ohms-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 50% 0%, #0c1822 0%, #060a12 55%, #02050a 100%);
    background-attachment: fixed;
}

.ohms-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 85%);
            mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 85%);
}

/* ── Top bar ──────────────────────────────────────────────── */
.ohms-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 28px;
    border-bottom: 1px solid var(--ohms-hair);
    backdrop-filter: blur(4px);
}

.ohms-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.ohms-brand-mark {
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.25));
}

.ohms-brand-word {
    font-family: "Michroma", sans-serif;
    font-size: 15px;
    letter-spacing: 0.10em;
    color: var(--ohms-lume);
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.ohms-brand-sub {
    font-size: 9px;
    letter-spacing: 0.42em;
    color: var(--ohms-cyan);
    opacity: 0.75;
}

.ohms-user {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
}

.ohms-user-id {
    color: var(--ohms-dim);
    letter-spacing: 0.04em;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ohms-signout {
    color: var(--ohms-lume);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 7px 14px;
    border: 1px solid var(--ohms-line);
    border-radius: 2px;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.ohms-signout:hover,
.ohms-signout:focus-visible {
    border-color: var(--ohms-cyan);
    background: rgba(0, 229, 255, 0.08);
    outline: none;
}

/* ── Main / launcher ──────────────────────────────────────── */
.ohms-main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 64px 28px 96px;
}

.ohms-launcher-head { margin-bottom: 40px; }

.ohms-launcher-eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ohms-cyan);
    opacity: 0.8;
    margin-bottom: 16px;
}

.ohms-launcher h1 {
    margin: 0 0 12px;
    font-family: "Michroma", sans-serif;
    font-size: clamp(26px, 4.4vmin, 40px);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--ohms-lume);
    text-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
}

.ohms-launcher-sub {
    margin: 0;
    max-width: 60ch;
    color: var(--ohms-dim);
    font-size: 15px;
    line-height: 1.7;
}

.ohms-inline-link {
    color: var(--ohms-cyan);
    border-bottom: 1px solid var(--ohms-hair);
}

/* ── Tiles ────────────────────────────────────────────────── */
.ohms-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.ohms-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 22px;
    background: linear-gradient(160deg, var(--ohms-panel), var(--ohms-void) 90%);
    border: 1px solid var(--ohms-line);
    border-radius: 4px;
    color: var(--ohms-lume);
    transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}

.ohms-tile:hover,
.ohms-tile:focus-visible {
    border-color: var(--ohms-cyan);
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.14);
    transform: translateY(-2px);
    outline: none;
}

.ohms-tile-mark {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ohms-line);
    border-radius: 3px;
    font-family: "Michroma", sans-serif;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: var(--ohms-cyan);
    background: rgba(0, 229, 255, 0.05);
}

.ohms-tile-body { flex: 1 1 auto; min-width: 0; }

.ohms-tile-name {
    font-family: "Michroma", sans-serif;
    font-size: 16px;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.ohms-tile-desc {
    color: var(--ohms-dim);
    font-size: 13px;
    line-height: 1.5;
}

.ohms-tile-cta {
    flex: 0 0 auto;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ohms-cyan);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ohms-tile-arrow { transition: transform .2s ease; }
.ohms-tile:hover .ohms-tile-arrow { transform: translateX(4px); }

/* Locked tiles — app exists, but the user lacks the per-app group. */
.ohms-tile--locked {
    opacity: 0.55;
    cursor: not-allowed;
}
.ohms-tile--locked:hover {
    border-color: var(--ohms-line);
    box-shadow: none;
    transform: none;
}
.ohms-tile--locked .ohms-tile-mark { color: var(--ohms-dim); }

.ohms-tile-cta--locked {
    color: var(--ohms-dim);
    letter-spacing: 0.18em;
}

.ohms-launcher-empty {
    margin-top: 28px;
    color: var(--ohms-dim);
    font-size: 14px;
}
.ohms-launcher-empty a {
    color: var(--ohms-cyan);
    border-bottom: 1px solid var(--ohms-hair);
}

@media (max-width: 560px) {
    .ohms-topbar { padding: 14px 18px; }
    .ohms-main { padding: 40px 18px 72px; }
    .ohms-tile-cta { display: none; }
}
