/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5; /* Fondo gris claro */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== CONTENEDOR LOGIN ===== */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

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

.login-header h1 {
    font-size: 24px;
    color: #2c3e50; /* Azul oscuro */
    margin-bottom: 10px;
}

.login-header p {
    color: #7f8c8d; /* Gris medio */
    font-size: 14px;
}

/* ===== FORMULARIO ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50; /* Azul oscuro */
    font-weight: 600;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db; /* Azul brillante */
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* ===== BOTÓN ===== */
.login-button {
    width: 100%;
    padding: 12px;
    background: #3498db; /* Azul brillante */
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-button:hover {
    background: #2980b9; /* Azul más oscuro */
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.login-footer {
    margin-top: 20px;
    font-size: 13px;
    color: #95a5a6; /* Gris claro */
}

.login-footer a {
    color: #3498db; /* Azul */
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===== EFECTOS EXTRAS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.login-container.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* --- PRESALA STYLES --- */
.presala {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.presala h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 500;
}

.presala p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.condominios-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.condo-btn {
    padding: 1rem;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.condo-btn:hover {
    background: #fff;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

/* Animación suave */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos para la tarjeta de condominio */
.condo-card {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.condo-btn {
    width: 100%;
    padding: 1.2rem;
    text-align: left;
    background: none;
    border: none;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
}

.condo-id {
    color: #666;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.condo-meta {
    padding: 0.8rem 1.2rem;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.expiry {
    color: #666;
}

.expiry.expired {
    color: #d32f2f;
    font-weight: bold;
}

/* Efecto hover para toda la tarjeta */
.condo-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.expiry.expired::before {
    content: "⚠️ ";
}


.renew-notice {
    margin-top: 2.5rem;
    padding: 1.2rem;
    background: #FFF9F9;
    border: 1px solid #FFEBEE;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulse 2s infinite;
}

.renew-notice svg {
    flex-shrink: 0;
}

.renew-notice p {
    margin: 0;
    color: #5F2120;
    font-size: 0.95rem;
    line-height: 1.5;
}

.renew-notice a {
    color: #D32F2F;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.renew-notice a:hover {
    text-decoration: underline;
    color: #B71C1C;
}

/* Animación sutil */
@keyframes pulse {
    0% { border-color: #FFEBEE; }
    50% { border-color: #FFCDD2; }
    100% { border-color: #FFEBEE; }
}

.renew-notice {
    background: linear-gradient(135deg, #FFF9F9 0%, #FFECEC 100%);
    border-left: 4px solid #D32F2F;
    box-shadow: 0 2px 8px rgba(215, 47, 47, 0.1);
}

/* Estilos para condominios caducados */
.condo-card.expired {
    opacity: 0.7;
    position: relative;
}

.condo-card.expired::after {
    content: "CADUCADO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(211, 47, 47, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.condo-btn[disabled] {
    cursor: not-allowed;
    filter: grayscale(70%);
}

.expiry.expired {
    color: #D32F2F;
    font-weight: bold;
}

.renew-notice {
    background-color: #FFF3E0;
    border-left: 4px solid #FFA000;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.renew-notice svg {
    flex-shrink: 0;
}

.renew-notice p {
    margin: 0;
    font-size: 14px;
}

/* Estilos para el header de la pre-sala */
.presala-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logout-btn {
    background: none;
    border: none;
    color: #D32F2F;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #FFEBEE;
}

.logout-btn i {
    font-size: 16px;
}

.user-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.change-password-btn {
    background-color: #4CAF50; /* Verde para diferenciar */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.change-password-btn:hover {
    background-color: #45a049;
}

.change-password-btn i {
    margin-right: 5px;
}


.swal2-input {
    border: 1px solid #4CAF50 !important;
    margin: 10px auto !important;
}

.swal2-popup {
    border-radius: 15px !important;
}


#forgot-password-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

#forgot-password-modal input {
  display: block;
  margin: 10px 0;
  padding: 8px;
  width: 100%;
}

/* Estilo del modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Estilo de los botones */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.btn-primary, .btn-secondary {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  flex: 1;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #4CAF50; /* Verde */
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
}

.btn-secondary {
  background-color: #f44336; /* Rojo */
  color: white;
}

.btn-secondary:hover {
  background-color: #d32f2f;
}

/* Estilo del input */
#recovery-email {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box;
}

.presala {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.presala-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.selection-prompt {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.condominios-container {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.condominios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 5px;
}

.condo-card {
    display: flex;
    flex-direction: column;
}

.condo-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.condo-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.condo-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.condo-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.condo-meta {
    font-size: 0.85rem;
    color: #666;
}

.expiry.expired {
    color: #d32f2f;
}

.expired .condo-btn {
    background: #f5f5f5;
}

.renew-notice {
    margin-top: 20px;
    padding: 15px;
    background: #ffebee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .presala-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .condominios-grid {
        grid-template-columns: 1fr;
    }
    
    .action-text {
        display: none;
    }
    
    .user-actions button {
        padding: 8px 12px;
    }
}