/* =========================================================
   SIDEBAR
========================================================= */

.brand {
    height: var(--topbar);
    padding: 0 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f2f8ff 0%, #fff 100%);
}

.brand {
    gap: 11px;
}

/* Square brand tile: the white app mark on the Palm Mind blue gradient */
.brand-mark {
    position: relative;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(0, 113, 219, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.brand-mark::before {
    content: "";
    position: absolute;
    inset: 6px;
    background: #fff;
    -webkit-mask: var(--emblem-mask-image) center / contain no-repeat;
    mask: var(--emblem-mask-image) center / contain no-repeat;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

/* Text wordmark: the corporate lockup is too wide to stay legible at
   sidebar scale, so the sidebar sets it in type and keeps the tile as the mark. */
.brand-wordmark {
    display: block;
    color: var(--primary);
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.1;
}

.brand-wordmark span {
    margin-left: 4px;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    vertical-align: 1px;
}

.brand-subtitle {
    color: var(--text-2);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

.nav {
    padding: 16px 10px;
    overflow-y: auto;
    flex: 1;
}

.nav-label {
    padding: 0 11px;
    margin: 8px 0 7px;
    font-size: 10px;
    color: var(--text-3);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--text-2);
    background: transparent;
    text-align: left;
    font-weight: 600;
    transition: background var(--transition), color var(--transition);
}

.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.nav-item:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
}

.sidebar-bottom {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.environment {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 11px;
}

.environment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.environment-title {
    font-weight: 700;
    font-size: 11px;
}

.environment-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--success);
    font-weight: 700;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
