/* ── Sidebar ── */
#sidebar {
    width: 240px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #e8eaf0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: calc(100vh - 64px);
    position: sticky;
    top: 64px;
    align-self: flex-start;
    box-shadow: 2px 0 12px rgba(0,0,0,.04);
}

.sidebar-tile-nav {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid #f0f2f5;
}

.sidebar-tile {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1rem;
    background: #fff;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 500;
    color: #555;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .18s, transform .18s, border-color .18s, color .18s;
    text-align: left;
    width: 100%;
}

.sidebar-tile:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transform: translateY(-2px);
    border-color: #d0d4f0;
    color: #1a1a2e;
}

.sidebar-tile.active {
    background: #f4f6ff;
    border-color: #4361ee;
    color: #4361ee;
    box-shadow: 0 4px 16px rgba(67,97,238,.18);
    transform: translateY(-1px);
}

.tile-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.tile-label {
    font-weight: 500;
}

/* ── Main view switching ── */
.main-view { width: 100%; }
.main-view.hidden { display: none; }
.hidden { display: none !important; }
