/* RMCJJ_CLIENT_PORTAL_WEB_UI_V1 */

:root {
  --portal-green:#126b49;
  --portal-green-dark:#0b5137;
  --portal-green-soft:#eaf5ef;
  --portal-ink:#193129;
  --portal-muted:#718078;
  --portal-line:#d9e2dc;
  --portal-paper:#ffffff;
  --portal-bg:#f7f8f3;
  --portal-danger:#9b3d35;
  --portal-danger-bg:#fff0ed;
}

* {
  box-sizing:border-box;
}

html,
body {
  margin:0;
  min-height:100%;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color:var(--portal-ink);
  background:
    radial-gradient(
      circle at 84% 8%,
      #dceee4 0,
      transparent 31%
    ),
    var(--portal-bg);
}

button,
input {
  font:inherit;
}

button {
  cursor:pointer;
}

.portal-header {
  width:min(1180px,calc(100% - 40px));
  min-height:82px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid rgba(25,49,41,.12);
}

.portal-brand {
  display:flex;
  gap:6px;
  align-items:center;
  color:var(--portal-ink);
  text-decoration:none;
  font-size:20px;
  font-weight:500;
}

.portal-brand strong {
  color:var(--portal-green);
  font-weight:600;
}

.pay-link {
  color:var(--portal-green);
  text-decoration:none;
  font-size:13px;
  font-weight:500;
}

.portal-shell {
  width:min(1080px,calc(100% - 40px));
  min-height:calc(100vh - 170px);
  margin:0 auto;
  padding:68px 0;
  display:grid;
  grid-template-columns:
    minmax(0,.95fr)
    minmax(420px,.75fr);
  gap:88px;
  align-items:center;
}

.portal-intro {
  max-width:560px;
}

.portal-kicker {
  display:inline-block;
  margin:0 0 18px;
  color:var(--portal-green);
  font-size:12px;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.portal-intro h1 {
  margin:0;
  max-width:620px;
  font-size:clamp(44px,6vw,72px);
  line-height:1;
  letter-spacing:-.055em;
  font-weight:500;
}

.portal-intro h1 span {
  color:var(--portal-green);
}

.portal-intro > p {
  max-width:540px;
  margin:26px 0 0;
  color:var(--portal-muted);
  font-size:17px;
  line-height:1.7;
  font-weight:400;
}

.portal-benefits {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px 25px;
  margin-top:36px;
}

.portal-benefits > div {
  display:flex;
  align-items:center;
  gap:10px;
}

.portal-benefits span {
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  flex:0 0 25px;
  border-radius:50%;
  color:var(--portal-green);
  background:var(--portal-green-soft);
  font-size:12px;
  font-weight:600;
}

.portal-benefits p {
  margin:0;
  color:#4f6259;
  font-size:13px;
  line-height:1.4;
  font-weight:400;
}

.portal-card {
  width:100%;
  max-width:490px;
  margin-left:auto;
  overflow:hidden;
  border:1px solid rgba(25,49,41,.12);
  border-radius:24px;
  background:var(--portal-paper);
  box-shadow:0 28px 75px rgba(28,58,44,.12);
}

.portal-auth-area {
  padding:28px;
}

.portal-tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
  padding:5px;
  border-radius:12px;
  background:#f1f4f1;
}

.portal-tab {
  min-height:42px;
  border:0;
  border-radius:9px;
  color:#66756e;
  background:transparent;
  font-size:13px;
  font-weight:500;
}

.portal-tab.active {
  color:var(--portal-green-dark);
  background:#fff;
  box-shadow:0 3px 10px rgba(23,45,36,.08);
}

.portal-panel {
  display:none;
  padding-top:27px;
}

.portal-panel.active {
  display:block;
}

.portal-panel-head {
  margin-bottom:23px;
}

.portal-panel-head h2,
.portal-signed-in h2 {
  margin:0;
  font-size:27px;
  line-height:1.2;
  letter-spacing:-.025em;
  font-weight:600;
}

