/* ==========================================================
   DPL AGUA — LOGIN
   INTERFAZ TECNOLÓGICA
========================================================== */

:root {
    --bg-main: #030b17;
    --bg-secondary: #061629;
    --panel: rgba(7, 24, 43, 0.88);

    --blue: #2563eb;
    --blue-light: #60a5fa;

    --cyan: #22d3ee;
    --green: #10b981;

    --white: #ffffff;

    --text-main: #f8fafc;
    --text-secondary: #a7bad0;
    --text-muted: #667d95;

    --border: rgba(148, 185, 225, 0.13);
}


/* ==========================================================
   RESET
========================================================== */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;

    min-height: 100%;

    background: var(--bg-main);
}

body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}


/* ==========================================================
   BODY
========================================================== */

.login-page {
    position: relative;

    width: 100%;
    min-height: 100vh;

    overflow-x: hidden;
    overflow-y: auto;

    color: var(--text-main);

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(37, 99, 235, 0.18),
            transparent 32%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(34, 211, 238, 0.08),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #020812 0%,
            #051426 50%,
            #071c31 100%
        );
}


/* ==========================================================
   FONDO
========================================================== */

.login-background {
    position: fixed;

    inset: 0;

    z-index: 0;

    overflow: hidden;

    pointer-events: none;
}


.login-grid {
    position: absolute;

    inset: 0;

    background-image:
        linear-gradient(
            rgba(96, 165, 250, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(96, 165, 250, 0.035) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    opacity: 0.55;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent
        );
}


.login-scan {
    position: absolute;

    top: -200px;
    left: 0;

    width: 100%;
    height: 160px;

    background:
        linear-gradient(
            transparent,
            rgba(34, 211, 238, 0.035),
            transparent
        );

    animation: scan 9s linear infinite;
}


@keyframes scan {

    from {
        transform: translateY(-200px);
    }

    to {
        transform: translateY(calc(100vh + 400px));
    }

}


.login-orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(90px);
}


.login-orb-one {
    top: 10%;
    left: 12%;

    width: 360px;
    height: 360px;

    background: rgba(37, 99, 235, 0.16);
}


.login-orb-two {
    right: 5%;
    bottom: 8%;

    width: 400px;
    height: 400px;

    background: rgba(6, 182, 212, 0.09);
}


/* ==========================================================
   LAYOUT PRINCIPAL
========================================================== */

.login-layout {
    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        minmax(540px, 1fr)
        minmax(420px, 520px);

    width: 100%;
    min-height: 100vh;
}


/* ==========================================================
   PANEL IZQUIERDO
========================================================== */

.login-brand-panel {
    position: relative;

    display: flex;

    align-items: center;

    min-width: 0;

    padding:
        50px
        clamp(45px, 6vw, 90px);
}


.login-brand-panel::after {
    content: "";

    position: absolute;

    top: 8%;
    right: 0;

    width: 1px;
    height: 84%;

    background:
        linear-gradient(
            transparent,
            rgba(96, 165, 250, 0.18),
            transparent
        );
}


.brand-wrapper {
    width: 100%;
    max-width: 700px;

    margin: auto;
}


/* ==========================================================
   LOGO
========================================================== */

.brand-header {
    display: flex;

    align-items: center;

    gap: 14px;
}


.brand-logo {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    flex-shrink: 0;

    overflow: hidden;

    border:
        1px solid rgba(147, 197, 253, 0.2);

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #087da8
        );

    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.28);
}


.brand-logo-main {
    position: relative;

    z-index: 2;

    color: white;

    font-size: 14px;

    font-weight: 900;

    letter-spacing: 1px;
}


.brand-logo-water {
    position: absolute;

    right: -7px;
    bottom: -10px;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background:
        rgba(34, 211, 238, 0.32);
}


.brand-name {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.brand-name strong {
    color: #ffffff;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1px;
}


.brand-name span {
    color: var(--text-muted);

    font-size: 10.5px;
}


/* ==========================================================
   HERO
========================================================== */

.brand-hero {
    margin-top: 65px;
}


.system-label {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: #62a9ff;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.8px;
}


.system-label-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--cyan);

    box-shadow:
        0 0 12px rgba(34, 211, 238, 0.8);
}


.brand-hero h1 {
    max-width: 650px;

    margin:
        18px 0 0;

    color: white;

    font-size:
        clamp(42px, 4vw, 62px);

    font-weight: 700;

    letter-spacing: -2.5px;

    line-height: 1;
}


