/*
|--------------------------------------------------------------------------
| HL Kom Lagerverwaltung
|--------------------------------------------------------------------------
| Helles Corporate Design für Filament.
*/

:root {
    --hlkom-blue: #075b91;
    --hlkom-blue-bright: #148dcc;
    --hlkom-blue-soft: #eaf5fb;
    --hlkom-text: #172033;
    --hlkom-muted: #64748b;
    --hlkom-border: #dbe5ef;
    --hlkom-background: #f4f8fc;
}

/* Gesamter Hintergrund */
.fi-body {
    background:
        radial-gradient(
            circle at 20% 5%,
            rgba(91, 183, 231, 0.14),
            transparent 34rem
        ),
        linear-gradient(135deg, #f9fcff 0%, #eef5fb 100%) !important;
    color: var(--hlkom-text);
}

/* Login-Seite */
.fi-simple-layout {
    min-height: 100vh;
    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.95),
            rgba(235, 245, 253, 0.92)
        );
    position: relative;
    overflow: hidden;
}

.fi-simple-layout::before,
.fi-simple-layout::after {
    position: fixed;
    content: "";
    border: 2px solid rgba(73, 163, 217, 0.10);
    border-radius: 50%;
    pointer-events: none;
    transform: rotate(-18deg);
}

.fi-simple-layout::before {
    width: 75rem;
    height: 22rem;
    left: -30rem;
    bottom: 5rem;
}

.fi-simple-layout::after {
    width: 70rem;
    height: 20rem;
    right: -25rem;
    top: 4rem;
}

/* Login-Karte */
.fi-simple-main {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid rgba(203, 218, 231, 0.85);
    border-radius: 1.5rem !important;
    box-shadow:
        0 28px 75px rgba(15, 56, 92, 0.12),
        0 5px 20px rgba(15, 56, 92, 0.06) !important;
    padding: 2.5rem !important;
}

/* Logo auf Login und in Navigation */
.fi-logo {
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

.fi-simple-header .fi-logo {
    height: 7rem !important;
    max-width: 23rem !important;
    margin-bottom: 0.75rem;
}

.fi-topbar .fi-logo,
.fi-sidebar-header .fi-logo {
    height: 3.4rem !important;
    max-width: 13rem !important;
}

/* Überschriften */
.fi-simple-header-heading,
.fi-header-heading {
    color: var(--hlkom-text) !important;
    font-weight: 750 !important;
    letter-spacing: -0.025em;
}

.fi-simple-header-subheading {
    color: var(--hlkom-muted) !important;
}

/* Eingabefelder */
.fi-input-wrp {
    background: #ffffff !important;
    border-color: var(--hlkom-border) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 1px 2px rgba(15, 56, 92, 0.03) !important;
}

.fi-input-wrp:focus-within {
    border-color: var(--hlkom-blue-bright) !important;
    box-shadow:
        0 0 0 3px rgba(20, 141, 204, 0.13),
        0 2px 6px rgba(15, 56, 92, 0.05) !important;
}

.fi-input {
    color: var(--hlkom-text) !important;
}

/* Primärer Button */
.fi-btn.fi-color-primary {
    background: linear-gradient(
        135deg,
        var(--hlkom-blue),
        var(--hlkom-blue-bright)
    ) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 8px 20px rgba(7, 91, 145, 0.20) !important;
}

.fi-btn.fi-color-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* Верхняя панель */
.fi-topbar nav {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid var(--hlkom-border) !important;
    box-shadow: 0 2px 12px rgba(15, 56, 92, 0.05) !important;
}

/* Боковое меню */
.fi-sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--hlkom-border) !important;
}

.fi-sidebar-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--hlkom-border) !important;
}

.fi-sidebar-item-label,
.fi-sidebar-group-label {
    color: #334155 !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--hlkom-blue-soft) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-icon {
    color: var(--hlkom-blue) !important;
}

/* Карточки и секции */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid var(--hlkom-border) !important;
    border-radius: 1rem !important;
    box-shadow: 0 8px 25px rgba(15, 56, 92, 0.055) !important;
}

/* Светлый текст в основной области */
.fi-main,
.fi-main-ctn {
    color: var(--hlkom-text);
}

/* Убираем резкие тёмные поверхности */
.dark .fi-body,
.dark .fi-simple-layout,
.dark .fi-simple-main,
.dark .fi-sidebar,
.dark .fi-topbar nav {
    color-scheme: light !important;
}

/* Мобильная адаптация */
@media (max-width: 640px) {
    .fi-simple-main {
        padding: 1.5rem !important;
        border-radius: 1rem !important;
    }

    .fi-simple-header .fi-logo {
        height: 5rem !important;
        max-width: 18rem !important;
    }
}

