/* ==========================================================================
   Plan & entitlement center — 2026 redesign
   Layered on top of base.css + app.css; all selectors are plan-center scoped.
   ========================================================================== */

.plan-center .page-head {
  margin-bottom: 20px;
}

.plan-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.plan-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}

.plan-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.plan-mode-tab svg {
  color: var(--text-3);
}

.plan-mode-tab > span {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.plan-mode-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.plan-mode-tab.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 3px 10px rgba(17, 25, 29, 0.18);
}

.plan-mode-tab.is-active svg {
  color: var(--brand);
}

.plan-mode-tab.is-active > span {
  color: #f4d6c2;
  background: rgba(255, 255, 255, 0.12);
}

.plan-mode-note {
  color: var(--text-3);
  font-size: 12px;
}

/* ------------------------------- Revenue -------------------------------- */

.revenue-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr);
  gap: 24px;
  overflow: hidden;
  padding: 26px 28px;
  color: #f7f4ed;
  background:
    radial-gradient(115% 160% at 100% 0%, rgba(208, 112, 55, 0.32) 0%, rgba(38, 48, 50, 0) 48%),
    radial-gradient(80% 110% at 0% 100%, rgba(27, 50, 56, 0.6) 0%, rgba(17, 25, 29, 0) 65%),
    linear-gradient(120deg, #121b1f 0%, #172327 58%, #10181b 100%);
  border: 1px solid #2b3538;
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(17, 25, 29, 0.15);
}

.revenue-hero::before,
.revenue-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.revenue-hero::before {
  width: 330px;
  height: 330px;
  right: -96px;
  top: -190px;
}

.revenue-hero::after {
  width: 210px;
  height: 210px;
  right: 54px;
  top: -130px;
}

.revenue-main,
.revenue-facts {
  position: relative;
  z-index: 1;
}

.revenue-kicker {
  margin-bottom: 9px;
  color: #a7a49b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.revenue-value {
  color: #faf7f0;
  font-size: 43px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.03;
  font-variant-numeric: tabular-nums;
}

.revenue-value small {
  margin-left: 8px;
  color: #aaa79f;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.revenue-foot {
  margin: 9px 0 18px;
  color: #b7b4ac;
  font-size: 12.5px;
}

.revenue-foot strong {
  color: #f1ede5;
  font-weight: 500;
}

.revenue-foot span {
  margin: 0 7px;
  color: #686b68;
}

.revenue-mix {
  display: flex;
  gap: 3px;
  width: min(300px, 100%);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.revenue-mix-part {
  flex: 0 0 var(--mix);
  min-width: 4px;
  background: var(--tone);
  border-radius: 999px;
}

.revenue-mix-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 9px;
  color: #8e8e87;
  font-size: 12px;
}

.revenue-mix-labels span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.revenue-mix-labels i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.revenue-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.revenue-fact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2px 16px;
}

