/**
 * 
 *                     PF_HAM - Modern Home Automation Manager CSS                
 *                           PFWS Version 1.4.1.3.31                             
 *                         Module Version 1.2.3 (Sticky + Waves)                       
 *                           Updated: 2025-01-08                                  
 * 
 */

/* ═══════════════════════════════════════════════════════════════════════════════════
   HAM Module Core - Layout Wrapper & Conditional Spacer (PF_Standard Pattern)
   ═══════════════════════════════════════════════════════════════════════════════════ */

/* Layout Wrapper - umschließt alles (wie PF_Standard) */
.pf-ham-layout-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ============================================================================
   HAM Color Hotfix (final winner rules)
   ============================================================================ */

.pf-ham-to-top-btn {
    border-color: rgba(255, 255, 255, 0.5) !important;
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 52%, #303f9f 100%) !important;
    box-shadow: 0 12px 28px rgba(30, 27, 75, 0.46) !important;
}

.pf-ham-to-top-btn:hover,
.pf-ham-to-top-btn:focus-visible {
    background: linear-gradient(135deg, #d81b60 0%, #8e24aa 52%, #3949ab 100%) !important;
}

.pf-ham-body,
.pf-ham-box .pf-ham-body {
    scrollbar-color: #7b1fa2 #dbe3f0 !important;
}

.pf-ham-body::-webkit-scrollbar-track,
.pf-ham-box .pf-ham-body::-webkit-scrollbar-track {
    background: #dbe3f0 !important;
}

.pf-ham-body::-webkit-scrollbar-thumb,
.pf-ham-box .pf-ham-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c2185b 0%, #7b1fa2 58%, #303f9f 100%) !important;
    border: 2px solid #dbe3f0 !important;
}

.pf-ham-body::-webkit-scrollbar-thumb:hover,
.pf-ham-box .pf-ham-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ad1457 0%, #6a1b9a 58%, #283593 100%) !important;
}

.pf-ham-body .pf-ham-tab-pane {
    scrollbar-color: #7b1fa2 #e8eef7 !important;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-track {
    background: #e8eef7 !important;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c2185b 0%, #7b1fa2 58%, #303f9f 100%) !important;
    border: 2px solid #e8eef7 !important;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ad1457 0%, #6a1b9a 58%, #283593 100%) !important;
}

/* Profile pill should always show pointer cursor (desktop hover). */
.pf-ham-user,
.pf-ham-user:hover,
.pf-ham-user:focus-visible,
.pf-ham-user * {
    cursor: pointer !important;
}

/* ============================================================================
   HAM Shell Final Overrides (EntWheel/CMS parity fixes)
   ============================================================================ */

/* Ensure tooltips and dashboard menu are never clipped behind body/content. */
.pf-ham-header,
.pf-ham-footer,
.pf-ham-header-right,
.pf-ham-dashboard-menu,
.pf-ham-user,
.pf-ham-btn-dashboard,
.pf-ham-btn.pf-ham-btn-small.pf-ham-btn-dashboard {
    overflow: visible !important;
}

.pf-ham-header {
    z-index: 1600;
}

.pf-ham-dashboard-menu {
    z-index: 1650;
}

.pf-ham-dashboard-submenu {
    z-index: 1700;
}

.pf-ham-tooltip-anchor::before,
.pf-ham-tooltip-anchor::after {
    z-index: 1750;
}

/* HAM tone for to-top button (remove orange look). */
.pf-ham-to-top-btn {
    border-color: rgba(255, 255, 255, 0.46);
    background: linear-gradient(135deg, rgba(194, 24, 91, 0.96) 0%, rgba(123, 31, 162, 0.96) 52%, rgba(48, 63, 159, 0.96) 100%);
    box-shadow: 0 12px 28px rgba(30, 27, 75, 0.42);
}

.pf-ham-to-top-btn:hover,
.pf-ham-to-top-btn:focus-visible {
    background: linear-gradient(135deg, rgba(219, 39, 119, 0.98) 0%, rgba(126, 34, 206, 0.98) 52%, rgba(67, 56, 202, 0.98) 100%);
}

/* HAM theme scrollbars for body and tab panes. */
.pf-ham-body {
    scrollbar-color: #7b1fa2 #dbe3f0;
}

.pf-ham-body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #e6ecf5 0%, #dbe3f0 100%);
}

.pf-ham-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c2185b 0%, #7b1fa2 55%, #303f9f 100%);
    border: 2px solid #dbe3f0;
}

.pf-ham-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ad1457 0%, #6a1b9a 55%, #283593 100%);
}

.pf-ham-tab-pane {
    scrollbar-color: #7b1fa2 #e8eef7;
}