/*
|--------------------------------------------------------------------------
| Telekom Material – Kategorien und Materialtabelle
|--------------------------------------------------------------------------
*/

.hl-material-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hl-material-search {
    width: 100%;
}

.hl-material-categories {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hl-material-category {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--hlkom-border);
    border-radius: 1rem;
    box-shadow:
        0 8px 25px rgba(15, 56, 92, 0.055),
        0 1px 3px rgba(15, 56, 92, 0.04);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.hl-material-category:hover {
    border-color: #b9d5e7;
    box-shadow:
        0 12px 30px rgba(15, 56, 92, 0.08),
        0 2px 5px rgba(15, 56, 92, 0.05);
}

.hl-material-category.is-open {
    border-color: rgba(20, 141, 204, 0.38);
}

.hl-material-category-header {
    width: 100%;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.hl-material-category-header:hover {
    background: #f7fbfe;
}

.hl-material-category-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.hl-material-chevron {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--hlkom-blue);
    transition: transform 180ms ease;
}

.hl-material-category.is-open .hl-material-chevron {
    transform: rotate(90deg);
}

.hl-material-category-title {
    color: var(--hlkom-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.hl-material-category-description {
    margin-top: 0.2rem;
    color: var(--hlkom-muted);
    font-size: 0.82rem;
}

.hl-material-category-count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    color: var(--hlkom-blue);
    background: var(--hlkom-blue-soft);
    border: 1px solid #cce5f3;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
}

.hl-material-category-content {
    border-top: 1px solid var(--hlkom-border);
}

.hl-material-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.hl-material-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    text-align: left;
}

.hl-material-table thead {
    background: #f7fafc;
}

.hl-material-table th {
    padding: 0.8rem 1.15rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hl-material-table td {
    padding: 0.9rem 1.15rem;
    color: #334155;
    font-size: 0.875rem;
    vertical-align: middle;
}

.hl-material-table tbody tr {
    border-top: 1px solid #e8eef4;
    transition: background 120ms ease;
}

.hl-material-table tbody tr:hover {
    background: #f8fbfd;
}

.hl-material-name {
    min-width: 20rem;
    color: var(--hlkom-text);
    font-weight: 600;
    line-height: 1.45;
}

.hl-material-notes {
    margin-top: 0.25rem;
    color: var(--hlkom-muted);
    font-size: 0.78rem;
    font-weight: 400;
}

.hl-material-number,
.hl-material-status,
.hl-material-actions {
    white-space: nowrap;
}

.hl-material-actions {
    text-align: right;
}

.hl-material-empty {
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--hlkom-border);
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(15, 56, 92, 0.055);
    text-align: center;
}

.hl-material-empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto;
    color: #94a3b8;
}

.hl-material-empty-title {
    margin-top: 0.75rem;
    color: var(--hlkom-text);
    font-weight: 650;
}

