﻿.layout
{
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar
{
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    border-right: 1px solid var(--border);
    background: var(--panel);
}

.brand
{
    margin: 0 0 16px;
    font-size: 20px;
}

.brand-zero
{
    color: #00a6d6;
}

.account-menu
{
    position: relative;
    margin-bottom: 16px;
}

.account-summary
{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: inherit;
    background: var(--panel-soft);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.account-summary:hover
{
    border-color: #8bcfc6;
    background: #eef8f6;
}

.account-summary:focus
{
    border-color: #8bcfc6;
    box-shadow: 0 0 0 3px #d7f3ec;
    outline: none;
}

.account-avatar
{
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    background: var(--accent);
}

.account-meta
{
    display: block;
    min-width: 0;
}

.account-id
{
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-tier
{
    display: inline-block;
    margin-top: 3px;
    border: 1px solid #b7dcd7;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-hover);
    background: #eef8f6;
}

.account-menu-panel
{
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.account-menu-panel[hidden]
{
    display: none;
}

.account-menu-current
{
    display: block;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 10px;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.account-menu-current:hover,
.account-menu-current:focus
{
    background: var(--panel-soft);
    outline: none;
}

.account-menu-current-id
{
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-current-tier
{
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.account-menu-separator
{
    height: 1px;
    margin: 6px 4px;
    background: var(--border);
}

.account-menu-item
{
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 6px;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 9px 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.account-menu-icon
{
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--text-dim);
    background: var(--panel-soft);
}

.account-menu-icon svg
{
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

.account-menu-item:hover,
.account-menu-item:focus
{
    background: var(--panel-soft);
    outline: none;
}

.account-menu-item.danger
{
    color: #b42318;
}

.account-menu-item.danger .account-menu-icon
{
    color: #b42318;
    background: #fff1f0;
}

.account-menu-item.danger:hover,
.account-menu-item.danger:focus
{
    background: #fff1f0;
}

.sidebar-nav
{
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-menu-group
{
    display: grid;
    gap: 4px;
}

.sidebar-menu-group-title
{
    margin: 0;
    padding: 4px 10px 2px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-dim);
}

.sidebar-menu-item
{
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: center;
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    background: transparent;
    box-shadow: inset 0 0 0 1px transparent;
    cursor: pointer;
    text-align: left;
}

.sidebar-menu-item:hover,
.sidebar-menu-item:focus,
.sidebar-menu-item.active
{
    background: var(--panel-soft);
    outline: none;
}

.sidebar-menu-item.active
{
    background: var(--menu-active);
    box-shadow:
        inset 0 0 0 1px var(--menu-active-border),
        0 8px 20px var(--menu-active-glow);
}

.sidebar-menu-item svg
{
    width: 18px;
    height: 18px;
    color: var(--text-dim);
}

.sidebar-menu-separator
{
    height: 1px;
    margin: 8px 4px;
    background: var(--border);
}

.recent-stage-group
{
    margin-top: 2px;
}

.recent-stage-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.recent-stage-header .sidebar-menu-group-title
{
    min-width: 0;
}

.recent-stage-toggle
{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    border-radius: 7px;
    padding: 4px 7px;
    color: var(--text-dim);
    background: transparent;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.recent-stage-toggle:hover,
.recent-stage-toggle:focus
{
    color: var(--accent-hover);
    background: var(--panel-soft);
    outline: none;
}

.recent-stage-toggle svg
{
    width: 13px;
    height: 13px;
    transition: transform 0.16s ease;
}

.recent-stage-toggle[aria-expanded="true"] svg
{
    transform: rotate(180deg);
}

.recent-stage-list
{
    display: grid;
    gap: 3px;
}

.recent-stage-row
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px transparent;
}

.recent-stage-row.active
{
    background: var(--menu-active);
    box-shadow:
        inset 0 0 0 1px var(--menu-active-border),
        0 8px 20px var(--menu-active-glow);
}

.recent-stage-item
{
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 400;
}

.recent-stage-main
{
    min-width: 0;
}

.recent-stage-row.active .recent-stage-main
{
    background: transparent;
}

.recent-stage-row.just-created
{
    animation: recent-session-just-created 1s ease-out 2;
}

.recent-stage-row.removing
{
    pointer-events: none;
    animation: recent-session-removing 0.42s ease-in forwards;
}

.recent-stage-row.has-label-color .recent-stage-main
{
    background: transparent;
}

.recent-stage-row.has-label-color
{
    background: var(--recent-stage-label-color);
}

.recent-stage-row.has-label-color.active
{
    background: var(--menu-active);
    box-shadow:
        inset 0 0 0 1px var(--menu-active-border),
        0 8px 20px var(--menu-active-glow);
}

@keyframes recent-session-just-created
{
    0%
    {
        background: #fff7d6;
        box-shadow:
            inset 0 0 0 1px rgba(217, 151, 36, 0.62),
            0 0 0 0 rgba(217, 151, 36, 0.3);
    }

    45%
    {
        background: #fff1b8;
        box-shadow:
            inset 0 0 0 1px rgba(217, 151, 36, 0.82),
            0 0 0 5px rgba(217, 151, 36, 0.12);
    }

    100%
    {
        background: var(--menu-active);
        box-shadow:
            inset 0 0 0 1px var(--menu-active-border),
            0 8px 20px var(--menu-active-glow);
    }
}

@keyframes recent-session-removing
{
    0%
    {
        background: #f4f6f5;
        opacity: 1;
        transform: translateX(0);
        box-shadow: inset 0 0 0 1px rgba(100, 116, 111, 0.22);
    }

    65%
    {
        background: #fff1f0;
        opacity: 0.82;
        transform: translateX(4px);
        box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.32);
    }

    100%
    {
        opacity: 0;
        transform: translateX(12px);
        box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0);
    }
}


.recent-stage-title
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-stage-actions
{
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-right: 4px;
}

.recent-stage-action
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    color: var(--text-dim);
    background: transparent;
    cursor: pointer;
}

.recent-stage-action:hover,
.recent-stage-action:focus
{
    color: var(--accent-hover);
    background: #eef8f6;
    outline: none;
}

.recent-stage-action:disabled
{
    opacity: 0.35;
    cursor: not-allowed;
}

.recent-stage-action:disabled:hover
{
    color: var(--text-dim);
    background: transparent;
}

.recent-stage-action svg
{
    width: 14px;
    height: 14px;
}

.recent-stage-menu
{
    position: absolute;
    z-index: 20;
    top: 0;
    left: calc(100% + 6px);
    display: grid;
    min-width: 272px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.recent-stage-menu[hidden]
{
    display: none;
}

.recent-stage-menu-item
{
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 7px;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 8px;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.recent-stage-submenu-group
{
    position: relative;
}

.recent-stage-submenu-trigger
{
    grid-template-columns: 18px 1fr 14px;
}

.recent-stage-submenu
{
    position: absolute;
    z-index: 21;
    top: -5px;
    left: 100%;
    display: none;
    min-width: 272px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.recent-stage-submenu-group:hover .recent-stage-submenu,
.recent-stage-submenu-group:focus-within .recent-stage-submenu
{
    display: grid;
}

.recent-stage-label-item
{
    grid-template-columns: 16px 1fr 14px;
}

.recent-stage-label-swatch
{
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 50%;
}

.recent-stage-label-swatch.none
{
    background:
        linear-gradient(135deg, transparent 42%, #94a3b8 44%, #94a3b8 56%, transparent 58%),
        #ffffff;
}

.recent-stage-label-swatch.custom
{
    background:
        linear-gradient(135deg, #ef4444 0 25%, #f59e0b 25% 50%, #10b981 50% 75%, #6366f1 75% 100%);
}

.recent-stage-label-check
{
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
}

.recent-stage-label-check svg
{
    width: 13px;
    height: 13px;
    color: var(--accent-hover);
}

.recent-stage-menu-item:hover,
.recent-stage-menu-item:focus
{
    background: var(--panel-soft);
    outline: none;
}

.recent-stage-menu-item svg
{
    width: 15px;
    height: 15px;
    color: var(--text-dim);
}

.recent-stage-menu-item .recent-stage-label-check svg
{
    color: var(--accent-hover);
}

.recent-stage-menu-item.danger
{
    color: #b42318;
}

.recent-stage-menu-item.danger svg
{
    color: #b42318;
}

.recent-stage-menu-item:disabled
{
    opacity: 0.42;
    cursor: not-allowed;
}

.recent-stage-menu-item:disabled:hover
{
    background: transparent;
}

.recent-stage-menu-separator
{
    height: 1px;
    margin: 4px;
    background: var(--border);
}

.side-note
{
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.server-status
{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding-top: 18px;
    color: var(--text-dim);
}

.status-dot
{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
}

.server-status.online .status-dot
{
    background: #10b981;
}

.server-status.offline .status-dot
{
    background: #ef4444;
}

.status-label
{
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.status-text
{
    margin-top: 2px;
    font-size: 12px;
}

.app-view[hidden]
{
    display: none;
}


@media (max-width: 860px)
{
    .layout
    {
        grid-template-columns: 1fr;
    }

    .sidebar
    {
        display: none;
    }
}
