@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #1A2CA3;
    min-height: 100vh;
    color: #fff;
    padding-top: 130px;
    margin: 0;
}

/* TOP BAR */
.top-bar {
    background: #1e40af;
    padding: 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: 45px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weather-icon {
    font-size: 24px;
}

.weather-info {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.datetime {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    font-weight: 600;
}

/* HEADER */
header {
    background: rgba(30, 64, 175, 0.98);
    backdrop-filter: blur(12px);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    z-index: 1999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    height: 85px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 80px;
    height: 80px;
    fill: white;
}

.logo-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.logo-text {
    font-size: 26px;
    font-weight: 900;
    color: white;
}

/* DESKTOP NAVIGATION */
nav {
    display: flex;
    gap: 0;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    padding: 10px 25px;
    position: relative;
    transition: all 0.3s ease;
}

/* Underline animation */
nav a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

nav a:hover::after {
    width: 60%;
}

/* MOBILE MENU BUTTON - WHITE COLOR */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* MOBILE NAVIGATION */
.mobile-nav {
    display: none;
    position: fixed;
    top: 130px;
    left: 0;
    right: 0;
    background: rgba(30, 64, 175, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 1998;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav.active {
    max-height: 500px;
}

.mobile-nav a {
    display: block;
    padding: 18px 40px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a:active {
    background: rgba(255, 255, 255, 0.15);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login {
    background: white;
    color: #0ea5e9;
}

.btn-login:hover {
    background: #0ea5e9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

/* Logout button - red hover */
#logout-btn:hover {
    background: #dc2626 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 40px;
}

.page-title {
    font-size: 52px;
    font-weight: 900;
    color: white;
    margin-bottom: 40px;
}

/* STATUS BANNER */
.status-banner {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px 40px;
    border-radius: 20px;
    margin-bottom: 40px;
}

.status-banner.aman { background: #22c55e; }
.status-banner.waspada { background: #f59e0b; }
.status-banner.bahaya { background: #ef4444; }
.status-banner.loading { background: #60a5fa; }

.status-label {
    font-size: 36px;
    font-weight: 900;
    color: white;
    min-width: 200px;
}

.status-description {
    font-size: 17px;
    color: white;
    font-weight: 500;
}

/* MAIN GRID */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* CARD */
.card {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    color: #1f2937;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 28px;
    font-weight: 900;
    color: #111827;
}

.card-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 30px;
}

/* MAP */
#map {
    width: 100%;
    height: 400px;
    border-radius: 20px;
}

/* INFO GRID */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

.info-box {
    background: #f9fafb;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 2px solid #e5e7eb;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.info-value {
    font-size: 40px;
    font-weight: 900;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.info-value.coordinate {
    font-size: 20px;
    flex-direction: column;
    gap: 5px;
}

/* WARNING BOX */
.warning-box {
    background: #fde68a;
    border-left: 6px solid #f59e0b;
    padding: 20px 25px;
    border-radius: 15px;
    margin-top: 30px;
    color: #92400e;
    font-size: 15px;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: white;
    border-radius: 25px;
    padding: 45px 35px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    color: #1f2937;
}

.contact-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 55px;
    height: 55px;
    stroke: #0ea5e9;
    fill: none;
}

.contact-title {
    font-size: 24px;
    font-weight: 900;
    color: #111827;
    margin-bottom: 10px;
}

.contact-info {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

/* STATUS TABS */
.status-tabs {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
}

.status-tab {
    flex: 1;
    padding: 18px;
    border-radius: 18px;
    text-align: center;
    font-weight: 900;
    font-size: 17px;
    cursor: pointer;
    border: 4px solid transparent;
}

.status-tab.aman { background: #4ade80; color: white; }
.status-tab.waspada { background: #e5e7eb; color: #6b7280; }
.status-tab.bahaya { background: #e5e7eb; color: #6b7280; }
.status-tab.active { border-color: #1f2937; }

.status-badge {
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 900;
    font-size: 15px;
}

.status-badge.aman { background: #4ade80; color: white; }
.status-badge.waspada { background: #fbbf24; color: white; }
.status-badge.bahaya { background: #ef4444; color: white; }

/* CHART */
.chart-legend {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.legend-line {
    width: 40px;
    height: 3px;
}

/* WEATHER */
.weather-main {
    background: white;
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 30px;
    color: #1f2937;
}

.weather-current {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.weather-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stat-icon {
    font-size: 28px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
}

.weather-forecast {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.forecast-day {
    background: #f0f9ff;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
}

.forecast-day.today {
    background: #0ea5e9;
    color: white;
}

/* LOGIN - SINGLE BOX ONLY */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    padding: 60px 50px;
    border-radius: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo-small {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-small svg {
    width: 100px;
    height: 100px;
    fill: white;
}

.login-logo-small img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.login-box h1 {
    font-size: 32px;
    font-weight: 900;
    color: #0ea5e9;
    margin-bottom: 10px;
}

.login-box .subtitle {
    color: #6b7280;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    transition: border 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0ea5e9;
}

/* Error state with red border and shake */
.form-group input.error {
    border-color: #dc2626;
    animation: shake 0.4s;
    -webkit-animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@-webkit-keyframes shake {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { -webkit-transform: translateX(-5px); transform: translateX(-5px); }
    20%, 40%, 60%, 80% { -webkit-transform: translateX(5px); transform: translateX(5px); }
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

/* Error state for button */
/* Success state for button */
.btn-submit.success {
    background: #16a34a !important;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
}

.btn-submit.error {
    background: #dc2626;
    animation: shake 0.4s;
    -webkit-animation: shake 0.4s;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

/* RESPONSIVE - TABLET */
@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .weather-current { grid-template-columns: 1fr; }
    .weather-stats { grid-template-columns: 1fr 1fr; }
    .weather-forecast { grid-template-columns: repeat(3, 1fr); }
    body { padding-top: 130px; }
    .container { padding: 15px 20px 30px; }
    .page-title { font-size: 36px; }
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    body {
        padding-top: 110px;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }

    /* TOP BAR */
    .top-bar {
        position: fixed;
        top: 0; left: 0; right: 0;
        width: 100%;
        height: 36px;
        padding: 0 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 2000;
    }

    .weather-widget {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .weather-icon { font-size: 16px; flex-shrink: 0; }

    .weather-info {
        display: flex;
        flex-direction: row;
        gap: 6px;
        font-size: 10px;
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .weather-info span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .datetime {
        font-size: 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* HEADER */
    header {
        position: fixed;
        top: 36px; left: 0; right: 0;
        width: 100%;
        height: 74px;
        padding: 8px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 1999;
    }

    .logo-section {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .logo-icon { width: 50px; height: 50px; flex-shrink: 0; }
    .logo-icon img { width: 50px; height: 50px; }

    .logo-text {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 50px);
    }

    nav { display: none; }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 8px;
        z-index: 2001;
        flex-shrink: 0;
    }

    .mobile-menu-btn span { width: 22px; height: 2px; }

    .mobile-nav {
        display: block;
        position: fixed;
        top: 110px; left: 0; right: 0;
        z-index: 1998;
    }

    .header-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .header-actions .btn {
        padding: 6px 14px;
        font-size: 11px;
        white-space: nowrap;
    }

    /* CONTAINER & LAYOUT */
    .container {
        padding: 12px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-title {
        font-size: 24px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 20px;
    }

    .status-banner {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    .status-label { font-size: 24px; min-width: unset; }
    .status-description { font-size: 14px; }

    .card {
        padding: 16px;
        width: 100%;
        overflow: visible;
        border-radius: 16px;
    }

    .card-title { font-size: 20px; }
    .card-subtitle, .card h2, .card p, .card li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .main-grid,
    .info-grid,
    .contact-grid,
    .weather-current,
    .weather-stats {
        grid-template-columns: 1fr !important;
        gap: 12px;
        width: 100%;
    }

    /* Weather forecast: 1 column on mobile */
    .weather-forecast {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
        width: 100%;
    }

    #map { height: 220px; width: 100%; }

    .status-tabs { flex-direction: row; gap: 8px; }
    .status-tab { font-size: 13px; padding: 12px 8px; }

    .chart-legend { flex-direction: row; flex-wrap: wrap; font-size: 11px; gap: 10px; }

    /* Table horizontal scroll */
    .card .table-wrapper,
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card table { font-size: 11px; min-width: 520px; }
    .card table th,
    .card table td { padding: 10px 8px !important; font-size: 11px !important; }

    .login-box { padding: 28px 16px; width: 100%; }

    /* Info grid value smaller */
    .info-value { font-size: 28px; }
    .info-value.coordinate { font-size: 14px; }
}

/* ---- SMALL MOBILE ---- */
@media (max-width: 480px) {
    body { padding-top: 105px; }

    .top-bar { height: 32px; padding: 0 8px; }
    .weather-icon { font-size: 14px; }
    .weather-info { font-size: 9px; }
    .datetime { font-size: 8px; }

    header { top: 32px; height: 73px; padding: 6px 8px; }
    .mobile-nav { top: 105px; }

    .logo-icon { width: 40px; height: 40px; }
    .logo-icon img { width: 40px; height: 40px; }
    .logo-text { font-size: 10px; }
    .header-actions .btn { padding: 5px 10px; font-size: 10px; }

    .page-title { font-size: 20px; }
    .weather-forecast { grid-template-columns: 1fr 1fr !important; }
    .card { padding: 14px; }
}
/* ========================================
   GLOBAL UTILITY - STATUS INDICATOR GRID
   ======================================== */
.status-indicator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .status-indicator-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ========================================
   GLOBAL MOBILE OVERRIDE
   Force ALL inline grid to single column on mobile
   ======================================== */
@media (max-width: 768px) {
    /* Override any inline grid styles on card children */
    .card > div[style*="grid"],
    .weather-main > div[style*="grid"],
    .container > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Chart container - prevent overflow */
    div[style*="height: 450px"],
    div[style*="height:450px"] {
        height: 250px !important;
    }

    /* Prevent ANY element from overflowing screen width */
    .container *, .card *, .weather-main * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix status banner text on small screens */
    .status-label { font-size: 22px; min-width: unset; }
    .status-description { font-size: 13px; }
    .warning-box { font-size: 13px; }
}

/* === FOOTER === */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 25px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 900;
    color: white;
    line-height: 1.3;
    margin-top: 10px;
}

.footer-heading {
    font-size: 14px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.footer-contact-item svg {
    flex-shrink: 0;
    color: #06b6d4;
}

.footer-contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-item a:hover {
    color: #06b6d4;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: #06b6d4;
}

.footer-links li a svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.footer-bottom {
    margin-top: 50px;
    padding: 25px 40px;
    border-top: 1px solid #334155;
}

.footer-bottom .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-template-columns: 1fr;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.back-to-top:hover {
    color: #06b6d4;
}

.back-to-top svg {
    transition: transform 0.2s;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 35px;
    }
    
    .site-footer {
        padding: 40px 0 0;
        margin-top: 50px;
    }
    
    .footer-bottom .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-bottom {
        padding: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}


    
    .legend-item span {
        font-size: 10px !important;
    }

/* === INFO TOOLTIP - MODAL CENTERED === */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    cursor: help;
}

.info-icon {
    width: 18px;
    height: 18px;
    background: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
}

.info-icon:hover {
    background: #64748b;
}

.tooltip-text {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white;
    color: #1e293b;
    padding: 15px 18px;
    border-radius: 12px;
    width: 85vw;
    max-width: 350px;
    font-size: 12px;
    line-height: 1.6;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    z-index: 10000 !important;

    max-height: 80vh;
    overflow-y: auto;}

.info-tooltip:hover .tooltip-text {
    display: block !important;

    max-height: 80vh;
    overflow-y: auto;}

.info-tooltip:hover::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    pointer-events: none;
}

@media (max-width: 768px) {
    .tooltip-text {
        width: 90vw !important;
        max-width: 320px !important;
        font-size: 11px !important;
    
    max-height: 80vh;
    overflow-y: auto;}
}

/* === GRAFIK LEGEND - ONE LINE PER ITEM === */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: 25px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.legend-line {
    width: 30px;
    height: 4px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .chart-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0 10px;
    }
    
    .legend-item {
        font-size: 12px;
        width: 100%;
    }
    
    .legend-line {
        width: 25px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .legend-item {
        font-size: 11px;
    }
}