        :root {
            --bg: #080a10;
            --surface: #0e1118;
            --card: #151921;
            --card-hover: #1a2030;
            --border: #1f2637;
            --text: #eaedf3;
            --text-secondary: #8892a8;
            --dim: #5a6480;
            --accent: #5b8def;
            --green: #3dd68c;
            --green-bg: rgba(61, 214, 140, .08);
            --green-border: rgba(61, 214, 140, .25);
            --red: #f06565;
            --red-bg: rgba(240, 101, 101, .08);
            --red-border: rgba(240, 101, 101, .25);
            --yellow: #f0b840;
            --yellow-bg: rgba(240, 184, 64, .08);
            --yellow-border: rgba(240, 184, 64, .25);
            --purple: #9f7aea;
            --gradient: linear-gradient(135deg, #5b8def 0%, #9f7aea 50%, #e06adb 100%);
            --radius: 14px;
            --radius-sm: 10px
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh
        }

        .login-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 1rem;
            background: linear-gradient(135deg, #0a0a1a 0%, #0d1117 30%, #111827 60%, #0a0a1a 100%);
            position: relative;
            overflow: hidden
        }

        .login-wrap::before {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(56,189,248,.06) 0%, transparent 70%);
            top: -100px;
            right: -100px;
            pointer-events: none
        }

        .login-wrap::after {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, rgba(168,85,247,.05) 0%, transparent 70%);
            bottom: -80px;
            left: -80px;
            pointer-events: none
        }

        .login-stars {
            position: absolute;
            inset: 0;
            overflow: hidden;
            pointer-events: none
        }

        .login-star {
            position: absolute;
            width: 2px;
            height: 2px;
            background: rgba(255,255,255,.3);
            border-radius: 50%;
            animation: twinkle ease-in-out infinite alternate
        }

        @keyframes twinkle {
            0% { opacity: .1; transform: scale(.8) }
            100% { opacity: .8; transform: scale(1.2) }
        }

        .login-box {
            background: rgba(15, 20, 30, .85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(56,189,248,.12);
            border-radius: 20px;
            padding: 2.5rem 2.2rem 2rem;
            width: 100%;
            max-width: 380px;
            position: relative;
            z-index: 2;
            box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(56,189,248,.04);
            animation: loginBoxIn .5s cubic-bezier(.16,1,.3,1);
            text-align: center
        }

        @keyframes loginBoxIn {
            0% { opacity: 0; transform: translateY(20px) scale(.97) }
            100% { opacity: 1; transform: translateY(0) scale(1) }
        }

        /* Robot avatar with ring */
        .login-avatar {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 1rem
        }

        .login-avatar img {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            position: absolute;
            top: 10px;
            left: 10px;
            z-index: 2;
            filter: drop-shadow(0 0 15px rgba(56,189,248,.3))
        }

        .login-ring {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 2px dashed rgba(56,189,248,.4);
            animation: ringRotate 8s linear infinite
        }

        @keyframes ringRotate {
            0% { transform: rotate(0) }
            100% { transform: rotate(360deg) }
        }

        .login-box h1 {
            font-size: 1.5rem;
            font-weight: 800;
            margin: 0 0 .3rem;
            background: linear-gradient(135deg, #38bdf8, #a855f7, #38bdf8);
            background-size: 200% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: shimmerText 3s linear infinite
        }

        @keyframes shimmerText {
            0% { background-position: 0% center }
            100% { background-position: 200% center }
        }

        .login-greeting {
            color: var(--dim);
            font-size: .85rem;
            margin-bottom: 1.5rem
        }

        .login-greeting .greet-emoji {
            margin-right: .3rem
        }

        /* Inputs with icons */
        .login-input-wrap {
            position: relative;
            margin-bottom: .9rem
        }

        .login-input-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(56,189,248,.5);
            font-size: .9rem;
            pointer-events: none;
            z-index: 2
        }

        .login-input-wrap input {
            width: 100%;
            padding: .75rem 2.5rem .75rem 2.5rem;
            background: rgba(255,255,255,.04);
            border: 1px solid rgba(255,255,255,.08);
            border-radius: 10px;
            color: var(--text);
            font-size: .9rem;
            outline: none;
            transition: all .25s ease;
            font-family: inherit
        }

        .login-input-wrap input:focus {
            border-color: rgba(56,189,248,.4);
            background: rgba(56,189,248,.04);
            box-shadow: 0 0 0 3px rgba(56,189,248,.08)
        }

        .login-input-wrap input::placeholder {
            color: rgba(255,255,255,.2);
            font-size: .85rem
        }

        .login-eye {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: rgba(255,255,255,.3);
            cursor: pointer;
            font-size: .85rem;
            padding: 4px;
            z-index: 2;
            transition: color .2s
        }

        .login-eye:hover { color: var(--text) }

        /* Gradient button */
        .login-btn {
            width: 100%;
            padding: .85rem;
            background: linear-gradient(135deg, #7c3aed 0%, #38bdf8 100%);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-weight: 700;
            font-size: .95rem;
            cursor: pointer;
            transition: all .25s ease;
            margin-top: .3rem;
            letter-spacing: .3px;
            position: relative;
            overflow: hidden
        }

        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(56,189,248,.35)
        }

        .login-btn:active {
            transform: translateY(0)
        }

        .login-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
            transform: translateX(-100%);
            transition: .6s
        }

        .login-btn:hover::after {
            transform: translateX(100%)
        }

        /* Status bar */
        .login-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .8rem;
            margin-top: 1.2rem;
            padding-top: 1rem;
            border-top: 1px solid rgba(255,255,255,.05);
            font-size: .78rem;
            color: var(--dim)
        }

        .login-status .status-dot {
            width: 7px;
            height: 7px;
            background: #22c55e;
            border-radius: 50%;
            box-shadow: 0 0 6px rgba(34,197,94,.5);
            animation: statusPulse 2s ease infinite
        }

        @keyframes statusPulse {
            0%, 100% { opacity: 1 }
            50% { opacity: .5 }
        }

        .login-status .login-clock {
            color: #38bdf8;
            font-weight: 600;
            font-family: 'JetBrains Mono', monospace
        }

        /* Footer */
        .login-powered {
            margin-top: .8rem;
            font-size: .7rem;
            color: rgba(255,255,255,.2);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .3rem
        }

        .login-powered span {
            background: linear-gradient(135deg, #38bdf8, #a855f7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-weight: 700
        }

        .login-copy {
            font-size: .65rem;
            color: rgba(255,255,255,.12);
            margin-top: .4rem
        }

        .error {
            background: rgba(239,68,68,.1);
            border: 1px solid rgba(239,68,68,.2);
            color: #f87171;
            font-size: .8rem;
            padding: .55rem .9rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            animation: loginShake .4s ease
        }

        @keyframes loginShake {
            0%, 100% { transform: translateX(0) }
            20%, 60% { transform: translateX(-5px) }
            40%, 80% { transform: translateX(5px) }
        }

        .wrap {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1.5rem
        }

        .header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.2rem
        }

        .header h1 {
            font-size: 1.4rem;
            font-weight: 800;
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent
        }

        .header .sub {
            color: var(--dim);
            font-size: .75rem;
            margin-left: .6rem;
            font-weight: 400;
            background: var(--surface);
            padding: .2rem .6rem;
            border-radius: 20px;
            border: 1px solid var(--border)
        }

        .btn-sm {
            padding: .4rem .8rem;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text-secondary);
            font-size: .75rem;
            text-decoration: none;
            cursor: pointer;
            transition: .2s
        }

        .btn-sm:hover {
            border-color: var(--accent);
            color: var(--text)
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 0;
            margin-bottom: 1.5rem;
            background: var(--surface);
            border-radius: var(--radius);
            padding: 4px;
            border: 1px solid var(--border)
        }

        .tab {
            flex: 1;
            text-align: center;
            padding: .7rem .5rem;
            font-size: .8rem;
            font-weight: 600;
            color: var(--dim);
            cursor: pointer;
            border-radius: var(--radius-sm);
            transition: .2s;
            user-select: none
        }

        .tab:hover {
            color: var(--text-secondary)
        }

        .tab.active {
            background: var(--card);
            color: var(--text);
            box-shadow: 0 2px 8px rgba(0, 0, 0, .3)
        }

        .tab-icon {
            font-size: 1.1rem;
            display: block;
            margin-bottom: 2px
        }

        .tab-content {
            display: none
        }

        .tab-content.active {
            display: block;
            animation: fadeIn .3s
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px)
            }

            to {
                opacity: 1;
                transform: translateY(0)
            }
        }

        /* Cards */
        .banner {
            padding: 1rem 1.5rem;
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--green-border);
            background: var(--green-bg)
        }

        .banner.error {
            border-color: var(--red-border);
            background: var(--red-bg)
        }

        .banner.warning {
            border-color: var(--yellow-border);
            background: var(--yellow-bg)
        }

        .banner.syncing {
            border-color: rgba(91, 141, 239, .25);
            background: rgba(91, 141, 239, .08)
        }

        .pulse-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--green);
            flex-shrink: 0;
            animation: pulse 2s infinite
        }

        .pulse-dot.error {
            background: var(--red)
        }

        .pulse-dot.warning {
            background: var(--yellow)
        }

        .pulse-dot.syncing {
            background: var(--accent)
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1
            }

            50% {
                opacity: .4
            }
        }

        .banner h2 {
            font-size: 1rem;
            font-weight: 600
        }

        .banner p {
            font-size: .8rem;
            color: var(--text-secondary)
        }

        .metrics {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem
        }

        .metric {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1.2rem;
            transition: .2s
        }

        .metric:hover {
            border-color: var(--accent)
        }

        .metric .label {
            font-size: .65rem;
            text-transform: uppercase;
            letter-spacing: .8px;
            color: var(--dim);
            margin-bottom: .5rem
        }

        .metric .val {
            font-size: 1.6rem;
            font-weight: 800;
            letter-spacing: -.5px
        }

        .metric .sub {
            font-size: .7rem;
            color: var(--dim);
            margin-top: .3rem
        }

        .panel {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            margin-bottom: 1rem;
            overflow: hidden
        }

        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: .8rem 1.3rem;
            border-bottom: 1px solid var(--border)
        }

        .panel-header .label {
            font-size: .7rem;
            text-transform: uppercase;
            letter-spacing: .8px;
            color: var(--dim);
            font-weight: 600
        }

        .panel-header .count {
            font-size: .75rem;
            font-weight: 600;
            color: var(--accent)
        }

        .panel-body {
            padding: .8rem 1.3rem
        }

        .servers {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1.5rem
        }

        .srv {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: .8rem
        }

        .srv-top {
            display: flex;
            align-items: center;
            gap: .6rem
        }

        .srv-icon {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem
        }

        .srv-icon.m {
            background: rgba(91, 141, 239, .12)
        }

        .srv-icon.r {
            background: rgba(159, 122, 234, .12)
        }

        .badge {
            padding: .25rem .6rem;
            border-radius: 20px;
            font-size: .65rem;
            font-weight: 700;
            letter-spacing: .5px;
            margin-left: auto
        }

        .badge.m {
            background: rgba(91, 141, 239, .12);
            color: var(--accent);
            border: 1px solid rgba(91, 141, 239, .25)
        }

        .badge.r {
            background: rgba(159, 122, 234, .12);
            color: var(--purple);
            border: 1px solid rgba(159, 122, 234, .25)
        }

        .bars {
            display: flex;
            gap: .5rem;
            flex-wrap: wrap
        }

        .bar-item {
            flex: 1;
            min-width: 80px
        }

        .bar-label {
            font-size: .6rem;
            color: var(--dim);
            margin-bottom: 3px
        }

        .bar-track {
            background: var(--bg);
            border-radius: 6px;
            height: 8px;
            overflow: hidden
        }

        .bar-fill {
            height: 100%;
            border-radius: 6px;
            transition: width .5s;
            background: var(--accent)
        }
        .bar-fill.bar-cpu { background: var(--accent) }
        .bar-fill.bar-ram { background: var(--green) }
        .bar-fill.bar-disk { background: var(--yellow) }

        .bar-text {
            font-size: .55rem;
            color: var(--dim);
            margin-top: 2px
        }

        .chip {
            display: inline-flex;
            align-items: center;
            gap: .3rem;
            padding: .25rem .6rem;
            background: var(--green-bg);
            border: 1px solid var(--green-border);
            border-radius: 20px;
            font-size: .68rem;
            color: var(--green);
            font-weight: 500;
            margin: .2rem
        }

        .log-entry {
            padding: .3rem 0;
            border-bottom: 1px solid rgba(31, 38, 55, .5);
            font-family: 'JetBrains Mono', monospace;
            font-size: .72rem;
            display: flex;
            gap: .8rem
        }

        .log-entry:last-child {
            border: none
        }

        .log-entry .ts {
            color: var(--dim);
            white-space: nowrap;
            min-width: 140px
        }

        .log-entry .msg {
            color: var(--text-secondary)
        }

        .log-entry .ok {
            color: var(--green)
        }

        .log-entry .err {
            color: var(--red)
        }

        .log-entry .warn {
            color: var(--yellow)
        }

        .file-item {
            padding: .4rem 0;
            border-bottom: 1px solid rgba(31, 38, 55, .5);
            font-family: 'JetBrains Mono', monospace;
            font-size: .72rem;
            color: var(--text-secondary);
            word-break: break-all
        }

        .action-btn {
            display: inline-flex;
            align-items: center;
            gap: .5rem;
            padding: .7rem 1.2rem;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-sm);
            color: var(--text);
            font-size: .85rem;
            cursor: pointer;
            transition: .2s;
            margin: .4rem
        }

        .action-btn:hover {
            border-color: var(--accent);
            background: var(--card)
        }

        .action-btn.danger {
            border-color: var(--red-border)
        }

        .action-btn.danger:hover {
            background: var(--red-bg)
        }

        .action-result {
            margin-top: .8rem;
            padding: .6rem 1rem;
            background: var(--surface);
            border-radius: var(--radius-sm);
            font-size: .8rem;
            color: var(--green);
            display: none
        }

        .stat-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem
        }

        .stat-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            padding: 1.2rem;
            text-align: center
        }

        .stat-card .num {
            font-size: 2rem;
            font-weight: 800
        }

        .stat-card .lbl {
            font-size: .7rem;
            color: var(--dim);
            margin-top: .3rem
        }

        .svc-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: .5rem;
            margin-top: .8rem
        }

        .svc-item {
            display: flex;
            align-items: center;
            gap: .5rem;
            padding: .5rem .8rem;
            background: var(--surface);
            border-radius: 8px;
            font-size: .8rem
        }

        .svc-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%
        }

        .svc-dot.on {
            background: var(--green)
        }

        .svc-dot.off {
            background: var(--red)
        }

        .footer {
            text-align: center;
            padding: 1.5rem;
            font-size: .7rem;
            color: var(--dim)
        }

        .live-dot {
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--green);
            margin-right: 4px;
            animation: pulse 2s infinite
        }

        /* Skeleton loading */
        .skeleton{background:linear-gradient(90deg,var(--surface) 25%,var(--card-hover) 50%,var(--surface) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:6px;height:1.6rem;margin-bottom:.3rem}
        @keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

        /* Focus visible for keyboard accessibility */
        :focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
        .tab:focus-visible,.action-btn:focus-visible,.btn-sm:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

        /* Counter animation */
        .counter-animate{transition:transform .3s;display:inline-block}
        .counter-animate.pop{transform:scale(1.15)}

        /* Toast notification */
        .toast-notify{position:fixed;bottom:20px;right:20px;padding:.7rem 1.2rem;background:var(--card);border:1px solid var(--green-border);border-radius:var(--radius-sm);color:var(--green);font-size:.8rem;font-weight:600;transform:translateY(100px);opacity:0;transition:.3s;z-index:1000;box-shadow:0 4px 20px rgba(0,0,0,.4)}
        .toast-notify.show{transform:translateY(0);opacity:1}

        @media(max-width:768px) {
            .wrap {
                padding: 1rem .7rem
            }

            .header {
                flex-direction: column;
                gap: .5rem;
                align-items: flex-start
            }

            .header h1 {
                font-size: 1.1rem
            }

            .tabs {
                display: grid;
                grid-template-columns: repeat(4, 1fr);
                gap: 3px;
                flex-wrap: unset
            }

            .tab {
                flex: unset;
                min-width: unset;
                padding: .5rem .3rem;
                font-size: .65rem;
                white-space: nowrap
            }

            .tab-icon {
                font-size: .9rem;
                margin-bottom: 1px
            }

            .metrics {
                grid-template-columns: repeat(2, 1fr);
                gap: .6rem
            }

            .metric {
                padding: .8rem
            }

            .metric .val {
                font-size: 1.2rem
            }

            .servers {
                grid-template-columns: 1fr
            }

            .stat-grid {
                grid-template-columns: 1fr
            }

            .svc-grid {
                grid-template-columns: 1fr 1fr
            }

            .banner {
                padding: .8rem 1rem;
                flex-direction: column;
                text-align: center
            }

            .panel-body {
                padding: .6rem .8rem
            }

            .action-btn {
                font-size: .78rem;
                padding: .6rem .9rem
            }

            .log-entry {
                flex-direction: column;
                gap: .2rem
            }

            .log-entry .ts {
                min-width: unset
            }
        }

/* -------------------------------------------
   REMASTERIZACIÓN FASE 1: BARRAS DE RECURSOS
   ------------------------------------------- */
.bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}
.bar-item {
    width: 100%;
}
.bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    align-items: baseline;
}
.bar-label {
    font-size: 0.75rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0;
}
.bar-text {
    font-size: 0.7rem;
    color: var(--dim);
    margin-top: 0;
    white-space: nowrap;
}
.bar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    height: 12px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.bar-cpu {
    background: linear-gradient(90deg, #5b8def, #a855f7) !important;
}
.bar-ram {
    background: linear-gradient(90deg, #3dd68c, #10b981) !important;
}
.bar-disk {
    background: linear-gradient(90deg, #f0b840, #f59e0b) !important;
}
.bar-fill[style*="background: var(--red)"] {
    background: linear-gradient(90deg, #f06565, #ef4444) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}
.bar-fill[style*="background: var(--yellow)"] {
    background: linear-gradient(90deg, #f0b840, #f59e0b) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4) !important;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .metrics { grid-template-columns: 1fr 1fr; }
    .servers { grid-template-columns: 1fr; }
    .tabs { flex-wrap: wrap; border-radius: 8px; }
    .tab { flex: 1 1 50%; padding: 0.5rem; font-size: 0.75rem; border-bottom: 1px solid var(--border); }
    .stat-grid { grid-template-columns: 1fr; }
    .header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header h1 { font-size: 1.2rem; }
    .btn-sm { width: 100%; text-align: center; }
    .login-wrap { padding: 0; }
    .login-box { border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
    .bars { flex-direction: column; gap: 0.8rem; }
}

@media (max-width: 480px) {
    .metrics { grid-template-columns: 1fr; }
    .tab { flex: 1 1 100%; border-bottom: 1px solid var(--border); }
    .tab:last-child { border-bottom: none; }
}
