:root {
    --max-width-content: 1260px;
    --header-height: 88px;
    --open-panel-width: 300px;
    --main-color: #eaf0ff;
    --main-color-rgb: 234, 240, 255;
    --field-color: #f5f7fc;
    --btn-hover-color: #2859d9;
    --btn-hover-color-rgb: 40, 89, 217;
    --warn-color: #a44316;
    --warn-color-rgb: 164, 67, 22;
    --logo-bg-color: #1e43a2;
    --logo-main-color: #fff;
    --outgoing-bg: #e7f5ed;
    --requested-bg: #fff3d8;
    --ink: #192c49;
    --muted: #566780;
    --line: #dce3ed;
    --brand: #2859d9;
    --surface: #fff;
    --soft: #eaf0ff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #f5f7fc;
    font-size: 16px;
    line-height: 1.55;
}

body::before {
    display: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

button,
.nav-link,
.clarity-link,
[role="button"],
summary {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

@media (hover: hover) {
    button:not(:disabled):hover,
    .nav-link:hover,
    .clarity-link:hover,
    [role="button"]:not([aria-disabled="true"]):hover,
    summary:hover {
        filter: brightness(0.94);
    }

    .top-btn:not(:disabled):hover {
        background: var(--soft);
        border-color: #aabfe9;
        color: var(--brand);
    }

    .fio-panel button:not(:disabled):hover {
        background: #214dbc;
        border-color: #214dbc;
        color: white;
    }
}

a {
    color: var(--brand);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #815bd7;
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

input,
select,
textarea {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 12px;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1,
h2 {
    font-size: 34px;
    letter-spacing: -1px;
    line-height: 1.18;
}

h3 {
    font-size: 20px;
    line-height: 1.3;
}

p {
    line-height: 1.65;
}

svg {
    flex-shrink: 0;
}

._wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.content {
    max-width: var(--max-width-content);
    padding: 0 40px;
    margin: 0 auto;
    width: 100%;
}

main {
    min-width: 0;
    padding: 40px 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.section-title {
    margin-bottom: 24px;
}

.section-title h1 {
    margin: 10px 0;
}

.section-title p:last-child {
    color: var(--muted);
    font-size: 14px;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: -1px;
    z-index: 20;
}

header>.content {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 88px;
}

.site-brand {
    display: flex;
    gap: 9px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -1px;
    white-space: nowrap;
}

.site-logo {
    display: block;
    width: 200px;
    height: auto;
    max-height: 68px;
    object-fit: contain;
    object-position: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--brand);
    color: white;
    border-radius: 10px;
    font-size: 18px;
}

.nav-menu {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
}

.nav-menu-items {
    display: contents;
}

.nav-link {
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 14px;
    text-decoration: none;
    color: var(--muted);
}

.nav-link:hover,
.nav-link[aria-current=page] {
    background: var(--soft);
    color: var(--brand);
}

.admin-nav-link {
    position: relative;
}

.admin-notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    box-shadow: 0 0 0 2px white;
    pointer-events: none;
}

.top-bar {
    display: flex;
    gap: 8px;
    order: 3;
}

.top-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--muted);
    font-size: 13px;
}

.menu-vertical {
    display: none;
}

header.is-pinned {
    box-shadow: 0 4px 16px #192c490a;
}

.default-btn,
.default-btn:not([disabled]),
.clarity-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    box-shadow: none;
}

.default-btn:not([disabled]):hover,
.clarity-link:hover {
    background: var(--soft);
    border-color: #aabfe9;
    box-shadow: none;
}

.default-btn.primary,
.clarity-link.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

.default-btn.primary:not([disabled]):hover {
    background: #214dbc;
}

.default-btn svg {
    width: 20px;
    height: 20px;
}

.red-text {
    color: #aa3030;
}

.blue-text {
    color: var(--brand);
}

.dots-button {
    padding: 4px;
    border-radius: 6px;
}

footer {
    background: #fff;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

footer .foot-field {
    display: flex;
    gap: 24px;
    padding: 22px 0;
    flex-wrap: wrap;
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .underline {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

footer .underline .info-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 900px) {
    .content {
        padding: 0 24px;
    }

    header>.content {
        gap: 18px;
    }

    h1,
    h2 {
        font-size: 30px;
    }
}

@media (max-width: 600px) {
    .content {
        padding: 0 20px;
    }

    main {
        padding: 28px 0;
    }

    header>.content {
        flex-wrap: wrap;
        column-gap: 12px;
        row-gap: 0;
        min-height: 72px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .site-brand {
        font-size: 21px;
    }

    .site-logo {
        width: 160px;
        max-height: 56px;
    }

    .top-bar {
        margin-left: auto;
        order: 2;
    }

    .menu-vertical {
        display: flex;
    }

    .nav-menu {
        display: grid;
        grid-template-rows: 0fr;
        order: 3;
        width: 100%;
        margin: 0;
        border-top: 0 solid var(--line);
        padding-top: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: grid-template-rows 0.2s ease, padding-top 0.2s ease, margin-top 0.2s ease, border-top-width 0.2s ease, opacity 0.2s ease, visibility 0s 0.2s;
    }

    .nav-menu-items {
        display: flex;
        min-height: 0;
        overflow: hidden;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .nav-menu.show {
        grid-template-rows: 1fr;
        margin-top: 12px;
        border-top-width: 1px;
        padding-top: 10px;
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        padding: 10px;
    }

    .logout-label {
        display: none;
    }

    h1,
    h2 {
        font-size: 28px;
    }

    footer .foot-field {
        gap: 12px;
    }

    footer .underline .info-bar {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none!important;
        transition: none!important;
        scroll-behavior: auto!important;
    }
}