@media (max-width: 768px) {
    /* Exact EntWheel/CMS pill parity for avatar and dashboard menu button. */
    .pf-ham-user,
    .pf-ham-btn-dashboard,
    .pf-ham-btn.pf-ham-btn-small.pf-ham-btn-dashboard {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        flex: 0 0 40px !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 999px !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .pf-ham-user {
        background: rgba(255, 255, 255, 0.16) !important;
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        box-shadow: none !important;
    }

    .pf-ham-user-avatar {
        width: 32px !important;
        height: 32px !important;
        border-radius: 999px !important;
    }

    .pf-ham-dash-icon,
    .pf-ham-dash-logo {
        width: 26px !important;
        height: 26px !important;
    }
}

/* ============================================================================
   HAM Shell Parity Overrides (EntWheel/CMS standard)
   ============================================================================ */

.pf-ham-module {
    position: relative;
}

.pf-ham-header {
    overflow: visible;
}

.pf-ham-header-compact-logo {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 8px 18px rgba(30, 27, 75, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pf-ham-header-compact-logo-image {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.pf-ham-header-compact-logo:hover,
.pf-ham-header-compact-logo:focus-visible {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.66);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 12px 24px rgba(30, 27, 75, 0.34);
}

.pf-ham-header-compact-logo:hover .pf-ham-header-compact-logo-image,
.pf-ham-header-compact-logo:focus-visible .pf-ham-header-compact-logo-image {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.pf-ham-tooltip-anchor {
    position: relative;
}

@media (max-width: 768px) {
    /* Mobile compact logo should still feel interactive in touch/hover emulation. */
    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-compact-logo {
        box-shadow: 0 10px 22px rgba(30, 27, 75, 0.34);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.18) 100%);
    }

    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-compact-logo:hover,
    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-compact-logo:focus-visible,
    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-compact-logo:active {
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.74);
        box-shadow: 0 14px 28px rgba(30, 27, 75, 0.42);
    }

    /* EntWheel-like compact info meta blocks on mobile. */
    .pf-ham-info-section {
        padding: 12px 14px;
        max-height: min(32vh, 260px);
        font-size: 0.82rem;
    }

    .pf-ham-info-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .pf-ham-info-block {
        padding: 9px 10px;
        border-radius: 12px;
        min-width: 0;
    }

    .pf-ham-info-block .pf-ham-info-label {
        font-size: 0.68rem;
        margin-bottom: 4px;
    }

    .pf-ham-info-block .pf-badge {
        font-size: 0.78rem;
        line-height: 1.3;
        padding: 4px 8px;
    }
}

.pf-ham-tooltip-anchor::after {
    content: attr(data-pf-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: normal;
    min-width: 84px;
    max-width: min(220px, calc(100vw - 24px));
    text-align: center;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1200;
}

.pf-ham-tooltip-anchor::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 3px);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(15, 23, 42, 0.94);
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1200;
}

.pf-ham-tooltip-anchor:not([data-pf-tooltip])::after,
.pf-ham-tooltip-anchor[data-pf-tooltip=""]::after,
.pf-ham-tooltip-anchor:not([data-pf-tooltip])::before,
.pf-ham-tooltip-anchor[data-pf-tooltip=""]::before {
    display: none;
}

.pf-ham-tooltip-left::after {
    left: 0;
    right: auto;
    transform: translateY(-4px);
}

.pf-ham-tooltip-left::before {
    left: 14px;
    right: auto;
    transform: translateY(-4px);
}

.pf-ham-tooltip-right::after {
    left: auto;
    right: 0;
    transform: translateY(-4px);
}

.pf-ham-tooltip-right::before {
    left: auto;
    right: 14px;
    transform: translateY(-4px);
}

.pf-ham-tooltip-top-left::after {
    left: 0;
    right: auto;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(4px);
}

.pf-ham-tooltip-top-left::before {
    left: 14px;
    right: auto;
    top: auto;
    bottom: calc(100% + 3px);
    transform: translateY(4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 0;
    border-top: 6px solid rgba(15, 23, 42, 0.94);
}

.pf-ham-tooltip-anchor:hover::after,
.pf-ham-tooltip-anchor:focus-visible::after {
    opacity: 1;
}

.pf-ham-tooltip-anchor:hover::before,
.pf-ham-tooltip-anchor:focus-visible::before {
    opacity: 1;
}

.pf-ham-tooltip-anchor:hover::after,
.pf-ham-tooltip-anchor:hover::before,
.pf-ham-tooltip-anchor:focus-visible::after,
.pf-ham-tooltip-anchor:focus-visible::before,
.pf-ham-tooltip-left:hover::after,
.pf-ham-tooltip-left:hover::before,
.pf-ham-tooltip-left:focus-visible::after,
.pf-ham-tooltip-left:focus-visible::before,
.pf-ham-tooltip-right:hover::after,
.pf-ham-tooltip-right:hover::before,
.pf-ham-tooltip-right:focus-visible::after,
.pf-ham-tooltip-right:focus-visible::before,
.pf-ham-tooltip-top-left:hover::after,
.pf-ham-tooltip-top-left:hover::before,
.pf-ham-tooltip-top-left:focus-visible::after,
.pf-ham-tooltip-top-left:focus-visible::before {
    transform: translateY(0);
}

.pf-ham-dashboard-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1350;
}

.pf-ham-dashboard-submenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 30px rgba(8, 17, 31, 0.24);
    z-index: 48;
}

.pf-ham-dashboard-submenu::before,
.pf-ham-dashboard-submenu::after {
    content: '';
    position: absolute;
    right: 18px;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pf-ham-dashboard-submenu::before {
    top: -9px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 9px solid rgba(148, 163, 184, 0.34);
}

.pf-ham-dashboard-submenu::after {
    top: -8px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.98);
}

.pf-ham-dashboard-submenu-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.pf-ham-dashboard-submenu-item:hover,
.pf-ham-dashboard-submenu-item:focus-visible {
    background: linear-gradient(135deg, rgba(255, 122, 61, 0.16) 0%, rgba(255, 179, 0, 0.24) 100%);
    color: #9a3412;
}

.pf-ham-dashboard-submenu-switch {
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(248, 250, 252, 0.72);
}

