/* Layout */

.app-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: 100vh;
}

.sidebar {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), transparent 16%),
        linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 50%, var(--sidebar-3) 100%);
    color: var(--sidebar-text);
    padding: 24px 18px 24px;
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow:
        inset -1px 0 0 rgba(255,255,255,0.03),
        16px 0 36px rgba(0, 0, 0, 0.14);
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 20px;
    right: 0;
    width: 1px;
    height: calc(100% - 40px);
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.12), transparent);
}

.main-content {
    overflow: auto;
    padding: 30px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.content-frame,
.main-content > * {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
}

/* Sidebar */

.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 22px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--sidebar-border);
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(145deg, #9eb4f8 0%, #4f68e8 45%, #3a52d4 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.04em;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 10px 22px rgba(58, 82, 212, 0.32);
    flex-shrink: 0;
}

.logo-copy h1 {
    font-size: 16px;
    font-weight: 700;
    color: #f8fbff;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 2px;
}

.logo-copy p {
    font-size: 12px;
    color: var(--sidebar-text-muted);
    line-height: 1.4;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-divider {
    height: 1px;
    margin: 10px 6px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.nav-item {
    position: relative;
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--sidebar-text-muted);
    text-align: left;
    padding: 12px 14px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.12s ease,
        box-shadow 0.16s ease;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.08);
    color: #f4f8ff;
    transform: translateX(2px);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(79,104,232,0.26), rgba(79,104,232,0.14));
    border-color: rgba(79,104,232,0.32);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 6px 16px rgba(12, 20, 38, 0.22);
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(180deg, #a6b5f8 0%, #4f68e8 100%);
    box-shadow: 0 0 0 4px rgba(79, 104, 232, 0.14);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--sidebar-border);
}

.status-pill {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    color: var(--sidebar-text-muted);
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
}

.status-pill.ok {
    color: #a8f0cc;
    background: rgba(28, 184, 112, 0.14);
    border-color: rgba(28, 184, 112, 0.26);
}

/* Topbar */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.breadcrumb {
    margin-bottom: 10px;
}

.topbar h2 {
    font-size: 30px;
    line-height: 1.08;
    font-weight: 780;
    letter-spacing: -0.045em;
    color: var(--text-1);
    margin-bottom: 10px;
}

.topbar p {
    max-width: 780px;
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.65;
}
