html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    color: #4a5568;
    font-weight: 300 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   Header & Telerik Navigation Bar
   ========================================================================== */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    padding: 0.85rem 2.5rem;
    position: relative;
    z-index: 100;
}

.app-menu {
    flex: 1;
}

.brand a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 300 !important;
    letter-spacing: 0.5px;
    margin-right: 3rem;
}

.app-menu .k-menu-horizontal {
    background: transparent !important;
    border: none !important;
}

.app-menu .k-menu-link,
.app-menu .k-menu-link .k-menu-link-text,
.app-menu .k-item,
.app-menu .k-item * {
    color: #475569 !important;
    font-weight: 300 !important;
    font-size: 0.92rem !important;
}

.app-menu .k-menu-link {
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.app-menu .k-menu-link:hover,
.app-menu .k-state-hover > .k-menu-link {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   Header User-Area & Sprachauswahl (Einheitlicher Dropdown-Look)
   ========================================================================== */

.user-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    font-size: 0.88rem;
    color: #475569;
}

.header-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Einheitliche Button-Optik für User & Sprachauswahl mit perfektem Abstand */
.header-dropdown-btn {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #334155;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Sorgt für perfekten Abstand zwischen Icons & Text */
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.header-dropdown-btn:hover,
.header-dropdown-btn:focus,
.header-dropdown-btn:active {
    background-color: #e2e8f0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.header-dropdown-btn .chevron-icon {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.1rem;
}

/* Absolute Positionierung: Schwebt über dem Header */
.header-dropdown-menu-popup {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    min-width: 170px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 0.35rem;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
}

/* Einträge in den Popups */
.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.85rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    border-radius: 6px;
    transition: background-color 0.12s ease, color 0.12s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.header-dropdown-item:hover:not(.disabled) {
    background-color: #f8fafc;
    color: #0f172a;
}

.header-dropdown-item.disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.header-dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.35rem 0;
}

/* Sprachauswahl mit vertikaler Trennlinie links */
.culture-picker {
    display: flex;
    align-items: center;
    padding-left: 1rem;
    border-left: 1px solid #cbd5e1;
}

.logout-link, .login-link {
    color: #64748b;
    text-decoration: none;
    padding: 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    transition: all 0.15s ease-in-out;
}

.logout-link:hover, .login-link:hover {
    color: #0f172a;
    background-color: #e2e8f0;
}

/* ==========================================================================
   Hauptinhaltsbereich & Footer
   ========================================================================== */

.content-body {
    flex: 1;
    padding: 2.5rem;
    background-color: #ffffff;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.85rem 2.5rem;
    font-size: 0.88rem;
    font-weight: 300;
}

.footer-company {
    color: #475569;
}

.footer-links a {
    color: #475569;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #0f172a;
    text-decoration: underline;
}

.footer-links .separator {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

/* ==========================================================================
   Auth Layout (Login / Register Card)
   ========================================================================== */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 1rem;
}

.auth-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #0f172a;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0;
    font-weight: 300;
}

.auth-error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem !important;
}

.auth-field .form-label {
    font-size: 0.85rem;
    font-weight: 400;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-checkbox-field {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 1.75rem !important;
}

.auth-checkbox-field .form-check-label {
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.auth-action-field {
    margin-bottom: 1.75rem !important;
}

.auth-card .k-textbox {
    width: 100% !important;
    border-radius: 6px !important;
    border-color: #cbd5e1 !important;
}

.auth-card .k-textbox:focus-within {
    border-color: #334155 !important;
    box-shadow: 0 0 0 2px rgba(51, 65, 85, 0.1) !important;
}

.auth-card .btn-auth-submit {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    background-color: #1e293b !important;
    border-color: #1e293b !important;
    color: #ffffff !important;
    font-weight: 400 !important;
    font-size: 0.9rem !important;
    padding: 0.55rem 1rem !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background-color 0.2s ease !important;
}

.auth-card .btn-auth-submit:hover {
    background-color: #0f172a !important;
    border-color: #0f172a !important;
}

.auth-footer {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 400;
}

.auth-footer a:hover {
    text-decoration: underline;
}