/* Fonte e reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050816;
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
}

/* Fundo com gradiente e blur */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, #22c55e33, transparent 55%),
        radial-gradient(circle at top right, #22d3ee2b, transparent 55%),
        radial-gradient(circle at bottom, #4f46e533, transparent 55%);
    filter: blur(4px);
    z-index: -1;
}

/* Container principal */
.login-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Card de login */
.login-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 18px;
    padding: 28px 26px 20px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(148, 163, 184, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Cabeçalho */
.login-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.8);
}

.logo-letter {
    font-weight: 800;
    font-size: 1.4rem;
    color: #0b1120;
}

.login-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Formulário */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 6px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: #e5e7eb;
    font-weight: 500;
}

/* Inputs */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(75, 85, 99, 0.9);
    background-color: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #6b7280;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.6),
        0 0 22px rgba(34, 197, 94, 0.35);
    background-color: rgba(15, 23, 42, 1);
}

/* Wrapper da senha + botão de visualizar */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 38px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.65;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toggle-password:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* Mensagens de erro */
.error-message {
    font-size: 0.78rem;
    color: #f97373;
    min-height: 16px;
}

/* Rodapé do formulário */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #d1d5db;
}

.remember-me input {
    accent-color: #22c55e;
}

.link-button {
    border: none;
    background: none;
    color: #22c55e;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.link-button:hover {
    color: #4ade80;
    opacity: 0.9;
}

/* Botão principal */
.btn-primary {
    width: 100%;
    margin-top: 4px;
    padding: 11px 12px;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #0b1120;
    box-shadow:
        0 10px 22px rgba(34, 197, 94, 0.38),
        0 0 0 1px rgba(15, 23, 42, 0.6);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        0 14px 28px rgba(34, 197, 94, 0.45),
        0 0 0 1px rgba(15, 23, 42, 0.8);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 6px 14px rgba(34, 197, 94, 0.35),
        0 0 0 1px rgba(15, 23, 42, 0.8);
}

/* Rodapé do card */
.login-footer {
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-footer p {
    font-size: 0.78rem;
    color: #6b7280;
}

.version-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: #9ca3af;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        padding: 22px 18px 18px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 1.1rem;
    }

    .login-header p {
        font-size: 0.8rem;
    }
}
