.portal-body { background: var(--canvas); min-height: 100vh; }
.portal-width { max-width: 1100px; margin: 0 auto; padding-left: 25px; padding-right: 25px; }
.portal-top { background: var(--side); color: #edf4ff; border-bottom: 3px solid var(--gold); }
.portal-top-inner { min-height: 67px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.portal-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: 17px; font-weight: 720; letter-spacing: -.035em; }
.portal-brand img { border-radius: 50%; }
.portal-brand small { display: block; margin-top: 2px; font-size: 10px; font-weight: 600; color: #f1ce73; letter-spacing: .05em; }
.portal-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.portal-nav > a { font-size: 13px; color: #d3e3f7; padding: 8px; border-radius: 6px; white-space: nowrap; }
.portal-nav > a:hover, .portal-nav > a[aria-current=page] { background: var(--navy-soft); color: #fff; }
.portal-nav .button { min-height: 32px; border-color: #426286; color: #edf4ff; background: transparent; }
.portal-nav .button:hover { background: var(--navy-soft); }
.portal-body main { min-height: 0; padding-top: 32px; }
.portal-page-head { margin-bottom: 22px; }
.portal-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(120deg, var(--side), var(--navy-soft)); color: #f5f9ff; padding: clamp(23px, 5vw, 58px); border-radius: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 33%); align-items: center; gap: 25px; }
.portal-hero::after { content: ""; position: absolute; width: 410px; height: 410px; z-index: -1; right: -96px; top: -150px; border-radius: 50%; border: 1px solid #ddbd6750; box-shadow: 0 0 0 50px #ddbd6710, 0 0 0 100px #ddbd670b; }
.portal-kicker { color: #f1ce73; font-weight: 650; font-size: 13px; }
.portal-hero h1 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -.05em; line-height: 1.1; margin: 7px 0 12px; }
.portal-hero p:not(.portal-kicker) { max-width: 54ch; color: #d9e6f5; line-height: 1.55; }
.portal-hero p + p, .portal-hero .actions { margin-top: 17px; }
.portal-hero .button.primary { background: var(--gold); color: var(--side); border-color: var(--gold); }
.portal-hero .button.primary:hover { background: #f0c85a; }
.hero-plan { min-width: 0; border: 1px solid #637b9b; border-radius: 12px; padding: 18px; background: #081b3370; }
.hero-plan span { display: block; color: #e5c872; font-weight: 650; }
.hero-plan strong, .client-price { display: block; font-weight: 740; font-size: clamp(25px, 3.4vw, 37px); letter-spacing: -.045em; margin: 6px 0; }
.hero-plan small, .client-price small { font-size: 13px; font-weight: 500; letter-spacing: normal; }
.portal-metrics, .client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); gap: 14px; margin-bottom: 17px; }
.client-grid .panel + .panel { margin-top: 0; }
.portal-metrics .stat-card { min-height: 94px; }
.portal-metrics .stat-card h2 { padding-right: 0; }
.portal-metrics .stat-card .amount { margin-top: 6px; }
.portal-panel td:last-child .actions { flex-wrap: nowrap; }
.portal-panel .panel-body > form { max-width: 410px; }
.admin-tabs { display: flex; gap: 7px; margin: 0 0 17px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.admin-tabs a { padding: 9px 12px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.admin-tabs a:hover { color: var(--royal); }
.admin-tabs [aria-current=page] { border-color: var(--royal); color: var(--royal); }
.integration-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 14px; margin-bottom: 17px; }
.integration-cards .panel + .panel { margin-top: 0; }
.endpoint-card { padding: 17px 19px; }
.endpoint-card h2 { font-size: 16px; margin: 0 0 9px; }
.endpoint-card code { display: block; padding: 7px 9px; margin-bottom: 7px; background: #edf4fd; border-radius: 6px; color: var(--side); font-size: 12px; overflow-wrap: anywhere; }
.endpoint-card code b { color: var(--royal); }
.dashboard-client, .subscription-card { padding: 17px 19px; }
.dashboard-client h2, .subscription-card h2 { font-size: 18px; }
.dashboard-client .hint, .subscription-card p { margin-top: 6px; }
.dashboard-client .actions, .subscription-card .actions { margin-top: 13px; }
.subscription-card { margin-bottom: 16px; }
.client-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.client-avatar { width: 36px; height: 36px; border-radius: 9px; background: var(--royal-soft); color: var(--royal); font-weight: 720; display: grid; place-items: center; }
.plan-status { display: inline-flex; align-items: center; gap: 5px; background: var(--royal-soft); color: var(--navy-soft); border-radius: 30px; font-weight: 650; font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.plan-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.plan-status.pending { color: var(--gold-dark); background: #fbf1d7; }
.plan-status.active, .plan-status.approved { color: #246148; background: #e8f5ed; }
.plan-status.expired, .plan-status.suspended, .plan-status.declined, .plan-status.revoked { color: #8c3c34; background: #faece9; }
.portal-dialog .dialog-body > p:not(.hint):not(.form-error) { line-height: 1.5; }
.portal-dialog [data-decision] .hint { margin-top: 5px; }
.portal-dialog [aria-invalid=true] { border-color: var(--red); }
@media (max-width: 630px) {
  .portal-width { padding-left: 14px; padding-right: 14px; }
  .portal-top-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 6px; }
  .portal-nav { justify-content: flex-start; gap: 5px; }
  .portal-nav > a { padding: 5px; font-size: 12px; }
  .portal-hero { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .portal-body main { padding-top: 22px; }
  .portal-page-head { margin-bottom: 16px; }
  .portal-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .portal-metrics .stat-card { padding: 9px 8px; min-height: 71px; }
  .portal-metrics .stat-card h2 { font-size: 11px; }
  .portal-metrics .stat-card .amount { font-size: 19px; }
}
