/* ═══════════════════════════════════════════════════════════════
   PREGAME DASHBOARD — Sidebar ("The Spine") Styles
   ═══════════════════════════════════════════════════════════════ */

.app-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    z-index: 90;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Top Profile Picture Block */
.sidebar-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
}

.sidebar-profile:hover {
    border-color: var(--border-hover);
    background: var(--surface-3);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #e05220);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-chevron {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-left: 6px;
    transition: transform 0.2s;
}

.sidebar-profile.active .profile-chevron {
    transform: rotate(180deg);
}

/* Categorized Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-group-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    padding: 4px 10px 2px;
}

.sidebar-links-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Sidebar Link Items */
.sidebar-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.sidebar-nav-link:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* Active State Vertical Indicator Rule */
.sidebar-nav-link.active {
    color: var(--text);
    background: var(--surface-2);
    font-weight: 600;
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 3.5px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.sidebar-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.sidebar-nav-link:hover .sidebar-link-icon,
.sidebar-nav-link.active .sidebar-link-icon {
    color: var(--accent);
}

.sidebar-link-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lucide-icon {
    display: inline-block;
    vertical-align: middle;
}

/* Sidebar Integration Status Indicator Dots */
.sidebar-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.sidebar-status-dot.not-connected {
    background: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.45);
}

.sidebar-status-dot.is-connected {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
}

.sidebar-status-dot.is-unimplemented,
.sidebar-status-dot.unimplemented {
    background: #64748b;
    box-shadow: none;
    opacity: 0.8;
}

/* Sidebar Bottom Section (Activity Feed Widget) */
.sidebar-bottom {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-activity-feed {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.75rem;
}

.activity-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dim);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.activity-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulseGlow 2s infinite ease-in-out;
}

.activity-feed-item {
    color: var(--text-muted);
    line-height: 1.35;
    font-size: 0.73rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Collapsed Sidebar State (Desktop optional) */
.app-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .profile-info,
.app-sidebar.collapsed .profile-chevron,
.app-sidebar.collapsed .sidebar-group-title,
.app-sidebar.collapsed .sidebar-link-text,
.app-sidebar.collapsed .sidebar-chip,
.app-sidebar.collapsed #nav-credits,
.app-sidebar.collapsed .count,
.app-sidebar.collapsed .new-chip,
.app-sidebar.collapsed .sidebar-activity-feed,
.app-sidebar.collapsed .sidebar-status-dot {
    display: none !important;
}

.app-sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 10px 0;
}

.app-sidebar.collapsed .sidebar-profile {
    justify-content: center;
    padding: 8px 0;
}
