/* public/css/global.css */

html, body {
    height: 100%;
    margin: 0 auto;
    max-width: 2000px;
}
body {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "topbar"
      "content";
    background-color: #DADADA;
    padding: 0 3vw;
    font-family: Helvetica;
}

/* Topbar */
.topbar-container {
    grid-area: topbar;
    display: flex;
    align-items: center;
    padding: 8px 0;

}

.tab-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;                                   /* exakt Tab-Höhe */
    padding: 0 12px;
    border-radius: 6px;
    flex: 0;
}
.tab-logo img {
    height: 100%;
    width: auto;
    display: block;
}

/* Menü-Container */
.menu-container {
    position: relative;
    display: inline-flex;
    padding: 6px 6px;
    background-color: #fff;
    border-radius: 12px;
    height: 36px;
    align-items: center;
    gap: 12px;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
}

/* Der bewegliche Hintergrund (Indikator) */
.menu-container .menu-tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0; /* Wird per JS gesetzt */
    width: 0; /* Wird per JS gesetzt */
    background-color: #404040;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Weicher "Spring"-Effekt */
    z-index: 0; /* Wichtig: Hinter dem Text */
}

/* Die Links */
.menu-container .menu-tab-item {
    position: relative;
    z-index: 1; /* Wichtig: Vor dem Indikator */
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555; /* Inaktive Farbe */
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    border-radius: 8px;
}

/* Wenn aktiv: Text weiß machen, damit man ihn auf dem dunklen Indikator sieht */
.menu-container .menu-tab-item.active {
    color: #fff;
}

.menu-container .menu-tab-item:hover:not(.active) {
    background-color: rgba(0,0,0,0.05); /* Leichter Hover-Effekt für inaktive Tabs */
}

/* --- Login-Container Anpassungen --- */
.login-container {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    padding: 6px;
    margin-left: auto;
    display: flex;
    align-items: center;
    height: 36px; /* Gesamt-Höhe fixieren */
    box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
    /* Isolieren für z-index Management */
    isolation: isolate;
}

/* Der neue Login-Indikator (gleicher Stil wie Menü) */
.login-tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px; /* Startposition passend zum Padding */
    width: 0;
    background-color: #404040;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

/* Link Styling */
.login {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    height: 100%;
    text-decoration: none;
    color: #000;
    border-radius: 8px; /* Wichtig für Hover-Form */
    transition: color 0.3s ease, background-color 0.3s ease;
    z-index: 1;
}

/* Icon Container */
.user-login {
    display: flex;
    align-items: center;
}

.user-login img {
    height: 24px; /* Fixe Höhe definieren falls nötig */
    width: auto;
    transition: filter 0.3s ease;
}

/* Text weiß färben */
.login.active {
    color: #fff;
}
/* Hover für den GANZEN Container-Inhalt */
.login:hover:not(.active) {
    background-color: rgba(0,0,0,0.05);
}
.login.active .user-login img {
    filter: brightness(0) invert(1);
}
/* Der Container für die zwei Textzeilen */
.user-details {
    display: flex;
    flex-direction: column; /* Untereinander */
    align-items: flex-start;
    justify-content: center;
    line-height: 1.1;       /* Enger Zeilenabstand wegen begrenzter Höhe */
}
/* Name */
.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #000;
    transition: color 0.3s ease;
}

/* Firma (kleiner und grau) */
.user-company {
    font-size: 0.7rem;
    color: #888; /* Grau */
    transition: color 0.3s ease;
}

.content-container {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
    margin-bottom: 8px;

    /* Feste Höhe damit Scroll funktioniert */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;        /* Verhindert flex-overflow aus parent */
    height: 90vh;         /* Füllt den grid-area aus */
    box-sizing: border-box;
}
