:root {
  --color-primary: #016c00;
  --color-primary-container: #008800;
  --color-action-orange: #f16a21;
  --color-teal-dark: #064458;
  --color-surface: #f3f4f6;
  --color-surface-container-low: #ffffff;
  --color-surface-container-lowest: #ffffff;
  --color-on-surface: #191c1c;
  --color-on-surface-variant: #3e4a39;
  --color-disabled-grey: #cbcbcb;
  --shadow-ambient: 0 4px 20px rgba(0, 0, 0, 0.05);
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Manrope", sans-serif;
  --header-height: 80px;
}

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

body {
  background-color: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

/* Top Teal Bar */
.top-accent-line {
  height: 4px;
  width: 100%;
  background: #064458;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

/* Portal Main Structure */
.portal-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  width: 100%;
}

.portal-content-wrapper {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 2.5rem;
  margin: 0 auto;
}

.portal-left-col {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-right-col {
  width: 520px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Auth Card */
.card {
  background-color: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
  padding: 2rem 35px 1.5rem 35px;
  width: 100%;
  max-width: 360px;
  position: relative;
  border: 1px solid #eaeaea;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}

.card-shield {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #f16a21;
}

.card-header {
  margin: 0 auto 1.5rem auto;
  width: 290px;
  max-width: 100%;
}

.welcome-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.5rem;
}

.brand-logo {
  height: 1.85rem;
  width: auto;
}

/* Form Styles */
#login-form {
  width: 290px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  margin: 0 auto 1rem auto;
  width: 290px;
  max-width: 100%;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2c323a;
  margin-bottom: 0.35rem;
}

.flex-between-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.mb-0 {
  margin-bottom: 0;
}

.forgot-link {
  color: #f16a21;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
}

.input-container {
  position: relative;
  width: 290px;
  max-width: 100%;
  margin: 0 auto;
}

.input {
  width: 290px;
  max-width: 100%;
  height: 48px;
  background-color: #ffffff;
  border: 1px solid #9ca3af;
  border-radius: 0.45rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.input:focus {
  border-color: #105163;
  box-shadow: 0 0 0 1px #105163;
}

.select-wrapper {
  position: relative;
  width: 290px;
  max-width: 100%;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23f16a21' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  pointer-events: none;
}

.select {
  width: 290px;
  max-width: 100%;
  height: 48px;
  background-color: #ffffff;
  border: 1px solid #9ca3af;
  border-radius: 0.45rem;
  padding: 0 1rem;
  font-size: 13px;
  color: #1a1a1a;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
}

.select:focus {
  border-color: #105163;
  box-shadow: 0 0 0 1px #105163;
}

.pass-container {
  position: relative;
  width: 290px;
  max-width: 100%;
  height: 48px;
  background-color: #f4f5f7;
  border: 1px solid #9ca3af;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  cursor: text;
  transition: border-color 0.2s, background-color 0.2s;
}

.pass-container:focus-within {
  border-color: #105163;
  box-shadow: 0 0 0 1px #105163;
  background-color: #ffffff;
}

.pass-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: text;
  z-index: 5;
  border: none;
  background: transparent;
  outline: none;
  font-size: 20px;
  color: transparent;
  caret-color: transparent;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.pass-slots {
  position: absolute;
  left: 1.25rem;
  right: 3rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  pointer-events: none;
  z-index: 2;
}

.pass-slot {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: #4b5563;
  width: 24px;
  text-align: center;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  pointer-events: none;
}

.pass-slot.filled {
  font-size: 1.1rem;
  color: #111827;
}

.eye-toggle-wrapper {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  z-index: 10;
}

.toggle-eye-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  background: none;
  border: none;
  padding: 4px;
  position: relative;
  z-index: 11;
}

.toggle-eye-btn:hover {
  color: #111827;
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* Toggle Recordar */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0.85rem auto 1.5rem auto;
  width: 290px;
  max-width: 100%;
  user-select: none;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.25rem;
  height: 1.25rem;
  background-color: #ccc;
  border-radius: 1rem;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 1rem;
  height: 1rem;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-container.active .toggle-switch {
  background-color: var(--color-primary);
}

.toggle-container.active .toggle-switch::after {
  transform: translateX(1rem);
}

.toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: #1a1a1a;
}

/* Buttons */
.btn-primary {
  background-color: #105163;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: rgba(16, 81, 99, 0.9);
}

.btn-disabled {
  background-color: var(--color-disabled-grey);
  color: #888;
  cursor: not-allowed;
}

.btn-continue {
  width: 290px;
  max-width: 100%;
  height: 48px;
  margin: 0 auto;
  border-radius: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.register-wrapper {
  text-align: center;
  margin: 1.25rem auto 0 auto;
  width: 290px;
  max-width: 100%;
}

.register-txt {
  font-size: 11px;
  font-weight: 500;
  color: #555;
}

.register-link {
  color: #f16a21;
  font-weight: 700;
  text-decoration: underline;
}

/* Right Column Hero Banner */
.hero-banner-card {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  background: #ffffff;
  border: 1px solid #eaeaea;
  width: 100%;
}

.banner-carousel-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0c4d5c;
}

.carousel-slide {
  width: 100%;
  transition: opacity 0.5s ease;
}

.active-slide {
  position: relative;
  opacity: 1;
  z-index: 2;
}

.inactive-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
}

.banner-slide-img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-dots-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 0.65rem 1rem;
  background: #ffffff;
}

