.keepedu-app-page,
.keepedu-auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: #566273;
}

.keepedu-app-page {
    background: #dedede;
}

.keepedu-app-page .topbar {
    display: none;
}

.ke-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 28px;
    background: #060606;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-header-left,
.ke-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ke-header-left {
    transition: gap 0.32s cubic-bezier(0.4, 0, 0.2, 1), width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    min-width: 0;
}

.ke-logo-icon {
    height: 32px;
    width: 32px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition:
        width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
}

.ke-logo-brand {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    opacity: 1;
    transition:
        max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease,
        margin 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-logo-mark {
    width: 36px;
    height: 36px;
    border: 3px solid #ffffff;
    border-radius: 9px;
    position: relative;
    flex: 0 0 auto;
}

.ke-logo-mark::before,
.ke-logo-mark::after {
    content: "";
    position: absolute;
    background: #ffffff;
    border-radius: 999px;
}

.ke-logo-mark::before {
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 4px;
}

.ke-logo-mark::after {
    left: 10px;
    top: 9px;
    width: 16px;
    height: 4px;
    transform: rotate(-34deg);
    transform-origin: left center;
}

.ke-header-menu {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #ffffff;
    position: relative;
    cursor: default;
    flex: 0 0 auto;
    transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), height 0.32s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.ke-header-menu::before,
.ke-header-menu::after,
.ke-header-menu span {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), top 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.ke-header-menu::before {
    top: 13px;
}

.ke-header-menu span {
    top: 20px;
}

.ke-header-menu::after {
    top: 27px;
}

.ke-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: #ffffff;
    text-decoration: none;
    border: 0;
    background: transparent;
    max-width: min(420px, 42vw);
    cursor: default;
}

.ke-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.ke-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ke-header-link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 4px;
}

.ke-shell {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: calc(100vh - 84px);
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-sidebar {
    background: #f6f6f6;
    border-right: 1px solid #d6d9dd;
    padding: 22px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 84px);
}

.ke-sidebar-title {
    padding: 0 14px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2b2f36;
    max-height: 24px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-nav {
    display: grid;
    gap: 2px;
}

.ke-nav-lote {
    display: grid;
    gap: 2px;
    overflow: hidden;
}

.ke-nav-lote.is-expanded .ke-nav-item {
    animation: ke-nav-lote-in 0.32s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(1) {
    animation-delay: 0.04s;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(2) {
    animation-delay: 0.09s;
}

.ke-nav-lote.is-expanded .ke-nav-item:nth-child(3) {
    animation-delay: 0.14s;
}

@keyframes ke-nav-lote-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ke-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 20px;
    color: #646f80;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1), gap 0.32s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-nav-item > span:not(.ke-nav-icon) {
    overflow: hidden;
    white-space: nowrap;
    max-width: 200px;
    opacity: 1;
    transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}

.ke-nav-item:hover {
    background: #ececec;
    color: #23456d;
}

.ke-nav-item.is-active {
    background: #f2f4f7;
    border-left-color: #2a84d2;
    color: #2a84d2;
}

.ke-nav-icon {
    width: 22px;
    text-align: center;
    color: inherit;
    font-size: 16px;
}

.ke-nav-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ke-nav-icon-svg .ke-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ke-sidebar-panel {
    margin: auto 14px 0;
    padding: 14px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d9dde4;
    max-height: 220px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, margin 0.32s cubic-bezier(0.4, 0, 0.2, 1), padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.ke-sidebar-panel span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7d8796;
    margin-bottom: 8px;
}

.ke-sidebar-panel strong,
.ke-sidebar-panel a {
    display: block;
    color: #38516f;
    text-decoration: none;
    line-height: 1.5;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ke-sidebar-group {
    display: grid;
    gap: 10px;
    padding: 0 14px;
}

.ke-sidebar-group-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a8595;
}

.ke-side-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #d9dde4;
    color: #4f6075;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ke-side-link:hover {
    background: #f4f8fc;
    border-color: #cad6e5;
    color: #2f5f97;
}

.ke-side-link::after {
    content: ">";
    color: #8c99ab;
    font-size: 12px;
}

.ke-side-link.is-current {
    background: #eef5fc;
    border-color: #c9dced;
    color: #2a84d2;
}

.ke-side-meta {
    display: grid;
    gap: 10px;
}

.ke-side-meta-item {
    padding: 12px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #d9dde4;
}

.ke-side-meta-item span {
    display: block;
    margin-bottom: 6px;
    color: #7d8796;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ke-side-meta-item strong,
.ke-side-meta-item p {
    margin: 0;
    color: #415166;
    line-height: 1.5;
}

.ke-side-meta-item strong {
    font-size: 13px;
}

.ke-side-meta-item p {
    font-size: 12px;
}

.keepedu-app-page .ke-main {
    min-width: 0;
    padding: 8px 18px 28px;
    overflow-x: clip;
}

.ke-page-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 8px 14px;
}

.ke-page-title h1 {
    margin: 0;
    color: #2d3848;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ke-page-title small {
    color: #8a95a5;
    font-size: 13px;
    font-weight: 500;
}

.ke-breadcrumbs {
    text-align: right;
    color: #93a0b1;
    font-size: 12px;
    line-height: 1.6;
}

.ke-page-content.page,
.ke-page-content.bernoulli-page {
    max-width: none;
    margin: 0;
    padding: 0;
}

.keepedu-app-page .bernoulli-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
