/* ============================================================
   LOGIN.CSS - Página de login standalone (sem layout)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 40%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    -webkit-font-smoothing: antialiased;
}

/* Círculos decorativos */
.circle {
    position: fixed;
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
}

.circle1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a78bfa, transparent);
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #4ade80, transparent);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.circle3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, #c4b5fd, transparent);
    top: 50%;
    left: 40%;
    opacity: 0.10;
    animation: float 6s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-20px) scale(1.05); }
}

/* Container */
.container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
}

/* Card */
.card {
    background: rgba(255,255,255,.97);
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 2.5rem;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #7c3aed, #4ade80);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px rgba(124,58,237,.40);
}

.logo-icon i {
    font-size: 2rem;
    color: #fff;
}

.logo-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #18181b;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: #71717a;
}

/* Alert container */
#alertContainer {
    margin-bottom: 1rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    border: 1px solid transparent;
    margin-bottom: 0.75rem;
}

.alert-danger {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

/* Form Bootstrap (standalone) */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3f3f46;
    margin-bottom: 0.375rem;
}

.form-label .input-icon {
    color: #7c3aed;
    margin-right: 0.375rem;
    font-size: 0.8rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.6rem 0.875rem;
    font-size: 1rem;
    font-family: inherit;
    color: #18181b;
    background: #fafafa;
    border: 1.5px solid #d4d4d8;
    border-radius: 0.625rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.form-control::placeholder { color: #a1a1aa; }

.form-control:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
    background: #fff;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 17px;
    height: 17px;
    accent-color: #7c3aed;
    cursor: pointer;
    border-radius: 4px;
}

.form-check-label {
    font-size: 0.875rem;
    color: #52525b;
    cursor: pointer;
    user-select: none;
}

/* Botão */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(124,58,237,.40);
    position: relative;
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.92;
    box-shadow: 0 6px 20px rgba(124,58,237,.55);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner dentro do botão */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading span:first-child { display: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Link de registro/esqueci senha */
.auth-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #71717a;
}

.auth-link a {
    color: #7c3aed;
    font-weight: 600;
    text-decoration: none;
}

.auth-link a:hover { text-decoration: underline; }

/* Responsivo */
@media (max-width: 480px) {
    .card-body { padding: 1.75rem 1.25rem; }
    .logo-icon { width: 60px; height: 60px; }
    .logo-icon i { font-size: 1.5rem; }
    .logo-title { font-size: 1.375rem; }
}
