body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

#app-side-nav-outer-toolbar {
    flex-direction: column;
    display: flex; 
    height: 100%;
    width: 100%;
}

.layout-header {
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
    z-index: 1505;
}

.header-logo {
    height: 40px;
    margin-right: 12px;
}

.header-title {
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dx-card {
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    border-radius: 4px;
    background-color: #fff;
    margin: 2px 2px 3px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

.layout-body {
    background-color: #f2f2f2;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.layout-body .content {
    flex-grow: 1;
    height: 100%;
    line-height: 1.5;
    margin: 20px 40px;
}

.layout-body .content h2 {
    font-size: 32px;
    line-height: 40px;
}

.layout-body .content-block {
    margin: 0 0 20px;
}

.layout-body .content-footer {
    display: block;
    color: rgba(0,0,0,.609);
    border-top: 1px solid rgba(0,0,0,.1);
    padding-top: 20px;
    padding-bottom: 24px;
    margin: 0 40px;
}

.auth-page .layout-body,
.admin-page .layout-body,
.app-page .layout-body {
    display: flex;
    flex-direction: column;
}

.auth-page .layout-body .content,
.admin-page .layout-body .content,
.app-page .layout-body .content {
    height: auto;
    min-height: 0;
    overflow-y: auto;
}

.auth-page .layout-body .content-footer,
.admin-page .layout-body .content-footer,
.app-page .layout-body .content-footer {
    flex-shrink: 0;
}

.layout-body .responsive-paddings {
    padding: 20px;
}

@media screen and (max-width: 600px) {
    .layout-body .content {
        margin: 20px;
    }
}

.language-switcher {
    position: relative;
    display: inline-block;
}

.language-switcher-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    padding: 2px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
}

.language-switcher-summary::-webkit-details-marker {
    display: none;
}

.language-switcher-summary::marker {
    content: "";
}

.language-switcher-list {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.language-switcher-form {
    display: inline;
    margin: 0;
}

.language-switcher-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    padding: 2px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.language-switcher-option:hover {
    background: rgba(0, 0, 0, 0.08);
}

.language-switcher-option.active {
    border-color: rgba(0, 0, 0, 0.4);
}

.language-switcher-flag {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 2px;
}

.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: #263238;
    color: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.cookie-consent-text {
    flex: 1 1 320px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #90caf9;
    margin-left: 6px;
}

.cookie-consent-form {
    margin: 0;
    flex: 0 0 auto;
}

/* Touch-friendly minimum tap targets on small screens */
@media screen and (max-width: 600px) {
    .cookie-consent-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .cookie-consent-form {
        width: 100%;
    }

    .cookie-consent-form .dx-button {
        width: 100%;
    }

    .language-switcher-summary,
    .language-switcher-option {
        min-height: 40px;
        min-width: 44px;
    }

    .auth-status input[type="text"],
    .auth-status input[type="password"],
    .layout-body .content input[type="text"],
    .layout-body .content input[type="password"] {
        min-height: 40px;
        font-size: 16px;
    }

    .layout-body .content .dx-button {
        min-height: 40px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

