:root {
    --bg-black: #050505;
    --acc-primary: #10b981;
    --acc-info: #0ea5e9;
    --acc-warning: #f59e0b;
    --acc-danger: #ef4444;

    --glass-bg: rgba(10, 10, 12, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7);

    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* UI Overrides and Fixes */
body {
    font-family: var(--font-main);
    background-color: var(--bg-black);
    color: white;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-black {
    background-color: var(--bg-black) !important;
}

.text-primary {
    color: var(--acc-primary) !important;
}

.btn-primary {
    background-color: var(--acc-primary);
    border-color: var(--acc-primary);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

/* Typography Refinement */
.fw-800 {
    font-weight: 800;
}

.fw-700 {
    font-weight: 700;
}

.fw-600 {
    font-weight: 600;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

.x-small {
    font-size: 0.7rem;
}

.font-mono {
    font-family: var(--font-mono);
}

/* Ambient Background Components */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    /* Increased from 0.15 */
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--acc-primary), transparent);
}

.glow-2 {
    bottom: -15%;
    right: -10%;
    background: radial-gradient(circle, var(--acc-info), transparent);
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    /* Increased from 0.3 */
}

.app-wrapper {
    position: relative;
    z-index: 10;
}

/* Glassmorphism Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.input-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 2px 16px;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-glass input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.input-glass:focus-within {
    border-color: var(--acc-primary);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

/* Animations and Micro-interactions */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-right {
    animation: slideRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.hover-glow:hover {
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    color: var(--acc-primary) !important;
}

/* Dashboard Specifics */
.square-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.square-btn:hover {
    transform: scale(1.1);
}

.status-pill {
    background: rgba(16, 185, 129, 0.1);
    color: var(--acc-primary);
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--acc-primary);
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.avatar-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 35% 65% 70% 30% / 30% 40% 60% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: liquidMorph 10s ease-in-out infinite alternate;
}

@keyframes liquidMorph {
    0% {
        border-radius: 35% 65% 70% 30% / 30% 40% 60% 70%;
    }

    100% {
        border-radius: 50% 50% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Gauge and Systems Visualization */
.gauge-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.gauge-svg {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.gauge-progress {
    fill: none;
    stroke: var(--acc-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
}

.progress-glass {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.sys-cpu {
    background: var(--acc-info);
}

.sys-ram {
    background: var(--acc-primary);
}

.sys-storage {
    background: #8b5cf6;
}

/* Speed Charts Equalizers */
.speed-graph {
    height: 40px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.speed-graph span {
    flex: 1;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

/* Glitch Text Restore */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--acc-danger);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--acc-info);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(21px, 9999px, 57px, 0);
    }

    100% {
        clip: rect(93px, 9999px, 21px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 81px, 0);
    }

    100% {
        clip: rect(12px, 9999px, 47px, 0);
    }
}

/* Footer Fix */
footer {
    backdrop-filter: none;
    background: transparent;
    border-top: none !important;
}

.main-logo {
    max-width: 140px;
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.4));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.animate-float {
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Animations Utility */
.animate-pulse {
    animation: softPulse 2s infinite ease-in-out;
}

@keyframes softPulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 0.8;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2.5rem;
    }

    .glass-card {
        padding: 1.5rem !important;
    }
}

/* ---- Missing layout utilities (used by dashboard markup) ---- */
.space-y-3 > * + * {
    margin-top: 1rem;
}

.lh-1 {
    line-height: 1;
}

.h-12 {
    height: 0.75rem !important;
}

.opacity-30 {
    opacity: 0.3;
}

.speed-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
}

.icon-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

/* ---- Server Status Chips ---- */
.server-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
}

.server-chip i {
    font-size: 0.72rem;
    flex-shrink: 0;
}

.server-chip.chip-green {
    color: var(--acc-primary);
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.08);
}

.server-chip.chip-red {
    color: var(--acc-danger);
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
}

.server-chip.chip-info {
    color: var(--acc-info);
    border-color: rgba(14, 165, 233, 0.22);
    background: rgba(14, 165, 233, 0.08);
}

.server-chip.chip-warn {
    color: var(--acc-warning);
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
}

/* ---- Account Alerts ---- */
.account-alert {
    font-size: 0.8rem;
    line-height: 1.4;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-alert.alert-amber {
    color: var(--acc-warning);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.account-alert.alert-red {
    color: var(--acc-danger);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Toast ---- */
.toast-host {
    z-index: 2000;
    pointer-events: none;
}

.toast-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-chip + .toast-chip {
    margin-top: 0.5rem;
}

.toast-ok {
    color: var(--acc-primary);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast-error {
    color: var(--acc-danger);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast-out {
    opacity: 0;
    transform: translateY(-8px);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Live Ticker ---- */
.live-ticker {
    color: var(--acc-primary);
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.07);
    font-size: 0.7rem;
}

.live-flash {
    color: var(--acc-primary) !important;
    transform: scale(1.02);
    transition: color 0.3s ease, transform 0.3s ease;
}

/* ---- Community Buttons ---- */
.community-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.community-btn:hover {
    transform: translateY(-2px);
}

.community-btn i {
    font-size: 0.9rem;
}

.whatsapp-btn {
    color: #25d366;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.28);
}

.whatsapp-btn:hover {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.5);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.18);
}

.linkedin-btn {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.08);
    border: 1px solid rgba(10, 102, 194, 0.28);
}

.linkedin-btn:hover {
    color: #0a66c2;
    border-color: rgba(10, 102, 194, 0.5);
    box-shadow: 0 8px 24px rgba(10, 102, 194, 0.18);
}

.opacity-60 {
    opacity: 0.6;
}

/* Sync button pulse ring */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.4);
    animation: ringPulse 2.5s infinite;
    pointer-events: none;
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

#sync-btn i.fa-spin {
    transition: transform 0.4s ease;
}

/* Live inputs & masked identity */
#dash-last-online {
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}