:root {
    --primary: #075e54;
    --primary-dark: #06483f;
    --secondary: #341544;
    --text: #111827;
    --muted: #6b7280;
    --card: rgba(255, 255, 255, 0.94);
    --card-border: rgba(255, 255, 255, 0.35);
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --white: #ffffff;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    --radius-lg: 28px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background:
        linear-gradient(
            120deg,
            rgba(7, 94, 84, 0.88),
            rgba(52, 21, 68, 0.72)
        ),
        url('../fundo08.jpg') center center / cover no-repeat;
    overflow-x: hidden;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(360px, 430px) 1fr;
    gap: clamp(24px, 5vw, 80px);
    align-items: center;
    padding:
        max(24px, env(safe-area-inset-top))
        max(24px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom))
        max(24px, env(safe-area-inset-left));
}

.login-card {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: clamp(28px, 4vw, 44px);
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: var(--white);
    font-size: 25px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(7, 94, 84, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.brand-text span {
    font-size: 13px;
    color: var(--muted);
}

.login-header {
    margin-bottom: 24px;
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 30px);
    line-height: 1.15;
}

.login-header p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.error-box {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-group input {
    width: 100%;
    min-height: 54px;
    padding: 0 15px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(7, 94, 84, 0.14);
    background: #ffffff;
}

#token {
    text-transform: uppercase;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 68px;
}

.show-password {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    min-width: 48px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.login-button {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(7, 94, 84, 0.32);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.login-button:hover {
    filter: brightness(1.05);
    box-shadow: 0 18px 36px rgba(7, 94, 84, 0.4);
}

.login-button:active {
    transform: scale(0.98);
}

.register-link {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.register-link a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
}

.register-link a:hover {
    text-decoration: underline;
}

.privacy-note {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
}

.info-side {
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content {
    max-width: 650px;
}

.tagline {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.info-side h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.03;
    letter-spacing: -1.8px;
}

.info-side p {
    margin: 0;
    max-width: 560px;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.features div {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.features strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
}

.features span {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
}

@media (display-mode: standalone) {
    body {
        background-attachment: scroll;
    }

    .login-shell {
        padding-top: max(22px, env(safe-area-inset-top));
        padding-bottom: max(22px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: start;
    }

    .login-card {
        max-width: 520px;
        margin: 0 auto;
        order: 1;
    }

    .info-side {
        order: 2;
        text-align: center;
    }

    .info-content {
        max-width: 560px;
    }

    .info-side h2 {
        font-size: clamp(30px, 9vw, 46px);
        letter-spacing: -1px;
    }

    .features {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 520px) {
    body {
        background-position: center top;
    }

    .login-shell {
        padding:
            max(14px, env(safe-area-inset-top))
            max(14px, env(safe-area-inset-right))
            max(14px, env(safe-area-inset-bottom))
            max(14px, env(safe-area-inset-left));
    }

    .login-card {
        border-radius: 24px;
        padding: 24px 18px;
    }

    .brand-area {
        margin-bottom: 26px;
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .form-group input,
    .login-button {
        min-height: 54px;
        font-size: 15px;
    }

    .info-side {
        display: none;
    }
}

@media (max-height: 680px) and (max-width: 900px) {
    .login-shell {
        align-items: start;
    }

    .login-card {
        margin-top: 0;
    }

    .privacy-note {
        display: none;
    }
}