﻿html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--brand-background);
    color: var(--brand-text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--brand-background);
}

.app-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 4px 32px;
    background: var(--brand-background);
    border-bottom: 1px solid var(--brand-border);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--brand-text);
    text-decoration: none;
}

.app-brand:hover {
    color: var(--brand-text);
}

.app-brand-logo {
    display: block;
    width: auto;
    height: 128px;
}

.app-header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-search {
    position: relative;
    width: 275px;
}

.app-search input {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 14px;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    color: var(--brand-text);
    outline: none;
}

.app-search input:focus {
    border-color: var(--brand-primary);
}

.app-search-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--brand-text);
}

.header-icon-button {
    border: 0;
    background: transparent;
    color: var(--brand-text);
    font-size: 1.5rem;
}

.app-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-user-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--brand-background);
    font-weight: 600;
}

.app-user-name {
    color: var(--brand-text);
}

.app-body {
    flex: 1;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
    padding: 16px 20px;
    background: var(--brand-background);
    border-right: 1px solid var(--brand-border);
}

.app-navigation {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-navigation-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 8px;
    color: var(--brand-text);
    text-decoration: none;
}

.app-navigation-item:hover,
.app-navigation-item:focus {
    background: var(--brand-surface);
    color: var(--brand-primary);
}

.app-navigation-item.active {
    background: var(--brand-secondary);
    color: var(--brand-text);
}

.app-navigation-icon {
    width: 24px;
    color: var(--brand-primary);
    font-size: 1.3rem;
    text-align: center;
}

.app-main {
    min-width: 0;
    padding: 28px 36px;
    background: var(--brand-background);
}

.app-footer {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 32px;
    background: var(--brand-background);
    border-top: 1px solid var(--brand-border);
    color: var(--brand-text-muted);
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-footer a {
    color: var(--brand-text-muted);
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--brand-primary);
}

@media (max-width: 900px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    .app-search,
    .app-user-name {
        display: none;
    }

    .app-main {
        padding: 20px;
    }

    .app-brand-logo {
        height: 48px;
        max-width: 260px;
    }
}