/* =========================================================
   PLUG IMPRESSOS — Login Page Styles
   static/css/login.css
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600&display=swap');

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

/* ---- Animated low-poly background inspired by the Plug logo ---- */
body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    background: #111;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Polygon canvas fills the background */
#poly-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* ---- Login card ---- */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 16px;
}

.login-card {
    background: rgba(15, 15, 15, 0.92);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 40px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

/* ---- Logo area ---- */
.brand-block {
    text-align: center;
    margin-bottom: 32px;
}

.brand-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    background:
        linear-gradient(#0f0f0f, #0f0f0f) padding-box,
        conic-gradient(#e43a89, #9c27b0, #3f51b5, #00bcd4, #4caf50, #ffeb3b, #ff9800, #f44336, #e43a89) border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    animation: spin-ring 8s linear infinite;
}

@keyframes spin-ring {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.brand-circle .brand-word {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: #f0f0f0;
    letter-spacing: 2px;
    line-height: 1;
}
.brand-circle .brand-sub {
    font-family: 'DM Mono', monospace;
    font-size: 7px;
    color: #888;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.brand-tagline {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #555;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Form fields ---- */
.field-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.field-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    color: #f0f0f0;
    padding: 11px 14px;
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    border-radius: 2px;
}
.field-input:focus {
    border-color: #e8ff47;
    box-shadow: 0 0 0 2px rgba(232,255,71,0.08);
}

.field-group { margin-bottom: 18px; }

/* ---- Buttons ---- */
.btn-enter {
    width: 100%;
    background: #e8ff47;
    color: #000;
    border: none;
    padding: 13px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    border-radius: 2px;
    margin-top: 6px;
}
.btn-enter:hover { opacity: .88; }
.btn-enter:active { transform: scale(.99); }

.btn-change-pass {
    width: 100%;
    background: none;
    border: 1px solid #2e2e2e;
    color: #666;
    padding: 10px;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .2s;
    border-radius: 2px;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
    display: block;
}
.btn-change-pass:hover { border-color: #ff6b35; color: #ff6b35; }

/* ---- Alert / error ---- */
.alert-error {
    background: rgba(248,113,113,0.1);
    border: 1px solid #f87171;
    border-left: 3px solid #f87171;
    color: #f87171;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    padding: 10px 14px;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* ---- Footer ---- */
.login-footer {
    text-align: center;
    margin-top: 22px;
    font-family: 'DM Mono', monospace;
    font-size: 9px;
    color: #333;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding: 24px 0;
    }
    .login-wrapper {
        max-width: 100%;
        padding: 14px;
    }
    .login-card {
        padding: 28px 22px;
    }
    .brand-block {
        margin-bottom: 24px;
    }
    .brand-circle {
        width: 72px;
        height: 72px;
    }
    .btn-enter {
        font-size: 18px;
    }
}

@media (max-height: 620px) {
    body {
        align-items: flex-start;
        padding: 16px 0;
    }
    .brand-block {
        margin-bottom: 20px;
    }
    .login-card {
        padding-top: 26px;
        padding-bottom: 26px;
    }
}
