@import url("ui/customers/detail.css");
/*
=========================================================
Objektmodule
=========================================================
*/

@import url("ui/objects/overview.css");
@import url("ui/customers/overview.css");
@import url("ui/objects/cockpit.css");
@import url("ui/objects/building.css");
@import url("ui/contacts/object_contacts.css");
@import url("vendor/maplibre/maplibre-gl.css");
@import url("ui/geocenter/map.css");


/*
=========================================================
WILLCON PORTAL
Main CSS Entry Point
---------------------------------------------------------
Zentrale Zusammenführung aller CSS Module
=========================================================
*/


/* =====================================================
   Design Tokens
===================================================== */

@import url("variables.css");


/* =====================================================
   Base
===================================================== */

@import url("base.css");


/* =====================================================
   Layout
===================================================== */

@import url("ui/layout/layout.css");
@import url("ui/layout/sidebar.css");
@import url("ui/layout/topbar.css");
@import url("ui/layout/detail_page.css");


/* =====================================================
   Components
===================================================== */

@import url("ui/buttons/buttons.css");
@import url("ui/forms/forms.css");
@import url("ui/cards/cards.css");
@import url("ui/widgets/dashboard.css");
@import url("ui/dashboard/workspace.css");
@import url("ui/tables/tables.css");
@import url("ui/tables/clickable_rows.css");
@import url("ui/iam/permission_matrix.css");
@import url("ui/iam/permission_matrix_enhancements.css");
@import url("ui/iam/permission_refinement.css");
@import url("alerts.css");


/* =====================================================
   Typography
===================================================== */

@import url("typography.css");


/* =====================================================
   Utilities
===================================================== */

@import url("utilities.css");


/* =====================================================
   Animations
===================================================== */

@import url("animations.css");



@import url("ui/iam/membership.css");

@import url("ui/layout/auth_page.css");


/*
=========================================================
Dashboard V3
Muss nach den bisherigen Dashboard-Dateien geladen werden.
=========================================================
*/

@import url("ui/dashboard/dashboard_v3.css");


/*
=========================================================
Dashboard-Konfiguration
=========================================================
*/

@import url("ui/dashboard/customize.css");





/*
=========================================================
Zentrales responsives Designsystem
Muss als letztes CSS-Modul geladen werden.
=========================================================
*/

@import url("ui/responsive/portal.css");


/* ============================================================
   WILLCON SYSTEM ADMIN PORTAL
   Grüner Systemmodus
   ============================================================ */

.portal-layout-system .system-sidebar {
    border-right-color: rgba(25, 135, 84, 0.35);
}

.portal-layout-system .system-sidebar .sidebar-link.active {
    background: rgba(25, 135, 84, 0.95);
    color: #ffffff;
}

.portal-layout-system .system-sidebar .sidebar-link:hover {
    background: rgba(25, 135, 84, 0.18);
    color: #ffffff;
}

.portal-layout-system .system-sidebar .sidebar-group-title {
    color: rgba(25, 135, 84, 0.85);
}

.portal-layout-system .system-sidebar .sidebar-logo {
    background: #198754;
    color: #ffffff;
}

.portal-layout-system .system-sidebar .sidebar-brand-subtitle {
    color: #198754;
}

.portal-layout-system .system-topbar {
    border-bottom-color: rgba(25, 135, 84, 0.25);
}

.portal-layout-system .system-topbar-title {
    color: #198754;
    font-weight: 600;
}

.portal-layout-system .system-topbar-title i {
    color: #198754;
}

.portal-layout-system .system-topbar-status {
    color: #198754;
}

.portal-layout-system .system-topbar-status .system-status-dot {
    background: #198754;
}

.portal-layout-system .system-admin-user {
    color: #198754;
    font-weight: 600;
}

.portal-layout-system .system-admin-user i {
    color: #198754;
}


/* System Dashboard */

.portal-layout-system .system-dashboard-accent {
    border-left: 4px solid #198754;
}

.portal-layout-system .system-dashboard-icon {
    color: #198754;
}

.portal-layout-system .system-dashboard-link {
    color: #198754;
}

.portal-layout-system .system-dashboard-link:hover {
    color: #146c43;
}

