* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arimo", "Inter", Calibri,"Carlito", "Segoe UI", Arial, Helvetica, sans-serif;
}

body {
    background: #ffffff;
}

.container {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 60px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow: auto;
}

.header {
    position: relative;
    z-index: 1000;
    grid-column: 1 / -1;
    grid-row: 1;
    height: 60px;
    background: white;
    border-bottom: 1px solid #fce9de;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px 0 18px;
}

.user-menu {
    position: relative;
}

.user-menu[open] .avatar {
    background: #ffdfcf;
}

.user {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

.user::-webkit-details-marker {
    display: none;
}

.user:focus-visible {
    outline: 2px solid #ff5a00;
    outline-offset: 4px;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffefe7;
    color: #ff5a00;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: background-color 0.15s ease;
}

.username-label {
    font-size: 13px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #f1e2da;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.14);
}

.user-dropdown form {
    margin: 0;
}

.user-dropdown-item {
    width: 100%;
    min-height: 42px;
    padding: 14px 30px;
    border: 0;
    background: #ffffff;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-dropdown-item:hover,
.user-dropdown-item:focus-visible {
    background: #fff5ef;
    color: #e65100;
    outline: none;
}

.user-dropdown-item i {
    font-size: 16px;
}

.mobile-user-dropdown-item {
    display: none;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.mobile-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.mobile-brand span {
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-wrap {
    white-space: nowrap;
    word-break: keep-all;
}

.system-messages {
    padding: 18px 26px 0;
}

.system-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

@media (max-width:767px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .container {
        display: block;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .main {
        width: 100%;
        height: auto;
        min-height: calc(100dvh - 64px);
        overflow-x: hidden;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
        height: 64px;
        justify-content: space-between;
        padding: env(safe-area-inset-top)
            max(16px, env(safe-area-inset-right))
            0
            max(16px, env(safe-area-inset-left));
    }

    .mobile-brand {
        display: flex;
    }

    .user {
        max-width: 45%;
        gap: 8px;
    }

    .avatar {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    .username-label {
        display: none;
    }

    .user-dropdown {
        right: 0;
    }

    .mobile-user-dropdown-item {
        display: flex;
    }

}

@media (max-width:359px) {
    .header {
        padding-right: 10px;
        padding-left: 10px;
    }

    .mobile-brand {
        gap: 7px;
    }

    .mobile-brand img {
        width: 32px;
        height: 32px;
    }

    .mobile-brand span {
        font-size: 15px;
    }
}
