/* ============================================
   BIOHBAC - Estilos globales
   ============================================ */

:root {
  --bio-dark-green: #0D3D2B;
  --bio-green: #3DAE6E;
  --bio-teal: #2E8B9A;
  --bio-orange: #E0833C;
  --bio-bg: #F4F7F6;
  --bio-card: #FFFFFF;
  --bio-text: #1F2D27;
  --bio-text-light: #5C6B65;
  --bio-border: #DCE6E2;

  --risk-low: #4CAF50;
  --risk-medium: #FF9800;
  --risk-high: #E53935;

  --radius: 14px;
  --shadow: 0 2px 10px rgba(13, 61, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bio-bg);
  color: var(--bio-text);
  min-height: 100vh;
}

a {
  color: var(--bio-teal);
  text-decoration: none;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */

.bio-header {
  background: var(--bio-dark-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.bio-header__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
  text-align: center;
}

.bio-header__nav {
  display: flex;
  gap: 8px;
}

.bio-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.15s ease;
  text-decoration: none;
}

.bio-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   LAYOUT / CONTAINERS
   ============================================ */

.bio-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.bio-page-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bio-dark-green);
  margin: 10px 0 28px;
}

.bio-footer {
  text-align: center;
  padding: 24px 16px;
}

.bio-footer img {
  height: 42px;
  opacity: 0.85;
}

/* ============================================
   HOME / MENU PRINCIPAL (slide 1)
   ============================================ */

.bio-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 16px;
}

.bio-home img.bio-logo {
  max-width: 320px;
  width: 100%;
  margin-bottom: 30px;
}

.bio-home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 800px;
}

@media (max-width: 600px) {
  .bio-home-grid {
    grid-template-columns: 1fr;
  }
}

.bio-app-card {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.bio-app-card.is-active {
  cursor: pointer;
}

.bio-app-card.is-active:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(13, 61, 43, 0.15);
}

.bio-app-card.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.bio-app-card img {
  width: 100%;
  max-width: 600px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.bio-app-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--bio-dark-green);
}

.bio-badge-soon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bio-orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ============================================
   LOGIN
   ============================================ */

.bio-login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .bio-login-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.bio-login-card {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.bio-login-card h2 {
  margin-top: 0;
  color: var(--bio-dark-green);
  font-size: 1.1rem;
}

.bio-login-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bio-field {
  margin-bottom: 16px;
}

.bio-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--bio-text);
}

.bio-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bio-border);
  border-radius: 8px;
  font-size: 1rem;
}

.bio-field input:focus {
  outline: 2px solid var(--bio-green);
  border-color: var(--bio-green);
}

/* ============================================
   BUTTONS
   ============================================ */

.bio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.bio-btn:active {
  transform: scale(0.98);
}

.bio-btn-primary {
  background: var(--bio-green);
  color: #fff;
}

.bio-btn-primary:hover {
  opacity: 0.9;
}

.bio-btn-secondary {
  background: #fff;
  color: var(--bio-dark-green);
  border: 1px solid var(--bio-border);
}

.bio-btn-secondary:hover {
  background: var(--bio-bg);
}

.bio-btn-block {
  width: 100%;
}

.bio-btn[disabled],
.bio-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   RESERVOIR / DASHBOARD GRID (slide 3 concept)
   ============================================ */

.bio-client-block {
  margin-bottom: 36px;
}

.bio-client-block h2 {
  color: var(--bio-dark-green);
  font-size: 1.15rem;
  border-bottom: 2px solid var(--bio-border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.bio-reservoir-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.bio-reservoir-card {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.bio-reservoir-card h3 {
  margin: 0 0 4px;
  color: var(--bio-dark-green);
  font-size: 1.05rem;
}

.bio-reservoir-card .bio-rcount {
  color: var(--bio-text-light);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.bio-index-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.bio-index-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 10px;
  background: var(--bio-bg);
  text-decoration: none;
  color: var(--bio-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease;
  position: relative;
}

.bio-index-link:hover {
  background: var(--bio-border);
}

.bio-index-link img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.bio-index-link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.bio-mini-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--bio-orange);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

/* ============================================
   FORM (IPER - slide 4 concept)
   ============================================ */

.bio-form-card {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.bio-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 600px) {
  .bio-form-grid {
    grid-template-columns: 1fr;
  }
}

.bio-form-field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bio-bg);
  border-radius: 10px;
  padding: 10px 14px;
}

.bio-form-field img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.bio-form-field .bio-field {
  flex: 1;
  margin-bottom: 0;
}

.bio-form-field label {
  margin-bottom: 4px;
}

.bio-form-field input,
.bio-form-field select {
  border: 1px solid var(--bio-border);
  background: #fff;
}

.bio-form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}

.bio-error {
  background: #FDECEA;
  color: #B3261E;
  border: 1px solid #F5C2BE;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

/* ============================================
   RESULT (slide 5 concept)
   ============================================ */

.bio-result-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .bio-result-wrap {
    grid-template-columns: 1fr;
  }
}

.bio-result-main {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.bio-result-main h2 {
  margin-top: 0;
  color: var(--bio-dark-green);
}

.bio-result-status {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 14px;
}

.bio-status-estable { background: var(--risk-low); }
.bio-status-riesgo  { background: var(--risk-medium); }
.bio-status-critico { background: var(--risk-high); }
.bio-status-default { background: var(--bio-teal); }

.bio-result-main img.bio-plot {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--bio-border);
}

.bio-result-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bio-side-card {
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}

.bio-side-card h4 {
  margin: 0 0 12px;
  color: var(--bio-dark-green);
  font-size: 0.95rem;
}

.bio-side-card img {
  width: 100%;
  max-width: 160px;
}

.bio-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}

.bio-meta-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--bio-border);
}

.bio-meta-list li:last-child {
  border-bottom: none;
}

/* ============================================
   PLACEHOLDER / "PROXIMAMENTE"
   ============================================ */

.bio-placeholder {
  text-align: center;
  padding: 60px 20px;
  background: var(--bio-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

.bio-placeholder img {
  width: 140px;
  margin-bottom: 18px;
  opacity: 0.8;
}

.bio-placeholder h2 {
  color: var(--bio-dark-green);
}

.bio-placeholder p {
  color: var(--bio-text-light);
}

/* ============================================
   PROCESSING
   ============================================ */

.bio-processing {
  text-align: center;
  padding: 60px 20px;
}

.bio-spinner {
  font-size: 2.5rem;
  animation: bio-spin 1.4s linear infinite;
  display: inline-block;
}

@keyframes bio-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
