/* app-shell.css — the shared chrome for first-class Selarys suite apps that ride the Syndex
   substrate (Sage, Surety, …). A single top nav row, congruent with Sentry (the canonical
   reference): the app's own animated mark + the "SELARYS <APP>" gradient wordmark, the app's own
   section tabs, then the canonical identity pill (injected by scope.js) + the gradient Logout.
   Each app is its own surface reachable from the Selarys portal — there is no cross-app "back" link. */

/* The shell header is <div id="header" class="app-header">. #header (an ID) lives in base.css and
   out-specifies a bare .app-header, so the chrome is written as #header.app-header to win the
   cascade — otherwise base.css's 14px vertical padding fattens the bar. Target: Sentry's compact row. */
#header.app-header {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 18px;
    border-bottom: 1px solid rgba(120, 134, 160, 0.16);
}

.app-header .header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 0;
    border-right: 1px solid rgba(120, 134, 160, 0.18);
    flex-shrink: 0;
}

/* The app's own mark links to the app home (not "back to Syndex"). */
.app-home {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.96;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.app-home:hover { opacity: 1; transform: translateY(-1px); }
.app-mark { display: block; width: 28px; height: 28px; }

/* Wordmark — the canonical Selarys suite treatment (matches Sentry's nav-brand-text:
   Outfit 300, wide tracking, the 3-stop cyan→violet→mint gradient clipped to text). */
.app-wordmark {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 5px;
    background: linear-gradient(90deg, #00c8ff 0%, #7850ff 50%, #00ffb4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    padding-left: 2px;
}

/* App section tabs — inline in the nav row (Sentry parity); grow as the app adds sections. */
.app-tabbar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 10px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}
.app-tab {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: #8c97ab;
    text-decoration: none;
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.app-tab:hover { color: #e8ecf4; }
.app-tab.active {
    color: #00c8ff;
    border-bottom-color: #00c8ff;
    background: linear-gradient(180deg, transparent 28%, rgba(0, 200, 255, 0.14));
    box-shadow: 0 10px 22px -12px rgba(0, 200, 255, 0.65);
}
.app-tab.soon { color: #5b6577; cursor: default; pointer-events: none; }
.app-tab.soon em {
    font-style: normal;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a5366;
    border: 1px solid rgba(120, 134, 160, 0.2);
    border-radius: 999px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
}

.app-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Logout — the canonical suite gradient pill (matches OP + the portal + the other apps). */
.app-logout {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2) 0%, rgba(120, 80, 255, 0.2) 100%);
    border: 1px solid rgba(0, 200, 255, 0.25);
    color: #00c8ff;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.app-logout:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.3) 0%, rgba(120, 80, 255, 0.3) 100%);
    border-color: rgba(0, 200, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.08);
    color: #00c8ff;
}

/* Coarse-pointer (iPad/touch) — let the nav row wrap rather than bleed off-screen. */
@media (pointer: coarse) and (min-width: 769px) {
    #header.app-header { flex-wrap: wrap; row-gap: 8px; }
    .app-header .header-logo { border-right: none; }
    .app-header .header-right { flex-wrap: wrap; }
    .app-tabbar { flex-wrap: wrap; }
}

/* === CANONICAL signed-out screen (cross-suite, byte-identical card; mark + wordmark differ per
   app) — rendered in-place by the shell when a fresh cross-app/self logout is detected, instead of
   bouncing to the portal. Matches Syndex login.html .so-* + Sentry/portal verbatim. === */
.so-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.so-card {
    position: relative; z-index: 1; width: 360px; max-width: 100%; margin: 0 auto;
    padding: 40px 36px 34px; background: #161a24; border: 1px solid rgba(255,255,255,.06);
    border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.45); text-align: center;
}
.so-mark { height: 58px; width: 58px; display: block; margin: 0 auto 18px; }
.so-wordmark {
    font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; font-size: 13px;
    letter-spacing: 0.34em; text-transform: uppercase; white-space: nowrap;
    background: linear-gradient(95deg, #00c8ff, #7850ff 58%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent; margin: 0 0 24px;
}
.so-heading { font-family: 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 18px; color: #e8eef6; margin: 0 0 10px; }
.so-sub { font-family: 'Inter', system-ui, sans-serif; font-weight: 400; font-size: 13px; line-height: 1.5; color: rgba(224,232,240,.55); max-width: 280px; margin: 0 auto 26px; }
.so-btn {
    display: block; width: 100%; padding: 11px 0; border: none; border-radius: 8px;
    font-family: 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 14px; color: #fff;
    background: linear-gradient(95deg, #00c8ff, #7850ff 62%); cursor: pointer;
    transition: filter .15s ease; text-decoration: none;
}
.so-btn:hover { filter: brightness(1.08); }
