:root {
  --portal-green: #55776c;
  --portal-green-deep: #29483f;
  --portal-cream: #fbf7ed;
  --portal-gold: #c9a85d;
  --portal-gold-light: #ead291;
  --portal-ink: #2e423b;
}

body.portal-mode {
  overflow: hidden;
}

.portal-mode .login-shell {
  display: none;
}

.service-portal {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(1.25rem, 4.5vw, 5.5rem);
  color: #fff;
  background:
    linear-gradient(112deg, rgba(35, 64, 56, 0.94) 0%, rgba(63, 91, 80, 0.91) 50%, rgba(174, 145, 80, 0.84) 100%),
    url('../../assets/img/abstract/portal-abstrak-utama.png') center 42% / cover no-repeat;
  isolation: isolate;
}

.service-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.service-portal::after {
  content: '';
  position: absolute;
  width: 46vw;
  height: 46vw;
  right: -22vw;
  top: -25vw;
  z-index: -1;
  border: 1px solid rgba(238, 213, 141, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 7vw rgba(238, 213, 141, 0.025), 0 0 0 14vw rgba(238, 213, 141, 0.018);
}

.service-portal__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.service-portal__glow--one {
  width: 32rem;
  height: 32rem;
  right: 17%;
  bottom: -24rem;
  background: rgba(205, 167, 76, 0.2);
}

.service-portal__glow--two {
  width: 22rem;
  height: 22rem;
  left: -15rem;
  top: 20%;
  background: rgba(255, 222, 116, 0.13);
}

.portal-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  text-decoration: none;
}

.portal-brand:hover {
  color: #fff;
  text-decoration: none;
}

.portal-brand__logos {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.portal-brand__logos img {
  display: block;
  width: auto;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.22));
}

.portal-brand__copy {
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,.22);
  line-height: 1.25;
}

.portal-brand__copy strong {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
}

.portal-brand__copy small {
  margin-top: 0.25rem;
  color: rgba(255,255,255,.62);
  font-size: 0.73rem;
}

.portal-header__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255,255,255,.7);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-header__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--portal-gold-light);
  box-shadow: 0 0 0 6px rgba(238, 213, 141, 0.1);
}

.portal-main {
  width: 100%;
  max-width: 1480px;
  margin: auto;
  padding: clamp(2rem, 5vh, 4.5rem) 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(600px, 1.42fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}

.portal-intro__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  color: var(--portal-gold-light);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portal-intro__eyebrow span {
  width: 42px;
  height: 1px;
  background: var(--portal-gold-light);
}

.portal-intro h1 {
  max-width: 640px;
  margin: 0;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.65rem, 4.4vw, 5.15rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.portal-intro h1 em {
  color: var(--portal-gold-light);
  font-weight: 400;
}

.portal-intro__lead {
  max-width: 520px;
  margin: 1.7rem 0 0;
  color: rgba(255,255,255,.68);
  font-size: clamp(0.94rem, 1.1vw, 1.08rem);
  line-height: 1.8;
}

.portal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.portal-card {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 11, 8, 0.27);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.portal-card:hover {
  transform: translateY(-8px);
  border-color: rgba(238,213,141,.64);
  box-shadow: 0 38px 86px rgba(0, 11, 8, 0.38);
}

.portal-card--report {
  background: linear-gradient(155deg, rgba(76, 110, 98, .97) 0%, rgba(37, 67, 58, .99) 100%);
  color: #fff;
}

.portal-card--document {
  background: linear-gradient(155deg, rgba(76, 110, 98, .97) 0%, rgba(37, 67, 58, .99) 100%);
  color: #fff;
}

.portal-card__visual {
  position: relative;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.4rem 1.6rem;
  overflow: hidden;
}

.portal-card__visual::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -62px;
  top: -72px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .13;
  box-shadow: 0 0 0 28px currentColor, 0 0 0 58px currentColor;
}

.portal-card__number {
  position: absolute;
  left: 1.6rem;
  top: 1.45rem;
  color: currentColor;
  opacity: .44;
  font-size: .7rem;
  letter-spacing: .2em;
}

.portal-card__icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 18px 38px rgba(32, 65, 55, .14);
  transform: rotate(3deg);
}

.portal-card--document .portal-card__icon,
.portal-card--report .portal-card__icon {
  background: rgba(238,213,141,.12);
  color: var(--portal-gold-light);
  box-shadow: inset 0 0 0 1px rgba(238,213,141,.22);
}

.portal-card__icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 1.7rem 1.7rem;
}

.portal-card__label {
  margin-bottom: .55rem;
  color: #8b6d21;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.portal-card--document .portal-card__label,
.portal-card--report .portal-card__label {
  color: var(--portal-gold-light);
}

.portal-card h2 {
  margin: 0;
  color: inherit;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.7rem, 2.2vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -.03em;
}

.portal-card p {
  min-height: 66px;
  margin: .85rem 0 1rem;
  color: rgba(38,65,56,.72);
  font-size: .89rem;
  line-height: 1.65;
}

.portal-card--document p,
.portal-card--report p {
  color: rgba(255,255,255,.64);
}

.portal-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.portal-card__features li {
  padding: .4rem .65rem;
  border: 1px solid rgba(42,76,65,.20);
  border-radius: 999px;
  font-size: .69rem;
}

.portal-card--document .portal-card__features li,
.portal-card--report .portal-card__features li {
  border-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.76);
}

