/* ==============================================================================
   TAYYAR INTERACTIVE HERO SANDBOX: SHELL, SIDEBAR & EMERALD HERO CTA
   ============================================================================== */
.btn-hero-emerald {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding-block: 12px;
    padding-inline: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(2, 132, 199, 0.34));
    border: 1px solid rgba(34, 211, 238, 0.55);
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.38), inset 0 1px 0 rgba(103, 232, 249, 0.28);
    color: #f0f9ff;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.btn-hero-emerald::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -100%;
    width: 65%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: skewX(-22deg);
    transition: inset-inline-start 0.65s ease;
    pointer-events: none;
}

.btn-hero-emerald:hover::after {
    inset-inline-start: 145%;
}

.btn-hero-emerald:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.34), rgba(2, 132, 199, 0.46));
    border-color: #67e8f9;
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Desktop Application Window Chassis */
.sandbox-window {
    position: relative;
    z-index: 2;
    background: #060b14;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: var(--radius-xl);
    box-shadow:
        0 32px 84px -18px rgba(0, 0, 0, 0.92),
        0 0 48px rgba(6, 182, 212, 0.16),
        inset 0 1px 0 rgba(103, 232, 249, 0.16);
    overflow: hidden;
    text-align: start;
    min-height: 780px;
    contain: layout style;
}

.sb-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 10px;
    padding-inline: 18px;
    background: #040810;
    border-block-end: 1px solid rgba(255, 255, 255, 0.06);
}

.sb-titlebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-slate);
}

.sb-titlebar-brand img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.sb-win-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sb-win-btn {
    width: 26px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-slate);
    transition: background-color 0.18s ease, color 0.18s ease;
}

.sb-win-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sb-win-close:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
}

/* Main App Shell: Sidebar + Active Workspace */
.sb-app-shell {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    height: clamp(640px, 76vh, 740px);
}

.sb-sidebar {
    background: #080e1a;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
    padding-block: 16px;
    padding-inline: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sb-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.sb-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(6, 182, 212, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sb-user-avatar img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.sb-user-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.sb-user-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #22d3ee;
}

.sb-nav-group-lbl {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-inline: 6px;
    margin-block-end: 4px;
}

.sb-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sb-nav-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding-block: 9px;
    padding-inline: 11px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: start;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sb-nav-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    flex-shrink: 0;
}

.sb-nav-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sb-nav-btn.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(2, 132, 199, 0.34));
    border-color: rgba(34, 211, 238, 0.55);
    color: #f0f9ff;
}

.sb-mini-counters {
    margin-block-start: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(5, 9, 17, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.sb-mini-cell span {
    display: block;
    font-size: 0.62rem;
    color: var(--text-muted);
}

.sb-mini-cell strong {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #22d3ee;
}

/* Workspace Viewport & Overlay */
.sb-workspace {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-block: 18px;
    padding-inline: 20px;
    background: radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.08), transparent 50%), #070d19;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.34) rgba(6, 12, 22, 0.65);
}

.sb-workspace::-webkit-scrollbar {
    width: 6px;
}

.sb-workspace::-webkit-scrollbar-track {
    background: rgba(6, 12, 22, 0.65);
}

.sb-workspace::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.34);
    border-radius: var(--radius-full);
}

.sb-workspace::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.56);
}

.sb-scan-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.18), transparent);
    pointer-events: none;
    opacity: 0;
    z-index: 6;
}

.sb-window-toast {
    position: absolute;
    inset-block-end: 14px;
    inset-inline-end: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(8, 47, 73, 0.94);
    border: 1px solid rgba(34, 211, 238, 0.65);
    color: #f0f9ff;
    font-size: 0.74rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    z-index: 8;
}

.sb-window-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Mobile & Tablet Shell: Natural Auto-Height (No Nested Scroll) */

@media (max-width: 1024px) {
    .sandbox-window {
        min-height: 540px;
    }

    .sb-app-shell {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sb-sidebar {
        display: none !important;
    }

    .sb-workspace {
        overflow: visible;
        padding-block: 14px;
        padding-inline: 12px;
    }
}

@media (max-width: 480px) {
    .sandbox-window {
        border-radius: 16px;
    }

    .sb-titlebar {
        padding-block: 8px;
        padding-inline: 12px;
    }

    .sb-titlebar-brand {
        font-size: 0.72rem;
    }

    .sb-sidebar {
        padding-block: 8px;
        padding-inline: 10px;
    }

    .sb-nav-btn {
        padding-block: 7px;
        padding-inline: 11px;
        font-size: 0.71rem;
    }

    .sb-workspace {
        padding-block: 12px;
        padding-inline: 10px;
    }
}