/**
 * assets/css/layout.css
 * Ergänzende Stile für das Basis-Template:
 * Navbar-Höhe, Page-Wrapper, Footer, Avatar, Dark-Mode.
 */

/* ── Navbar Page-Links (linksbündig nach Brand) ───────────────────────────── */
.navbar-page-link {
    color: rgba(255, 255, 255, .65) !important;
    font-size: .875rem;
    font-weight: 500;
    padding: .35rem .75rem !important;
    border-radius: 7px;
    transition: color .15s ease, background .15s ease;
    white-space: nowrap;
}

.navbar-page-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08);
}

.navbar-page-link.active {
    color: var(--sb-teal) !important;
    background: rgba(26, 188, 156, .12);
}

/* ── Cards immer weißer Hintergrund ──────────────────────────────────────── */
/* Überschreibt card-teal und card-stat Gradienten/Farben                    */
.card,
.card-teal,
.card-stat .card-body {
    background: #fff !important;
}

/* Stat-Werte und Labels auf dunkle Farben zurücksetzen */
.card-teal .stat-value { color: #1e2d3d !important; }
.card-teal .stat-label { color: #8a9bb0 !important; opacity: 1; }
.card-teal i           { color: var(--sb-teal); opacity: .5; }

/* Border für vormals gradient-Cards */
.card-teal {
    border: 1px solid var(--sb-border) !important;
}


#main-navbar {
    height: 58px;
    z-index: 1045; /* über Offcanvas-Backdrop */
}

/* ── Page-Wrapper: Mindesthöhe Viewport minus Navbar & Footer ─────────────── */
.page-wrapper {
    min-height: calc(100vh - 58px - 60px);
    padding: 1.5rem 0 2rem;
}

/* ── Avatar-Kreise ────────────────────────────────────────────────────────── */
.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--sb-teal-grad);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-circle-lg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sb-teal-grad);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Offcanvas-Sidebar Breite & Übergänge ─────────────────────────────────── */
#sidebar {
    width: 260px;
    border-right: 1px solid rgba(255, 255, 255, .05);
}

/* Sidebar nav-link logout-Farbe */
#sidebar .nav-link.text-danger:hover {
    background: rgba(231, 76, 60, .12);
    color: #ff8a80 !important;
}
#sidebar .nav-link.text-danger:hover i {
    color: #ff8a80 !important;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.main-footer {
    height: 60px;
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--sb-border);
    font-size: .8rem;
}

.footer-brand {
    font-weight: 700;
    color: #1e2d3d;
}

.footer-sep {
    color: #cdd5df;
}

.footer-meta {
    color: #8a9bb0;
}

.footer-link {
    color: var(--sb-teal);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--sb-teal-dark);
    text-decoration: underline;
}

/* ── Page-Header-Block (wiederverwendbar in Seiten) ───────────────────────── */
.page-header {
    padding: 0 1.5rem 1.25rem;
    border-bottom: 1px solid var(--sb-border);
    margin-bottom: 1.5rem;
}

.page-header h4 {
    margin-bottom: .15rem;
}

.page-header .page-subtitle {
    font-size: .85rem;
    color: #8a9bb0;
}

/* ── Stat-Strip (Zahlenzeile unter Page-Header) ───────────────────────────── */
.stat-strip {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-strip-item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.stat-strip-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e2d3d;
    line-height: 1;
}

.stat-strip-label {
    font-size: .7rem;
    color: #8a9bb0;
    text-transform: uppercase;
    letter-spacing: .07em;
}

/* ── Dark Mode ────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] body {
    background: #121c26;
    color: #d0dce8;
}

[data-bs-theme="dark"] .card {
    background: #1a2535;
    border-color: #263748;
}

[data-bs-theme="dark"] .card-header {
    background: #1e2d3d;
    border-color: #263748;
    color: #d0dce8;
}

[data-bs-theme="dark"] .table thead th {
    background: #1a2535;
    color: #8a9bb0;
    border-color: #263748;
}

[data-bs-theme="dark"] .table td {
    border-color: #263748;
    color: #d0dce8;
}

[data-bs-theme="dark"] .main-footer {
    background: #1a2535;
    border-color: #263748;
}

[data-bs-theme="dark"] .footer-brand { color: #d0dce8; }
[data-bs-theme="dark"] .footer-meta  { color: #4a637a; }

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #1a2535;
    border-color: #263748;
    color: #d0dce8;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: #1a2535;
    border-color: #263748;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #d0dce8;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background: #263748;
}

/* ── Responsive Anpassungen ───────────────────────────────────────────────── */

/* Auf sehr kleinen Displays Footer zweizeilig stapeln */
@media (max-width: 575.98px) {
    .main-footer {
        height: auto;
        padding: .75rem 0;
    }

    .page-wrapper {
        min-height: calc(100vh - 58px - 80px);
    }
}

/* Auf xxl: etwas mehr Innenabstand im Content */
@media (min-width: 1400px) {
    .page-wrapper {
        padding: 2rem 0 2.5rem;
    }
}
