/* App Container */
.app-container {
    position: relative;
    display: flex;
    height: calc(100vh - 50px);
    /* Full height minus menu bar (50px) */
    overflow: hidden;
}

/* App Sidebar */
.app-sidebar {
    width: 220px;
    background: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    border-right: 1px solid #1a252f;
    flex-shrink: 0;
    z-index: 100;
}

.app-sidebar.collapsed {
    width: 50px;
}

.app-sidebar.collapsed .app-sidebar-item .label {
    opacity: 0;
    width: 0;
    display: none;
}

/* Ensure icon is centered when collapsed */
.app-sidebar.collapsed .app-sidebar-item {
    justify-content: center;
    padding: 10px 0;
}

.app-sidebar.collapsed .app-sidebar-item .icon {
    margin-right: 0;
}

.app-sidebar-toggle {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-toggle .icon {
    font-size: 14px;
    color: #7f8c8d;
}

.app-sidebar-toggle:hover .icon {
    color: #bdc3c7;
}

.app-sidebar-toggle:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.05);
}

.app-sidebar-menu {
    padding: 8px 0;
    overflow-y: auto;
}

/* Scrollbar Styling für Sidebar */
.app-sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.app-sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.app-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.app-sidebar-item {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #95a5a6;
    white-space: nowrap;
    overflow: hidden;
    border-left: 3px solid transparent;
}

.app-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ecf0f1;
}

.app-sidebar-item:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.05);
    color: #ecf0f1;
}

.app-sidebar-item.active {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border-left-color: #3498db;
}

.app-sidebar-item .icon {
    width: 20px;
    font-size: 13px;
    text-align: center;
    margin-right: 10px;
    flex-shrink: 0;
    opacity: 0.7;
}

.app-sidebar-item:hover .icon,
.app-sidebar-item.active .icon {
    opacity: 1;
}

.app-sidebar-item .label {
    font-size: 12px;
    font-weight: 400;
    opacity: 1;
    transition: opacity 0.2s;
    letter-spacing: 0.01em;
}

/* Sidebar Gruppe (Abschlussprovision, Datentransfer, Administration, etc.) */
.app-sidebar-group {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sidebar Footer (Ausloggen) */
.app-sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-footer .app-sidebar-item {
    color: #7f8c8d;
}

.app-sidebar-footer .app-sidebar-item:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}



/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: #fff;
}

/* Update Main Content to fit in wrapper */
.main-content {
    /* Previously fixed height */
    height: auto !important;
    flex: 1;
    display: flex;
}

/* ========== App Footer (dynamisch, nicht fixiert) ========== */
.app-footer {
    flex-shrink: 0;
    height: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #e8ecf0 0%, #dce0e5 100%);
    border-top: 1px solid #c0c4c8;
    font-size: 10px;
    color: #5a6370;
    user-select: none;
}

.app-footer-spacer {
    flex: 1;
    min-width: 0;
}

.app-footer-center {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Platz für Aktionen-Button; bleibt reserviert, wenn Button herausgezogen ist – Footer-Inhalte behalten Position */
.app-footer-aktionen-slot {
    flex-shrink: 0;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 28px;
    min-width: 92px;
}

.app-footer-text {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.app-footer-separator {
    color: #a0a4a8;
}

.app-footer-version {
    color: #7a8290;
}

.app-footer .time-display {
    font-weight: 600;
    color: #4a5568;
    font-size: 10px;
    letter-spacing: 0.02em;
}