.carousel-dot {
  flex: 1;
  max-width: 110px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.carousel-dot.active {
  background: #00b020;
}

/* Help Section */
.help-section-box {
  width: 100%;
  margin-top: 0.25rem;
}

.help-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 0.85rem;
}

.help-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  width: 100%;
}

.help-action-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border: 1px solid #eaeaea;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.help-action-card:hover {
  transform: translateY(-2px);
}

.help-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.help-card-label {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

/* Footer */
.portal-footer {
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #eaeaea;
  padding: 0.75rem 3rem;
  margin-top: auto;
  font-family: 'Inter', sans-serif;
}

.footer-inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-bp {
  height: 1.45rem;
  width: auto;
}

.footer-logo-sep {
  width: 1px;
  height: 20px;
  background: #d1d5db;
}

.footer-logo-aval {
  height: 1.35rem;
  width: auto;
  object-fit: contain;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.footer-link-orange {
  font-size: 11px;
  font-weight: 700;
  color: #f16a21;
  text-decoration: none;
}

.footer-link-orange:hover {
  text-decoration: underline;
}

.footer-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.footer-date-txt,
.footer-copy-txt {
  font-size: 10px;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
}

/* Token Screen */
.token-screen-wrapper {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: #f3f4f6;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  font-family: var(--font-sans);
}

.token-screen-header {
  width: 100%;
  height: 56px;
  background: #ffffff;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
}

.token-screen-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background-color: #f3f4f6;
}

.token-card-box {
  width: 100%;
  max-width: 480px;
  background-color: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 1.25rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
  padding: 2.5rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  margin: 0 auto;
}

#btn-token-continue {
  width: 128.5px;
  max-width: 100%;
  height: 48px;
  border-radius: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.token-screen-footer {
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 1.25rem 1.5rem;
  font-size: 11px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  body {
    background-color: #ffffff;
  }
  .portal-main {
    padding: 0 0 1.5rem 0;
  }
  .portal-content-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  .portal-left-col {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .portal-right-col {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
  }
  .help-section-box {
    order: 1;
  }
  .hero-banner-card {
    order: 2;
  }
  .card {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 1.5rem 0.5rem 1rem 0.5rem;
  }
  .portal-footer {
    padding: 0.75rem 1rem;
  }
  .footer-row-top,
  .footer-row-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Mobile Token Screen Override */
  .token-screen-wrapper {
    background-color: #ffffff;
  }
  .token-screen-main {
    background-color: #ffffff;
    padding: 1rem 1rem;
  }
  .token-card-box {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.5rem 0;
    max-width: 100%;
  }
}
