/* Portal Arusku launcher. Do not load on the entity dashboard. */

.portal-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f4f7fb;
  color: #2c3a4a;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5edf5;
  backdrop-filter: blur(8px);
}

.portal-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 64px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.portal-brand:hover,
.portal-brand:focus {
  color: inherit;
  text-decoration: none;
}

.portal-logo {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.portal-wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #163f78;
}

.portal-header-end {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.portal-header-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(52vw, 420px);
  color: #5b6b7c;
  font-size: 13px;
  font-weight: 600;
}

.portal-header-access span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-header-access .fa {
  flex-shrink: 0;
  color: #1e5aa8;
}

.portal-main {
  flex: 1 0 auto;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 72px;
  box-sizing: border-box;
}

.portal-flash {
  margin: 0 0 20px;
}

.portal-shell {
  width: 100%;
}

.portal-intro {
  text-align: center;
  margin: 12px auto 40px;
  max-width: 560px;
}

.portal-intro h1 {
  margin: 0 0 10px;
  font-size: 36px;
  font-weight: 700;
  color: #163f78;
  letter-spacing: -0.03em;
}

.portal-intro p {
  margin: 0;
  color: #5b6b7c;
  font-size: 16px;
  line-height: 1.55;
}

.portal-intro-hint {
  margin-top: 10px !important;
  font-size: 14px !important;
  color: #7b8a99 !important;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 280px));
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  width: 100%;
}

.portal-card-form {
  display: flex;
  min-width: 0;
  margin: 0;
}

.portal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 252px;
  min-width: 0;
  padding: 28px 24px 28px;
  background: #fff;
  border: 1px solid #e5edf5;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 36, 64, 0.04);
  box-sizing: border-box;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.portal-card {
  margin: 0;
}

.portal-card:hover {
  border-color: #c9d8e8;
  box-shadow: 0 10px 24px rgba(16, 36, 64, 0.08);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.portal-card:focus {
  outline: none;
  color: inherit;
  text-decoration: none;
}

.portal-card:focus-visible {
  outline: 2px solid #1e5aa8;
  outline-offset: 3px;
  border-color: #1e5aa8;
}

.portal-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 36, 64, 0.08);
}

.portal-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 30px;
  background: #e8f1fb;
  color: #1e5aa8;
}

.portal-card--finance_personal .portal-card-icon {
  background: #e8f1fb;
  color: #1e5aa8;
}

.portal-card--finance_business .portal-card-icon {
  background: #e8eefb;
  color: #3457c4;
}

.portal-card--plantation .portal-card-icon {
  background: #e7f6ee;
  color: #2f8a57;
}

.portal-card-badge {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e5aa8;
}

.portal-card--plantation .portal-card-badge {
  color: #2f8a57;
}

.portal-card-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #163f78;
}

.portal-card-subtitle {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: #3d8b66;
}

.portal-card--finance_personal .portal-card-subtitle,
.portal-card--finance_business .portal-card-subtitle {
  color: #5b6b7c;
}

.portal-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #5b6b7c;
}

.portal-empty {
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid #e5edf5;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 36, 64, 0.04);
}

.portal-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3f8;
  color: #7b8a99;
  font-size: 22px;
}

.portal-empty h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #163f78;
}

.portal-empty p {
  margin: 0;
  color: #5b6b7c;
  line-height: 1.5;
}

.portal-admin-link {
  color: #7b8a99;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  flex-shrink: 0;
}

.portal-admin-link:hover,
.portal-admin-link:focus {
  color: #1e5aa8;
  text-decoration: none;
}

.portal-footer {
  flex-shrink: 0;
  border-top: 1px solid #e5edf5;
  background: transparent;
  text-align: center;
}

.portal-footer-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
}

.portal-footer-credit {
  margin: 0;
  max-width: 100%;
  color: #7b8a99;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.5;
  overflow-wrap: break-word;
}

@media (max-width: 639.98px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (min-width: 640px) and (max-width: 1023.98px) {
  .portal-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 280px));
    max-width: calc(280px * 2 + 20px);
    margin-inline: auto;
  }
}

@media (max-width: 575.98px) {
  .portal-header-inner {
    padding: 12px 16px;
  }

  .portal-main {
    padding: 28px 16px 48px;
  }

  .portal-intro {
    margin-bottom: 24px;
  }

  .portal-intro h1 {
    font-size: 28px;
  }

  .portal-intro p {
    font-size: 15px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .portal-card {
    min-height: 200px;
    padding: 24px 20px;
  }

  .portal-header-access {
    max-width: 46vw;
    font-size: 12px;
  }

  .portal-footer-inner {
    padding: 14px 16px 20px;
  }

  .portal-footer-credit {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-card {
    transition: none;
  }

  .portal-card:hover,
  .portal-card:active {
    transform: none;
  }
}