.hl-material-empty-text {
    margin-top: 0.25rem;
    color: var(--hlkom-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .hl-material-category-header {
        min-height: 4rem;
        padding: 0.9rem 1rem;
    }

    .hl-material-category-title {
        font-size: 0.92rem;
    }

    .hl-material-category-count {
        padding: 0.28rem 0.55rem;
        font-size: 0.7rem;
    }

    .hl-material-table th,
    .hl-material-table td {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

/*
|--------------------------------------------------------------------------
| Kompakter Dashboard
|--------------------------------------------------------------------------
*/

.hlkom-dashboard-stat {
    min-height: 112px !important;
}

.hlkom-dashboard-stat > div {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

.hlkom-dashboard-stat .fi-wi-stats-overview-stat-value {
    margin-top: 0.2rem !important;
    margin-bottom: 0.2rem !important;
    line-height: 1.05 !important;
}

.hlkom-dashboard-stat .fi-wi-stats-overview-stat-description {
    margin-top: 0.3rem !important;
}

/* Dashboard-Abstände verkleinern */
.fi-page:has(.hlkom-dashboard-stat) .fi-wi-stats-overview {
    gap: 0.75rem !important;
}

.fi-page:has(.hlkom-dashboard-stat) .fi-wi {
    margin-bottom: 0.75rem !important;
}

/*
|--------------------------------------------------------------------------
| Einheitliche Aktionsfarben
|--------------------------------------------------------------------------
| Success wird ruhig und konturiert dargestellt.
| Danger bleibt für Löschen und Abschreiben reserviert,
| wird aber weniger aggressiv dargestellt.
*/

.fi-btn.fi-color-success,
.fi-btn-color-success,
.hlkom-muted-success-action.fi-btn {
    color: #2f6f4e !important;
    background: #f6fbf8 !important;
    border-color: #9bc8ad !important;
    box-shadow:
        0 3px 10px rgba(47, 111, 78, 0.08) !important;
}

.fi-btn.fi-color-success:hover,
.fi-btn-color-success:hover,
.hlkom-muted-success-action.fi-btn:hover {
    color: #255a3f !important;
    background: #edf7f1 !important;
    border-color: #76ad8b !important;
}

.fi-btn.fi-color-success:focus-visible,
.fi-btn-color-success:focus-visible,
.hlkom-muted-success-action.fi-btn:focus-visible {
    outline:
        2px solid rgba(70, 135, 94, 0.25) !important;
    outline-offset: 2px;
}

.fi-btn.fi-color-success svg,
.fi-btn-color-success svg,
.hlkom-muted-success-action.fi-btn svg {
    color: currentColor !important;
}

/*
 * Rot nur für echte Gefahrenaktionen.
 * Die Farbe bleibt eindeutig, wirkt aber nicht grell.
 */

.fi-btn.fi-color-danger,
.fi-btn-color-danger {
    color: #9f3b3b !important;
    background: #fff8f8 !important;
    border-color: #e7b6b6 !important;
    box-shadow:
        0 3px 10px rgba(159, 59, 59, 0.07) !important;
}

.fi-btn.fi-color-danger:hover,
.fi-btn-color-danger:hover {
    color: #842f2f !important;
    background: #fff0f0 !important;
    border-color: #d99292 !important;
}

.fi-btn.fi-color-danger:focus-visible,
.fi-btn-color-danger:focus-visible {
    outline:
        2px solid rgba(159, 59, 59, 0.22) !important;
    outline-offset: 2px;
}

.fi-btn.fi-color-danger svg,
.fi-btn-color-danger svg {
    color: currentColor !important;
}

/*
|--------------------------------------------------------------------------
| Materialkarten
|--------------------------------------------------------------------------
*/

.hlkom-material-category-card {
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease;
}

.hlkom-material-category-card:hover {
    border-color: #b9cfe3 !important;
}

/*
|--------------------------------------------------------------------------
| Breiteres Suchfeld in Tabellen
|--------------------------------------------------------------------------
*/

.fi-ta-header-toolbar
.fi-ta-search-field {
    width: min(100%, 25rem) !important;
    min-width: 20rem;
}

@media (max-width: 768px) {
    .fi-ta-header-toolbar
    .fi-ta-search-field {
        width: 100% !important;
        min-width: 0;
    }
}

/*
|--------------------------------------------------------------------------
| Kompakte Inventar-Tabs
|--------------------------------------------------------------------------
*/

.fi-tabs {
    gap: .25rem !important;
}

.fi-tabs-item {
    min-height: 2.5rem;
    padding:
        .5rem .75rem !important;
    border-radius:
        .65rem !important;
}

.fi-tabs-item.fi-active {
    background:
        #eef6ff !important;
}

.fi-tabs-item-label {
    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Inventar-Tabelle
|--------------------------------------------------------------------------
*/

.fi-ta-table tbody tr td {
    vertical-align: middle;
}

.fi-ta-table tbody tr {
    transition:
        background-color 140ms ease;
}

.fi-ta-table tbody tr:hover {
    background:
        rgba(238, 246, 255, .55);
}

.fi-ta-search-field {
    width: min(100%, 28rem) !important;
    min-width: 22rem;
}

@media (max-width: 768px) {
    .fi-ta-search-field {
        width: 100% !important;
        min-width: 0;
    }
}

/*
|--------------------------------------------------------------------------
| HL Kom Topbar
|--------------------------------------------------------------------------
*/

.fi-topbar {
    min-height: 68px !important;
    background: rgba(255, 255, 255, .97) !important;
    border-bottom: 1px solid #dbe5ef !important;
    box-shadow: 0 5px 18px rgba(15, 56, 92, .06) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.fi-topbar > nav {
    position: relative !important;
    min-height: 68px !important;
    padding-inline: 1.35rem !important;
}

/*
|--------------------------------------------------------------------------
| Systembezeichnung links
|--------------------------------------------------------------------------
*/

.hlkom-topbar-system-name {
    display: flex;
    min-width: 235px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding-left: 1rem;
    border-left: 1px solid #dbe5ef;
    line-height: 1.15;
}

.hlkom-topbar-system-name__title {
    color: #172033;
    font-size: .91rem;
    font-weight: 750;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.hlkom-topbar-system-name__subtitle {
    color: #718096;
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
}

/*
|--------------------------------------------------------------------------
| Logo exakt in der Mitte
|--------------------------------------------------------------------------
*/

.fi-topbar .fi-logo {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    max-width: 170px !important;
    height: 50px !important;
    object-fit: contain !important;
    transform: translate(-50%, -50%) !important;
    transition:
        opacity 160ms ease,
        filter 160ms ease !important;
}

.fi-topbar .fi-logo:hover {
    opacity: .92;
    filter: saturate(1.04);
}

/*
|--------------------------------------------------------------------------
| Suche
|--------------------------------------------------------------------------
*/

.fi-topbar .fi-global-search {
    width: min(100%, 310px) !important;
}

.fi-topbar .fi-global-search-field {
    width: 100% !important;
}

.fi-topbar .fi-input-wrp {
    min-height: 40px !important;
    background: #f8fafc !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.fi-topbar .fi-input-wrp:hover {
    background: #ffffff !important;
    border-color: #bfd1e2 !important;
}

.fi-topbar .fi-input-wrp:focus-within {
    background: #ffffff !important;
    border-color: #4d91c6 !important;
    box-shadow:
        0 0 0 3px rgba(55, 129, 184, .12) !important;
}

.fi-topbar .fi-input {
    font-size: .9rem !important;
}

.fi-topbar .fi-input::placeholder {
    color: #8a98a9 !important;
}

/*
|--------------------------------------------------------------------------
| Benutzermenü
|--------------------------------------------------------------------------
*/

.fi-topbar .fi-user-menu-trigger {
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #dbe5ef !important;
    border-radius: 999px !important;
    box-shadow:
        0 4px 12px rgba(15, 56, 92, .08) !important;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.fi-topbar .fi-user-menu-trigger:hover {
    transform: translateY(-1px);
    border-color: #adc5da !important;
    box-shadow:
        0 7px 16px rgba(15, 56, 92, .12) !important;
}

.fi-topbar .fi-icon-btn {
    width: 38px !important;
    height: 38px !important;
    color: #64748b !important;
    border-radius: 10px !important;
}

.fi-topbar .fi-icon-btn:hover {
    color: #176aa3 !important;
    background: #eef6ff !important;
}

/*
|--------------------------------------------------------------------------
| Login-Seite
|--------------------------------------------------------------------------
*/

.fi-simple-layout {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(62, 145, 199, .15),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(117, 175, 211, .12),
            transparent 36%
        ),
        linear-gradient(
            135deg,
            #f4f9fd 0%,
            #edf5fb 48%,
            #f8fbfd 100%
        ) !important;
}

.fi-simple-main {
    width: min(100%, 460px) !important;
    padding: 2rem !important;
    background: rgba(255, 255, 255, .97) !important;
    border: 1px solid #d8e5ef !important;
    border-radius: 22px !important;
    box-shadow:
        0 24px 65px rgba(15, 56, 92, .15) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.fi-simple-main .fi-logo {
    width: auto !important;
    max-width: 210px !important;
    height: 78px !important;
    margin-inline: auto !important;
    object-fit: contain !important;
}

.hlkom-login-brand {
    margin-bottom: 1.35rem;
    padding-bottom: 1.25rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.hlkom-login-brand__title {
    color: #172033;
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -.02em;
}

.hlkom-login-brand__subtitle {
    margin-top: .3rem;
    color: #64748b;
    font-size: .88rem;
}

/*
|--------------------------------------------------------------------------
| Inhaltsabstand
|--------------------------------------------------------------------------
*/

.fi-main {
    padding-top: 1.75rem !important;
}

/*
|--------------------------------------------------------------------------
| Responsive Topbar
|--------------------------------------------------------------------------
*/

@media (max-width: 1150px) {
    .hlkom-topbar-system-name {
        min-width: auto;
    }

    .hlkom-topbar-system-name__subtitle {
        display: none;
    }

    .fi-topbar .fi-logo {
        max-width: 145px !important;
    }
}

@media (max-width: 900px) {
    .hlkom-topbar-system-name {
        display: none;
    }

    .fi-topbar .fi-logo {
        max-width: 130px !important;
    }

    .fi-topbar .fi-global-search {
        width: auto !important;
    }
}

@media (max-width: 640px) {
    .fi-topbar {
        min-height: 60px !important;
    }

    .fi-topbar > nav {
        min-height: 60px !important;
        padding-inline: .75rem !important;
    }

    .fi-topbar .fi-logo {
        max-width: 110px !important;
        height: 38px !important;
    }

    .fi-simple-main {
        margin: 1rem !important;
        padding: 1.4rem !important;
        border-radius: 17px !important;
    }
}

/*
|--------------------------------------------------------------------------
| Kompakter Login
|--------------------------------------------------------------------------
*/

.fi-simple-main {
    width: min(100%, 440px) !important;
    padding: 1.75rem 2rem 2rem !important;
}

.fi-simple-main .fi-logo {
    max-width: 190px !important;
    height: 66px !important;
}

.fi-simple-main .fi-header {
    gap: .65rem !important;
}

