.agent-sidebar {
    width: 260px;
    background-color: var(--color-dark);
    color: var(--color-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.agent-sidebar.open {
    transform: translateX(0);
}

.agent-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(226, 237, 237, 0.1);
    text-align: center;
}

.agent-sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-accent);
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-dark);
    font-weight: bold;
}

.agent-sidebar-name {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-white);
}

.agent-sidebar-role {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.agent-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    flex: 1;
}

.agent-sidebar-nav li {
    margin: 0;
}

.agent-sidebar-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-light);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.agent-sidebar-nav a:hover,
.agent-sidebar-nav a:focus,
.agent-sidebar-nav a.active {
    background-color: var(--color-accent);
    color: var(--color-dark);
    text-decoration: none;
}

.agent-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
}

.agent-main {
    flex: 1;
    margin-left: 0;
    padding: .5rem;
    width: 100%;
    transition: margin-left 0.3s ease;
}

.agent-footer {
    width: 100%;
    padding: 1rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--color-light);
    background-color: var(--color-dark);
    border-top: 1px solid rgba(226, 237, 237, 0.1);
}

/* The sidebar is a fixed overlay on mobile, so the main area does not shift. */

.agent-sidebar-toggle {
    position: relative;
    z-index: 110;
    display: inline-block;
    background: var(--color-dark);
    color: var(--color-light);
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.agent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.agent-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(23, 51, 68, 0.08);
}

.agent-card h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--color-dark);
}

.agent-card p {
    margin-bottom: 0;
    color: var(--color-dark);
    opacity: 0.85;
}

@media (min-width: 769px) {
    .agent-sidebar {
        transform: translateX(0);
    }

    .agent-main {
        margin-left: 260px;
        width: calc(100% - 260px);
        padding: 2rem;
    }

    .agent-main.open {
        margin-left: 260px;
        width: calc(100% - 260px);
    }

    .agent-sidebar-toggle {
        display: none;
    }
}
