.portal-body {
  min-height: 100vh;
  margin: 0;
  color: #f5fbff;
  background:
    radial-gradient(circle at 20% 10%, rgba(39, 138, 178, .18), transparent 34rem),
    linear-gradient(145deg, #020b12 0%, #071925 58%, #031019 100%);
}

.auth-shell,
.portal-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.auth-card {
  width: min(100%, 460px);
  padding: 32px;
  border: 1px solid rgba(141, 213, 239, .16);
  border-radius: 24px;
  background: rgba(5, 20, 31, .88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5fbff;
  text-decoration: none;
  font-size: 1.08rem;
  letter-spacing: .02em;
}

.auth-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-brand b {
  color: #65d6ff;
}

.auth-heading {
  margin: 34px 0 26px;
}

.auth-heading h1,
.portal-intro h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.04;
}

.auth-heading p:last-child,
.portal-intro > p:last-child {
  color: #9fb5c2;
  line-height: 1.7;
}
.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #cce3ed;
  font-size: .92rem;
}

.auth-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(145, 207, 231, .2);
  border-radius: 12px;
  padding: 13px 14px;
  color: #f8fcff;
  background: rgba(255, 255, 255, .045);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(101, 214, 255, .72);
  box-shadow: 0 0 0 3px rgba(101, 214, 255, .08);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  color: #8cb4c5;
  background: transparent;
  cursor: pointer;
  opacity: .82;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
  color: #7cddff;
  background: rgba(101, 214, 255, .08);
  outline: none;
  opacity: 1;
}

.password-toggle span {
  font-size: 1rem;
  line-height: 1;
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-error {
  min-height: 20px;
  color: #ff9e9e;
  font-size: .9rem;
}

.auth-success {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(34,197,94,.22);
  border-radius: 12px;
  color: #9ef0c5;
  background: rgba(34,197,94,.09);
  font-size: .9rem;
  line-height: 1.5;
}

.auth-success a { color: #b9efff; }
.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(145, 207, 231, .1);
  color: #78909d;
  font-size: .8rem;
}

.auth-foot a {
  color: #8cdfff;
  text-decoration: none;
  white-space: nowrap;
}

.portal-header {
  min-height: 76px;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(145, 207, 231, .1);
  background: rgba(2, 11, 18, .72);
  backdrop-filter: blur(14px);
}

.portal-logout {
  min-height: 40px;
}
.portal-shell {
  padding: 72px 0 56px;
}

.portal-intro {
  max-width: 760px;
  margin-bottom: 34px;
}

.portal-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.portal-app-card,
.portal-empty {
  min-height: 150px;
  border: 1px solid rgba(145, 207, 231, .14);
  border-radius: 20px;
  padding: 22px;
  background: rgba(7, 25, 37, .74);
}

.portal-app-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.portal-app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(101, 214, 255, .42);
  background: rgba(10, 35, 50, .9);
}
.portal-app-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #b9efff;
  background: rgba(65, 180, 225, .14);
  font-weight: 800;
  font-size: 1.25rem;
}

.portal-app-copy h2,
.portal-empty h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.portal-app-copy p,
.portal-empty p {
  margin: 4px 0 0;
  color: #88a2b0;
  font-size: .88rem;
}

.portal-app-copy .portal-role {
  color: #7cdbff;
  font-weight: 700;
  letter-spacing: .03em;
}

.portal-open {
  color: #73dcff;
  font-size: 1.5rem;
}

.portal-identity {
  margin-top: 32px;
  color: #607b89;
  font-size: .78rem;
}

@media (max-width: 620px) {
  .auth-card { padding: 24px 20px; }
  .auth-foot { flex-direction: column; }
  .portal-shell { padding-top: 48px; }
}

/* Owner user management */
.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-user-management {
  min-height: 40px;
  text-decoration: none;
}

.portal-users-shell {
  max-width: 1120px;
}

.portal-user-list {
  display: grid;
  gap: 14px;
}

.portal-user-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid rgba(145, 207, 231, .14);
  border-radius: 18px;
  background: rgba(7, 25, 37, .74);
}

.portal-user-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #b9efff;
  background: rgba(65, 180, 225, .14);
  font-weight: 800;
  font-size: 1.1rem;
}

.portal-user-copy h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.portal-user-meta {
  margin: 0;
  color: #78909d;
  font-size: .78rem;
}

.portal-user-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.portal-user-apps span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #8ddfff;
  background: rgba(101, 214, 255, .08);
  font-size: .72rem;
}

.portal-user-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.portal-user-activate {
  text-decoration: none;
  white-space: nowrap;
}

.portal-user-status {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
}

.portal-user-status.is-active {
  color: #9ef0c5;
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.20);
}

.portal-password-reset-request {
  min-height: 36px;
  white-space: nowrap;
}

