@font-face {
  font-family: "Bryson";
  src: url("/billing/assets/branding/Fonts/Title/Bryson-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --pp-navy: #272b58;
  --pp-orange: #e58a2a;
  --pp-cream: #f3e5d5;
  --pp-line: #dddfe8;
  --pp-text: #22243b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--pp-cream);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--pp-text);
  background: var(--pp-cream);
  font-family: Montserrat, Arial, sans-serif;
}

body.central-studio-login {
  min-height: 100vh;
  min-height: 100dvh;
  background: #272b58;
  color: #fff;
  overflow: hidden;
}

body.central-studio-login::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 100%
  );
  pointer-events: none;
}

body.central-studio-login .account-shell {
  position: relative;
  z-index: 1;
  width: min(430px, calc(100vw - 36px));
  padding: 22px 0 72px;
  align-items: center;
}

body.central-studio-login .central-login-utility {
  position: fixed;
  inset: 0 0 auto;
  z-index: 8;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  pointer-events: none;
}

body.central-studio-login .central-login-utility-logo {
  width: 48px;
  height: 48px;
}

body.central-studio-login .central-login-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

body.central-studio-login .central-login-utility-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  transition: background 0.18s ease;
}

body.central-studio-login .central-login-utility-link:hover,
body.central-studio-login .central-login-utility-link:focus-visible {
  background: transparent;
}

body.central-studio-login .central-login-utility-link:hover img,
body.central-studio-login .central-login-utility-link:focus-visible img {
  filter: brightness(0) saturate(100%) invert(100%);
}

body.central-studio-login .central-login-utility-link img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

body.central-studio-login .central-login-utility-link span {
  display: none;
}

body.central-studio-login .status {
  width: 100%;
  margin-bottom: 10px;
}

