﻿/* ========================================
   HESOTECH MODERN LAYOUT SYSTEM
   Reusable layout components for all Hesotech applications
   ======================================== */

/* Page Layout */
.heso-page-wrapper {
    display: flex;
    height: 100vh;
    background: #f5f7fa;
    width: 100%;
    overflow: hidden;
}

/* Sidebar */
.heso-sidebar {
    width: 280px;
    background: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Main Content Wrapper */
.heso-main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - 280px);
    max-width: calc(100% - 280px);
    height: 100vh;
    overflow: hidden;
}

/* Navbar - Gradient Background wie Login, exakte Höhe */
.heso-navbar {
    background: linear-gradient(135deg, #006d77 0%, #83c5be 100%);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid #f77f00;
    gap: 0.75rem;
    height: 70px;
    flex-shrink: 0;
}

.heso-navbar-brand {
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.heso-navbar-brand:hover {
    color: #ffddd2 !important;
}

.heso-navbar-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.heso-navbar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.heso-navbar-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.heso-navbar-brand-subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Logout Button - Kompakter */
.heso-logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.heso-logout-btn .oi {
    font-size: 0.875rem;
}

.heso-logout-btn:hover {
    background: white;
    color: #006d77;
    border-color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* Small Logout Button - Icon only, next to current user */
.heso-logout-btn-small {
    background: rgba(0, 109, 119, 0.1);
    border: 2px solid #006d77;
    color: #006d77;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.heso-logout-btn-small:hover {
    background: #006d77;
    color: white;
    border-color: #006d77;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 109, 119, 0.3);
}

.heso-logout-btn-small .oi {
    font-size: 0.9rem;
}

/* Top Bar - Exakt gleiche Höhe und nahtloser Gradient-Übergang */
.heso-top-bar {
    background: linear-gradient(90deg, #83c5be 0%, #5bc0de 100%);
    padding: 0.8rem 2rem;
    border-bottom: 3px solid #f77f00;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 70px;
}

.heso-top-bar a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
 gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.heso-top-bar a .oi {
    font-size: 0.875rem;
}

.heso-top-bar a:hover {
    background: white;
    color: #006d77;
    border-color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Content Area */
.heso-content-area {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.heso-content-area > * {
    width: 100%;
    max-width: 100%;
    flex: 1;
    min-height: 0;
}

/* Navigation Menu - Gradient Background */
.heso-nav-menu-wrapper {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    flex: 1;
    overflow: hidden;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.heso-nav-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.nav-item-hesotech,
.dynamic-nav-item {
    margin: 0.25rem 0;
}

.nav-link-hesotech,
.dynamic-nav-link {
    display: flex;
 align-items: center;
 padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
font-weight: 500;
    border-left: 4px solid transparent;
    gap: 12px;
}

.nav-link-hesotech:hover,
.dynamic-nav-link:hover {
    background: linear-gradient(90deg, rgba(0, 109, 119, 0.1) 0%, transparent 100%);
    color: #006d77;
    border-left-color: #f77f00;
    padding-left: 1.75rem;
}

.nav-link-hesotech.active,
.dynamic-nav-link.active {
    background: linear-gradient(90deg, rgba(0, 109, 119, 0.15) 0%, transparent 100%);
    color: #006d77;
    border-left-color: #006d77;
    font-weight: 700;
}

.nav-link-hesotech .oi,
.dynamic-nav-link .oi {
    font-size: 1.1rem;
    width: 24px;
 text-align: center;
}

/* Current User Item at bottom - styled like nav items */
.heso-nav-current-user {
    margin-top: auto;
    flex-shrink: 0;
    border-top: 2px solid #dee2e6;
    background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%);
}

.current-user-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #374151;
    gap: 12px;
    border-left: 4px solid #006d77;
    background: linear-gradient(90deg, rgba(0, 109, 119, 0.1) 0%, transparent 100%);
    cursor: default;
}

.current-user-item .oi.oi-person {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #006d77;
    flex-shrink: 0;
}

.current-user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.current-user-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #666;
    text-transform: uppercase;
    line-height: 1;
}

.current-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #006d77;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #83c5be;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #006d77;
}

/* Scrollbar für spezifische Komponenten */
.heso-sidebar::-webkit-scrollbar,
.heso-content-area::-webkit-scrollbar,
.heso-nav-menu-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.heso-sidebar::-webkit-scrollbar-track,
.heso-content-area::-webkit-scrollbar-track,
.heso-nav-menu-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.heso-sidebar::-webkit-scrollbar-thumb,
.heso-content-area::-webkit-scrollbar-thumb,
.heso-nav-menu-wrapper::-webkit-scrollbar-thumb {
  background: #83c5be;
    border-radius: 4px;
}

.heso-sidebar::-webkit-scrollbar-thumb:hover,
.heso-content-area::-webkit-scrollbar-thumb:hover,
.heso-nav-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: #006d77;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 767.98px) {
    .heso-page-wrapper {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .heso-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .heso-main-content-wrapper {
        width: 100%;
        max-width: 100%;
        height: auto;
        overflow: visible;
    }

    .heso-content-area {
        padding: 1rem;
        overflow: visible;
    }

    .heso-navbar {
        padding: 1rem;
    }
    
    .heso-navbar-brand {
        font-size: 1.2rem;
  }

    .heso-logout-btn span:not(.oi) {
        display: none;
    }

    .heso-nav-menu-wrapper {
        position: fixed;
  top: 0;
    left: 0;
        width: 280px;
        height: 100vh;
     transform: translateX(-100%);
        transition: transform 0.3s ease;
     z-index: 1000;
    }

    .heso-nav-menu-wrapper.show {
   transform: translateX(0);
    }
}

/* ========================================
   FULLSCREEN STANDALONE PAGE LAYOUT
   For pages accessed via EmptyLayout (without sidebar navigation)
   Matches Login page styling
   ======================================== */

.heso-fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #006d77 0%, #83c5be 50%, #ffddd2 100%);
    padding: 1rem;
    box-sizing: border-box;
}

.heso-fullscreen-content {
    height: 100%;
    width: 100%;
    overflow: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Variante ohne Padding (volle Breite) */
.heso-fullscreen-container.no-padding {
    padding: 0;
}

.heso-fullscreen-container.no-padding .heso-fullscreen-content {
    border-radius: 0;
    box-shadow: none;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .heso-fullscreen-container {
        padding: 0.5rem;
    }
    
    .heso-fullscreen-content {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .heso-fullscreen-container {
        padding: 0;
    }
    
    .heso-fullscreen-content {
        border-radius: 0;
    }
}
