html {
    min-height: 100%;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #dbeafe;
    text-align: center;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background:
        linear-gradient(120deg, #1b2d5a 0%, #214c92 100%),
        linear-gradient(135deg, #233a5e 0%, #3768a8 100%),
        linear-gradient(110deg, #347edf 0%, #152b61 100%);
    background-blend-mode: darken, lighten, multiply;
    background-size: 300% 300%, 300% 300%, 300% 300%;
    background-position: 0% 50%, 100% 50%, 50% 0%;
    background-attachment: scroll;
    animation: bg-fade 11s linear infinite;
@keyframes bg-fade {
    0% {
        background-position: 0% 50%, 100% 50%, 50% 0%;
    }
    33% {
        background-position: 50% 0%, 0% 50%, 100% 50%;
    }
    66% {
        background-position: 100% 50%, 50% 100%, 0% 50%;
    }
    100% {
        background-position: 0% 50%, 100% 50%, 50% 0%;
    }
}
}

body::before,
body::after {
    display: none !important;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 40px auto 0 auto;
    padding: 0 16px;
    z-index: 1;
    margin-top: 54px; /* Push content below the fixed tab bar */
}

.hidden {
    display: none;
    pointer-events: none;
}

.container>* {
    filter: drop-shadow(0 0 2px rgba(1, 1, 1, 0.1));
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}


#customersDiv {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 40vh;
    position: relative;
}

:root {
    --customer-bg: linear-gradient(129deg, rgba(27, 56, 121, 0.85), rgba(27, 46, 92, 0.95) 80%),
                   linear-gradient(69deg, rgba(19, 37, 78, 0.85) 10%, rgba(22, 43, 88, 0.93) 90%);
    --customer-border-radius: 18px;
    --customer-shadow: 0 2px 16px rgba(30,44,77,0.45);
    --customer-shadow-hover: 0 6px 32px rgba(30,44,77,0.65);
    --customer-border: 1px solid rgba(60,90,150,0.22);
    --customer-gap: 14px;
    --customer-padding: 18px 24px;
    --customer-min-height: 3.6em;
    --customer-name-color: #60aaff;
    --customer-link-color: #3bbcff;
    --customer-link-hover: #ff6f91;
    --customer-link-highlight: #00ffd0;
    --customer-comment-color: #ffe6e6;
}

.customer {
    display: grid;
    grid-template-columns: 2fr 2fr 3fr 1fr;
    align-items: center;
    width: 100%;
    padding: var(--customer-padding);
    gap: var(--customer-gap);
    background: var(--customer-bg);
    border-radius: var(--customer-border-radius);
    box-shadow: var(--customer-shadow);
    margin-bottom: 20px;
    border: var(--customer-border);
    min-height: var(--customer-min-height);
    transition: box-shadow 0.35s cubic-bezier(.4,0,.2,1), background 0.35s cubic-bezier(.4,0,.2,1);
}

.customer.error {
    background: rgba(255,0,0,.2);
    box-shadow: 0 0 12px 2px rgba(255,0,0,0.18);
}

.customer.pending {
    background: rgba(1,0,0,.2);
    box-shadow: 0 0 12px 2px rgba(1,0,0,0.18);
}

.customer:hover {
    box-shadow: var(--customer-shadow-hover);
    background: rgba(60,90,150,0.32);
}

.customer:hover .customer-link a {
    color: var(--customer-link-highlight);
    border-radius: 6px;
    text-decoration: underline;
    box-shadow: 0 0 6px var(--customer-link-highlight);
    background: rgba(43,124,255,0.08);
}

.customer-name,
.customer-entrypoint,
.customer-link,
.customer-comment {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 1.05rem;
    word-break: break-word;
}

.customer-name {
    color: var(--customer-name-color);
}
.customer-entrypoint {
    font-family: monospace;
    color: #7a8ca3;
}

.customer-link a {
    color: var(--customer-link-color);
    font-weight: 500;
    text-decoration: underline;
    word-break: break-all;
    transition: 
        color 0.35s cubic-bezier(.4,0,.2,1),
        background 0.35s cubic-bezier(.4,0,.2,1),
        box-shadow 0.35s cubic-bezier(.4,0,.2,1),
        border-radius 0.35s cubic-bezier(.4,0,.2,1);
}

.customer-link a:hover {
    color: var(--customer-link-hover);
    text-decoration: underline;
}

.customer-comment {
    color: var(--customer-comment-color);
    font-style: italic;
    opacity: 0.85;
    font-size: 0.98rem;
}

#customersTitle {
    font-size: 2.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #60aaff;
    margin-bottom: 28px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(60,127,207,0.18);
}

#tabBar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 54px;
    display: flex;
    flex-direction: row;
    gap: 0;
    justify-content: flex-start;
    align-items: center;
    background: linear-gradient(90deg, #233a5e 60%, #1a2747 100%);
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(30,44,77,0.18);
    padding: 0;
    margin: 0;
    z-index: 1000;
}

.tab {
    background: none;
    color: #60aaff;
    border: none;
    border-radius: 0;
    padding: 0 32px;
    height: 54px;
    font-size: 1.08rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    outline: none;
    text-align: center;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
}

.tab.active {
    background: #233a5e;
    color: #00ffd0;
    border-bottom: 2px solid #00ffd0;
    box-shadow: none;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section.hidden {
    display: none !important;
}

.spinner {
    z-index: 2;
    border: 4px solid rgba(60,90,150,0.3);
    border-top: 4px solid #60aaff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 5.1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeOutIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.customer-status {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 4px;
    min-height: 18px;
}

.status-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #233a5e;
    border: 2px solid #3bbcff;
    box-shadow: 0 2px 8px rgba(60,127,207,0.18);
    transition: background 0.3s, border-color 0.5s, box-shadow 0.8s;
    position: relative;
}

.status-dot.on {
    background: radial-gradient(circle at 50% 50%, #00ffd0 60%, #00bfae 100%);
    border-color: #00bfae;
    box-shadow:
        0 0 2px 2px #00ffd088,
        0 0 1px 4px #00ffd044;
    mix-blend-mode: lighten;
}

.status-dot.off {
    background: radial-gradient(circle at 50% 50%, #ff1e1e 60%, #c62828 100%);
    border-color: #ff0000;
    box-shadow:
        0 0 8px 2px #ff0303b0,
        0 0 16px 4px #ff525244;
    mix-blend-mode: screen;
    animation: status-error-blink 1.2s infinite;
}

.status-dot.pending {
    background: radial-gradient(circle at 50% 50%, #ffe066 60%, #e6c200 100%);
    border-color: #e6c200;
    box-shadow:
        0 0 8px 2px #ffe06688,
        0 0 16px 4px #ffe06644;
    mix-blend-mode: lighten;
    animation: status-pulse 0.4s infinite;
}

.status-dot.inactive {
    background: radial-gradient(circle at 50% 50%, #7a8ca3 60%, #233a5e 100%);
    border-color: #233a5e;
    box-shadow:
        0 0 8px 2px #7a8ca388,
        0 0 16px 4px #7a8ca344;
    opacity: 0.5;
    mix-blend-mode: luminosity;
}

@keyframes status-pulse {
    0% { box-shadow: 0 0 8px #ffe06655, 0 0 0 0 #ffe06633; }
    50% { box-shadow: 0 0 16px #ffe06699, 0 0 0 8px #ffe06633; }
    100% { box-shadow: 0 0 8px #ffe06655, 0 0 0 0 #ffe06633; }
}

@keyframes status-error-blink {
    0% { box-shadow: 0 0 16px #ff5252cc, 0 0 0 0 #ff525233; opacity: 1; }
    25% { box-shadow: 0 0 32px #ff5252ff, 0 0 0 12px #ff525233; opacity: 0.7; }
    50% { box-shadow: 0 0 16px #ff5252cc, 0 0 0 0 #ff525233; opacity: 1; }
    75% { box-shadow: 0 0 32px #ff5252ff, 0 0 0 12px #ff525233; opacity: 0.7; }
    100% { box-shadow: 0 0 16px #ff5252cc, 0 0 0 0 #ff525233; opacity: 1; }
}

#tabBar.flyout {
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 100;
    height: auto;
    min-height: 200px;
    width: 38px;
    background: rgba(36,54,94,0.85);
    border-radius: 0 16px 16px 0;
    box-shadow: 0 2px 16px rgba(30,44,77,0.18);
    transition: width 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

#tabBar.flyout::before {
    content: '';
    display: block;
    width: 8px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(90deg, #00ffd0 0%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
}

#tabBar.flyout:hover,
#tabBar.flyout.flyout-open {
    width: 180px;
    box-shadow: 0 4px 32px rgba(30,44,77,0.32);
}

#tabBar.flyout .tab {
    background: none;
    color: #60aaff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 1.08rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, opacity 0.2s;
    outline: none;
    text-align: left;
    opacity: 0;
    pointer-events: none;
}

#tabBar.flyout:hover .tab,
#tabBar.flyout.flyout-open .tab {
    opacity: 1;
    pointer-events: auto;
}

#tabBar.flyout .tab.active {
    background: #233a5e;
    color: #00ffd0;
    box-shadow: 0 2px 8px rgba(60,127,207,0.18);
}