.revenue-fact + .revenue-fact {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.revenue-fact > span {
  color: #9b9a93;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.revenue-fact > strong {
  margin: 7px 0 4px;
  color: #fbf7ef;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.revenue-fact > strong small {
  color: #8f9089;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.revenue-fact > em {
  overflow: hidden;
  color: #7f817b;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------- Suite cards ---------------------------- */

.suite-section {
  margin-top: 25px;
}

.suite-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.suite-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.suite-section-head p {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.suite-count {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.suite-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  align-items: stretch;
}

.suite-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(24, 26, 24, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.suite-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px rgba(24, 26, 24, 0.07);
}

.suite-card.is-featured {
  color: #f8f5ee;
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(239, 106, 43, 0.2) 0%, rgba(21, 30, 34, 0) 52%),
    linear-gradient(145deg, #172126 0%, #11191d 100%);
  border-color: #2c393d;
  box-shadow: 0 18px 38px rgba(17, 25, 29, 0.17);
}

.suite-card.is-featured:hover {
  border-color: #455155;
  box-shadow: 0 22px 44px rgba(17, 25, 29, 0.23);
}

.suite-card.is-off {
  opacity: 0.68;
}

.suite-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.suite-code {
  margin-bottom: 7px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.suite-code span {
  margin: 0 3px;
  color: var(--line-strong);
}

.suite-title-wrap h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.suite-status {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 4px 7px;
  color: var(--text-3);
  font-size: 12px;
  background: var(--surface-3);
  border-radius: 5px;
}

.suite-status.is-on {
  color: #126844;
  background: #eaf7f0;
}

.suite-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #3d1c09;
  font-size: 12px;
  font-weight: 600;
  background: #f6a272;
  border-radius: 5px;
}

.suite-card.is-featured .suite-code {
  color: #8e928d;
}

.suite-card.is-featured .suite-code span {
  color: #4d5553;
}

.suite-card.is-featured .suite-title-wrap h2 {
  color: #fbf7ef;
}

.suite-desc {
  min-height: 41px;
  margin: 11px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.68;
}

.suite-card.is-featured .suite-desc {
  color: #aaa9a1;
}

.suite-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0 14px;
  min-height: 46px;
}

.suite-currency {
  margin-right: 2px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}

.suite-price strong {
  color: var(--text);
  font-size: 39px;
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.suite-period {
  margin-left: 5px;
  color: var(--text-3);
  font-size: 11.5px;
}

.suite-price em {
  flex-basis: 100%;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
}

.suite-card.is-featured .suite-currency,
.suite-card.is-featured .suite-price strong {
  color: #fbf7ef;
}

.suite-card.is-featured .suite-period,
.suite-card.is-featured .suite-price em {
  color: #888c86;
}

.suite-limits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.suite-limit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 3px 8px;
}

.suite-limit + .suite-limit {
  border-left: 1px solid var(--line);
}

.suite-limit strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.suite-limit strong small {
  margin-left: 1px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

.suite-limit > span {
  color: var(--text-3);
  font-size: 12px;
}

.suite-card.is-featured .suite-limits {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.09);
}

.suite-card.is-featured .suite-limit + .suite-limit {
  border-color: rgba(255, 255, 255, 0.08);
}

.suite-card.is-featured .suite-limit strong {
  color: #edeae2;
}

.suite-card.is-featured .suite-limit strong small,
.suite-card.is-featured .suite-limit > span {
  color: #838781;
}

.suite-apps {
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.suite-card.is-featured .suite-apps {
  border-color: rgba(255, 255, 255, 0.1);
}

.suite-apps-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.suite-apps-head > span {
  color: var(--text-3);
  font-size: 12px;
}

.suite-apps-head > strong {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

.suite-card.is-featured .suite-apps-head > strong {
  color: #d3a17c;
}

.suite-app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.suite-app-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 6px;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.suite-app-chip.is-more {
  color: var(--text-3);
  background: transparent;
  border-style: dashed;
}

.suite-card.is-featured .suite-app-chip {
  color: #c2c1b9;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.11);
}

.suite-card.is-featured .suite-app-chip.is-more {
  color: #858981;
  background: transparent;
}

.suite-apps-note {
  margin-top: 7px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.4;
}

.suite-card.is-featured .suite-apps-note {
  color: #7e827c;
}

.suite-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 11px;
  color: var(--text-3);
  font-size: 12px;
}

.suite-permissions > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.suite-permissions strong {
  color: var(--text-2);
  font-weight: 600;
}

.suite-permissions svg {
  color: #1b8b65;
}

.suite-card.is-featured .suite-permissions {
  color: #868a83;
}

.suite-card.is-featured .suite-permissions strong {
  color: #d4d0c7;
}

.suite-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.suite-card.is-featured .suite-foot {
  border-color: rgba(255, 255, 255, 0.1);
}

.suite-mrr {
  min-width: 0;
}

.suite-mrr strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.suite-mrr span {
  color: var(--text-3);
  font-size: 12px;
}

.suite-card.is-featured .suite-mrr strong {
  color: #f3efe7;
}

.suite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.suite-actions .plan-detail-link {
  font-size: 11.5px;
}

.suite-card.is-featured .suite-actions .plan-detail-link {
  color: #d09b76;
}

.suite-card.is-featured .suite-actions .btn-secondary {
  color: #e1ddd3;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
}

.suite-card.is-featured .suite-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* -------------------------------- Matrix -------------------------------- */

.matrix-card {
  margin-top: 24px;
  overflow: hidden;
}

.matrix-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 22px 16px;
}

.matrix-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.matrix-head p {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 11.5px;
}

.matrix-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.matrix-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.matrix-table th,
.matrix-table td {
  padding: 11px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.matrix-table thead th {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--surface-2);
}

.matrix-table thead th:first-child {
  width: 31%;
  padding-left: 22px;
}

.matrix-table thead th:not(:first-child) {
  width: 23%;
  text-align: center;
}

.matrix-table thead th.is-featured,
.matrix-table td.is-featured {
  background: #fff8f3;
}

.matrix-table thead th.is-featured {
  box-shadow: inset 0 2px 0 var(--brand);
}

.matrix-plan-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.matrix-plan-meta {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.matrix-table tbody tr:hover td {
  background: #fcfbf8;
}

.matrix-table tbody tr:hover td.is-featured {
  background: #fff4ec;
}

.matrix-table td:not(:first-child) {
  text-align: center;
  color: var(--text-2);
}

.matrix-table td:first-child {
  color: var(--text-2);
  font-size: 11.5px;
}

.matrix-table td strong {
  color: var(--text);
  font-weight: 600;
}

.matrix-group-row td {
  padding-top: 8px;
  padding-bottom: 8px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: var(--surface-3) !important;
}

.matrix-permission-group td {
  padding-top: 7px;
  padding-bottom: 7px;
  padding-left: 28px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-2) !important;
}

.matrix-sub {
  color: var(--text-3);
  font-size: 12px;
}

.matrix-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #16855f;
  background: #e9f7f0;
  border-radius: 50%;
}

.matrix-dash {
  color: #c5c1b8;
  font-size: 13px;
}

.plan-center .text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ------------------------------- Catalog -------------------------------- */

.catalog-summary {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 14px;
  padding: 18px 22px;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(239, 106, 43, 0.08), transparent 55%),
    linear-gradient(110deg, #fffdf9 0%, #fbf8f2 100%);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.catalog-summary-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.catalog-big {
  color: var(--text);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.catalog-big small {
  margin-left: 3px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.catalog-summary-main strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.catalog-summary-main p {
  margin: 0;
  color: var(--text-3);
  font-size: 11.5px;
}

.catalog-summary-fact {
  display: flex;
  flex-direction: column;
  flex: 0 0 150px;
  gap: 2px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.catalog-summary-fact > span {
  color: var(--text-3);
  font-size: 12px;
}

.catalog-summary-fact > strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.catalog-summary-fact > strong small {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

.catalog-summary-fact > em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.catalog-search {
  width: 350px;
  flex: 0 1 350px;
}

.catalog-search .input {
  height: 38px;
}

.catalog-billing {
  width: 135px;
  flex: 0 0 135px;
  height: 38px;
}

.catalog-result {
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
}

.module-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.module-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.module-chip span {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.module-chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.module-chip.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.module-chip.is-active span {
  color: #c8b5a6;
}

.addon-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.addon-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.addon-group-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 9px;
}

.addon-group-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.addon-group-head p {
  margin: 2px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.addon-group-count {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

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

.addon-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.addon-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px rgba(24, 26, 24, 0.055);
}

.addon-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.addon-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 8px;
}

.addon-icon[data-tone="green"] { color: #14704e; background: #e8f6ef; }
.addon-icon[data-tone="blue"] { color: #2c5da8; background: #edf3fc; }
.addon-icon[data-tone="amber"] { color: #946216; background: #fbf3e3; }
.addon-icon[data-tone="red"] { color: #a84235; background: #fceeea; }
.addon-icon[data-tone="teal"] { color: #176b6c; background: #e9f5f4; }
.addon-icon[data-tone="violet"] { color: #6950a0; background: #f1eef9; }

.addon-title {
  flex: 1;
  min-width: 0;
}

.addon-title h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-title > span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-billing {
  flex: 0 0 auto;
  padding: 3px 5px;
  color: var(--text-3);
  font-size: 12px;
  background: var(--surface-3);
  border-radius: 4px;
}

.addon-billing.is-free {
  color: #14704e;
  background: #ebf7f1;
}

.addon-billing.is-quote {
  color: #8c621b;
  background: #faf2e2;
}

.addon-desc {
  min-height: 34px;
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.addon-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.addon-price {
  display: flex;
  align-items: baseline;
  min-width: 0;
  color: var(--text);
}

.addon-price strong {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.addon-price small {
  margin-left: 2px;
  color: var(--text-3);
  font-size: 12px;
}

.addon-plans-count {
  overflow: hidden;
  color: var(--text-3);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 19px;
  margin-top: 7px;
}

.addon-plan-chip {
  padding: 2px 5px;
  color: #6d6253;
  font-size: 12px;
  background: #f7f2e9;
  border-radius: 4px;
}

.addon-plan-chip[data-tone="orange"] {
  color: #9b4e20;
  background: #fdf0e7;
}

.addon-plan-chip[data-tone="ink"] {
  color: #f1ede5;
  background: #2b3335;
}

.addon-plan-empty {
  color: var(--text-3);
  font-size: 12px;
}

.addon-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.addon-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
  font-size: 12px;
}

.addon-state::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #bcb8ae;
  border-radius: 50%;
}

.addon-state.is-on::before {
  background: #1b8b65;
}

.addon-card-foot .text-action {
  font-size: 12px;
}

.addon-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 220px;
  color: var(--text-3);
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.addon-empty svg {
  margin-bottom: 3px;
  opacity: 0.65;
}

.addon-empty strong {
  color: var(--text-2);
  font-size: 13px;
}

.addon-empty span {
  font-size: 12px;
}

/* --------------------------- Plan app picker ---------------------------- */

.plan-app-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-app-summary > span {
  color: var(--text-2);
  font-size: 11.5px;
}

.plan-app-summary strong {
  color: var(--text);
  font-weight: 600;
}

.plan-app-summary em {
  color: var(--brand-strong);
  font-style: normal;
  font-weight: 600;
}

.plan-app-summary-actions {
  display: flex;
  gap: 9px;
}

.plan-app-groups {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.plan-app-group {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.plan-app-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.plan-app-group-head span:last-child {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

.plan-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.plan-app-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  background: var(--surface);
  cursor: pointer;
}

.plan-app-option:hover {
  background: var(--surface-2);
}

.plan-app-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-app-check {
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: transparent;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.plan-app-option input:checked + .plan-app-check {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

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

.plan-app-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-app-copy span {
  display: block;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 12px;
}

.plan-app-meta {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}

/* ------------------------------ Plan drawer ----------------------------- */

.plan-includes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.plan-includes-head > span {
  color: var(--text-2);
  font-size: 11.5px;
}

.plan-includes-head > strong {
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 500;
}

.plan-includes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.plan-include-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: var(--text-2);
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.plan-include-chip.is-muted {
  color: var(--text-3);
  border-style: dashed;
}

.plan-include-chip small {
  color: var(--text-3);
  font-size: 12px;
}

/* ------------------------------- Addon form ----------------------------- */

.addon-form .form-grid {
  row-gap: 13px;
}

.addon-form .field-hint {
  font-size: 12px;
}

.addon-form-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  color: #765641;
  font-size: 12px;
  line-height: 1.6;
  background: var(--brand-tint);
  border: 1px solid #f1dfd2;
  border-radius: 8px;
}

/* ------------------------------- Responsive ----------------------------- */

@media (max-width: 1320px) {
  .revenue-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .revenue-facts {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
    padding-top: 16px;
  }

  .revenue-fact:first-child {
    padding-left: 0;
  }

  .suite-grid {
    gap: 12px;
  }

  .addon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-mode-note {
    display: none;
  }
}

@media (max-width: 980px) {
  .suite-grid {
    grid-template-columns: 1fr;
  }

  .suite-card {
    min-height: 0;
  }

  .suite-apps {
    margin-bottom: 3px;
  }

  .addon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-summary {
    flex-wrap: wrap;
    gap: 14px 22px;
  }

  .catalog-summary-fact {
    flex: 1 1 150px;
  }

  .catalog-summary-fact:nth-last-child(2) {
    border-left: 0;
    padding-left: 0;
  }

  .catalog-toolbar {
    flex-wrap: wrap;
  }

  .catalog-search {
    flex: 1 1 280px;
    width: auto;
  }

  .addon-groups {
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .plan-mode-bar {
    margin-bottom: 14px;
  }

  .plan-mode-tabs {
    width: 100%;
  }

  .plan-mode-tab {
    flex: 1;
    justify-content: center;
  }

  .revenue-hero {
    padding: 20px;
    border-radius: 15px;
  }

  .revenue-value {
    font-size: 36px;
  }

  .revenue-facts {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .revenue-fact {
    padding: 4px 12px;
  }

  .revenue-fact:nth-child(2) {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .revenue-fact:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .suite-section {
    margin-top: 20px;
  }

  .suite-section-head {
    align-items: flex-start;
  }

  .suite-section-head p {
    max-width: 270px;
    line-height: 1.55;
  }

  .suite-card {
    padding: 17px;
  }

  .suite-price strong {
    font-size: 36px;
  }

  .matrix-head {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }

  .matrix-table th,
  .matrix-table td {
    padding-left: 14px;
    padding-right: 14px;
  }

  .catalog-summary {
    padding: 15px 16px;
  }

  .catalog-summary-main {
    flex-basis: 100%;
  }

  .catalog-big {
    font-size: 33px;
  }

  .catalog-summary-fact {
    padding-left: 0;
    border-left: 0;
    flex: 1 1 120px;
  }

  .catalog-summary-fact + .catalog-summary-fact {
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }

  .catalog-toolbar {
    padding: 11px;
    gap: 8px;
  }

  .catalog-search {
    flex-basis: 100%;
    width: 100%;
  }

  .catalog-billing {
    flex: 1 1 130px;
    width: auto;
  }

  .catalog-result {
    margin-left: auto;
  }

  .module-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .module-filter::-webkit-scrollbar {
    display: none;
  }

  .module-chip {
    flex: 0 0 auto;
  }

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

  .addon-desc {
    min-height: 0;
  }

  .plan-app-grid {
    grid-template-columns: 1fr;
  }

  .plan-app-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 480px) {
  .revenue-facts {
    grid-template-columns: 1fr 1fr;
  }

  .revenue-fact > strong {
    font-size: 23px;
  }

  .suite-actions {
    gap: 6px;
  }

  .suite-actions .btn {
    padding-left: 9px;
    padding-right: 9px;
  }

  .suite-mrr {
    display: none;
  }

  .suite-foot {
    justify-content: flex-end;
  }

  .catalog-summary-fact {
    flex-basis: 100%;
  }

  .catalog-summary-fact + .catalog-summary-fact {
    padding-left: 0;
    border-left: 0;
  }

  .addon-group-head p {
    display: none;
  }

  .plan-app-summary-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Compact catalog summary on phones: two stats side by side */
@media (max-width: 760px) {
  .catalog-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px 0;
  }

  .catalog-summary-main {
    grid-column: 1 / -1;
    flex-basis: auto;
  }

  .catalog-summary-fact {
    flex: initial;
    padding-left: 0;
    border-left: 0;
  }

  .catalog-summary-fact + .catalog-summary-fact {
    padding-left: 18px;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 480px) {
  .catalog-summary-fact {
    flex-basis: auto;
  }

  .catalog-summary-fact + .catalog-summary-fact {
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }
}

/* Readability pass: never let plan-center meta copy fall below 11.5px */
.revenue-kicker { font-size: 12px; }
.revenue-fact > span { font-size: 12px; }
.revenue-fact > strong small { font-size: 12px; }
.revenue-fact > em { font-size: 12px; }
.suite-count { font-size: 11.5px; }
.suite-code { font-size: 11.5px; }
.suite-desc { font-size: 13.5px; }
.suite-period { font-size: 12.5px; }
.suite-price em { font-size: 12.5px; }
.suite-limit strong { font-size: 16px; }
.suite-limit strong small { font-size: 11.5px; }
.suite-limit > span { font-size: 12px; }
.suite-apps-head > span,
.suite-apps-head > strong { font-size: 12px; }
.suite-app-chip { font-size: 11.5px; padding: 4px 7px; }
.suite-apps-note { font-size: 12px; }
.suite-permissions { font-size: 12px; }
.suite-mrr span { font-size: 11.5px; }
.suite-actions .plan-detail-link { font-size: 12.5px; }
.matrix-head p { font-size: 12.5px; }
.matrix-table thead th { font-size: 12px; }
.matrix-table td { font-size: 13px; }
.matrix-table td:first-child { font-size: 13px; }
.matrix-plan-name { font-size: 13.5px; }
.matrix-plan-meta { font-size: 11.5px; }
.matrix-group-row td { font-size: 11.5px; }
.matrix-permission-group td { font-size: 11.5px; }
.matrix-sub { font-size: 11.5px; }
.catalog-big small { font-size: 12px; }
.catalog-summary-main p { font-size: 12.5px; }
.catalog-summary-fact > span { font-size: 11.5px; }
.catalog-summary-fact > em { font-size: 11.5px; }
.catalog-result { font-size: 12.5px; }
.module-chip { font-size: 12.5px; }
.module-chip span { font-size: 11.5px; }
.addon-title h3 { font-size: 14.5px; }
.addon-title > span { font-size: 12px; }
.addon-billing { font-size: 11.5px; }
.addon-desc { min-height: 40px; font-size: 13px; line-height: 1.55; }
.addon-price strong { font-size: 20px; }
.addon-price small { font-size: 11.5px; }
.addon-plans-count { font-size: 11.5px; }
.addon-plan-chip { font-size: 12px; padding: 3px 6px; }
.addon-plan-empty { font-size: 11.5px; }
.addon-state { font-size: 11.5px; }
.addon-group-head p { font-size: 12.5px; }
.addon-group-count { font-size: 12px; }
.addon-form .field-hint { font-size: 12.5px; }
.plan-app-summary > span { font-size: 13px; }
.plan-app-group-head { font-size: 12px; }
.plan-app-group-head span:last-child { font-size: 11.5px; }
.plan-app-copy strong { font-size: 13px; }
.plan-app-copy span { font-size: 12px; }
.plan-app-meta { font-size: 12px; }
.plan-selected-count { font-size: 12.5px; }
.plan-include-chip { font-size: 12px; }
.plan-include-chip small { font-size: 11.5px; }

/* ---------------------- Plan editor: composition & picker ---------------------- */
.plan-compose-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, #fbf8f2 0%, #f7f2e9 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.plan-compose-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  border-left: 1px solid var(--line);
}

.plan-compose-item:first-child { border-left: 0; }
.plan-compose-item > span { color: var(--text-3); font-size: 11.5px; letter-spacing: .03em; }
.plan-compose-item > strong { color: var(--text); font-size: 19px; font-weight: 600; line-height: 1.25; }
.plan-compose-item > strong b { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.plan-compose-item > strong small { color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.plan-compose-item > em { color: var(--text-3); font-size: 11.5px; font-style: normal; }
.plan-compose-item .text-action { margin-top: auto; padding: 4px 0 0; font-size: 11.5px; white-space: nowrap; }
.plan-compose-item.is-value strong { color: var(--brand-strong); }

.plan-sync-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 15px;
  padding: 11px 13px;
  background: #fcfaf6;
  border: 1px solid #eadfd0;
  border-radius: 10px;
  cursor: pointer;
}

.plan-sync-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.plan-sync-check {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  place-items: center;
  color: transparent;
  background: #fff;
  border: 1px solid #d8cbb9;
  border-radius: 5px;
}

.plan-sync-option > input:checked + .plan-sync-check {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.plan-sync-option > input:focus-visible + .plan-sync-check {
  outline: 2px solid rgba(234, 113, 51, .35);
  outline-offset: 2px;
}

.plan-sync-copy { display: flex; flex-direction: column; gap: 2px; }
.plan-sync-copy strong { color: var(--text); font-size: 12.5px; font-weight: 600; }
.plan-sync-copy small { color: var(--text-3); font-size: 11.5px; line-height: 1.55; }

.plan-app-tools {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.plan-app-search { flex: 1 1 auto; min-width: 0; margin: 0; }
.plan-app-only { flex: 0 0 auto; margin: 0; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.plan-app-only .box { width: 16px; height: 16px; }

.plan-app-group-actions { display: flex; align-items: center; gap: 7px; }
.plan-app-group-actions > span { color: var(--text-3); font-size: 11.5px; }
.plan-mini-action {
  padding: 2px 3px;
  color: var(--brand-strong);
  font: inherit;
  font-size: 11.5px;
  background: none;
  border: 0;
  cursor: pointer;
}
.plan-mini-action:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.plan-app-option.hidden,
.plan-app-group.hidden { display: none !important; }

.plan-section-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.plan-section-actions > span { color: var(--text-3); font-size: 11.5px; }
.plan-section-actions .text-action { font-size: 11.5px; white-space: nowrap; }

@media (max-width: 720px) {
  .plan-compose-summary { grid-template-columns: 1fr; }
  .plan-compose-item { padding: 11px 13px; border-top: 1px solid var(--line); border-left: 0; }
  .plan-compose-item:first-child { border-top: 0; }
  .plan-app-tools { align-items: stretch; flex-wrap: wrap; gap: 8px; }
  .plan-app-search { flex-basis: 100%; }
  .plan-app-group-actions { gap: 3px; }
  .plan-section-actions { justify-content: flex-start; gap: 6px; }
}

.plan-app-group.is-filtered .plan-app-grid { grid-template-columns: 1fr; }

.plan-app-grid { background: var(--surface); }
.plan-app-option { outline: 1px solid var(--line); outline-offset: -1px; }
.plan-section-actions { flex-wrap: nowrap; }
.plan-section-actions > span { white-space: nowrap; }

.plan-app-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 24px 16px;
  color: var(--text-3);
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
}
.plan-app-empty strong { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.plan-app-empty span { font-size: 11.5px; }

.plan-compose-item .text-action { align-self: flex-start; text-align: left; }
@media (max-width: 720px) {
  .plan-form-tab em { display: none; }
  .plan-app-grid { grid-template-columns: 1fr; }
}

.plan-section-actions .text-action { font-size: 12px; font-weight: 600; }
@media (max-width: 720px) {
  .plan-section-actions { flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; }
  .plan-section-actions > span { white-space: normal; }
}

.plan-section-actions .text-action {
  padding: 2px 7px;
  background: #fff9f4;
  border: 1px solid #f1d6c2;
  border-radius: 6px;
}
.plan-section-actions .text-action:hover {
  color: var(--brand);
  text-decoration: none;
  background: #fff2e7;
  border-color: #ecc4a8;
}
