/* Fuentes BBVA */
@font-face {
  font-family: 'BentonSansBBVA';
  src: url('../fonts/c0b7234c71994d418b18c40d0f7bde38.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BentonSansBBVA';
  src: url('../fonts/fc398e5d1fca4cfa897904b876455ad0.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BentonSansBBVA';
  src: url('../fonts/aa42fb7aa064457f880933e57c623209.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Variables de colores BBVA */
:root {
  --bbva-blue: #004481;
  --bbva-dark-blue: #072146;
  --bbva-medium-blue: #0954a5;
  --bbva-light-blue: #1464a5;
  --bbva-white: #ffffff;
  --bbva-gray: #f4f4f4;
  --bbva-text-gray: #666666;
  --bbva-blue-hover: #043263;
  --bbva-button-blue: #1973B8;
  --bbva-link-blue: #5BBEFF;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: 'BentonSansBBVA', Arial, sans-serif;
  background-color: var(--bbva-dark-blue);
  color: var(--bbva-white);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animación de loader inicial */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bbva-dark-blue);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-icon {
  width: 40px;
  height: 40px;
  position: relative;
  margin-bottom: 20px;
}

.loading-spinner {
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid var(--bbva-white);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--bbva-white);
  font-size: 16px;
  font-weight: 500;
}

/* Header de la app */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.logo {
  height: 24px;
  width: auto;
}

.header-actions {
  display: flex;
  gap: 16px;
}

.header-button {
  color: var(--bbva-white);
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-family: 'BentonSansBBVA', Arial, sans-serif;
  display: flex;
  align-items: center;
}

/* Main container */
.main-container {
  display: flex;
  flex-direction: column;
  height: calc(100% - 56px);
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* Login form */
.login-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 20px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-input {
  width: 100%;
  height: 56px;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--bbva-white);
  color: var(--bbva-white);
  font-size: 16px;
  padding: 8px 0;
  font-family: 'BentonSansBBVA', Arial, sans-serif;
  outline: none;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 16px;
  background: none;
  border: none;
  color: var(--bbva-white);
  cursor: pointer;
}

.password-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--bbva-white);
}

.help-text {
  color: var(--bbva-link-blue);
  font-size: 14px;
  text-decoration: none;
  margin-top: 8px;
  display: inline-block;
}

/* Buttons */
.btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 2px;
  font-family: 'BentonSansBBVA', Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 16px;
}

.btn-primary {
  background-color: var(--bbva-button-blue);
  color: var(--bbva-white);
}

.btn-primary:hover {
  background-color: #12629e;
}

.btn-secondary {
  background-color: transparent;
  color: var(--bbva-white);
  border: 1px solid var(--bbva-white);
  margin-top: 16px;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-link {
  background: none;
  border: none;
  color: var(--bbva-link-blue);
  text-decoration: none;
  font-size: 14px;
  height: auto;
  margin-top: 30px;
  padding: 0;
  text-align: center;
  display: inline-block;
}

/* Efectos de fade para animar */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

/* Para ocultar elementos */
.hidden {
  display: none;
}

/* Footer */
.footer {
  margin-top: auto;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* App container */
.app-container {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Media queries para diferentes dispositivos */
@media (min-width: 768px) {
  .login-form {
    max-width: 400px;
    margin: 40px auto 0;
  }
}

@media (max-width: 320px) {
  .header {
    padding: 12px;
  }

  .form-input {
    height: 48px;
    font-size: 14px;
  }

  .btn {
    height: 44px;
    font-size: 14px;
  }
}