.portal-panel-head p,
.portal-signed-in > p {
  margin:8px 0 0;
  color:var(--portal-muted);
  font-size:13px;
  line-height:1.6;
  font-weight:400;
}

.portal-panel-head p strong {
  color:var(--portal-ink);
  font-weight:500;
}

.portal-panel form {
  display:grid;
  gap:15px;
}

.portal-panel label {
  display:grid;
  gap:7px;
  color:#52635b;
  font-size:12px;
  font-weight:500;
}

.portal-panel input {
  width:100%;
  height:48px;
  padding:0 13px;
  border:1px solid var(--portal-line);
  border-radius:10px;
  outline:none;
  background:#fff;
  color:var(--portal-ink);
  font-size:14px;
  font-weight:400;
}

.portal-panel input:focus {
  border-color:var(--portal-green);
  box-shadow:0 0 0 3px rgba(18,107,73,.10);
}

.portal-two-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.portal-check {
  display:flex!important;
  grid-template:none!important;
  align-items:flex-start;
  gap:10px!important;
  line-height:1.5;
}

.portal-check input {
  width:16px;
  height:16px;
  margin-top:2px;
  flex:0 0 16px;
}

.password-note {
  margin:-3px 0 2px;
  color:#88938d;
  font-size:11px;
  line-height:1.5;
}

.portal-primary,
.portal-secondary {
  width:100%;
  min-height:48px;
  border-radius:11px;
  font-size:13px;
  font-weight:600;
}

.portal-primary {
  border:0;
  color:#fff;
  background:var(--portal-green);
  box-shadow:0 9px 20px rgba(18,107,73,.18);
}

.portal-primary:hover {
  background:var(--portal-green-dark);
}

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

.portal-secondary:hover {
  background:#f8faf8;
}

.portal-text-button {
  border:0;
  background:transparent;
  color:var(--portal-muted);
  font-size:12px;
  font-weight:500;
}

.portal-primary:disabled,
.portal-secondary:disabled {
  opacity:.55;
  cursor:wait;
}

.portal-message {
  padding:11px 12px;
  border-radius:9px;
  color:var(--portal-green-dark);
  background:var(--portal-green-soft);
  font-size:12px;
  line-height:1.5;
  font-weight:400;
}

.portal-message.error {
  color:var(--portal-danger);
  background:var(--portal-danger-bg);
}

.verify-icon {
  display:grid;
  place-items:center;
  width:45px;
  height:45px;
  margin-bottom:17px;
  border-radius:12px;
  color:var(--portal-green);
  background:var(--portal-green-soft);
  font-size:20px;
}

.otp-input {
  height:58px!important;
  text-align:center;
  letter-spacing:.45em;
  font-size:22px!important;
}

.portal-signed-in {
  padding:36px 30px;
  text-align:center;
}

.signed-in-mark {
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  margin:0 auto 20px;
  border-radius:50%;
  color:var(--portal-green);
  background:var(--portal-green-soft);
  font-size:22px;
  font-weight:600;
}

.portal-account-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:28px 0 17px;
  padding:17px;
  border:1px solid var(--portal-line);
  border-radius:12px;
  background:#fafbf9;
}

.portal-account-summary span {
  color:var(--portal-muted);
  font-size:12px;
  font-weight:400;
}

.portal-account-summary strong {
  color:var(--portal-green);
  font-size:22px;
  font-weight:600;
}

.portal-notice {
  margin-bottom:18px;
  padding:14px;
  border-radius:11px;
  color:#53645c;
  background:#f3f6f3;
  font-size:12px;
  line-height:1.6;
  font-weight:400;
}

.portal-footer {
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
  padding:24px 0 34px;
  border-top:1px solid rgba(25,49,41,.10);
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:#8a958f;
  font-size:11px;
  font-weight:400;
}