.brand-hero h1 span {
    display: block;

    margin-top: 7px;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #a7cbff,
            #63e4f4
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.brand-hero p {
    max-width: 570px;

    margin-top: 22px;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.75;
}


/* ==========================================================
   CONSOLA
========================================================== */

.system-console {
    position: relative;

    width: 100%;
    max-width: 620px;

    margin-top: 40px;

    overflow: hidden;

    border:
        1px solid rgba(148, 185, 225, 0.13);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(10, 32, 55, 0.78),
            rgba(4, 17, 31, 0.74)
        );

    backdrop-filter:
        blur(18px);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}


.system-console::before {
    content: "";

    position: absolute;

    top: 0;
    left: 15%;

    width: 70%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--blue),
            var(--cyan),
            transparent
        );
}


/* ==========================================================
   CONSOLA HEADER
========================================================== */

.console-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 17px 19px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.055);
}


.console-header > div:first-child {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


.console-overline {
    color: #5f7892;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.6px;
}


.console-header strong {
    color: #dceafa;

    font-size: 12px;

    font-weight: 650;
}


.console-live {
    display: flex;

    align-items: center;

    gap: 7px;

    padding: 6px 9px;

    border:
        1px solid rgba(16, 185, 129, 0.18);

    border-radius: 100px;

    background:
        rgba(16, 185, 129, 0.06);

    color: #65dbb3;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 0.6px;
}


.console-live span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 8px var(--green);
}


/* ==========================================================
   CONSOLA MAIN
========================================================== */

.console-main {
    display: grid;

    grid-template-columns:
        185px minmax(0, 1fr);
}


.water-monitor {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 190px;

    overflow: hidden;

    border-right:
        1px solid rgba(255, 255, 255, 0.05);
}


.water-monitor-grid {
    position: absolute;

    inset: 0;

    background-image:
        linear-gradient(
            rgba(96, 165, 250, 0.06) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(96, 165, 250, 0.06) 1px,
            transparent 1px
        );

    background-size: 21px 21px;
}


/* ==========================================================
   CÍRCULO MONITOR
========================================================== */

.monitor-ring {
    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 116px;
    height: 116px;

    border:
        1px solid rgba(59, 130, 246, 0.3);

    border-radius: 50%;

    box-shadow:
        0 0 25px rgba(37, 99, 235, 0.1),
        inset 0 0 25px rgba(37, 99, 235, 0.08);
}


.monitor-ring::before {
    content: "";

    position: absolute;

    inset: 8px;

    border:
        1px dashed rgba(34, 211, 238, 0.25);

    border-radius: 50%;

    animation:
        rotateRing 14s linear infinite;
}


.monitor-ring-inner {
    position: relative;

    z-index: 4;

    display: flex;

    flex-direction: column;

    align-items: center;

    color: white;
}


.monitor-ring-inner svg {
    display: block;

    width: 24px !important;
    height: 24px !important;

    max-width: 24px;
    max-height: 24px;

    margin-bottom: 5px;

    color: #4fd9ee;
}


.monitor-ring-inner strong {
    color: white;

    font-size: 18px;
}


.monitor-ring-inner small {
    margin-top: 3px;

    color: #657c93;

    font-size: 7px;

    font-weight: 800;

    letter-spacing: 1px;
}


.signal {
    position: absolute;

    z-index: 4;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--cyan);

    box-shadow:
        0 0 8px var(--cyan);
}


.signal-one {
    top: 28%;
    left: 20%;
}


.signal-two {
    top: 30%;
    right: 18%;
}


.signal-three {
    left: 30%;
    bottom: 23%;
}


@keyframes rotateRing {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================================
   ESTADÍSTICAS
========================================================== */

.console-stats {
    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 14px 20px;
}


.console-stat {
    display: grid;

    grid-template-columns:
        36px minmax(0, 1fr);

    align-items: center;

    gap: 11px;

    padding: 11px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.045);
}


.console-stat:last-child {
    border-bottom: none;
}


.stat-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border:
        1px solid rgba(96, 165, 250, 0.14);

    border-radius: 9px;

    background:
        rgba(37, 99, 235, 0.09);

    color: #76aef7;
}


.stat-icon svg {
    display: block;

    width: 16px !important;
    height: 16px !important;
}


.console-stat div {
    display: flex;

    flex-direction: column;

    gap: 3px;

    min-width: 0;
}


.console-stat small {
    color: #5f7891;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.7px;

    text-transform: uppercase;
}


