/* =================================================================================================
   HABUS – Gesamt-CSS (merged)
   Enthält: Design-Variablen, Global/Layout, Navigation, Buttons/Utility, Tabellen, Kalender/Urlaub,
            Overlay/Popup (einmalig, konsolidiert)
================================================================================================= */

/* ============================================================================================= */
/* 2) Global Reset & Grundlayout                                                                 */
/* ============================================================================================= */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-size: var(--habus-font-size-base);
    font-family: sans-serif;
    height: 100%;
}

/* Flex-Layout: Navigation links, Content rechts */
.flex-container {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* Content-Bereich (rechts) */
.content {
    flex: 9;
    padding: 10px;
    background-color: var(--habus-color-bg-page);
	min-width: 0;              /* WICHTIG: erlaubt horizontales "Einschrumpfen" */
}

.content_header {
    flex: 9;
    padding: 0;
    min-height: 10vh;
    background-color: var(--habus-color-bg-page);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-bottom: 12px;
}

/* ── Header-Bar (modern) ────────────────────────────────────────────────── */
.habus-header-bar {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, .55);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.habus-header-titlewrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.habus-header-title {
    margin: 0;
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: .01em;
}

.habus-header-mgmtview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    color: #7a5000;
    background: #fef9e7;
    border: 1px solid #f0d080;
    border-radius: 20px;
    padding: 3px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.habus-header-mgmtview:hover { filter: brightness(.97); }
.habus-header-mgmtview i { font-size: 10px; }

.habus-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.habus-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.habus-user-lastlogin {
    font-size: 9px;
    font-weight: 400;
    color: #2c3e50;
    opacity: .65;
    padding-left: 14px;
    white-space: nowrap;
}

.habus-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--habus-color-primary-light);
    background: rgba(64, 128, 128, .12);
    border-radius: 20px;
    padding: 7px 14px;
    white-space: nowrap;
}

.habus-user-pill i { font-size: 12px; opacity: .8; }

.habus-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--habus-color-primary-light);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: filter .15s ease, transform .12s ease;
}

.habus-logout-btn:hover { filter: brightness(1.1); }
.habus-logout-btn:active { transform: scale(.92); }

@media (max-width: 480px) {
    .habus-header-bar { padding: 12px 14px; gap: 8px; }
    .habus-user-pill span.pill-text { display: none; }
}

.content_body {
    flex: 9;
    padding: 0;
    min-height: 80vh;
    background-color: var(--habus-color-bg-page);
}

.footer {
    min-height: 5vh;
    margin-right: 10px;
    background-color: lightgray;
}

.debug_window { background-color: gray; }

/* Responsive: kleines Display → Navigation oben */
@media (max-width: 360px) {
    .flex-container { flex-direction: column; }
    .content { margin: 0; }
}

/* ============================================================================================= */
/* 9) Urlaubsübersicht                                                                           */
/* ============================================================================================= */

.habus-urlaub-wrapper {
    font-size: 12px;
    margin: 10px 0;
}

.urlaub-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.urlaub-header h2 {
    margin: 0;
    font-size: 14px;
}

.urlaub-month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
}

.urlaub-month-nav label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.habus-urlaubstabelle {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

.habus-urlaubstabelle th,
.habus-urlaubstabelle td {
    border: 1px solid var(--habus-color-table-border);
    padding: 3px 4px;
    text-align: center;
    vertical-align: middle;
    font-size: 10px;
}

.month-cell {
    background: var(--habus-color-primary-light);
    color: #fff;
    font-weight: bold;
    min-width: 90px;
}

.month-cell-rowlabel { background: #fefefe; }

.fixed-col {
    background: #f9f9f9;
    white-space: nowrap;
}

.name-cell {
    text-align: left;
    padding-left: 6px;
}

.day-header {
    background: var(--habus-color-primary-light);
    color: #fff;
    font-weight: bold;
}

.day-number {
    background: #fefefe;
    font-weight: bold;
}

.day-cell {
    height: 18px;
    background: #ffffff;
}

.weekend { background-color: var(--habus-color-weekend); }

.abs-tag {
    display: inline-block;
    min-width: 22px;
    padding: 2px 4px;
    margin: 1px;
    border-radius: var(--habus-button-radius);
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    color: white;
}

.abs-tag.abs-anwesend {
    background-color: var(--habus-color-primary);
    color: #ffffff;
    font-weight: bold;
}

.abs-urlaub       { background-color: var(--habus-color-urlaub); }
.abs-krank        { background-color: var(--habus-color-krank); }
.abs-ueberstunden { background-color: var(--habus-color-abs-ueberstunden); }
.abs-fortbildung  { background-color: var(--habus-color-abs-fortbildung); }
.abs-sonstiges    { background-color: var(--habus-color-abs-sonstiges); }

.habus-urlaubstabelle tbody tr:hover td { background-color: #eaeaea; }

.habus-urlaubstabelle .scroll-container thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--habus-color-primary-light);
    color: #fff;
}


/* ============================================================================================= */
/* 10) Overlay & Popup (konsolidiert) */
/*     sollte in der hbaus_overlay.css sein hier ist nur noch der rest. */
/* ============================================================================================= */

/* Close-Button */
.close-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.close-btn .close-icon {
    width: 15px;
    height: 15px;
    color: #555;
    transition: color 0.2s ease;
}

.close-btn:hover .close-icon { color: #f44336; }

/* Button-Zustände im Popup */
.kommt,
.senden {
    background-color: var(--habus-color-btn-comes);
    color: white;
}

.geht,
.krank {
    background-color: var(--habus-color-btn-goes);
    color: white;
}

.urlaub {
    background-color: var(--habus-color-btn-urlaub);
    color: white;
}

/* Hover auf Close-Buttons */
.close-btn:hover {
    color: #f00;
}

/* Layout-Helfer */
.date-row {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
}

.date-row > div {
    display: flex;
    flex-direction: column;
}

#statusMessage {
    margin-top: 1rem;
    color: #333;
    font-size: var(--habus-font-size-base);
}

/* Mobile */
@media screen and (max-width: 480px) {
    #statusMessage { font-size: var(--habus-font-size-base); }
}

/* ================================================================================================= */