/* ============================================================
   WILLCON SYSTEM ADMIN PORTAL
   Gleiches Portal-Layout wie der normale Willcon-Bereich.
   Nur der Systembereich erhält einen grünen Akzent.
   ============================================================ */


/* ------------------------------------------------------------
   System Sidebar
   ------------------------------------------------------------ */

.portal-layout-system .sidebar-section-title {
    color: #198754;
}


.portal-layout-system .sidebar-link.active {
    background-color: #198754;
    color: #ffffff;
}


.portal-layout-system .sidebar-link.active i {
    color: #ffffff;
}


.portal-layout-system .sidebar-link:hover {
    color: #198754;
}


/* ------------------------------------------------------------
   System Header
   ------------------------------------------------------------ */

.portal-layout-system .system-admin-identity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #198754;
    font-weight: 600;
    white-space: nowrap;
}


.portal-layout-system .system-admin-identity i {
    color: #198754;
}


/* ------------------------------------------------------------
   Datum / Serverzeit
   ------------------------------------------------------------ */

.portal-layout-system .system-datetime {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


.portal-layout-system .system-server-date {
    color: var(--text-muted);
    font-size: 13px;
}


.portal-layout-system .system-server-time {
    color: #198754;
    font-size: 14px;
    font-weight: 600;
}


/* ------------------------------------------------------------
   System Buttons
   ------------------------------------------------------------ */

.portal-layout-system .btn-primary {
    --bs-btn-bg: #198754;
    --bs-btn-border-color: #198754;
    --bs-btn-hover-bg: #157347;
    --bs-btn-hover-border-color: #146c43;
}


/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .portal-layout-system .system-admin-identity span {
        display: none;
    }


    .portal-layout-system .system-datetime {
        gap: 4px;
    }

}

/* ============================================================
   WILLCON – SYSTEM ADMIN SIDEBAR
   Vollständig grünes Admin-Portal
   ============================================================ */


/* ------------------------------------------------------------
   Gesamte Sidebar
   ------------------------------------------------------------ */

.portal-sidebar.system-sidebar {
    background: #198754;
    color: #ffffff;
}


/* ------------------------------------------------------------
   Logo-Bereich
   ------------------------------------------------------------ */

.portal-sidebar.system-sidebar .sidebar-header {
    background: #198754;
}


.portal-sidebar.system-sidebar .sidebar-brand {
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-logo {
    display: block;
}


/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */

.portal-sidebar.system-sidebar .sidebar-navigation {
    color: #ffffff;
}


/* Abschnittsüberschriften */

.portal-sidebar.system-sidebar .sidebar-section-title,
.portal-sidebar.system-sidebar .sidebar-group-title {
    color: rgba(255, 255, 255, 0.72);
}


/* Normale Menüeinträge */

.portal-sidebar.system-sidebar .sidebar-link {
    color: rgba(255, 255, 255, 0.90);
}


.portal-sidebar.system-sidebar .sidebar-link i {
    color: rgba(255, 255, 255, 0.82);
}


/* Hover */

.portal-sidebar.system-sidebar .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-link:hover i {
    color: #ffffff;
}


/* Aktiver Menüpunkt */

.portal-sidebar.system-sidebar .sidebar-link.active {
    background: #146c43;
    color: #ffffff;
    font-weight: 600;
}


.portal-sidebar.system-sidebar .sidebar-link.active i {
    color: #ffffff;
}


/* ------------------------------------------------------------
   Unterer Bereich
   ------------------------------------------------------------ */

.portal-sidebar.system-sidebar .sidebar-bottom {
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-tenant {
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-tenant-name {
    color: #ffffff;
}


/* Trennlinie */

.portal-sidebar.system-sidebar .sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.18);
}


/* ------------------------------------------------------------
   Benutzerbereich
   ------------------------------------------------------------ */

.portal-sidebar.system-sidebar .sidebar-user {
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-user small {
    color: rgba(255, 255, 255, 0.70);
}


.portal-sidebar.system-sidebar .sidebar-user strong {
    color: #ffffff;
}


.portal-sidebar.system-sidebar .sidebar-user-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}


/* Abmelden */

.portal-sidebar.system-sidebar .sidebar-footer .sidebar-link {
    color: rgba(255, 255, 255, 0.90);
}


.portal-sidebar.system-sidebar .sidebar-footer .sidebar-link i {
    color: rgba(255, 255, 255, 0.85);
}


.portal-sidebar.system-sidebar .sidebar-footer .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}