.console-stat strong {
    overflow: hidden;

    color: #d5e4f3;

    font-size: 10.5px;

    font-weight: 600;

    text-overflow: ellipsis;
}


/* ==========================================================
   CONSOLA FOOTER
========================================================== */

.console-footer {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    border-top:
        1px solid rgba(255, 255, 255, 0.05);

    background:
        rgba(0, 0, 0, 0.08);
}


.console-node {
    display: flex;

    align-items: center;

    gap: 5px;

    padding: 10px 12px;

    color: #587088;

    font-size: 7px;

    white-space: nowrap;
}


.console-node + .console-node {
    border-left:
        1px solid rgba(255, 255, 255, 0.04);
}


.console-node > span {
    width: 5px;
    height: 5px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--green);
}


.console-node strong {
    color: #849bad;

    font-size: 7px;
}


/* ==========================================================
   BRAND FOOTER
========================================================== */

.brand-footer {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 27px;

    color: #536a80;

    font-size: 9px;
}


.brand-footer > span:first-child {
    color: #8196aa;

    font-weight: 800;
}


.footer-divider {
    width: 1px;
    height: 11px;

    background:
        rgba(255, 255, 255, 0.1);
}


/* ==========================================================
   PANEL DERECHO
========================================================== */

.login-form-panel {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 0;

    padding: 40px 45px;
}


/* ==========================================================
   CARD LOGIN
========================================================== */

.login-card {
    position: relative;

    width: 100%;
    max-width: 430px;

    overflow: hidden;

    padding:
        37px 34px 24px;

    border:
        1px solid rgba(147, 197, 253, 0.14);

    border-radius: 21px;

    background:
        linear-gradient(
            145deg,
            rgba(12, 32, 54, 0.91),
            rgba(5, 20, 36, 0.86)
        );

    backdrop-filter:
        blur(22px);

    box-shadow:
        0 35px 80px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}


.login-card-accent {
    position: absolute;

    top: 0;
    left: 20%;

    width: 60%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #3b82f6,
            #22d3ee,
            transparent
        );
}


.login-card-glow {
    position: absolute;

    top: -100px;
    right: -100px;

    width: 230px;
    height: 230px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(37, 99, 235, 0.14),
            transparent 70%
        );

    pointer-events: none;
}


/* ==========================================================
   MOBILE BRAND
========================================================== */

.mobile-brand {
    display: none;

    align-items: center;

    gap: 11px;

    margin-bottom: 28px;
}


.mobile-logo {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #0891b2
        );

    color: white;

    font-size: 12px;

    font-weight: 900;
}


.mobile-brand > div:last-child {
    display: flex;

    flex-direction: column;

    gap: 2px;
}


.mobile-brand strong {
    color: white;

    font-size: 11px;
}


.mobile-brand span {
    color: #71879c;

    font-size: 9px;
}


/* ==========================================================
   HEADER LOGIN
========================================================== */

.login-card-header {
    position: relative;

    z-index: 2;
}


.access-label {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #6da9fa;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.5px;
}


.access-label svg {
    display: block;

    width: 13px !important;
    height: 13px !important;
}


.login-card-header h2 {
    margin:
        14px 0 0;

    color: white;

    font-size: 34px;

    font-weight: 700;

    letter-spacing: -1px;
}


.login-card-header p {
    max-width: 330px;

    margin:
        10px 0 0;

    color: #98adc1;

    font-size: 12px;

    line-height: 1.6;
}


/* ==========================================================
   MENSAJES
========================================================== */

.login-messages {
    margin-top: 20px;
}


.login-alert {
    display: flex;

    align-items: center;

    gap: 9px;

    padding: 11px 13px;

    border:
        1px solid rgba(239, 68, 68, 0.18);

    border-radius: 10px;

    background:
        rgba(127, 29, 29, 0.12);

    color: #fecaca;

    font-size: 10.5px;
}


.alert-symbol {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 19px;
    height: 19px;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        rgba(239, 68, 68, 0.14);

    font-size: 9px;

    font-weight: 800;
}


/* ==========================================================
   FORM
========================================================== */

.login-form {
    position: relative;

    z-index: 2;

    margin-top: 27px;
}


.login-field {
    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-bottom: 17px;
}


.login-field label {
    color: #c4d3e0;

    font-size: 11px;

    font-weight: 650;
}


/* ==========================================================
   INPUT
========================================================== */

.login-input-wrapper {
    position: relative;
}