.portal-password-reset-status {
  max-width: 240px;
  color: #8ddfff;
  font-size: .7rem;
  line-height: 1.4;
  text-align: right;
}

.portal-access-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.portal-access-form label {
  display: grid;
  gap: 5px;
  color: #78909d;
  font-size: .7rem;
}

.portal-access-form select {
  min-width: 190px;
  padding: 8px 10px;
  border: 1px solid rgba(145,207,231,.18);
  border-radius: 10px;
  color: #dff7ff;
  background: rgba(5,20,31,.92);
}

.portal-access-form .btn {
  min-height: 36px;
  padding: 8px 13px;
}

.portal-access-status {
  align-self: center;
  color: #8ddfff;
  font-size: .72rem;
}

@media (max-width: 720px) {
  .portal-header-actions { gap: 7px; }
  .portal-user-management { display: none; }
  .portal-user-card {
    grid-template-columns: auto 1fr;
  }
  .portal-user-action {
    grid-column: 1 / -1;
    align-items: stretch;
    justify-content: stretch;
  }
  .portal-user-action .btn,
  .portal-user-status {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .portal-access-form { align-items: stretch; }
  .portal-access-form label,
  .portal-access-form select,
  .portal-access-form .btn { width: 100%; box-sizing: border-box; }
}

/* =========================================================
   My AYLA Portal — Command Center visual layer
   Scope: portal_home.html only (.portal-body)
   ========================================================= */
.portal-body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  color: #eef9ff;
  background: #010811;
}

.portal-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1,8,17,.08) 0%, rgba(1,8,17,.16) 48%, #010811 94%),
    url('/assets/portal-command-center-bg.webp') center top / cover no-repeat;
}

.portal-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(67,190,239,.09), transparent 34rem),
    linear-gradient(90deg, rgba(0,17,31,.18), transparent 24%, transparent 76%, rgba(0,17,31,.18));
}
.portal-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(99,213,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,213,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent 0, #000 38%, transparent 88%);
}

.portal-body .portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(119,211,247,.12);
  background: linear-gradient(180deg, rgba(1,10,18,.82), rgba(2,15,26,.62));
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 14px 44px rgba(0,0,0,.12);
}

.portal-brand {
  gap: 12px;
}

.portal-brand-logo {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(103,214,255,.18);
  border-radius: 13px;
  background: rgba(7,32,48,.42);
  box-shadow: inset 0 0 18px rgba(77,201,245,.05), 0 0 26px rgba(43,178,226,.05);
}

.portal-brand-logo img {
  width: 34px;
  height: 34px;
}
.portal-brand-copy {
  display: grid;
  gap: 2px;
}

.portal-brand-copy strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .025em;
}

.portal-brand-copy strong b {
  color: #69d9ff;
}

.portal-brand-copy small {
  color: #6f94a8;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .24em;
}

.portal-body .portal-header-actions {
  gap: 9px;
}

.portal-body .portal-action {
  min-height: 39px;
  padding: 8px 15px;
  border-color: rgba(115,208,244,.2);
  background: rgba(5,25,39,.48);
  color: #d7eef8;
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.portal-body .portal-action:hover {
  border-color: rgba(105,217,255,.5);
  background: rgba(8,37,55,.72);
  box-shadow: 0 0 24px rgba(63,191,236,.09);
}

.portal-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portal-body .portal-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 72px 0 58px;
}

.portal-hero {
  min-height: 252px;
  display: flex;
  align-items: flex-end;
  padding: 12px 0 26px;
}

.portal-body .portal-intro {
  max-width: 790px;
  margin: 0;
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px;
  color: #75d8fb;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.portal-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #74ddff;
  box-shadow: 0 0 0 5px rgba(94,211,251,.08), 0 0 18px rgba(94,211,251,.72);
}

.portal-body .portal-intro h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.35rem, 5vw, 4.3rem);
  line-height: .98;
  font-weight: 540;
  letter-spacing: -.045em;
  text-shadow: 0 8px 36px rgba(0,0,0,.42);
}
.portal-body .portal-intro h1 span {
  color: #bfeeff;
  font-weight: 620;
}

.portal-body .portal-intro > p:not(.eyebrow) {
  max-width: 690px;
  margin: 18px 0 0;
  color: #a7c0cf;
  font-size: .94rem;
  line-height: 1.72;
}

.portal-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 23px;
  color: #83a0b0;
  font-size: .7rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.portal-hero-meta > span:not(.portal-meta-divider) {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(107,204,240,.13);
  border-radius: 999px;
  background: rgba(3,20,32,.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.portal-hero-meta b {
  margin-right: 4px;
  color: #b8eaff;
  font-weight: 700;
}

.portal-meta-divider {
  width: 3px;
  height: 3px;
  padding: 0;
  border-radius: 50%;
  background: rgba(120,205,237,.48);
}
.portal-app-panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid rgba(109,205,242,.16);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(10,31,45,.72), rgba(3,16,27,.78)),
    rgba(3,16,27,.64);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  box-shadow:
    0 24px 70px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(196,237,255,.035);
}

