/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Corpo */
body { font-family: 'Segoe UI', sans-serif; background-color: #1c1c1e; color: #FFF; line-height: 1.6; text-align: center; padding-bottom: 50px; }

/* TOPO */
.topo-logo { background: linear-gradient(135deg, #4B1D8C, #6F28A8); margin: 5px; padding: 40px 10px; text-align: center; color: white; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); }
.texto-logo h1 { font-size: 3rem; font-weight: bold; letter-spacing: 2px; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
.maluma { color: #ffffff; text-shadow: 0 0 4px rgba(255, 255, 255, 0.5); }
.pay { color: #FFD700; text-shadow: 0 0 12px rgba(255, 215, 0, 0.8); }
.subtexto { color: rgba(255, 255, 255, 0.7); margin-top: -10px; font-size: 1.1rem; font-weight: 300; }

/* Botões topo */
.topo-botoes { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 20px; margin-top: 10px; flex-wrap: wrap; }
.topo-botoes button { background-color: rgba(255, 255, 255, 0.1); color: white; border: 1px solid #fff; padding: 8px 14px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 5px; }
.topo-botoes button:hover { background-color: rgba(255, 255, 255, 0.2); }

/* Conteúdo */
.apresentacao { padding: 30px 20px; }
h2 { font-size: 1.8rem; color: #FFD700; margin-bottom: 10px; }
h3 { color: #a78bfa; margin: 25px 0 10px; font-size: 1.4rem; }
.slogan { font-size: 1.1rem; color: #ccc; margin-bottom: 30px; }
section { margin-bottom: 30px; padding: 0 10px; }
section p, section ul { color: #ddd; font-size: 1rem; margin: 10px 0; }
ul { list-style: none; padding: 0; }
li { margin-bottom: 10px; }

/* Rodapé */
.rodape { background-color: #111; color: #777; font-size: 0.9rem; padding: 20px 0; position: relative; bottom: 0; width: 100%; }

/* POPUP MENSAGEM */
#popup { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); }
#popup .popup-content { background-color: #fff; color: #333; margin: 15% auto; padding: 30px 20px; border-radius: 10px; width: 90%; max-width: 400px; text-align: center; position: relative; box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }

/* FORMULÁRIO MELHORADO */
#formCadastro { display: none; position: fixed; z-index: 9998; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); animation: fadeInForm 0.3s ease-out; }
#formCadastro .popup-content, #formCadastro .popup-content.form-melhorado { background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%); margin: 3% auto; padding: 30px; border-radius: 20px; width: 95%; max-width: 500px; max-height: 95vh; overflow-y: auto; position: relative; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6); border: 2px solid #FFD700; color: #fff; animation: slideInForm 0.4s ease-out; text-align: center; }

.form-header { text-align: center; margin-bottom: 25px; color: #FFD700; }
.form-header h3 { font-size: 1.8rem; margin-bottom: 8px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); background: linear-gradient(45deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.form-header p { color: #ccc; font-size: 0.9rem; opacity: 0.8; }

/* INPUT GROUPS */
.input-group { margin-bottom: 18px; position: relative; }
.input-row { display: flex; gap: 12px; margin-bottom: 18px; }
.input-group label { display: block; margin-bottom: 6px; color: #FFD700; font-weight: 600; font-size: 0.85rem; text-align: left; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.input-group input { width: 100%; padding: 12px 15px; border: 2px solid #444; border-radius: 12px; background: linear-gradient(145deg, #333, #2a2a2a); color: #fff; font-size: 0.95rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); box-sizing: border-box; }
.input-group input:focus { outline: none; border-color: #FFD700; box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2); background: linear-gradient(145deg, #3a3a3a, #333); transform: translateY(-1px); }
.input-group input:disabled { background: linear-gradient(145deg, #1a1a1a, #161616); border-color: #333; color: #666; cursor: not-allowed; transform: none; }
.input-group input::placeholder { color: #888; opacity: 0.7; }

/* VALIDAÇÃO */
.input-group input.valid { border-color: #28a745; box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15); }
.input-group input.invalid { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15); animation: shakeError 0.5s ease-in-out; }
@keyframes shakeError { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.validation-message { margin-top: 6px; font-size: 0.75rem; padding: 6px 10px; border-radius: 8px; text-align: left; display: none; transition: all 0.3s ease; }
.validation-message.success { background: rgba(40, 167, 69, 0.15); color: #4caf50; border: 1px solid rgba(40, 167, 69, 0.3); display: block; animation: slideDown 0.3s ease-out; }
.validation-message.error { background: rgba(220, 53, 69, 0.15); color: #f44336; border: 1px solid rgba(220, 53, 69, 0.3); display: block; animation: slideDown 0.3s ease-out; }
.validation-message.info { background: rgba(255, 215, 0, 0.15); color: #ffb300; border: 1px solid rgba(255, 215, 0, 0.3); display: block; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* BOTÃO VERIFICAÇÃO */
.verify-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; border: none; padding: 8px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; font-weight: bold; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3); }
.verify-btn:hover:not(:disabled) { background: linear-gradient(135deg, #FFA500, #ff8c00); transform: translateY(-50%) scale(1.1); box-shadow: 0 6px 12px rgba(255, 215, 0, 0.4); }
.verify-btn:disabled { background: #555; cursor: not-allowed; transform: translateY(-50%); box-shadow: none; }

/* BOTÃO FINALIZAR */
#formCadastro button[type="submit"], .btn-finalizar { background: linear-gradient(135deg, #FFD700, #FFA500) !important; color: #000 !important; border: none !important; padding: 16px !important; border-radius: 12px !important; font-size: 1.1rem !important; font-weight: bold !important; cursor: pointer !important; margin: 20px 0 10px 0 !important; width: 100% !important; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; box-shadow: 0 8px 16px rgba(255, 215, 0, 0.3) !important; position: relative !important; overflow: hidden !important; }
#formCadastro button[type="submit"]::before, .btn-finalizar::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transition: left 0.5s; }
#formCadastro button[type="submit"]:hover:not(:disabled)::before, .btn-finalizar:hover:not(:disabled)::before { left: 100%; }
#formCadastro button[type="submit"]:hover:not(:disabled), .btn-finalizar:hover:not(:disabled) { transform: translateY(-3px) !important; box-shadow: 0 12px 24px rgba(255, 215, 0, 0.5) !important; }
#formCadastro button[type="submit"]:active:not(:disabled), .btn-finalizar:active:not(:disabled) { transform: translateY(-1px) !important; }
#formCadastro button[type="submit"]:disabled, .btn-finalizar:disabled { background: linear-gradient(135deg, #666, #555) !important; cursor: not-allowed !important; transform: none !important; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important; opacity: 0.6 !important; }

/* CLOSE BUTTON */
#formCadastro .popup-close { position: absolute; right: 15px; top: 15px; background: linear-gradient(135deg, #dc3545, #c82333); color: white; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; z-index: 1000; box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3); }
#formCadastro .popup-close:hover { background: linear-gradient(135deg, #c82333, #a71e2a); transform: scale(1.1) rotate(90deg); box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4); }

/* SCROLLBAR */
#formCadastro .popup-content::-webkit-scrollbar { width: 8px; }
#formCadastro .popup-content::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
#formCadastro .popup-content::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #FFD700, #FFA500); border-radius: 10px; }
#formCadastro .popup-content::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #FFA500, #ff8c00); }

/* CLOSE POPUP */
.popup-close { position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; color: #555; font-weight: bold; }
.popup-close:hover { color: #000; }

/* ===== MODAL ELEGANTE DE SUBSTITUIÇÃO ===== */
.popup-content.modal-substituicao { background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%); border: 2px solid #ffc107; max-width: 550px; padding: 30px; }

.modal-header { text-align: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 193, 7, 0.3); }
.modal-header h4 { color: #ffc107; font-size: 1.6rem; margin: 0 0 8px 0; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.modal-header p { color: #ccc; font-size: 0.95rem; margin: 0; opacity: 0.9; }

.info-card-elegante { background: rgba(255, 193, 7, 0.1); border: 1px solid rgba(255, 193, 7, 0.3); border-radius: 12px; padding: 20px; margin: 20px 0; }
.info-card-elegante h5 { color: #ffc107; font-size: 1.1rem; margin: 0 0 12px 0; font-weight: 600; }
.user-info { color: #eee; line-height: 1.6; font-size: 0.95rem; }
.user-info strong { color: #ffc107; font-weight: 600; }

.explicacao-box { background: rgba(108, 117, 125, 0.15); border: 1px solid rgba(108, 117, 125, 0.3); border-radius: 12px; padding: 18px; margin: 20px 0; }
.explicacao-box h6 { color: #fff; font-size: 1rem; margin: 0 0 12px 0; font-weight: 600; }
.explicacao-box ul { margin: 0; padding-left: 20px; color: #ccc; }
.explicacao-box li { margin-bottom: 6px; font-size: 0.9rem; line-height: 1.4; }

.button-group-elegante { display: flex; gap: 15px; margin-top: 25px; justify-content: center; }
.btn-elegante { padding: 12px 24px; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); flex: 1; max-width: 180px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.btn-confirmar-elegante { background: linear-gradient(135deg, #28a745, #20c997); color: white; box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3); }
.btn-confirmar-elegante:hover { background: linear-gradient(135deg, #20c997, #17a2b8); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4); }

.btn-cancelar-elegante { background: linear-gradient(135deg, #6c757d, #495057); color: white; box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3); }
.btn-cancelar-elegante:hover { background: linear-gradient(135deg, #495057, #343a40); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4); }

/* ANIMAÇÕES */
@keyframes fadeInForm { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInForm { from { transform: scale(0.9) translateY(-20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* EFEITOS */
.input-group input[type="date"] { color-scheme: dark; }
.input-group input:focus::placeholder { color: #aaa; transform: translateY(-2px); transition: all 0.3s ease; }
.input-group label::after { content: " *"; color: #ff6b6b; font-weight: bold; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.input-group:hover input:not(:disabled) { border-color: #666; transform: translateY(-1px); }
.validation-message.success::before { content: "✓ "; font-weight: bold; }
.validation-message.error::before { content: "✗ "; font-weight: bold; }
.validation-message.info::before { content: "ℹ️ "; font-weight: bold; }

/* RESPONSIVO */
@media (max-width: 600px) {
  .texto-logo h1 { font-size: 2.2rem; }
  .subtexto { font-size: 1rem; }
  h2 { font-size: 1.4rem; }
  .topo-botoes { justify-content: center; }
  .topo-botoes button { font-size: 1rem; padding: 10px 16px; }
  section { text-align: left; }
  #formCadastro .popup-content, #formCadastro .popup-content.form-melhorado { margin: 1% auto; padding: 20px; width: 98%; border-radius: 15px; }
  .input-row { flex-direction: column; gap: 0; }
  .form-header h3 { font-size: 1.5rem; }
  .verify-btn { width: 28px; height: 28px; font-size: 0.7rem; }
  .input-group input { padding: 10px 12px; font-size: 0.9rem; }
  .input-group label { font-size: 0.8rem; }
  .popup-content.modal-substituicao { margin: 3% auto; padding: 25px 20px; width: 95%; }
  .modal-header h4 { font-size: 1.4rem; }
  .button-group-elegante { flex-direction: column; gap: 10px; }
  .btn-elegante { max-width: none; padding: 14px; }
}