.pf-ham-dashboard-submenu-switch-ui {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pf-ham-dashboard-submenu-switch-state {
    min-width: 30px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 2px 7px;
    color: #065f46;
    background: rgba(16, 185, 129, 0.2);
}

.pf-ham-dashboard-submenu-switch-track {
    width: 34px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(148, 163, 184, 0.28);
    padding: 2px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pf-ham-dashboard-submenu-switch-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transform: translateX(16px);
    transition: transform 0.22s ease;
}

.pf-ham-box.is-footer-fx-off .pf-ham-dashboard-submenu-switch-state {
    color: #9f1239;
    background: rgba(244, 63, 94, 0.18);
}

.pf-ham-box.is-footer-fx-off .pf-ham-dashboard-submenu-switch-track {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(190, 24, 93, 0.48);
}

.pf-ham-box.is-footer-fx-off .pf-ham-dashboard-submenu-switch-dot {
    transform: translateX(0);
}

.pf-ham-dashboard-menu.is-open .pf-ham-btn-dashboard {
    background: rgba(8, 17, 31, 0.42);
    border-color: rgba(255, 179, 0, 0.48);
    box-shadow: 0 0 0 2px rgba(255, 179, 0, 0.32), 0 4px 14px rgba(8, 17, 31, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pf-ham-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    overflow: visible;
}

.pf-ham-footer-left,
.pf-ham-footer-center,
.pf-ham-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.pf-ham-footer-center {
    justify-content: center;
}

.pf-ham-footer-right {
    justify-content: flex-end;
    justify-self: end;
    flex-wrap: nowrap;
}

.pf-ham-footer-module,
.pf-ham-footer-meta,
.pf-ham-footer-runtime {
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-ham-shimmer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.pf-ham-footer-fx-toggle .pf-ham-footer-icon-off {
    display: none;
}

#pf-ham-shimmer-toggle[data-state="inactive"] .pf-ham-footer-icon-on,
.is-footer-fx-off .pf-ham-footer-fx-toggle .pf-ham-footer-icon-on {
    display: none;
}

#pf-ham-shimmer-toggle[data-state="inactive"] .pf-ham-footer-icon-off,
.is-footer-fx-off .pf-ham-footer-fx-toggle .pf-ham-footer-icon-off {
    display: inline-flex;
}

.pf-ham-shimmer-btn:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.52);
}

.pf-ham-shimmer-btn[data-state="inactive"] {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.58);
    background: rgba(15, 23, 42, 0.2);
}

.pf-ham-shimmer-btn[data-state="inactive"]:hover {
    background: rgba(15, 23, 42, 0.28);
}

.pf-ham-to-top-wrap {
    display: contents;
}

.pf-ham-to-top-btn {
    position: absolute;
    right: 24px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 107, 87, 0.95) 0%, rgba(255, 190, 77, 0.95) 100%);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.38);
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    font-size: 1.2rem;
    line-height: 1;
    color: #ffffff;
    z-index: 220;
}

.pf-ham-to-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pf-ham-info-section {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.pf-ham-info-section::-webkit-scrollbar {
    width: 8px;
}

.pf-ham-info-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.pf-ham-info-section::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header {
        min-height: 0;
        height: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-left,
    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-right {
        display: none;
    }

    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-header-compact-logo {
        display: inline-flex;
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        transform: none;
        z-index: 240;
        border-radius: 999px;
        overflow: hidden;
    }

    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-footer {
        display: none;
    }

    .pf-ham-box.is-mobile-shell-collapsed .pf-ham-to-top-btn {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .pf-ham-user,
    .pf-ham-btn-dashboard,
    .pf-ham-btn.pf-ham-btn-small.pf-ham-btn-dashboard {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        flex: 0 0 40px;
        padding: 0;
        gap: 0;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        box-sizing: border-box;
        aspect-ratio: 1 / 1;
        overflow: visible;
    }

    .pf-ham-user {
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.22);
        box-shadow: none;
    }

    .pf-ham-user-avatar {
        width: 32px;
        height: 32px;
        border-radius: 999px;
    }

    .pf-ham-dash-icon,
    .pf-ham-dash-logo {
        width: 26px;
        height: 26px;
    }

    .pf-ham-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 4px;
    }

    .pf-ham-footer-left,
    .pf-ham-footer-right {
        display: none;
    }

    .pf-ham-footer-center,
    .pf-ham-footer-runtime {
        max-width: 100%;
        text-align: center;
    }

    #pf-ham-shimmer-toggle,
    .pf-ham-footer-fx-toggle {
        display: none !important;
    }

    .pf-ham-dashboard-submenu {
        right: 0;
        min-width: 190px;
    }
}

/* Topnav Spacer - NUR im Standalone-Modus sichtbar (conditional PHP rendering) */
.pf-ham-topnav-spacer {
    height: var(--pf-dashboard-topnav-height, 60px);
    margin-top: 0;
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   Container Box (wie PF_Standard) - absorbiert Flexbox-Effekte vom Overlay
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-box {
    --pf-ham-shell-radius: 14px;
    border-radius: var(--pf-ham-shell-radius);
    overflow: hidden;
    margin: 0;
    padding: 0;
    isolation: isolate;
}

/* Overlay Mode - volle Höhe (relativ zum Parent!), eigene Größe/Farbe */
.pf-ham-box.overlay-mode {
    --pf-ham-shell-radius: 16px;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    max-height: 100%;
    border-radius: var(--pf-ham-shell-radius);            /* Abgerundete Ecken (Overlay-Mode) */
    /* Layout */
    overflow: hidden;               /* Module kontrollieren ihr eigenes Scrolling */
    margin: 20px auto;              /* 20px oben/unten, zentriert horizontal */
    padding: 0;                     /* Kein Padding */
}

/* Dashboard Mode */
.pf-ham-box.dashboard-mode {
    margin: 10px;
    max-height: 100%;
    overflow-y: auto;
}

.pf-ham-box > .pf-ham-module {
    border-radius: inherit;
    min-height: 0;
    overflow: hidden;
}

.pf-ham-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-radius: inherit;
}

.pf-ham-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #eef2f6;
    min-height: 0;
    scrollbar-color: #c47f3c #d9dfe8;
    scrollbar-width: thin;
}

.pf-ham-body::-webkit-scrollbar {
    width: 10px;
}

.pf-ham-body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #dce3eb 0%, #cfd7e2 100%);
    border-radius: 8px;
}

.pf-ham-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c47f3c 0%, #6d56ca 100%);
    border-radius: 6px;
    border: 2px solid #dce3eb;
}

