* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cadastro-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 480px;
}

.cadastro-header {
    text-align: center;
    margin-bottom: 25px;
}

.cadastro-header h1 {
    color: hsl(220, 73%, 20%);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.system-description {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent,#e3a627, transparent);
    margin: 15px 0;
}

.form-title {
    color: hsl(220, 73%, 20%);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.cadastro-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: hsl(220, 73%, 20%);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: hsl(220, 73%, 20%);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.password-group {
    position: relative;
}

.password-input-container {
    position: relative;
    margin-bottom: 8px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.password-toggle:hover {
    background-color: #e8ecef;
}

.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background-color: #e8ecef;
    border-radius: 2px;
    margin-bottom: 4px;
    overflow: hidden;
    position: relative;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background-color: #e74c3c;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 33%;
    background-color: #e74c3c;
}

.strength-bar.medium::before {
    width: 66%;
    background-color: #f39c12;
}

.strength-bar.strong::before {
    width: 100%;
    background-color: #27ae60;
}

.strength-text {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
    accent-color: #e3a627;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.4;
    cursor: pointer;
    flex: 1;
}

.cadastro-btn {
    width: 100%;
    background: #e3a627;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cadastro-btn:hover {
    background: #d1941f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 166, 39, 0.4);
}

.cadastro-btn:active {
    transform: translateY(0);
}

.cadastro-footer {
    text-align: center;
    border-top: 1px solid #e8ecef;
    padding-top: 20px;
}

.cadastro-footer p {
    color: #7f8c8d;
    margin-bottom: 8px;
}

.link {
    color: #d1941f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link:hover {
    color: hsl(220, 73%, 15%);
    text-decoration: underline;
}

/* Estados de validação */
.form-control.valid {
    border-color: #27ae60;
}

.form-control.invalid {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

.success-message {
    color: #27ae60;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* Loading state */
.cadastro-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.cadastro-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 480px) {
    .cadastro-container {
        padding: 30px 25px;
        margin: 10px;
    }
    
    .cadastro-header h1 {
        font-size: 1.7rem;
    }
    
    .form-title {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 12px 14px;
    }
    
    .cadastro-btn {
        padding: 14px;
    }
}