/* ------------------------------------------------------------
   System Admin Header
   ------------------------------------------------------------ */

.portal-layout-system .system-admin-identity {
    color: #198754;
}


.portal-layout-system .system-admin-identity i {
    color: #198754;
}


.portal-layout-system .system-server-time {
    color: #198754;
}


/* ------------------------------------------------------------
   System Dashboard Buttons
   ------------------------------------------------------------ */

.portal-layout-system .btn-primary {
    background-color: #198754;
    border-color: #198754;
    color: #ffffff;
}


.portal-layout-system .btn-primary:hover {
    background-color: #146c43;
    border-color: #146c43;
    color: #ffffff;
}


.portal-layout-system a {
    color: #198754;
}


.portal-layout-system a:hover {
    color: #146c43;
}


/* ------------------------------------------------------------
   Mobile Sidebar
   ------------------------------------------------------------ */

@media (max-width: 900px) {

    .portal-sidebar.system-sidebar {
        background: #198754;
    }

}



/* =========================================================
   WILLCON SYSTEMPORTAL
   Primärbuttons
   ========================================================= */

.portal-layout-system .system-btn-primary {
    background-color: #087f4e;
    border-color: #087f4e;
    color: #ffffff;
    font-weight: 600;
}

.portal-layout-system .system-btn-primary:hover,
.portal-layout-system .system-btn-primary:focus,
.portal-layout-system .system-btn-primary:active {
    background-color: #066a41;
    border-color: #066a41;
    color: #ffffff;
}

.portal-layout-system .system-btn-primary i {
    color: #ffffff;
}


/* =========================================================
   SYSTEMPORTAL – TABELLEN
   ========================================================= */

.portal-layout-system .data-table tbody tr.portal-clickable-row {
    cursor: pointer;
}

.portal-layout-system .data-table tbody tr.portal-clickable-row:hover {
    background-color: rgba(8, 127, 78, 0.055) !important;
}

.portal-layout-system
.data-table tbody tr.portal-clickable-row:hover
> td:first-child::before {
    background: #087f4e;
}

.portal-layout-system
.data-table tbody tr.portal-clickable-row:focus,
.portal-layout-system
.data-table tbody tr.portal-clickable-row:focus-visible {
    background-color: rgba(8, 127, 78, 0.08) !important;
    outline: none;
}

.portal-layout-system
.data-table tbody tr.portal-clickable-row:focus
> td:first-child::before,
.portal-layout-system
.data-table tbody tr.portal-clickable-row:focus-visible
> td:first-child::before {
    background: #087f4e;
}


/* =========================================================
   SYSTEMPORTAL – AKTIONSBUTTONS
   ========================================================= */

.portal-layout-system .portal-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.portal-layout-system .portal-row-action {
    width: 36px;
    height: 34px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;
}

.portal-layout-system .portal-row-action i {
    line-height: 1;
}


/* =========================================================
   SYSTEMPORTAL – MANDANTEN-ID
   ========================================================= */

.portal-layout-system .portal-row-number {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}


/* =========================================================
   WILLCON SYSTEMPORTAL
   SIDEBAR FOOTER / BENUTZERBEREICH
   ========================================================= */


/* =========================================================
   WILLCON SYSTEMPORTAL
   SIDEBAR – VOLLSTÄNDIGE FLEX-STRUKTUR
   ========================================================= */

.portal-sidebar.system-sidebar {
    display: flex;
    flex-direction: column;

    min-height: 100vh;
    height: 100vh;

    overflow: hidden;
}


.portal-sidebar.system-sidebar .sidebar-header {
    flex: 0 0 auto;
}


.portal-sidebar.system-sidebar .sidebar-navigation {
    flex: 1 1 auto;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;
}


.portal-sidebar.system-sidebar .sidebar-bottom {
    flex: 0 0 auto;
}




/* ============================================================
   WILLCON SYSTEM-ADMIN
   Dashboard – Schnellzugriff
   ============================================================ */

.system-dashboard-actions-card {
    overflow: hidden;
}