.portal-card__action {
  width: 100%;
  height: 52px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1rem 0 1.25rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #e0b238 0%, #bd890d 100%);
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

.portal-card--document .portal-card__action {
  background: linear-gradient(180deg, #fff0a5 0%, #e0b238 100%);
  color: #3f2f06;
}

.portal-card__action:hover,
.portal-card__action:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #edc34f 0%, #c79312 100%);
  outline: none;
}

.portal-card--document .portal-card__action:hover,
.portal-card--document .portal-card__action:focus-visible {
  background: linear-gradient(180deg, #fff5bd 0%, #ebc655 100%);
}

.portal-card__action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform .25s ease;
}

.portal-card__action:hover svg {
  transform: translateX(3px);
}

/* Login E-Laporan mengikuti palet hijau-gold portal agar tidak terlalu kontras. */
.elaporan-login-shell .login-hero {
  background:
    linear-gradient(90deg, rgba(31, 62, 53, .88) 0%, rgba(53, 84, 73, .64) 48%, rgba(113, 101, 62, .30) 100%),
    url('../../assets/img/abstract/portal-abstrak-gelap.png') center / cover no-repeat;
}

.elaporan-login-shell .login-hero__overlay {
  background:
    radial-gradient(circle at 28% 28%, rgba(190, 214, 199, .24), transparent 23%),
    radial-gradient(circle at 74% 76%, rgba(225, 194, 111, .18), transparent 30%);
}

.elaporan-login-shell .login-hero__eyebrow,
.elaporan-login-shell .login-hero__footer div {
  background: rgba(213, 225, 216, .12);
  border-color: rgba(234, 210, 145, .26);
}

.elaporan-login-shell .login-panel {
  background:
    radial-gradient(circle at top right, rgba(203, 174, 95, .18), transparent 28%),
    linear-gradient(145deg, #d9e2db 0%, #c5d3cb 52%, #e5ddc4 100%);
}

.elaporan-login-shell .login-card {
  background: rgba(245, 246, 239, .97);
  border-color: rgba(112, 139, 126, .50);
  box-shadow: 0 30px 74px rgba(25, 55, 46, .22);
}

.elaporan-login-shell .login-card h2,
.elaporan-login-shell .login-form .form-control {
  color: #29483f;
}

.elaporan-login-shell .login-card__kicker {
  color: #9a751c;
}

.elaporan-login-shell .login-card__header p,
.elaporan-login-shell .login-form__options .caption {
  color: #66776e;
}

.elaporan-login-shell .login-form .form-group {
  border-color: #c4d1c7;
  background: linear-gradient(180deg, #edf1eb 0%, #e2e9e2 100%);
}

.elaporan-login-shell .login-form .form-group.focus,
.elaporan-login-shell .login-form .form-group.field--not-empty {
  background: #f9faf5;
  border-color: rgba(90, 126, 111, .72);
  box-shadow: 0 12px 24px rgba(38, 72, 61, .12);
}

.elaporan-login-shell .login-form .form-group label {
  color: #71877b;
}

.elaporan-login-shell .login-form__submit {
  color: #263f37;
  background: linear-gradient(180deg, #ead486 0%, #d5ad3e 58%, #bd8f1d 100%);
  box-shadow: 0 18px 30px rgba(126, 94, 20, .22);
}

.portal-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.46);
  font-size: .72rem;
}

.portal-footer__secure {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.portal-footer__secure svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--portal-gold-light);
  stroke-width: 1.3;
}

.portal-notice {
  position: fixed;
  right: clamp(1rem, 4vw, 4rem);
  bottom: 2rem;
  z-index: 20;
  max-width: min(430px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(238,213,141,.34);
  border-radius: 15px;
  background: rgba(58,40,6,.95);
  color: rgba(255,255,255,.82);
  box-shadow: 0 24px 64px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
  font-size: .8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: .3s ease;
}

.portal-notice.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.portal-notice__icon {
  flex: 0 0 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--portal-gold);
  color: #3f2f06;
  font-family: Georgia, serif;
  font-weight: 700;
}

.portal-notice button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.62);
  font-size: 1.3rem;
  cursor: pointer;
}

.portal-back {
  position: fixed;
  top: 1.15rem;
  right: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 40px;
  padding: 0 .9rem;
  border: 1px solid rgba(90,61,10,.15);
  border-radius: 999px;
  background: rgba(255,252,241,.82);
  color: #695323;
  box-shadow: 0 10px 30px rgba(85,61,13,.12);
  backdrop-filter: blur(12px);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}

.portal-back svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.service-portal.is-leaving {
  animation: portalLeave .46s cubic-bezier(.65,0,.35,1) forwards;
}

.login-shell.login-enter {
  animation: loginEnter .68s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes portalLeave {
  to { opacity: 0; transform: scale(1.025); filter: blur(6px); }
}

@keyframes loginEnter {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1180px) {
  body.portal-mode { overflow: auto; }
  .portal-main { grid-template-columns: 1fr; gap: 2.4rem; }
  .portal-intro { max-width: 760px; }
  .portal-intro h1 br { display: none; }
  .portal-options { max-width: 850px; }
  .portal-card { min-height: 440px; }
}

@media (max-width: 680px) {
  .service-portal { padding: 0 1rem; }
  .portal-header { min-height: 90px; }
  .portal-brand__logos img { height: 42px; }
  .portal-brand__copy, .portal-header__meta { display: none; }
  .portal-main { padding: 2.5rem 0; }
  .portal-intro h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .portal-options { grid-template-columns: 1fr; }
  .portal-card { min-height: 430px; }
  .portal-footer { min-height: 86px; flex-direction: column; justify-content: center; gap: .5rem; text-align: center; }
  .portal-back span { display: none; }
  .portal-back { width: 40px; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .service-portal.is-leaving,
  .login-shell.login-enter { animation-duration: .01ms; }
  .portal-card, .portal-card__action { transition: none; }
}
