﻿:root {
    --layout-bg: #0f172a;
    --layout-panel: rgba(15, 23, 42, 0.88);
    --layout-border: rgba(148, 163, 184, 0.18);
    --layout-ink: #e5e7eb;
    --layout-muted: #94a3b8;
    --layout-brand: #22c55e;
    --layout-brand-alt: #06b6d4;
}

* {
    box-sizing: border-box;
}

body.layout-base {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: var(--layout-ink);
    background: var(--layout-bg);
    min-height: 100vh;
    position: relative;
}

.container {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 24px;
}

.layout-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, #0b1020, rgba(13, 20, 38, 0.95) 45%, #0b1020), radial-gradient(1200px 480px at 18% 12%, rgba(34, 197, 94, 0.16), transparent 65%), radial-gradient(920px 360px at 90% 10%, rgba(6, 182, 212, 0.16), transparent 70%), var(--bg-img) center/cover no-repeat fixed;
    filter: saturate(120%);
    pointer-events: none;
}

    .layout-bg::after {
        content: "";
        position: fixed;
        top: 24px;
        right: 24px;
        width: 84px;
        height: 84px;
        background: var(--logo) center/contain no-repeat;
        opacity: 0.22;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    }

.layout-body {
    position: relative;
    z-index: 1;
    padding: 32px 0 64px;
}

.layout-body--tight {
    padding: 0;
}

body.layout-shell .layout-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.layout-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, rgba(10, 17, 31, 0.92), rgba(10, 17, 31, 0.75));
    backdrop-filter: blur(12px) saturate(130%);
    border-bottom: 1px solid var(--layout-border);
}

.layout-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
}

.layout-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--layout-ink);
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-image: url('../../assets/logo1024.png');
    box-shadow: 0 22px 56px rgba(14, 74, 207, .9);
}

.layout-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.layout-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--layout-muted);
    transition: background 0.2s ease, color 0.2s ease;
}

    .layout-nav-link:hover,
    .layout-nav-link:focus-visible {
        background: rgba(34, 197, 94, 0.14);
        color: var(--layout-ink);
    }

.layout-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.layout-pild {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--layout-border);
    background: rgba(14, 21, 38, 0.85);
    color: var(--layout-ink);
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.2s ease, transform 0.2s ease;
}

    .layout-pild:hover,
    .layout-pild:focus-visible {
        filter: brightness(1.08);
        transform: translateY(-1px);
    }

.layout-logout {
    margin: 0;
}

    .layout-logout .layout-pild.logout {
        border: none;
        background: linear-gradient(180deg, #f87171, #ef4444);
        color: #0b1220;
    }

        .layout-logout .layout-pild.logout:hover,
        .layout-logout .layout-pild.logout:focus-visible {
            filter: brightness(1.1);
        }

.layout-main {
    flex: 1;
    width: min(1180px, 100%);
    margin: 48px auto 64px;
}

.layout-footer {
    margin-top: auto;
    border-top: 1px solid var(--layout-border);
    background: rgba(10, 17, 31, 0.82);
    backdrop-filter: blur(12px) saturate(130%);
    padding: 24px 0;
}

.layout-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    color: var(--layout-muted);
}

.footer-brand {
    font-weight: 650;
    color: var(--layout-ink);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-version {
    margin-left: 10px;
    font-size: 0.85rem;
}

.layout-footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

    .layout-footer-right a {
        color: var(--layout-ink);
        text-decoration: none;
    }

        .layout-footer-right a:hover,
        .layout-footer-right a:focus-visible {
            text-decoration: underline;
        }

@media (max-width: 768px) {
    .layout-header-inner {
        flex-wrap: wrap;
    }

    .layout-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .layout-main {
        margin: 36px auto 48px;
    }

    .layout-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