body.central-studio-login .central-login-stack {
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

body.central-studio-login .central-login-card {
  width: 100%;
  padding: 20px 22px 24px;
  background: rgba(245, 248, 255, 0.95);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(16, 18, 45, 0.26);
}

body.central-studio-login .central-login-logo {
  display: block;
  width: min(430px, 100%);
  object-fit: contain;
  margin: 0;
}

body.central-studio-login label {
  color: #5f6273;
}

body.central-studio-login input {
  background: #fff;
}

body.central-studio-login .muted {
  margin: 14px 0 0;
  text-align: center;
  font-size: 14px;
}

a {
  color: var(--pp-navy);
}

.account-shell {
  width: min(940px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.account-shell-wide {
  width: min(1260px, calc(100vw - 40px));
  justify-content: flex-start;
  padding-top: 40px;
}

.account-profile-page .account-shell-wide {
  width: calc(100vw - 80px);
  display: grid;
  grid-template-columns: 210px minmax(0, 1260px);
  gap: 18px 34px;
  align-items: start;
  justify-content: start;
}

.account-profile-page .account-shell-wide > :not(.account-logo-small) {
  grid-column: 2;
}

.account-card,
.panel {
  background: #fff;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(39, 43, 88, 0.08);
}

.account-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 34px;
}

.account-logo {
  display: block;
  width: min(520px, 100%);
  margin: 0 auto 14px;
}

.account-logo-small {
  width: min(300px, 70vw);
}

.account-profile-page .account-logo-small {
  position: sticky;
  top: 40px;
  z-index: 5;
  grid-column: 1;
  grid-row: 1;
  width: min(190px, 46vw);
  margin: 0;
}

@media (min-width: 1800px) {
  .account-profile-page .account-shell-wide {
    width: min(1260px, calc(100vw - 80px));
    display: flex;
    gap: 0;
    margin: 0 auto;
  }

  .account-profile-page .account-shell-wide > :not(.account-logo-small) {
    grid-column: auto;
    width: 100%;
  }

  .account-profile-page .account-logo-small {
    position: fixed;
    left: 40px;
    top: 40px;
  }
}

h1,
h2,
.page-header h1 {
  margin: 0;
  color: var(--pp-navy);
  font-family: "Bryson", Impact, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-card h1 {
  color: var(--pp-orange);
  text-align: center;
  font-size: 34px;
  margin-bottom: 26px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  color: #666;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--pp-text);
  font: inherit;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.btn,
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(229, 138, 42, 0.55);
  border-radius: 8px;
  padding: 10px 18px;
  background: #fff;
  color: var(--pp-navy);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary,
button.primary {
  border-color: var(--pp-orange);
  background: var(--pp-orange);
  color: #fff;
}

.btn.full,
button.full {
  width: 100%;
}

.status {
  margin: 0 auto 14px;
  width: min(680px, 100%);
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--pp-line);
  background: #fff;
}

.status.error {
  border-color: #d26565;
  color: #9d2525;
}

.status.success {
  border-color: #6fbea9;
  color: #226956;
}

.muted {
  color: #6f7182;
}

.page-header {
  margin: 18px 0 24px;
}

.page-header p {
  margin: 0 0 7px;
  color: var(--pp-orange);
  font-weight: 800;
  text-transform: uppercase;
}

.page-header h1 {
  font-size: clamp(36px, 5vw, 60px);
}

.page-header span {
  display: block;
  margin-top: 8px;
  color: #6f7182;
  font-size: 18px;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-nav a {
  padding: 10px 14px;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.admin-nav a.active {
  background: var(--pp-navy);
  color: #fff;
}

.admin-back-form {
  margin: 0 0 18px;
}

.impersonation-banner .admin-back-form {
  margin: 0;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(229, 138, 42, 0.65);
  border-radius: 8px;
  background: #fff9f1;
  color: var(--pp-navy);
}

.impersonation-banner div {
  display: grid;
  gap: 3px;
}

.impersonation-banner span {
  color: rgba(39, 43, 88, 0.72);
  font-weight: 800;
}

.impersonation-banner strong,
.impersonation-banner span {
  display: block;
}

.impersonation-banner span {
  margin-top: 3px;
  color: #6f7182;
}

.impersonation-banner form {
  margin: 0;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.panel h2 {
  padding-left: 10px;
}

.account-profile-page .panel > h2 {
  padding-left: 0;
}

.account-profile-page .companies-panel > h2 {
  padding-left: 10px;
}

.admin-create-panel h2 {
  padding-left: 0;
  margin: 0 0 6px;
  line-height: 1;
}

.panel-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.panel-heading-row h2 {
  margin: 0;
}

.search-control {
  width: min(360px, 100%);
  margin: 0;
}

.search-control span {
  color: var(--pp-navy);
  font-size: 13px;
  font-weight: 900;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-control input {
  min-height: 40px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--pp-line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--pp-navy);
  font-weight: 900;
}

.table-center {
  text-align: center;
  vertical-align: middle;
}

.app-link-list {
  color: var(--pp-navy);
  font-weight: 800;
}

.company-group-row td {
  padding: 18px 10px 8px;
  border-bottom: 1px solid rgba(229, 138, 42, 0.28);
  color: var(--pp-orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.company-chip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.company-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(39, 43, 88, 0.16);
  border-radius: 999px;
  background: #f7f7fb;
  color: var(--pp-navy);
  padding: 3px 9px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.link-action {
  min-height: 38px;
  min-width: 88px;
  border-color: rgba(229, 138, 42, 0.55);
  background: rgba(229, 138, 42, 0.08);
  color: var(--pp-navy);
  padding: 9px 15px;
  font-size: 15px;
  line-height: 1.1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.link-action:hover,
.link-action:focus-visible {
  border-color: var(--pp-orange);
  background: var(--pp-orange);
  color: #fff;
  transform: translateY(-1px);
}

.user-action-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.user-action-stack form {
  margin: 0;
}

.user-action-stack .link-action {
  min-width: 98px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #cfd2e4;
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--pp-navy);
  font-size: 13px;
  font-weight: 800;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form select,
.inline-form input {
  min-width: 190px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.setup-link {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--pp-orange);
  border-radius: 8px;
  background: #fff9f1;
  overflow-wrap: anywhere;
}

.notification-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.notification-stat {
  padding: 16px;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  background: #fcfcfe;
}

.notification-stat span {
  display: block;
  color: #6f7182;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--pp-navy);
  font-size: 26px;
}

.notification-send-form button {
  min-width: 220px;
}

.account-overview-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-profile-summary,
.company-account-identity,
.admin-user-cell,
.admin-company-group-label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-person-avatar,
.account-company-logo {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: var(--pp-orange);
  color: #fff;
  font-family: var(--pp-heading);
  font-size: 30px;
  font-weight: 900;
}

.account-company-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f5f5fb;
  color: var(--pp-navy);
  font-size: 24px;
}

.account-person-avatar-small {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.account-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-company-logo img,
.admin-company-group-label img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-company-group-label img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
}

.account-overview-panel h2 {
  padding-left: 0;
}

.account-notification-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-notification-panel h2 {
  padding-left: 0;
}

.account-notification-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.account-notification-actions button {
  min-width: 150px;
}

.profile-form button,
.admin-password-form button,
.profile-links-form button {
  min-width: 180px;
  margin-top: 4px;
}

.email-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-admin-list {
  display: grid;
  gap: 10px;
}

.email-admin-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.email-admin-item form,
.email-admin-add {
  margin: 0;
}

.email-admin-add {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.email-admin-add label {
  margin-bottom: 0;
}

.mini-action {
  min-height: 30px;
  padding: 5px 10px;
  border-color: rgba(39, 43, 88, 0.16);
  background: #fff;
  font-size: 13px;
}

.mini-action:hover,
.mini-action:focus-visible {
  border-color: var(--pp-orange);
  color: var(--pp-orange);
}

.mini-action.danger:hover,
.mini-action.danger:focus-visible {
  border-color: #d26565;
  color: #9d2525;
}

.company-account-list {
  display: grid;
  gap: 16px;
}

.company-account-card {
  padding: 18px 10px 4px;
  border-top: 1px solid rgba(229, 138, 42, 0.38);
}

.company-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.company-account-head h3 {
  margin: 3px 0 0;
  color: var(--pp-navy);
  font-size: 24px;
}

.company-account-eyebrow {
  margin: 0;
  color: var(--pp-orange);
  font-weight: 900;
  text-transform: uppercase;
}

.company-account-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.company-account-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--pp-navy);
}

.company-account-apps span {
  font-weight: 800;
}

.profile-links-form {
  padding: 16px;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  background: #fcfcfe;
}

.profile-links-form h4 {
  margin: 0 0 14px;
  color: var(--pp-navy);
  font-family: "Bryson", Impact, sans-serif;
  font-size: 24px;
  text-transform: uppercase;
}

.profile-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}

@media (max-width: 740px) {
  .account-shell,
  .account-shell-wide {
    width: min(100vw - 24px, 560px);
    padding: 24px 0;
  }

  .account-profile-page .account-shell-wide {
    display: flex;
    width: min(100vw - 24px, 560px);
  }

  .account-profile-page .account-logo-small {
    position: sticky;
    width: min(180px, 54vw);
    margin: 0 0 22px;
  }

  .account-card,
  .panel {
    padding: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .account-overview-panel,
  .account-notification-panel,
  .company-account-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-notification-actions {
    justify-content: flex-start;
  }

  .company-account-meta {
    justify-content: flex-start;
  }

  .profile-link-grid {
    grid-template-columns: 1fr;
  }

  .notification-summary-grid {
    grid-template-columns: 1fr;
  }

  .impersonation-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .email-admin-add {
    grid-template-columns: 1fr;
  }
}