[hidden] {
  display:none!important;
}

@media (max-width:850px) {
  .portal-shell {
    grid-template-columns:1fr;
    gap:42px;
    padding:48px 0 60px;
  }

  .portal-intro {
    max-width:680px;
  }

  .portal-card {
    max-width:600px;
    margin:0;
  }
}

@media (max-width:560px) {
  .portal-header,
  .portal-shell,
  .portal-footer {
    width:min(100% - 28px,1180px);
  }

  .portal-header {
    min-height:70px;
  }

  .portal-brand {
    font-size:17px;
  }

  .pay-link {
    font-size:11px;
  }

  .portal-shell {
    padding-top:38px;
  }

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

  .portal-benefits,
  .portal-two-columns {
    grid-template-columns:1fr;
  }

  .portal-auth-area,
  .portal-signed-in {
    padding:22px 18px;
  }

  .portal-card {
    border-radius:18px;
  }

  .portal-footer {
    flex-direction:column;
  }
}


/* RMCJJ_CLIENT_PORTAL_ACCOUNTS_UI_V1 */

.portal-signed-in {
  text-align:left;
}

.portal-signed-in > .signed-in-mark,
.portal-signed-in > .portal-kicker,
.portal-signed-in > h2,
.portal-signed-in > p {
  text-align:center;
}

.portal-accounts-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:24px 0 14px;
}

