/* =============================================================
   shell.css — Shared application shell layout
   FORGE-102 | Dark navy visual parity with landing / entry flow
   ============================================================= */

/* ── Reset / base ─────────────────────────────────────────── */
.shell-header,
.shell-layout,
.shell-sidebar,
.shell-content,
.shell-footer {
    box-sizing: border-box;
}

/* ── Shell header ─────────────────────────────────────────── */
.shell-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    background: #060e1a;
    color: #fff;
    border-bottom: 1px solid rgba(14, 158, 138, 0.18);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.shell-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shell-hamburger {
    display: none;
    background: none;
    border: none;
    color: rgba(240, 246, 252, 0.72);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.shell-hamburger:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.shell-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(65%) sepia(60%) saturate(400%) hue-rotate(130deg) brightness(95%);
}

.shell-brand {
    font-family: 'Plus Jakarta Sans', var(--avb-font-display), sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #f0f6fc;
}

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

.shell-greeting {
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 13px;
    color: rgba(200, 216, 232, 0.72);
}

/* ── Shell layout (sidebar + content) ────────────────────── */
.shell-layout {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 60px - 44px);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.shell-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #0d1d30;
    color: #fff;
    padding: 20px 0 16px;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    border-right: 1px solid rgba(14, 158, 138, 0.12);
}

.shell-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 12px;
    flex: 1;
}

.shell-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 10px;
    color: rgba(200, 216, 232, 0.65);
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.shell-nav-item:hover {
    background: rgba(14, 158, 138, 0.12);
    color: rgba(240, 246, 252, 0.95);
}

.shell-nav-item.active {
    background: rgba(14, 196, 168, 0.14);
    color: #14c4a8;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #14c4a8;
}

/* ── Sidebar footer (tier badge + sign out) ─────────────── */
.shell-sidebar-footer {
    padding: 16px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 12px;
}

.shell-tier-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(14, 158, 138, 0.08);
    border: 1px solid rgba(14, 196, 168, 0.18);
    border-radius: 10px;
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 12px;
}

.tier-label {
    color: rgba(200, 216, 232, 0.9);
    font-weight: 600;
    text-transform: capitalize;
}

.tier-upgrade-link {
    color: #14c4a8;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(20, 196, 168, 0.4);
    border-radius: 999px;
    padding: 2px 8px;
    transition: background 0.15s, color 0.15s;
}

.tier-upgrade-link:hover {
    background: #14c4a8;
    color: #0d1d30;
}

.shell-sign-out {
    width: 100%;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(200, 216, 232, 0.7);
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}

.shell-sign-out:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f6fc;
}

/* ── Content area ────────────────────────────────────────── */
.shell-content {
    flex: 1;
    min-width: 0;
    background: #f8f9fa;
    overflow-x: hidden;
}

/* ── Footer ──────────────────────────────────────────────── */
.shell-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 44px;
    padding: 0 20px;
    background: #060e1a;
    border-top: 1px solid rgba(14, 158, 138, 0.1);
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 12px;
    color: rgba(200, 216, 232, 0.42);
}

.shell-footer a {
    color: rgba(200, 216, 232, 0.42);
    text-decoration: none;
    transition: color 0.15s;
}

.shell-footer a:hover {
    color: #14c4a8;
}

/* ── Tier gating ─────────────────────────────────────────── */
body[data-tier="free"] [data-min-tier="pro"],
body[data-tier="free"] [data-min-tier="enterprise"] {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
    filter: blur(1px);
}

body[data-tier="free"] [data-min-tier="pro"]::after,
body[data-tier="free"] [data-min-tier="enterprise"]::after {
    content: '\1F512 Pro';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #060e1a 0%, #0e9e8a 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

body[data-tier="pro"] [data-min-tier="enterprise"] {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
    filter: blur(1px);
}

body[data-tier="pro"] [data-min-tier="enterprise"]::after {
    content: '\1F512 Enterprise';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #060e1a 0%, #0e9e8a 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-family: 'Inter', var(--avb-font-body), sans-serif;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

/* ── Responsive — mobile (<768px) ───────────────────────── */
@media (max-width: 767px) {
    .shell-hamburger {
        display: block;
    }

    .shell-sidebar {
        position: fixed;
        top: 60px;
        left: -220px;
        height: calc(100vh - 60px);
        z-index: 200;
        transition: left 0.25s ease;
        box-shadow: none;
    }

    .shell-sidebar.open {
        left: 0;
        box-shadow: 4px 0 28px rgba(0, 0, 0, 0.48);
    }

    .shell-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 60px 0 0 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
    }

    .shell-sidebar-overlay.visible {
        display: block;
    }

    .shell-layout {
        flex-direction: column;
    }

    .shell-content {
        width: 100%;
    }
}
