/* ============================================================
   Login — CooperVass Daily Inspection Panel
   ============================================================ */

/* ── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;

    /* Fundo cinza industrial com padrão de engrenagens */
    background-color: #8E9DAA;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='%2367787f' fill-opacity='0.55' d='M72 4l-3.5 13.8a42 42 0 0 0-10 4.1L47 15.7 15.7 47l6.1 11.5a42 42 0 0 0-4.1 10L4 72v16l13.8 3.5a42 42 0 0 0 4.1 10L15.7 113 47 144.3l11.5-6.1a42 42 0 0 0 10 4.1L72 156h16l3.5-13.8a42 42 0 0 0 10-4.1l11.5 6.1 31.3-31.3-6.1-11.5a42 42 0 0 0 4.1-10L156 88V72l-13.8-3.5a42 42 0 0 0-4.1-10l6.1-11.5L113 15.7 101.5 21.8a42 42 0 0 0-10-4.1L88 4H72zm8 36a40 40 0 1 1 0 80 40 40 0 0 1 0-80zm0 14a26 26 0 1 0 0 52 26 26 0 0 0 0-52z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 160 160'%3E%3Cpath fill='%2355676e' fill-opacity='0.4' d='M72 4l-3.5 13.8a42 42 0 0 0-10 4.1L47 15.7 15.7 47l6.1 11.5a42 42 0 0 0-4.1 10L4 72v16l13.8 3.5a42 42 0 0 0 4.1 10L15.7 113 47 144.3l11.5-6.1a42 42 0 0 0 10 4.1L72 156h16l3.5-13.8a42 42 0 0 0 10-4.1l11.5 6.1 31.3-31.3-6.1-11.5a42 42 0 0 0 4.1-10L156 88V72l-13.8-3.5a42 42 0 0 0-4.1-10l6.1-11.5L113 15.7 101.5 21.8a42 42 0 0 0-10-4.1L88 4H72zm8 36a40 40 0 1 1 0 80 40 40 0 0 1 0-80zm0 14a26 26 0 1 0 0 52 26 26 0 0 0 0-52z'/%3E%3C/svg%3E");
    background-position: 0 0, 110px 110px;
    background-size: 200px 200px, 150px 150px;
    padding: max(.6rem, env(safe-area-inset-top)) max(.6rem, env(safe-area-inset-right)) max(.6rem, env(safe-area-inset-bottom)) max(.6rem, env(safe-area-inset-left));
}

/* ── Wrapper centralizado ───────────────────────────────────── */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    animation: fadeUp .4s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Card branco ────────────────────────────────────────────── */
.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,.24);
    padding: 2.75rem 2.5rem 2.25rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    max-height: calc(100vh - 1.2rem);
    overflow: auto;
}

/* ── Logo (imagem SVG) ──────────────────────────────────────── */
.brand-logo {
    margin-bottom: 1.4rem;
}

.brand-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(28,107,58,.35));
}

/* ── Título ─────────────────────────────────────────────────── */
.login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1C6B3A;
    letter-spacing: .14em;
    margin-bottom: 1.85rem;
    position: relative;
}

/* Linha decorativa abaixo do título */
.login-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #1C6B3A;
    border-radius: 2px;
    margin: .6rem auto 0;
    opacity: .4;
}

/* ── Campos de input ────────────────────────────────────────── */
.login-field {
    position: relative;
    margin-bottom: 1rem;
}

.login-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    color: #7a8a94;
    pointer-events: none;
}

.login-input {
    width: 100%;
    padding: .9rem 2.9rem .9rem 2.8rem;
    border: 1.5px solid #dde3e8;
    border-radius: 10px;
    font-size: .93rem;
    font-family: 'Montserrat', sans-serif;
    color: #1a2530;
    outline: none;
    background: #f7f9fb;
    transition: border-color .18s, box-shadow .18s, background .18s;
    min-height: 46px;
}

.login-input:focus {
    border-color: #1C6B3A;
    box-shadow: 0 0 0 3px rgba(28,107,58,.14);
    background: #fff;
}

.login-input::placeholder { color: #b0bac4; }

.login-toggle-pass {
    position: absolute;
    right: .65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #7a8a94;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: color .18s, background .18s;
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.login-toggle-pass:hover {
    color: #1C6B3A;
    background: rgba(28, 107, 58, .08);
}

.login-toggle-pass:focus-visible {
    outline: 2px solid rgba(28, 107, 58, .35);
    outline-offset: 1px;
}

/* ── Mensagem de erro ───────────────────────────────────────── */
.login-erro {
    color: #c0392b;
    font-size: .82rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: .85rem;
    padding: .55rem .8rem;
    background: #fdf2f2;
    border-left: 3px solid #e74c3c;
    border-radius: 6px;
}

/* ── Botão ENTRAR ───────────────────────────────────────────── */
.btn-entrar {
    width: 100%;
    padding: .95rem;
    margin-top: .4rem;
    background: #1C6B3A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .14em;
    cursor: pointer;
    transition: background .18s, transform .1s, box-shadow .18s;
    box-shadow: 0 4px 16px rgba(28,107,58,.38);
    min-height: 46px;
}

.btn-entrar:hover  { background: #155430; box-shadow: 0 6px 20px rgba(28,107,58,.45); }
.btn-entrar:active { transform: scale(.97); }
.btn-entrar:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Footer ─────────────────────────────────────────────────── */
.login-footer {
    margin-top: 1.6rem;
    font-size: .76rem;
    color: rgba(255,255,255,.72);
    letter-spacing: .05em;
}

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card  { padding: 2.25rem 1.5rem 2rem; }
    .brand-img   { width: 78px; height: 78px; }
    .login-title { font-size: .88rem; }
}

@media (max-height: 760px) {
    body {
        justify-content: flex-start;
    }

    .login-wrapper {
        padding-top: .8rem;
        padding-bottom: .8rem;
    }

    .login-card {
        padding: 1.7rem 1.4rem 1.45rem;
        max-height: none;
    }

    .brand-logo {
        margin-bottom: .85rem;
    }

    .brand-img {
        width: 72px;
        height: 72px;
    }

    .login-title {
        margin-bottom: 1.15rem;
    }
}