.portal-app-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(65,191,236,.08), transparent 28rem),
    linear-gradient(90deg, transparent, rgba(116,218,255,.03), transparent);
}

.portal-section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 0 2px;
}

.portal-kicker {
  margin: 0 0 7px;
  color: #5f93ab;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
}

.portal-section-head h2 {
  margin: 0;
  color: #edf9ff;
  font-size: 1.28rem;
  font-weight: 560;
  letter-spacing: -.015em;
}
.portal-secure-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #78a7ba;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-secure-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #66d5b5;
  box-shadow: 0 0 14px rgba(102,213,181,.6);
}

.portal-body .portal-apps {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-body .portal-app-card,
.portal-body .portal-empty {
  min-height: 124px;
  border: 1px solid rgba(116,204,237,.13);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(12,39,56,.65), rgba(5,22,34,.76)),
    rgba(5,22,34,.72);
  box-shadow: inset 0 1px 0 rgba(205,241,255,.025);
}

.portal-body .portal-app-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 17px;
  padding: 18px;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.portal-body .portal-app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(100,213,255,.34);
  background: linear-gradient(135deg, rgba(14,48,68,.8), rgba(5,25,39,.9));
  box-shadow: 0 14px 38px rgba(0,0,0,.2), 0 0 30px rgba(61,190,237,.055);
}
.portal-body .portal-app-mark {
  width: 56px;
  height: 56px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(101,214,255,.24);
  border-radius: 16px;
  color: #c7f2ff;
  background:
    radial-gradient(circle at 30% 24%, rgba(126,224,255,.18), transparent 46%),
    linear-gradient(145deg, rgba(33,128,166,.24), rgba(9,48,69,.28));
  box-shadow: inset 0 0 22px rgba(75,200,245,.08), 0 0 24px rgba(61,187,231,.04);
  font-size: 1.2rem;
  font-weight: 650;
}

.portal-body .portal-app-mark::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  right: -14px;
  bottom: -14px;
  border: 1px solid rgba(111,220,255,.18);
  border-radius: 50%;
}

.portal-app-mark span {
  position: relative;
  z-index: 1;
}

.portal-app-copy {
  min-width: 0;
}

.portal-app-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.portal-app-copy h3,
.portal-empty h3 {
  margin: 0;
  color: #f2fbff;
  font-size: 1rem;
  font-weight: 590;
  line-height: 1.3;
}

.portal-role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.portal-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 8px;
  border: 1px solid rgba(103,214,255,.18);
  border-radius: 999px;
  color: #7fdfff;
  background: rgba(67,178,220,.075);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .09em;
}

.portal-body .portal-app-copy p {
  margin: 0;
  color: #7897a8;
  font-size: .78rem;
  line-height: 1.55;
}

.portal-body .portal-open {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(105,214,255,.19);
  border-radius: 12px;
  color: #75dcff;
  background: rgba(45,158,200,.055);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.portal-body .portal-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-body .portal-app-card:hover .portal-open {
  transform: translateX(2px);
  border-color: rgba(112,220,255,.42);
  background: rgba(58,183,229,.11);
}
.portal-body .portal-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 28px;
  text-align: center;
}

.portal-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  border: 1px solid rgba(105,214,255,.18);
  border-radius: 13px;
  color: #75dcff;
  background: rgba(62,170,210,.06);
}

.portal-body .portal-empty p {
  max-width: 430px;
  margin: 0;
  color: #7897a8;
  font-size: .8rem;
  line-height: 1.55;
}