.login-input-icon {
    position: absolute;

    top: 50%;
    left: 14px;

    z-index: 3;

    display: flex;

    align-items: center;

    transform:
        translateY(-50%);

    color: #6688ad;

    pointer-events: none;
}


.login-input-icon svg {
    display: block;

    width: 16px !important;
    height: 16px !important;
}


.login-input-wrapper input {
    display: block;

    width: 100%;
    height: 50px;

    padding:
        0 15px 0 43px;

    border:
        1px solid rgba(139, 175, 215, 0.15);

    border-radius: 11px;

    background:
        rgba(3, 14, 27, 0.55);

    color: white;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition: 0.2s;
}


.login-input-wrapper input::placeholder {
    color: #526b82;
}


.login-input-wrapper input:hover {
    border-color:
        rgba(96, 165, 250, 0.27);
}


.login-input-wrapper input:focus {
    border-color:
        rgba(59, 130, 246, 0.7);

    background:
        rgba(5, 23, 42, 0.82);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


.login-input-wrapper:focus-within
.login-input-icon {
    color: #60a5fa;
}


/* ==========================================================
   ERROR FIELD
========================================================== */

.login-field-error {
    display: flex;

    align-items: center;

    gap: 5px;

    color: #fca5a5;

    font-size: 10px;
}


/* ==========================================================
   BUTTON
========================================================== */

.login-button {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 100%;
    height: 51px;

    margin-top: 8px;

    overflow: hidden;

    border: none;

    border-radius: 11px;

    background:
        linear-gradient(
            110deg,
            #1d5cda,
            #2563eb 50%,
            #078fae
        );

    color: white;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 13px 26px rgba(37, 99, 235, 0.23);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.login-button::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 50%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent
        );

    transform:
        skewX(-20deg);

    transition:
        left 0.6s;
}


.login-button:hover::before {
    left: 150%;
}


.login-button:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 18px 34px rgba(37, 99, 235, 0.32);
}


.login-button svg {
    display: block;

    width: 16px !important;
    height: 16px !important;

    transition:
        transform 0.2s;
}


.login-button:hover svg {
    transform:
        translateX(3px);
}


/* ==========================================================
   SECURITY BOX
========================================================== */

.security-box {
    display: grid;

    grid-template-columns:
        35px minmax(0, 1fr);

    gap: 10px;

    margin-top: 22px;

    padding: 13px;

    border:
        1px solid rgba(147, 197, 253, 0.08);

    border-radius: 11px;

    background:
        rgba(2, 12, 24, 0.31);
}


.security-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border:
        1px solid rgba(16, 185, 129, 0.13);

    border-radius: 9px;

    background:
        rgba(16, 185, 129, 0.06);

    color: #5cd6ad;
}


.security-icon svg {
    display: block;

    width: 16px !important;
    height: 16px !important;
}


.security-box strong {
    color: #bccddd;

    font-size: 10px;
}


.security-box p {
    margin:
        4px 0 0;

    color: #688097;

    font-size: 9.5px;

    line-height: 1.5;
}


/* ==========================================================
   FOOTER LOGIN
========================================================== */

.login-card-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-top: 22px;

    padding-top: 16px;

    border-top:
        1px solid rgba(255, 255, 255, 0.05);

    color: #536b81;

    font-size: 8px;
}


.secure-connection {
    display: flex;

    align-items: center;

    gap: 6px;
}


.secure-connection > span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 7px rgba(16, 185, 129, 0.6);
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1150px) {

    .login-layout {
        grid-template-columns:
            minmax(450px, 1fr)
            minmax(390px, 470px);
    }

    .login-brand-panel {
        padding:
            40px;
    }

    .brand-hero h1 {
        font-size: 48px;
    }

}


/* ==========================================================
   MOBILE / TABLET
========================================================== */

@media (max-width: 900px) {

    .login-layout {
        display: block;

        min-height: 100vh;
    }


    .login-brand-panel {
        display: none;
    }


    .login-form-panel {
        min-height: 100vh;

        padding:
            40px 20px;
    }


    .mobile-brand {
        display: flex;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 520px) {

    .login-form-panel {
        align-items: flex-start;

        padding:
            25px 13px;
    }


    .login-card {
        padding:
            28px 20px 20px;

        border-radius: 18px;
    }


    .login-card-header h2 {
        font-size: 29px;
    }


    .login-input-wrapper input,
    .login-button {
        height: 49px;
    }

}


/* ==========================================================
   REDUCE MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

}