.pf-ham-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a66a2f 0%, #5946b1 100%);
}

/* Info-Section, Tabs, Tab-Panes: flex-grow fuer dynamische Hoehe */
.pf-ham-info-section,
.pf-ham-tabs {
    flex-shrink: 0; /* Header-Bereiche nicht zusammendruecken */
}

/* Tab-Panes sollen wachsen und scrollen */
.pf-ham-tab-pane {
    flex: 1; /* Nimmt verfuegbaren Raum zwischen Tabs und Footer */
    min-height: 0; /* Wichtig fuer Flexbox-Scrolling */
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   Header Styles - Epischer Gradient mit Wellen-Effekt
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-header {
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 30%, #512da8 60%, #303f9f 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.4);
    flex-shrink: 0; /* Nicht zusammendruecken */
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}



.pf-ham-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.pf-ham-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.pf-ham-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: none;
    pointer-events: none;
}

.pf-ham-icon-state {
    display: none;
    align-items: center;
    justify-content: center;
}

.pf-ham-icon-wrapper[data-info-state="closed"] .pf-ham-icon-state.is-closed,
.pf-ham-icon-wrapper[data-info-state="open"] .pf-ham-icon-state.is-open {
    display: inline-flex;
}

.pf-ham-icon-wrapper:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.2) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.pf-ham-icon-wrapper:active {
    opacity: 0.85;
}

.pf-ham-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-ham-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.pf-ham-meta {
    font-size: 0.85rem;
    opacity: 0.9;
}

.pf-ham-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.pf-ham-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pf-ham-user-license-mobile {
    display: none;
}

/* Dashboard Button (wie PF_Standard) */
.pf-ham-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.pf-ham-btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.pf-ham-btn-dashboard {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pf-ham-btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.pf-ham-dash-icon,
.pf-ham-dash-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   📋 Modern Info Section - styled wie PF_Standard
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-info-section {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f4f8 100%);
    padding: 20px;
    border-bottom: 2px solid #667eea;
    margin: 0; /* Kein Abstand nach oben */
}

@keyframes pf-ham-info-slide-down {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pf-ham-info-details {
    max-width: 1200px;
    margin: 0 auto;
}

/* 2-Spalten Layout: Beschreibung links, Meta rechts */
.pf-ham-info-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Beschreibung nimmt 2/3, Meta 1/3 */
    gap: 20px;
    align-items: start;
}

/* LINKS: Beschreibung mit Scrollbar */
.pf-ham-info-description {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 440px; /* Maximale Höhe - dann scrollbar */
    overflow-y: auto; /* Scrollbar wenn Inhalt zu lang */
}

.pf-ham-info-description::-webkit-scrollbar {
    width: 6px;
}

.pf-ham-info-description::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pf-ham-info-description::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.pf-ham-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
    margin-top: 8px;
}