.portal-section-label {
  display:block;
  margin-bottom:4px;
  color:var(--portal-muted);
  font-size:10px;
  font-weight:500;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.portal-accounts-head h3,
.portal-link-head h3,
.portal-link-otp-intro h3 {
  margin:0;
  color:var(--portal-ink);
  font-size:16px;
  font-weight:600;
  letter-spacing:-.01em;
}

.portal-add-account {
  min-height:36px;
  padding:0 12px;
  border:1px solid var(--portal-green);
  border-radius:9px;
  color:var(--portal-green);
  background:#fff;
  font-size:11px;
  font-weight:600;
}

.portal-add-account:hover {
  color:#fff;
  background:var(--portal-green);
}

.portal-linked-list {
  display:grid;
  gap:12px;
}

.portal-linked-empty {
  padding:22px 16px;
  border:1px dashed var(--portal-line);
  border-radius:12px;
  color:var(--portal-muted);
  background:#fafbf9;
  text-align:center;
  font-size:12px;
  line-height:1.6;
}

.portal-account-card {
  padding:17px;
  border:1px solid var(--portal-line);
  border-radius:14px;
  background:#fff;
}

.portal-account-card-top {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.portal-account-card h4 {
  margin:0;
  color:var(--portal-ink);
  font-size:15px;
  font-weight:600;
}

.portal-account-number {
  margin-top:4px;
  color:var(--portal-muted);
  font-size:11px;
  font-weight:400;
}

.portal-account-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:25px;
  padding:0 9px;
  border-radius:999px;
  color:var(--portal-green-dark);
  background:var(--portal-green-soft);
  font-size:10px;
  font-weight:600;
  white-space:nowrap;
}

.portal-account-status.status-non-active,
.portal-account-status.status-disconnected,
.portal-account-status.status-inactive {
  color:#943f36;
  background:#fff0ed;
}

.portal-account-details {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px;
  margin-top:16px;
  padding-top:15px;
  border-top:1px solid #edf1ee;
}

.portal-account-detail {
  min-width:0;
}

.portal-account-detail span {
  display:block;
  margin-bottom:3px;
  color:var(--portal-muted);
  font-size:10px;
  font-weight:400;
}

.portal-account-detail strong {
  display:block;
  overflow:hidden;
  color:var(--portal-ink);
  font-size:12px;
  font-weight:500;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.portal-account-detail strong.portal-rate {
  color:var(--portal-green);
  font-size:14px;
  font-weight:600;
}

.portal-link-box {
  margin-top:18px;
  padding:18px;
  border:1px solid var(--portal-line);
  border-radius:14px;
  background:#fafbf9;
}

.portal-link-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  margin-bottom:17px;
}

.portal-close-link {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
  border:0;
  border-radius:50%;
  color:#738079;
  background:#eef2ef;
  font-size:19px;
  font-weight:400;
}

.portal-link-box form {
  display:grid;
  gap:14px;
}

.portal-link-box label {
  display:grid;
  gap:7px;
  color:#52635b;
  font-size:12px;
  font-weight:500;
}

.portal-link-box input {
  width:100%;
  height:46px;
  padding:0 12px;
  border:1px solid var(--portal-line);
  border-radius:10px;
  outline:none;
  background:#fff;
  color:var(--portal-ink);
  font-size:14px;
  font-weight:400;
}

.portal-link-box input:focus {
  border-color:var(--portal-green);
  box-shadow:0 0 0 3px rgba(18,107,73,.10);
}

.portal-money-input {
  position:relative;
}

.portal-money-input > span {
  position:absolute;
  z-index:1;
  left:13px;
  top:12px;
  color:var(--portal-muted);
  font-size:14px;
}

.portal-money-input input {
  padding-left:32px;
}

.portal-link-help {
  margin:-1px 0 1px;
  color:var(--portal-muted);
  font-size:10px;
  line-height:1.6;
  font-weight:400;
}

.portal-link-otp-intro {
  margin-bottom:3px;
}

.portal-link-otp-intro .verify-icon {
  margin-bottom:13px;
}

.portal-link-otp-intro p {
  margin:7px 0 0;
  color:var(--portal-muted);
  font-size:11px;
  line-height:1.6;
  font-weight:400;
}

.portal-signout-button {
  margin-top:20px;
}

@media(max-width:560px) {
  .portal-accounts-head {
    align-items:flex-start;
  }

  .portal-account-details {
    grid-template-columns:1fr;
  }

  .portal-add-account {
    flex:0 0 auto;
  }

  .portal-link-box {
    padding:15px;
  }
}


/* RMCJJ_CLIENT_PORTAL_UNLINK_UI_V1 */

.portal-account-card-actions {
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid #edf1ee;
}

.portal-unlink-trigger {
  min-height:34px;
  padding:0 12px;
  border:1px solid #e2bab5;
  border-radius:9px;
  color:#963d35;
  background:#fff;
  font-size:10px;
  font-weight:500;
}

.portal-unlink-trigger:hover {
  border-color:#963d35;
  background:#fff5f3;
}

.portal-unlink-box {
  margin-top:18px;
  padding:18px;
  border:1px solid #e9ccc8;
  border-radius:14px;
  background:#fffafa;
}

.portal-unlink-warning {
  margin:0 0 9px;
  color:#715b57;
  font-size:11px;
  line-height:1.6;
}

.portal-unlink-preserve {
  margin-bottom:15px;
  padding:10px 11px;
  border-radius:9px;
  background:#f3f7f4;
  color:#52645b;
  font-size:10px;
  line-height:1.6;
}

.portal-unlink-target {
  margin-bottom:15px;
  padding:12px;
  border:1px solid #ead9d6;
  border-radius:10px;
  background:#fff;
}

.portal-unlink-target strong,
.portal-unlink-target span {
  display:block;
}

.portal-unlink-target strong {
  font-size:13px;
  font-weight:600;
}

.portal-unlink-target span {
  margin-top:4px;
  color:var(--portal-muted);
  font-size:11px;
}

.portal-unlink-box form {
  display:grid;
  gap:13px;
}

.portal-unlink-box label {
  display:grid;
  gap:7px;
  color:#52635b;
  font-size:12px;
  font-weight:500;
}

.portal-unlink-box input {
  width:100%;
  height:46px;
  padding:0 12px;
  border:1px solid var(--portal-line);
  border-radius:10px;
  outline:none;
  background:#fff;
  font-size:14px;
  font-weight:400;
}

.portal-unlink-box input:focus {
  border-color:#963d35;
  box-shadow:0 0 0 3px rgba(150,61,53,.10);
}

.portal-danger-button {
  width:100%;
  min-height:46px;
  border:0;
  border-radius:10px;
  color:#fff;
  background:#963d35;
  font-size:12px;
  font-weight:600;
}

.portal-danger-button:hover {
  background:#792f29;
}

.portal-danger-button:disabled {
  opacity:.55;
  cursor:wait;
}


/* RMCJJ_CLIENT_PORTAL_DASHBOARD_FIRST_V3 */

/*
 * SIGNED-IN CLIENT PORTAL
 *
 * The large marketing introduction is useful while
 * signing in or creating an account.
 *
 * After login, the customer's account dashboard
 * becomes the primary page content and the intro
 * becomes a small information section underneath.
 */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) {
  display:flex;
  flex-direction:column;
  align-items:center;

  width:min(
    1180px,
    calc(100% - 40px)
  );

  min-height:auto;

  gap:28px;

  padding:
    34px 0
    48px;
}