.portal-panel-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 19px;
  padding: 17px 2px 0;
  border-top: 1px solid rgba(117,203,237,.08);
  color: #527689;
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.portal-panel-foot span:last-child {
  color: #658da1;
  letter-spacing: .08em;
}
@media (max-width: 900px) {
  .portal-body::before {
    background-position: 54% top;
  }

  .portal-body .portal-shell {
    width: min(100% - 32px, 760px);
    padding-top: 54px;
  }

  .portal-hero {
    min-height: 224px;
  }

  .portal-body .portal-apps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portal-body .portal-header {
    min-height: 70px;
    padding: 0 16px;
  }

  .portal-brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .portal-brand-logo img {
    width: 30px;
    height: 30px;
  }

  .portal-brand-copy strong {
    font-size: .9rem;
  }

  .portal-brand-copy small {
    font-size: .52rem;
  }

  .portal-body .portal-action {
    width: 39px;
    min-width: 39px;
    height: 39px;
    padding: 0;
    border-radius: 12px;
  }

  .portal-action-label {
    display: none;
  }

  .portal-body .portal-shell {
    width: min(100% - 24px, 760px);
    padding: 36px 0 34px;
  }

  .portal-hero {
    min-height: 206px;
    padding-bottom: 18px;
  }

  .portal-eyebrow {
    font-size: .56rem;
    letter-spacing: .17em;
  }

  .portal-body .portal-intro h1 {
    font-size: clamp(2.15rem, 11vw, 3.1rem);
    line-height: 1.02;
  }

  .portal-body .portal-intro > p:not(.eyebrow) {
    margin-top: 14px;
    font-size: .84rem;
  }

  .portal-hero-meta {
    gap: 8px;
    margin-top: 17px;
    font-size: .62rem;
  }

  .portal-meta-divider {
    display: none;
  }

  .portal-app-panel {
    padding: 17px;
    border-radius: 20px;
  }

  .portal-section-head {
    align-items: flex-start;
    margin-bottom: 15px;
  }

  .portal-secure-state {
    display: none;
  }

  .portal-body .portal-app-card {
    min-height: 112px;
    gap: 13px;
    padding: 15px;
  }

  .portal-body .portal-app-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .portal-app-title-row {
    gap: 6px 8px;
    margin-bottom: 6px;
  }

  .portal-app-copy h3 {
    font-size: .94rem;
  }

  .portal-role-badge {
    min-height: 19px;
    padding: 0 7px;
    font-size: .54rem;
  }

  .portal-body .portal-app-copy p {
    font-size: .72rem;
  }

  .portal-body .portal-open {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .portal-panel-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    font-size: .5rem;
  }
}

@media (max-width: 420px) {
  .portal-brand-copy small {
    display: none;
  }

  .portal-body .portal-header-actions {
    gap: 6px;
  }

  .portal-body .portal-app-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .portal-body .portal-open {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-body .portal-app-card,
  .portal-body .portal-open,
  .portal-body .portal-action {
    transition: none;
  }
}

/* Central user registration & approval */
.auth-note,
.auth-provider-note,
.portal-empty-inline {
  border: 1px solid rgba(119,211,247,.12);
  border-radius: 12px;
  background: rgba(7,25,37,.58);
  color: #91adbb;
  font-size: .82rem;
  line-height: 1.55;
}
.auth-note { padding: 12px 14px; }
.auth-provider-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
}
.auth-provider-note a { color: #80ddff; text-decoration: none; }
.auth-provider-note b { color: #7ea0af; font-size: .72rem; font-weight: 600; }

.auth-form select,
.activation-result input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(145,207,231,.2);
  border-radius: 12px;
  padding: 13px 14px;
  color: #f8fcff;
  background: rgba(255,255,255,.045);
  outline: none;
}
.auth-form select option { color: #0b1b24; }
.auth-card-wide { width: min(100%, 620px); }
.identity-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 22px;
  color: #8bdfff;
  font-size: .72rem;
}
.identity-flow span { padding: 6px 9px; border-radius: 999px; background: rgba(101,214,255,.08); }
.identity-flow i { color: #557986; font-style: normal; }

.review-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.approval-result { display: grid; gap: 14px; }
.activation-result { display: grid; gap: 8px; color: #cce3ed; font-size: .9rem; }
.portal-pending-panel {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid rgba(119,211,247,.12);
  border-radius: 20px;
  background: rgba(5,20,31,.56);
}
.compact-head { margin-bottom: 14px; align-items: center; }
.compact-head .btn { text-decoration: none; }
.pending-card { border-color: rgba(245,184,74,.18); }
.portal-empty-inline { padding: 18px; text-align: center; }
.existing-users::before {
  content: "ACTIVE / PROVISIONED USERS";
  display: block;
  margin: 4px 0 0;
  color: #5f93ab;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
}
@media (max-width: 620px) {
  .auth-provider-note { flex-direction: column; }
  .review-actions { grid-template-columns: 1fr; }
  .compact-head { align-items: flex-start; flex-direction: column; }
}

/* Hidden state must win over .auth-form { display: grid }. */
.auth-form[hidden],
.auth-success[hidden] {
  display: none !important;
}


/* AYLA user presence */
.portal-presence{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;margin:.45rem 0 .7rem;font-size:.86rem;color:var(--muted,#94a3b8)}
.portal-presence-badge{display:inline-flex;align-items:center;border:1px solid rgba(148,163,184,.25);border-radius:999px;padding:.2rem .55rem;font-weight:700;letter-spacing:.01em}
.portal-presence-badge.is-online{color:#34d399;border-color:rgba(52,211,153,.35);background:rgba(16,185,129,.08)}
.portal-presence-badge.is-idle{color:#fbbf24;border-color:rgba(251,191,36,.35);background:rgba(245,158,11,.08)}
.portal-presence-badge.is-offline{color:#94a3b8;background:rgba(148,163,184,.06)}
