﻿.page-shell {
    width: calc(100% - 32px);
    margin: 0 auto;
    min-height: calc(100vh - var(--footer-height));
    display: grid;
    grid-template-rows: var(--topbar-height) var(--tasks-height) 1fr;
    gap: 10px;
    padding: 12px 14px 10px;
    position: relative;
}

.page-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.18), transparent 35%), radial-gradient(circle at 20% 10%, rgba(130, 208, 213, 0.10), transparent 25%);
    z-index: 0;
}

.page-shell > * {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 0 2px;
    background: transparent;
    border: none;
    box-shadow: none;
    min-height: var(--topbar-height);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-box {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-title {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--surface-dark);
    white-space: nowrap;
}

.demo-logo-mark {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    color: var(--text-on-dark);
    font-size: 1.18rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.demo-subtitle {
    color: var(--text-soft);
    font-size: 0.82rem;
    margin-top: 2px;
}

.profile-area {
    display: flex;
    align-items: center;
}

.profile-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(255,255,255,0.60));
    border: 1px solid rgba(72, 113, 159, 0.14);
    color: var(--surface-dark);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.profile-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: rgba(130, 208, 213, 0.75);
}

.content-row {
    min-height: 0;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.sidebar {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(53, 55, 71, 0.97), rgba(53, 55, 71, 0.91));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-lg);
    color: var(--text-on-dark);
    position: sticky;
    top: 12px;
    align-self: start;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(130, 208, 213, 0.14), transparent 24%), radial-gradient(circle at top right, rgba(72, 113, 159, 0.25), transparent 28%);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.sidebar label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(244, 247, 251, 0.78);
}

.project-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    outline: none;
    background: rgba(255,255,255,0.08);
    color: var(--text-on-dark);
    font-size: 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.project-select:focus {
    border-color: rgba(130, 208, 213, 0.72);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 4px rgba(130, 208, 213, 0.12);
}

.project-select option {
    color: #111;
    background: #fff;
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    padding-right: 2px;
    position: relative;
    z-index: 1;
}

.nav-button {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    color: rgba(244, 247, 251, 0.94);
    text-align: left;
    padding: 11px 14px;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-button:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.12);
    border-color: rgba(130, 208, 213, 0.34);
    box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

.nav-button.active {
    background: linear-gradient(135deg, rgba(72, 113, 159, 0.72), rgba(130, 208, 213, 0.42));
    border-color: rgba(130, 208, 213, 0.50);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.14);
}

.main-view {
    min-height: 0;
    overflow: auto;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58));
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.main-view::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top left, rgba(130, 208, 213, 0.10), transparent 24%), linear-gradient(180deg, rgba(255,255,255,0.14), transparent 30%);
}

#mainContent {
    position: relative;
    z-index: 1;
    min-height: 100%;
}

.footer {
    height: var(--footer-height);
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: var(--text-soft);
    font-size: 0.8rem;
    border-top: 1px solid rgba(72, 113, 159, 0.10);
    background: transparent;
}

.demo-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(72, 113, 159, 0.14);
    color: var(--surface-dark);
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.demo-back-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.92);
}

@media (max-width: 1280px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 980px) {
    :root {
        --topbar-height: auto;
        --tasks-height: auto;
    }

    .page-shell {
        width: min(100% - 24px, 1240px);
        grid-template-rows: auto auto 1fr;
    }

    .content-row {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1240px);
        padding: 10px;
        gap: 10px;
    }

    .app-title {
        font-size: 1.05rem;
    }

    .demo-back-link {
        min-height: 38px;
        padding: 0 14px;
        font-size: 0.9rem;
    }

    .logo-box,
    .profile-icon {
        width: 38px;
        height: 38px;
    }

    .main-view,
    .sidebar {
        padding: 12px;
    }
}