/* RECHTS: Meta-Informationen gestapelt */
.pf-ham-info-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-ham-info-block {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.pf-ham-info-block:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

.pf-ham-info-block label,
.pf-ham-info-block .pf-ham-info-label,
.pf-ham-info-description label,
.pf-ham-info-description .pf-ham-info-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Badges wie PF_Standard */
.pf-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pf-badge-version {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pf-badge-status.is-active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.pf-badge-status.is-inactive {
    background: #e0e0e0;
    color: #666;
}

.pf-badge-license.is-licensed {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.pf-badge-license.is-unlicensed {
    background: #ffeaa7;
    color: #d63031;
}

.pf-badge-author {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.pf-badge-date {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    color: white;
}

/* 
    Tab System
    */
.pf-ham-tabs {
    display: flex;
    gap: 4px;
    padding: 0 4px;
    margin-bottom: 0;
    align-items: stretch;
    flex-wrap: wrap;
    position: relative;
}

.pf-ham-tabs::-webkit-scrollbar {
    display: none;
}

.pf-ham-tab {
    appearance: none;
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 45%, #303f9f 100%);
    background-size: 160% 160%;
    background-position: 0% 0%;
    border: 2px solid #7b1fa2;
    border-bottom: 2px solid #7b1fa2;
    border-radius: 10px 10px 0 0;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: color 0.18s ease, background-position 0.35s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    transform-origin: center bottom;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.18);
}

.pf-ham-tab-label {
    display: inline;
}

.pf-ham-tab:hover {
    background: #ffffff;
    color: #5b2a93;
    transform: none;
    margin-bottom: 0;
    border-color: #7b1fa2;
    background-position: 100% 100%;
    filter: none;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.18);
}

.pf-ham-tab.active {
    background: #ffffff;
    color: #7b1fa2;
    font-weight: 700;
    text-shadow: none;
    border: 2px solid #7b1fa2;
    border-bottom: 2px solid #ffffff;
    margin-bottom: 0;
    z-index: 3;
    box-shadow: 0 8px 24px rgba(80, 45, 143, 0.16);
    transform: none;
}

.pf-ham-tab-content {
    padding: 16px;
    background: white;
    border: 2px solid #7b1fa2;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
}

.pf-ham-tab-pane {
    display: none;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.pf-ham-tab-pane.active {
    display: block;
}

/* Keep HAM layout deterministic across viewport and interaction states. */
.pf-ham-module,
.pf-ham-module *,
.pf-ham-module *::before,
.pf-ham-module *::after {
    box-sizing: border-box;
}

.pf-ham-icon-wrapper:hover,
.pf-ham-icon-wrapper:active,
.pf-ham-card:hover,
.pf-ham-scenario-btn:hover,
.pf-ham-temp-btn:hover,
.pf-ham-meter-card:hover,
.pf-ham-consumption-item:hover,
.pf-ham-battery-card:hover,
.pf-ham-tab-pane {
    transform: none;
    animation: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   🎨 Custom Scrollbar - Epische Farben passend zum Theme
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar {
    width: 12px;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c47f3c 0%, #764ba2 50%, #5a67d8 100%);
    background-size: 100% 200%;
    border-radius: 10px;
    border: 2px solid #f8f9fa;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
    transition: background-position 0.3s ease, box-shadow 0.3s ease;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-thumb:hover {
    background-position: 0 100%;
    box-shadow: inset 0 1px 4px rgba(255,255,255,0.5), 0 0 8px rgba(196, 127, 60, 0.35);
    border-color: #c47f3c;
}

.pf-ham-body .pf-ham-tab-pane::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #5a67d8 0%, #6b3f8a 100%);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes pf-ham-tab-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pf-ham-section-title {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* 
    Dashboard Grid
    */
.pf-ham-dashboard {
    padding: 20px;
}

.pf-ham-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.pf-ham-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* 
    Card Styles
    */
.pf-ham-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
}

.pf-ham-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pf-ham-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pf-ham-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* 
    Device Cards
    */
.pf-ham-device {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-device:hover {
    background: #e9ecef;
}

.pf-ham-device-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.pf-ham-device-info {
    flex: 1;
}

.pf-ham-device-name {
    font-weight: 600;
    color: #2c3e50;
}

.pf-ham-device-status {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.pf-ham-device-on {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.pf-ham-device-off {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.pf-ham-device-pulse {
    /* pulse animation removed for layout stability */
}

/* 
    Buttons
    */
.pf-ham-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pf-ham-btn-primary {
    background: #3498db;
    color: white;
}

.pf-ham-btn-primary:hover {
    background: #2980b9;
}

.pf-ham-btn-success {
    background: #2ecc71;
    color: white;
}

.pf-ham-btn-success:hover {
    background: #27ae60;
}

.pf-ham-btn-secondary {
    background: #95a5a6;
    color: white;
}

.pf-ham-btn-secondary:hover {
    background: #7f8c8d;
}

.pf-ham-btn-danger {
    background: #e74c3c;
    color: white;
}

.pf-ham-btn-danger:hover {
    background: #c0392b;
}

/* 
    Energy Dashboard
    */
.pf-ham-energy {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    color: white;
}

.pf-ham-energy-item {
    text-align: center;
}

.pf-ham-energy-value {
    font-size: 2rem;
    font-weight: 700;
}

.pf-ham-energy-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 
    Temperature Control
    */
.pf-ham-temp-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 12px;
}

.pf-ham-temp-display {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    text-align: center;
}

.pf-ham-temp-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.pf-ham-temp-btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 
    Automation Scenarios
    */
.pf-ham-scenarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pf-ham-scenario-btn {
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pf-ham-scenario-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.pf-ham-scenario-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.pf-ham-scenario-name {
    font-weight: 600;
    color: #2c3e50;
}

/* 
    Notifications
    */
.pf-ham-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    white-space: pre-line;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(400px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    z-index: 10000;
}

.pf-ham-notification.is-error {
    background: #e74c3c;
}

.pf-ham-notification.is-success {
    background: #27ae60;
}

.pf-ham-notification.is-warning {
    background: #f39c12;
}

.pf-ham-notification-show {
    opacity: 1;
    transform: translateX(0);
}

/* 
    Energy & Solar Dashboard
    */
.pf-ham-energy-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.pf-ham-energy-card,
.pf-ham-solar-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pf-ham-energy-label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.95;
}

.pf-ham-energy-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

.pf-ham-energy-sublabel {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* 
    Scenario Grid
    */
.pf-ham-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.pf-ham-scenario-btn {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 
    Info Box
    */
.pf-ham-info-box {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.pf-ham-info-box h4 {
    color: #667eea;
    margin-top: 0;
    margin-bottom: 10px;
}

.pf-ham-info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.pf-ham-info-box li {
    margin: 8px 0;
    line-height: 1.6;
}

.pf-ham-info-box p {
    margin: 10px 0;
    line-height: 1.6;
}

/* Battery Grid */
.pf-ham-battery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.pf-ham-battery-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border: 2px solid #f39c12;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-battery-card:hover {
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

.pf-ham-battery-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.pf-ham-battery-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.pf-ham-battery-capacity {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.pf-ham-battery-charge-big {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f39c12;
    margin: 10px 0;
}

.pf-ham-battery-temp {
    font-size: 0.85rem;
    color: #e67e22;
    margin: 5px 0;
}

.pf-ham-battery-month {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Battery Box (Balkon) */
.pf-ham-battery-box {
    background: #fff3cd;
    border: 2px dashed #f39c12;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.pf-ham-battery-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #856404;
    margin-bottom: 10px;
}

.pf-ham-battery-mini {
    background: white;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.pf-ham-battery-charge {
    font-weight: 700;
    color: #f39c12;
}

/* Consumption Details */
.pf-ham-consumption-details {
    margin-top: 30px;
}

.pf-ham-consumption-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.pf-ham-consumption-item {
    background: white;
    border-radius: 10px;
    padding: 18px;
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 12px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-consumption-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.pf-ham-consumption-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border: 2px solid #f39c12;
}

.pf-ham-consumption-icon {
    font-size: 1.8rem;
}

.pf-ham-consumption-label {
    font-weight: 600;
    color: #495057;
}

.pf-ham-consumption-value {
    font-weight: 700;
    color: #667eea;
    text-align: right;
}

.pf-ham-consumption-cost {
    font-weight: 700;
    color: #28a745;
    text-align: right;
}

/* Special Sections */
.pf-ham-balkon-west {
    border-left-color: #e67e22;
}

.pf-ham-sued-vorbau {
    border-left-color: #f39c12;
}

.pf-ham-ost-modul {
    border-left-color: #3498db;
}

.pf-ham-sued-treppe {
    border-left-color: #27ae60;
}

.pf-ham-keller {
    border-left-color: #95a5a6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   ⚡ SMART METER ÜBERSICHT
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-smartmeter-section {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    margin-bottom: 30px;
}

.pf-ham-smartmeter-selector {
    margin-bottom: 20px;
}

.pf-ham-smartmeter-selector label {
    display: block;
    font-weight: 600;
    color: #512da8;
    margin-bottom: 8px;
}

.pf-ham-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #7b1fa2;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-select:hover {
    border-color: #c2185b;
    box-shadow: 0 4px 12px rgba(194, 24, 91, 0.2);
}

.pf-ham-meter-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pf-ham-meter-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.15);
    border: 2px solid #e1bee7;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-meter-card.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.pf-ham-meter-card:hover {
    box-shadow: 0 8px 24px rgba(194, 24, 91, 0.25);
    border-color: #c2185b;
}

.pf-ham-meter-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.pf-ham-meter-value {
    font-size: 2rem;
    font-weight: 700;
    color: #7b1fa2;
    margin-bottom: 8px;
}

.pf-ham-meter-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   📊 VERBRAUCH DIALS (Energie, Wasser, Heizung)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-consumption-section {
    padding: 20px;
    margin-bottom: 30px;
}

.pf-ham-consumption-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.pf-ham-consumption-card {
    text-align: center;
}

.pf-ham-dial-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
}

.pf-ham-dial {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pf-ham-dial-bg {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 12;
}

.pf-ham-dial-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 502; /* 2 * PI * 80 */
    stroke-dashoffset: calc(502 - (502 * var(--progress) / 100));
    transition: stroke-dashoffset 1s ease;
}

.pf-ham-dial-energy {
    stroke: url(#gradient-energy);
}

.pf-ham-dial-water {
    stroke: url(#gradient-water);
}

.pf-ham-dial-heating {
    stroke: url(#gradient-heating);
}

.pf-ham-dial-temp {
    stroke: url(#gradient-temp);
}

.pf-ham-dial-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 700;
    color: #512da8;
}

.pf-ham-dial-icon {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
}

.pf-ham-consumption-label {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   🌡️ TEMPERATUR CONTROL - 2 separate Boxen
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-temp-card,
.pf-ham-target-temp-card {
    padding: 25px;
    background: linear-gradient(135deg, rgba(123,31,162,0.05) 0%, rgba(48,63,159,0.05) 100%);
    border: 2px solid rgba(123,31,162,0.2);
}

/* Aktuelle Temperatur - Prominent Display */
.pf-ham-temp-current-display {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fff 0%, rgba(123,31,162,0.03) 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(123,31,162,0.1);
}

.pf-ham-temp-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.pf-ham-temp-value {
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 50%, #512da8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.pf-ham-temp-unit {
    font-size: 2rem;
    font-weight: 500;
    color: #7b1fa2;
    opacity: 0.8;
}

/* Tages-Trend Anzeige */
.pf-ham-temp-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(123,31,162,0.08);
    border-radius: 8px;
    margin: 0 auto;
    max-width: 300px;
}

.pf-ham-trend-icon {
    font-size: 1.5rem;
}

.pf-ham-trend-text {
    font-weight: 600;
    color: #7b1fa2;
    font-size: 1rem;
}

.pf-ham-trend-value {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}



.pf-ham-temp-dial-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.pf-ham-temp-dial {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pf-ham-temp-slider-container {
    max-width: 400px;
    margin: 30px auto 10px;
    padding-top: 20px;
}

.pf-ham-temp-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #2196f3, #ff9800, #f44336);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.pf-ham-temp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #7b1fa2;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pf-ham-temp-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 3px 12px rgba(123, 31, 162, 0.4);
}

.pf-ham-temp-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #7b1fa2;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pf-ham-temp-slider::-moz-range-thumb:hover {
    box-shadow: 0 3px 12px rgba(123, 31, 162, 0.4);
}

.pf-ham-temp-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   📍 FIND MY DING mit OpenStreetMap & Geräteauswahl
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-device-selector {
    margin: 20px 0 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid rgba(123,31,162,0.2);
}

.pf-ham-device-label {
    display: block;
    font-weight: 600;
    color: #7b1fa2;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.pf-ham-device-select {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid rgba(123,31,162,0.3);
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.pf-ham-device-select:hover {
    border-color: #7b1fa2;
    box-shadow: 0 2px 8px rgba(123,31,162,0.2);
}

.pf-ham-device-select:focus {
    outline: none;
    border-color: #7b1fa2;
    box-shadow: 0 0 0 3px rgba(123,31,162,0.1);
}

.pf-ham-findmy-container {
    margin-top: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.pf-ham-map-privacy-layer {
    position: relative;
    min-height: 400px;
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pf-ham-map-privacy-content {
    text-align: center;
    max-width: 500px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(123, 31, 162, 0.3);
}

.pf-ham-map-privacy-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.pf-ham-map-privacy-content h4 {
    font-size: 1.5rem;
    color: #7b1fa2;
    margin-bottom: 15px;
}

.pf-ham-map-privacy-content p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.pf-ham-map-container {
    position: relative;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
}

.pf-ham-map {
    width: 100%;
    height: 100%;
}

.pf-ham-map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.pf-ham-map-btn {
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 50%, #512da8 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pf-ham-map-btn:hover {
    box-shadow: 0 6px 20px rgba(123, 31, 162, 0.5);
    background: linear-gradient(135deg, #d81b60 0%, #8e24aa 50%, #5e35b1 100%);
}

.pf-ham-map-btn:active {
    box-shadow: 0 3px 10px rgba(123, 31, 162, 0.4);
}

/* Device Info Panel */
.pf-ham-device-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    border: 2px solid #7b1fa2;
    z-index: 1000;
}

.pf-ham-device-info-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: #7b1fa2;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(123,31,162,0.2);
}

.pf-ham-device-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.pf-ham-device-info-item:last-child {
    border-bottom: none;
}

.pf-ham-info-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.pf-ham-info-value {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

/* Tracking Toggle Switch */
.pf-ham-tracking-toggle {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid rgba(123,31,162,0.2);
}

.pf-ham-tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pf-ham-tracking-label {
    font-weight: 600;
    font-size: 1rem;
    color: #7b1fa2;
}

/* Toggle Switch */
.pf-ham-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.pf-ham-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pf-ham-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    border-radius: 26px;
    border: 2px solid rgba(123,31,162,0.2);
}

.pf-ham-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background: white;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pf-ham-switch input:checked + .pf-ham-switch-slider {
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 50%, #512da8 100%);
    border-color: #7b1fa2;
}

.pf-ham-switch input:checked + .pf-ham-switch-slider:before {
    transform: translateX(24px);
}

.pf-ham-switch-slider:hover {
    box-shadow: 0 0 8px rgba(123,31,162,0.3);
}

.pf-ham-tracking-status {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 8px;
    background: rgba(123,31,162,0.05);
    border-radius: 6px;
    margin-top: 10px;
}

.pf-ham-tracking-status.is-active {
    color: #388e3c;
    font-weight: 600;
    background: rgba(56,142,60,0.1);
}

.pf-ham-tracking-status.is-error {
    color: #d32f2f;
    font-weight: 600;
    background: rgba(211,47,47,0.1);
}

.pf-ham-map-privacy-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.pf-ham-svg-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    vertical-align: middle;
}

.pf-ham-svg-icon-28 {
    width: 28px;
    height: 28px;
}

.pf-ham-svg-icon-18 {
    width: 18px;
    height: 18px;
}

.pf-ham-svg-icon-inline {
    width: 0.95em;
    height: 0.95em;
    margin-right: 0.35em;
    vertical-align: -0.14em;
}

.pf-ham-meter-icon,
.pf-ham-dial-icon,
.pf-ham-device-icon,
.pf-ham-map-privacy-icon,
.pf-ham-summary-icon,
.pf-ham-trend-icon,
.pf-ham-temp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pf-ham-toggle-btn,
.pf-ham-map-btn,
.pf-ham-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

/* ═══════════════════════════════════════════════════════════════════════════════════
   PF_HAM UI Polish (PFWS 1.4.1.3.31)
   ═══════════════════════════════════════════════════════════════════════════════════ */
.pf-ham-header {
    padding: 12px 16px;
    min-height: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.pf-ham-header-left {
    gap: 10px;
}

.pf-ham-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.pf-ham-title {
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

.pf-ham-meta {
    font-size: 0.74rem;
    opacity: 0.86;
}

.pf-ham-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.8rem;
}

.pf-ham-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.pf-ham-user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.pf-ham-user-avatar-fallback {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.pf-ham-user-name {
    white-space: nowrap;
}

.pf-ham-user-separator {
    opacity: 0.65;
}

.pf-ham-user-license {
    white-space: nowrap;
}

.pf-ham-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.pf-ham-btn-dashboard,
.pf-ham-btn.pf-ham-btn-small.pf-ham-btn-dashboard {
    height: 32px;
    padding: 0 12px;
    font-size: 0.78rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pf-ham-dash-icon {
    width: 20px;
    height: 20px;
}

.pf-ham-dash-logo,
.pf-ham-footer-logo {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
}

.pf-ham-dash-logo {
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.28));
}

.pf-ham-info-section {
    padding: 12px 14px;
    border-bottom-width: 1px;
}

.pf-ham-info-layout {
    gap: 12px;
}

.pf-ham-info-description {
    max-height: 300px;
    padding: 12px;
    border-radius: 10px;
    scrollbar-color: #7b1fa2 #eef1f6;
}

.pf-ham-desc {
    font-size: 0.84rem;
    line-height: 1.45;
}

.pf-ham-info-meta {
    gap: 8px;
}

.pf-ham-info-block {
    padding: 9px 11px;
    border-radius: 10px;
}

.pf-badge {
    padding: 4px 9px;
    font-size: 0.77rem;
}

.pf-ham-tabs {
    gap: 4px;
    padding: 0 4px;
}

.pf-ham-tab {
    padding: 10px 16px;
    font-size: 0.86rem;
}

.pf-ham-tab-content {
    padding: 14px;
}

.pf-ham-tab-pane {
    scrollbar-color: #c47f3c #e8ebf1;
}

.pf-ham-section-title {
    font-size: 1.08rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.pf-ham-card {
    padding: 14px;
}

.pf-ham-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 30%, #512da8 60%, #303f9f 100%);
    color: #ffffff;
    min-height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

/* EntWheel-style shell FX for HAM header/footer */
.pf-ham-header,
.pf-ham-footer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.pf-ham-header::before,
.pf-ham-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(135deg, #c2185b 0%, #7b1fa2 36%, #512da8 70%, #303f9f 100%);
    background-size: 300% 300%;
    background-position: 0% 50%;
    pointer-events: none;
    z-index: 0;
    animation: pf-ham-shell-wave 9s ease-in-out infinite;
}

.pf-ham-header::after,
.pf-ham-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.pf-ham-header::after {
    background: radial-gradient(ellipse 80% 120% at 20% 30%, rgba(255, 255, 255, 0.56) 0%, rgba(255, 255, 255, 0.16) 50%, transparent 72%);
    animation: pf-ham-shell-shimmer 7s ease-in-out infinite;
}

.pf-ham-footer::after {
    background: radial-gradient(ellipse 70% 140% at 78% 60%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.1) 48%, transparent 70%);
    animation: pf-ham-shell-shimmer 7s ease-in-out infinite reverse;
}

.pf-ham-box.is-footer-fx-off .pf-ham-header::before,
.pf-ham-box.is-footer-fx-off .pf-ham-footer::before,
.pf-ham-box.is-footer-fx-off .pf-ham-header::after,
.pf-ham-box.is-footer-fx-off .pf-ham-footer::after {
    animation: none !important;
}

.pf-ham-box.is-footer-fx-off .pf-ham-header::after,
.pf-ham-box.is-footer-fx-off .pf-ham-footer::after {
    opacity: 0.68;
}

.pf-ham-box.is-footer-fx-off .pf-ham-header,
.pf-ham-box.is-footer-fx-off .pf-ham-footer {
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 30%, #512da8 60%, #303f9f 100%);
}

@keyframes pf-ham-shell-wave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pf-ham-shell-shimmer {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.pf-ham-footer-left,
.pf-ham-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: inherit;
}

.pf-ham-footer-right {
    justify-content: flex-end;
}

.pf-ham-footer-left span,
.pf-ham-footer-right span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-ham-footer-logo {
    width: 14px;
    height: 14px;
    color: currentColor;
}

.pf-ham-svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pf-ham-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pf-ham-status-indicator.is-active {
    color: #1f7a47;
}

.pf-ham-status-indicator-icon {
    color: currentColor;
}

.pf-ham-info-box-spaced {
    margin-top: 1rem;
}

.pf-ham-feature-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.pf-ham-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pf-ham-feature-icon {
    color: #27ae60;
    flex-shrink: 0;
    margin-top: 2px;
}

.pf-ham-legend-box.is-active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.pf-ham-legend-box.is-standby {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

.pf-ham-legend-box.is-battery {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.pf-ham-progress-42 {
    --progress: 42;
}

.pf-ham-progress-55 {
    --progress: 55;
}

.pf-ham-progress-65 {
    --progress: 65;
}

.pf-ham-progress-78 {
    --progress: 78;
}

@media (max-width: 768px) {
    .pf-ham-grid {
        grid-template-columns: 1fr;
    }

    .pf-ham-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .pf-ham-energy-dashboard {
        grid-template-columns: 1fr;
    }

    .pf-ham-meter-display {
        grid-template-columns: 1fr;
    }

    .pf-ham-battery-grid {
        grid-template-columns: 1fr;
    }

    .pf-ham-scenarios {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-ham-scenario-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-ham-panels-horizontal {
        grid-template-columns: repeat(2, 1fr);
    }

    .pf-ham-consumption-grid {
        grid-template-columns: 1fr;
    }

    .pf-ham-consumption-item {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
    }

    .pf-ham-consumption-value,
    .pf-ham-consumption-cost {
        grid-column: 2;
    }

    .pf-ham-box.overlay-mode {
        --pf-ham-shell-radius: 12px;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: var(--pf-ham-shell-radius);
        margin: 0;
        overflow: hidden;
        mask-image: radial-gradient(white, black);
        -webkit-mask-image: -webkit-radial-gradient(white, black);
    }

    .pf-ham-body {
        padding: 10px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        scroll-padding-bottom: calc(86px + env(safe-area-inset-bottom));
        border-left-width: 0;
        border-right-width: 0;
    }

    .pf-ham-header {
        padding: 8px 10px;
        min-height: 52px;
        align-items: center;
        gap: 8px;
        flex-direction: row;
    }

    .pf-ham-header-right {
        width: auto;
        justify-content: flex-end;
        gap: 6px;
    }

    .pf-ham-title {
        font-size: 18px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-ham-meta {
        display: none;
    }

    .pf-ham-user {
        padding: 0;
        gap: 0;
        background: transparent;
        border: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .pf-ham-user-name,
    .pf-ham-user-separator,
    .pf-ham-user-license,
    .pf-ham-user-license-mobile,
    .pf-ham-dash-label,
    .pf-ham-tab-label {
        display: none;
    }

    .pf-ham-user-avatar {
        width: 24px;
        height: 24px;
    }

    .pf-ham-icon-wrapper {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .pf-ham-btn-dashboard,
    .pf-ham-btn.pf-ham-btn-small.pf-ham-btn-dashboard {
        width: 38px;
        min-width: 38px;
        height: 38px;
        flex: 0 0 38px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 10px;
    }

    .pf-ham-dash-icon,
    .pf-ham-dash-logo {
        width: 20px;
        height: 20px;
    }

    .pf-ham-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 6px;
        padding: 4px 6px 0;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 6px;
        position: relative;
        top: auto;
        z-index: 1;
    }

    .pf-ham-info-layout {
        grid-template-columns: 1fr;
    }

    .pf-ham-info-description {
        max-height: 180px;
    }

    .pf-ham-tab {
        flex: 0 0 auto;
        min-width: 52px;
        width: 52px;
        height: 44px;
        padding: 0;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        border-radius: 12px 12px 0 0;
        scroll-snap-align: start;
        margin-top: 0;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .pf-ham-tab:hover {
        transform: none;
        margin-bottom: 0;
        filter: none;
    }

    .pf-ham-tab-content {
        padding: 10px;
        border-radius: 0 10px 10px 10px;
    }

    .pf-ham-tab-pane {
        padding: 0;
    }

    .pf-ham-info-section {
        padding: 10px;
    }

    .pf-ham-info-description {
        max-height: 180px;
    }

    .pf-ham-footer {
        padding: 8px 10px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        min-height: 38px;
        gap: 8px;
        border-top-color: rgba(255, 255, 255, 0.28);
        background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 30%, #512da8 60%, #303f9f 100%);
        color: #ffffff;
    }

    .pf-ham-footer-left,
    .pf-ham-footer-right {
        min-width: 0;
        gap: 6px;
        font-size: 0.67rem;
    }

    .pf-ham-footer-left {
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-ham-footer-right {
        flex: 0 1 auto;
        justify-content: flex-end;
        white-space: nowrap;
        max-width: 50%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pf-ham-footer-right span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

