:root {
    --violet: #350064;
    --violet-dark: #240044;
    --violet-light: #5a2588;
    --aqua: #00b7e8;
    --white: #fff;
}

.site-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    color: var(--white);
    background: linear-gradient(110deg, var(--violet-dark), var(--violet) 62%, #491178);
    border-bottom: 3px solid var(--aqua);
}

.site-header__inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    color: var(--white);
    font-size: 1.55rem;
    line-height: 1.15;
}

.site-brand__system-name {
    display: flex;
    align-items: center;
    align-self: center;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: .09em;
    line-height: 1;
    white-space: nowrap;
    text-transform: none;
}

.site-brand__logo {
    display: block;
    width: 300px;
    height: 76px;
}

.site-account {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-account__name {
    color: #d8f7ff;
    font-size: .9rem;
    font-weight: bold;
}

.site-account__logout {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 14px;
    color: var(--white);
    background: var(--violet-light);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease;
}

.site-account__logout:hover,
.site-account__logout:focus {
    color: var(--violet-dark);
    background: var(--aqua);
    outline: none;
    transform: translateY(-1px);
}

.site-nav {
    background: var(--violet-dark);
}

.site-nav__list {
    display: flex;
    min-height: 53px;
    align-items: stretch;
    padding: 0;
    margin: 0 auto;
    list-style: none;
}

.site-nav__link {
    display: flex;
    align-items: center;
    min-height: 53px;
    padding: 0 24px;
    color: var(--white);
    appearance: none;
    border-right: 1px solid rgba(255, 255, 255, .25);
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: .93rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color .18s ease;
}

.site-nav__item:first-child .site-nav__link {
    border-left: 1px solid rgba(255, 255, 255, .25);
}

.site-nav__item {
    position: relative;
}

.site-nav__link:hover,
.site-nav__link:focus,
.site-nav__link--active {
    background: var(--violet-light);
    outline: none;
}

.site-nav__link--active {
    box-shadow: inset 0 -3px 0 var(--aqua);
}

.site-nav__submenu {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    display: none;
    min-width: 180px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    background: var(--violet-dark);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 10px 20px rgba(20, 0, 40, .25);
}

.site-nav__item--submenu:hover .site-nav__submenu,
.site-nav__item--submenu:focus-within .site-nav__submenu {
    display: block;
}

.site-nav__submenu a {
    display: block;
    padding: 10px 16px;
    color: var(--white);
    font-size: .88rem;
    font-weight: bold;
    text-decoration: none;
}

.site-nav__submenu span {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, .7);
    font-size: .88rem;
    font-weight: bold;
}

.site-nav__submenu a:hover,
.site-nav__submenu a:focus {
    color: var(--violet-dark);
    background: var(--aqua);
    outline: none;
}

.site-footer {
    color: var(--white);
    background: var(--violet-dark);
}

.site-footer__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: .87rem;
}

.site-footer__inner p {
    margin: 0;
    font-weight: bold;
}

.site-footer__build {
    color: #bcefff;
    font-size: .8rem;
    white-space: nowrap;
}

.page-note {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 1000;
}

.page-note .page-note__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0;
    color: var(--violet-dark);
    background: var(--aqua);
    border: 2px solid var(--violet-dark);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(20, 0, 40, .25);
    cursor: pointer;
}

.page-note .page-note__toggle:hover,
.page-note .page-note__toggle:focus {
    color: var(--white);
    background: var(--violet-light);
    border-color: var(--aqua);
}

.page-note__toggle svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-note__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 36px));
    padding: 16px;
    color: #262033;
    background: #fff;
    border: 1px solid #c9bfd3;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(20, 0, 40, .3);
}

.page-note__panel[hidden] { display: none; }
.page-note__header, .page-note__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-note__header { margin-bottom: 12px; }
.page-note__header h2 { margin: 0; font-size: 1rem; }
.page-note__close { width: 34px; min-width: 34px; padding: 3px; color: #554863; background: transparent; font-size: 1.6rem; line-height: 1; }
.page-note__text { width: 100%; min-height: 180px; resize: vertical; font-size: 1.15rem; line-height: 1.55; }
.page-note__footer { margin-top: 10px; }
.page-note__save { width: auto; min-width: 92px; }
.page-note__status { font-size: .84rem; color: #526148; }
.page-note__status--error { color: #a22323; }

@media (max-width: 760px) {
    .site-shell { width: min(100% - 28px, 1120px); }
    .site-header__inner { min-height: 70px; }
    .site-nav__list { overflow-x: auto; }
    .site-nav__link { min-height: 48px; padding: 0 17px; white-space: nowrap; }
}

@media (max-width: 480px) {
    .site-brand { gap: 8px; font-size: 1.18rem; }
    .site-brand__logo { width:126px; height:auto; }
    .site-brand__system-name { font-size: .75rem; }
    .site-account { gap: 10px; }
    .site-account__name { display: none; }
    .site-footer__inner { min-height: 86px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
    .page-note { top: 8px; right: 8px; }
}