.system-dashboard-action {
    position: relative;

    min-height: 82px;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 15px 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-md);

    background: #ffffff;

    color: var(--text);

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


.system-dashboard-action:hover {
    color: var(--text);

    border-color: rgba(25, 145, 91, 0.45);

    background: rgba(25, 145, 91, 0.035);

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);

    transform: translateY(-1px);
}


.system-dashboard-action-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: var(--radius-sm);

    background: rgba(25, 145, 91, 0.10);

    color: #198f5a;

    font-size: 1.15rem;
}


.system-dashboard-action-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.system-dashboard-action-content strong {
    color: var(--text);

    font-size: var(--font-size-sm);

    font-weight: var(--font-weight-heavy);
}


.system-dashboard-action-content small {
    color: var(--text-muted);

    font-size: var(--font-size-xs);

    line-height: 1.35;
}


.system-dashboard-action-arrow {
    margin-left: auto;

    color: #198f5a;

    font-size: 0.9rem;

    transition:
        transform 0.15s ease;
}


.system-dashboard-action:hover .system-dashboard-action-arrow {
    transform: translateX(3px);
}


.system-dashboard-action.is-disabled {
    cursor: default;

    opacity: 0.55;

    background: #f8f9fa;
}


.system-dashboard-action.is-disabled:hover {
    border-color: var(--border);

    background: #f8f9fa;

    box-shadow: none;

    transform: none;
}


.system-dashboard-action.is-disabled
.system-dashboard-action-icon {
    background: rgba(108, 117, 125, 0.08);

    color: #6c757d;
}


.system-dashboard-action.is-disabled
.system-dashboard-action-arrow {
    color: #8a929a;
}


@media (max-width: 767.98px) {

    .system-dashboard-action {
        min-height: 74px;

        padding: 13px 14px;
    }

    .system-dashboard-action-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }

}

@import url("ui/contacts/detail.css");


/* System dashboard */

.portal-layout-system .stat-card {
    border-left: 3px solid #dfe4e8 !important;
    transition:
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.portal-layout-system a:hover .stat-card {
    box-shadow: 0 6px 18px rgba(24, 35, 45, 0.08) !important;
    transform: translateY(-1px);
}

.portal-layout-system .stat-card--success {
    border-left-color: #198754 !important;
}

.portal-layout-system .stat-card--warning {
    border-left-color: #d99a00 !important;
}

.portal-layout-system .stat-card-icon,
.portal-layout-system .system-activity-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(25, 135, 84, 0.10);
    color: #198754;
    font-size: 1.1rem;
}

.portal-layout-system .system-health-list {
    display: grid;
    gap: 18px;
}

.portal-layout-system .system-health-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-layout-system .system-health-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef1f3;
    color: #66707a;
}

.portal-layout-system .system-health-icon.is-success {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.portal-layout-system .system-health-icon.is-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #8a6700;
}

.portal-layout-system .system-health-icon.is-danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}


/* System sidebar account */

.portal-sidebar.system-sidebar .sidebar-bottom {
    padding: 12px 16px 16px;
    background: transparent;
}

.portal-sidebar.system-sidebar .sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
}

.portal-sidebar.system-sidebar .sidebar-account {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
}

.portal-sidebar.system-sidebar .sidebar-account:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

.portal-sidebar.system-sidebar .sidebar-user-icon {
    margin: 0;
}

.portal-sidebar.system-sidebar .sidebar-user-data {
    display: flex;
    flex-direction: column;
}

.portal-sidebar.system-sidebar .sidebar-user-data strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-sidebar.system-sidebar .sidebar-user-data small {
    margin: 2px 0 0;
}

.portal-sidebar.system-sidebar .sidebar-footer form {
    width: auto;
    flex: 0 0 auto;
}

.portal-sidebar.system-sidebar .sidebar-logout-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
}

.portal-sidebar.system-sidebar .sidebar-logout-button:hover,
.portal-sidebar.system-sidebar .sidebar-logout-button:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.portal-sidebar.system-sidebar .sidebar-link.is-disabled {
    cursor: default;
    opacity: 0.58;
}

.portal-sidebar.system-sidebar .sidebar-link.is-disabled:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.90);
}
