﻿@import url('/css/rossi.font.css');

* {
    box-sizing: border-box;
    font-family: 'Inter',sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--page);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] .form-field::before { filter: brightness(0) invert(.78); }
.login-brand-logo {
    display: block;
    width: min(390px, calc(100% - 24px));
    aspect-ratio: 8 / 3;
    margin: 0 auto;
    background: var(--header-brand-ink);
    -webkit-mask: url('../Images/rossi-pedido-web.png') center / contain no-repeat;
    mask: url('../Images/rossi-pedido-web.png') center / contain no-repeat;
}
html[data-theme="light"] .login-brand-logo {
    background: transparent url('../Images/rossi-pedido-web.png') center / contain no-repeat;
    -webkit-mask: none;
    mask: none;
}

.group {
    position: relative;
    margin-bottom: 25px;
}

hgroup {
    text-align: center;
    margin-top: 3em;
}

form {
    width: min(400px, calc(100% - 24px));
    margin: 2em auto;
    padding: 10px 20px 10px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: none;
}


    form input {
        font-family: inherit;
        width: 100%;
        outline: none;
        background-color: var(--control-bg);
        border: 1px solid var(--border);
        border-radius: 5px;
        display: block;
        padding: 0.9rem 0.7rem;
        font-size: 17px;
        color: var(--text);
        text-indent: 40px;
    }

        form input:focus {
            border-color: var(--primary);
            box-shadow: none;
        }


    form .form-field::before {
        font-size: 20px;
        position: absolute;
        left: 15px;
        top: 17px;
        color: var(--muted);
        content: " ";
        display: block;
        background-size: cover;
        background-repeat: no-repeat;
    }

    form .form-field:nth-child(1)::before {
        background-image: url(/icons/corporate-icon.png);
        width: 20px;
        height: 20px;
        top: 15px;
    }

    form .form-field:nth-child(2)::before {
        background-image: url(/icons/user-icon.png);
        width: 20px;
        height: 20px;
        top: 15px;
    }

    form .form-field:nth-child(3)::before {
        background-image: url(/icons/lock-icon.png);
        top: 10px;
        width: 20px;
        height: 20px;
    }

    form .form-field {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        margin-bottom: 1rem;
        position: relative;
    }

    form .btn {
        outline: none;
        border: none;
        cursor: pointer;
        display: inline-block;
        margin: 0 auto;
        padding: 0.9rem 2.5rem;
        text-align: center;
        background-color: var(--action-fill);
        color: var(--action-text);
        border-radius: 4px;
        box-shadow: none;
        font-size: 17px;
        width: 100%;
        margin-top: 10px;
    }

        form .btn:hover {
            background: var(--action-fill-hover);
        }



footer {
    text-align: center;
}

    footer p {
        color: var(--muted);
        font-size: 13px;
        letter-spacing: .4px;
    }

    footer a {
        color: var(--primary);
        text-decoration: none;
        transition: all .2s ease;
    }

        footer a:hover {
            color: var(--primary-hover);
            text-decoration: underline;
        }

    footer img {
        width: 80px;
        transition: all .2s ease;
    }

        footer img:hover {
            opacity: .83;
        }

        footer img:focus, footer a:focus {
            outline: none;
        }



.pwa-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 900px;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 12px 35px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);
    display: none;
    z-index: 999999;
    animation: fadeUp .35s ease;
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pwa-icon {
    font-size: 42px;
}

.pwa-text {
    flex: 1;
}

    .pwa-text strong {
        display: block;
        color: var(--primary);
        font-size: 18px;
    }

    .pwa-text span {
        display: block;
        color: var(--muted);
        margin-top: 5px;
    }

.pwa-buttons {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: var(--action-fill);
    color: var(--action-text);
    border: 1px solid var(--action-border);
    border-radius: 5px;
    padding: 10px 18px;
    cursor: pointer;
}

    .btn-primary:hover {
        background: var(--action-fill-hover);
    }

.btn-secondary {
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 10px 18px;
    cursor: pointer;
}

.btn-secondary:hover {
        background: var(--surface-hover);
    }

/* O login e o convite de instalação usam os mesmos botões do ERP no tema Claro. */
html[data-theme="light"][data-theme-variant="v1"] form .btn,
html[data-theme="light"][data-theme-variant="v1"] .btn-primary,
html[data-theme="light"][data-theme-variant="v1"] .btn-secondary {
    min-height:34px;
    padding:0 12px;
    border:1px solid var(--border);
    border-radius:5px;
    box-shadow:none;
    font-size:13px;
    font-weight:500;
}
html[data-theme="light"][data-theme-variant="v1"] form .btn,
html[data-theme="light"][data-theme-variant="v1"] .btn-primary {
    border-color:var(--primary);
    color:#fff;
    background:var(--primary);
}
html[data-theme="light"][data-theme-variant="v1"] .btn-secondary {
    color:var(--text);
    background:var(--summary-button-bg);
}
html[data-theme="light"][data-theme-variant="v1"] form .btn:hover,
html[data-theme="light"][data-theme-variant="v1"] .btn-primary:hover {
    border-color:var(--primary-hover);
    background:var(--primary-hover);
}
html[data-theme="light"][data-theme-variant="v1"] .btn-secondary:hover {
    border-color:var(--primary);
    color:var(--primary);
    background:var(--summary-button-hover);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@media(max-width:650px) {

    .pwa-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .pwa-buttons {
        width: 100%;
    }

        .pwa-buttons button {
            flex: 1;
        }
}

/* Mantém o mesmo enquadramento responsivo das telas de login dos demais módulos. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: clamp(16px, 3vw, 32px);
}

hgroup {
    width: min(390px, 100%);
    margin: clamp(24px, 7vh, 56px) auto 0;
}

form {
    border-radius: 12px;
    margin: clamp(24px, 4vh, 36px) auto 20px;
}

footer {
    margin-top: auto;
    padding-top: 16px;
}

@media (max-width: 650px) {
    body {
        padding: 16px;
    }

    hgroup {
        margin-top: 20px;
    }

    form {
        margin-top: 24px;
        border-radius: 10px;
    }
}