/* Dashboard first */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-card {
  order:1;

  width:100%;
  max-width:920px;

  margin:0 auto;

  border-radius:22px;
}


/*
 * Give linked accounts and services room.
 * This fixes the buttons being cut off in
 * the previous narrow 490px column.
 */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-signed-in {
  padding:
    30px
    34px;
}


/* Intro moves underneath the account dashboard */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-intro {
  order:2;

  width:100%;
  max-width:920px;

  margin:0 auto;

  padding:
    22px
    24px;

  border-top:
    1px solid
    rgba(25,49,41,.10);

  text-align:center;
}


/* Small footer-style introduction */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-intro .portal-kicker {
  margin-bottom:8px;

  font-size:10px;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-intro h1 {
  max-width:none;

  margin:0;

  font-size:25px;
  line-height:1.15;

  letter-spacing:-.025em;

  font-weight:500;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-intro > p {
  max-width:720px;

  margin:
    9px auto 0;

  font-size:12px;
  line-height:1.6;
}


/* Benefits become one small horizontal information row */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-benefits {
  grid-template-columns:
    repeat(4,minmax(0,1fr));

  gap:8px 14px;

  max-width:820px;

  margin:
    15px auto 0;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-benefits > div {
  justify-content:center;

  gap:6px;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-benefits span {
  width:20px;
  height:20px;

  flex-basis:20px;

  font-size:10px;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-benefits p {
  font-size:11px;
}


/*
 * Slightly cleaner signed-in header.
 * Keep customer name centered but reduce the
 * empty vertical space above account information.
 */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .signed-in-mark {
  width:45px;
  height:45px;

  margin-bottom:12px;

  font-size:18px;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-signed-in
> .portal-kicker {
  margin-bottom:8px;
}


.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-account-summary {
  margin:
    20px 0
    14px;
}


/* Desktop linked account services now have proper width */

.portal-shell:has(
  #portal-signed-in:not([hidden])
) .portal-linked-list {
  width:100%;
}


/* Tablet */

@media(max-width:850px) {

  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) {
    width:min(
      100% - 28px,
      760px
    );

    gap:20px;

    padding:
      28px 0
      40px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-card {
    max-width:none;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-benefits {
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

}


/* Mobile */

@media(max-width:560px) {

  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) {
    width:calc(100% - 20px);

    padding-top:20px;

    gap:16px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-signed-in {
    padding:
      22px
      16px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-intro {
    padding:
      18px
      10px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-intro h1 {
    font-size:20px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-intro > p {
    font-size:11px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-benefits {
    grid-template-columns:1fr 1fr;

    gap:8px;
  }


  .portal-shell:has(
    #portal-signed-in:not([hidden])
  ) .portal-benefits > div {
    justify-content:flex-start;
  }

}
