/* --- RESET & BASIC --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100% !important;
}

/* --- CONTAINER --- */
.container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 90% !important;
    max-width: 380px !important;
    margin: auto !important;
    transition: all 0.5s ease;
    z-index: 10;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0c2c1c;
    font-weight: 700;
}

/* --- TABS --- */
.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab.active {
    color: #0c2c1c;
    border-bottom: 2px solid #0c2c1c;
    margin-bottom: -2px;
}

/* --- FORM ELEMENTS --- */
.form-content {
    display: none;
}

.form-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fafafa;
}

input:focus {
    outline: none;
    border-color: #0c2c1c;
    background: white;
    box-shadow: 0 0 0 3px rgba(12, 44, 28, 0.1);
}

.show-password-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.show-password-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.show-password-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #0c2c1c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(12, 44, 28, 0.2);
}

button[type="submit"]:hover {
    background: #14462c;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(12, 44, 28, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #4a5568;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

/* --- MESSAGES --- */
.mensaje {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
    font-size: 14px;
    font-weight: 500;
}

.mensaje.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    display: block;
}

.mensaje.success {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #9ae6b4;
    display: block;
}

/* --- SUCCESS ANIMATION --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.loading-overlay.active {
    display: flex;
    opacity: 1;
}

.water-logo-container {
    text-align: center;
}

.logo-wrapper {
    position: relative;
    width: 220px; /* Más grande */
    height: 220px; /* Más grande */
    margin: 0 auto 40px auto; /* Centrado forzado y más espacio abajo */
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-bg {
    width: 100%;
    height: 100%;
    opacity: 0.1;
    filter: grayscale(1);
    position: absolute; /* Asegura superposición perfecta */
    top: 0;
    left: 0;
}

.water-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    overflow: hidden;
    transition: height 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.logo-front {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 220px; /* Mismo tamaño que el contenedor */
    height: 220px;
    /* Verde "Fuerteson" (Esmeralda vibrante) */
    filter: invert(34%) sepia(85%) saturate(1450%) hue-rotate(135deg) brightness(95%) contrast(105%);
}

#welcome-text {
    color: #0c2c1c;
    font-size: 2.2rem; /* Un poco más grande */
    font-weight: 800;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.6s;
    width: 100%;
}

#welcome-text.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- LOADER ANIMATION --- */
.loader-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 40px;
  position: relative;
}

.loader-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.loader-block {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 2px;
  background-color: #04d473;
  box-shadow: 0 0 10px rgba(4, 212, 115, 0.5);
  animation: loader_562 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-block:nth-child(1) { animation-delay: 0.1s; }
.loader-block:nth-child(2) { animation-delay: 0.2s; }
.loader-block:nth-child(3) { animation-delay: 0.3s; }
.loader-block:nth-child(4) { animation-delay: 0.4s; }
.loader-block:nth-child(5) { animation-delay: 0.5s; }
.loader-block:nth-child(6) { animation-delay: 0.6s; }
.loader-block:nth-child(7) { animation-delay: 0.7s; }
.loader-block:nth-child(8) { animation-delay: 0.8s; }

@keyframes loader_562 {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(4, 212, 115, 0.3);
  }
  20% {
    transform: scale(1, 2.5);
    box-shadow: 0 0 20px rgba(4, 212, 115, 0.6);
  }
  40% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(4, 212, 115, 0.3);
  }
}

.verificando-text {
    color: #0c2c1c;
    font-size: 14px;
    font-weight: 600;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    .container {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 25px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}
