/* Commercial center: memberships, benefits, teams, notifications, tickets and withdrawals. */
.commerce-head .btn { display: inline-flex; align-items: center; gap: 7px; }
.commerce-head .ui-icon { width: 16px; height: 16px; }

.member-current-band,
.team-create-band,
.team-member-overview,
.team-owner-summary {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(260px, .8fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
  padding: 28px;
  overflow: hidden;
  color: #f7f8fa;
  border: 1px solid #272c32;
  border-radius: 8px;
  background: #1d2126;
  box-shadow: 0 18px 45px rgba(25, 28, 32, .15);
}
.member-current-band > div:first-child > span,
.team-create-band > div > span,
.team-member-overview > div:first-child > span,
.team-owner-summary > div:first-child > span { color: #57c8bc; font-size: 10px; font-weight: 900; }
.member-current-band h2,
.team-create-band h2,
.team-member-overview h2,
.team-owner-summary h2 { margin: 7px 0; color: #fff; font-size: 28px; }
.member-current-band p,
.team-create-band p,
.team-member-overview p,
.team-owner-summary p { margin: 0; color: #aeb5be; }
.member-current-empty { grid-template-columns: 1fr; background: #25292e; }
.member-current-metric,
.team-quota-ring { min-width: 120px; display: grid; justify-items: center; padding: 18px; border: 1px solid #3b4249; border-radius: 7px; background: #262b31; }
.member-current-metric strong,
.team-quota-ring strong { color: #ff6a4d; font-size: 32px; }
.member-current-metric span,
.team-quota-ring span { color: #9ea6af; font-size: 11px; }
.member-current-features,
.team-permission-list { display: grid; gap: 9px; }
.member-current-features span,
.team-permission-list span { display: flex; align-items: center; gap: 7px; color: #cbd1d7; font-size: 12px; }
.member-current-features .ui-icon,
.team-permission-list .ui-icon { width: 14px; height: 14px; color: #57c8bc; }

.member-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.member-plan-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid #dde2e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 13px 35px rgba(25, 28, 32, .08);
}
.member-plan-card.featured { border-color: #efad9f; box-shadow: 0 18px 46px rgba(240, 82, 54, .13); }
.member-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-plan-top span { color: #f05236; font-size: 10px; font-weight: 900; }
.member-plan-top em { padding: 5px 9px; color: #117e75; border-radius: 5px; background: #e9f7f5; font-size: 11px; font-style: normal; font-weight: 800; }
.member-plan-card h2 { margin: 16px 0 9px; font-size: 27px; }
.member-plan-price { display: flex; align-items: baseline; gap: 4px; }
.member-plan-price small { color: #f05236; font-size: 18px; }
.member-plan-price strong { color: #20242a; font-size: 46px; line-height: 1; }
.member-plan-price span { color: #828993; }
.member-daily-quota { display: flex; align-items: baseline; gap: 8px; margin: 20px 0; padding: 15px; border-radius: 6px; background: #f3f7f6; }
.member-daily-quota strong { color: #168d83; font-size: 25px; }
.member-daily-quota span { color: #65706f; font-size: 12px; }
.member-plan-card ul { display: grid; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.member-plan-card li { display: flex; align-items: center; gap: 8px; color: #56606a; }
.member-plan-card li .ui-icon { width: 15px; height: 15px; color: #168d83; }
.member-plan-card label { display: grid; gap: 7px; margin-top: auto; }
.member-plan-card label span { color: #737b84; font-size: 11px; font-weight: 750; }
.member-plan-card button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; }
.member-plan-card button .ui-icon { width: 17px; height: 17px; }

.commerce-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.commerce-panel,
.commerce-section {
  border: 1px solid #dfe3e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 28, 32, .06);
}
.commerce-panel { padding: 24px; }
.commerce-section { margin-top: 20px; padding: 22px; }
.commerce-panel-kicker,
.commerce-section-head > div > span { color: #f05236; font-size: 9px; font-weight: 900; }
.commerce-panel h2,
.commerce-section-head h2 { margin: 6px 0 8px; color: #22262b; font-size: 21px; }
.commerce-panel > p { margin: 0 0 20px; color: #727b85; }
.benefit-entry-grid form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.benefit-entry-grid button { min-width: 120px; }
.benefit-redeem-panel { border-top: 3px solid #168d83; }
.benefit-claim-panel { border-top: 3px solid #f05236; }
.commerce-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.commerce-section-head > div { display: grid; gap: 2px; }
.commerce-section-head small { color: #168d83; font-weight: 800; }
.commerce-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 6px; color: #858d96; text-align: center; border: 1px dashed #cfd5d9; border-radius: 7px; background: #fafbfb; }
.commerce-empty.tall { min-height: 390px; }
.commerce-empty.compact { min-height: 100px; }
.commerce-empty .ui-icon { width: 28px; height: 28px; color: #168d83; }
.commerce-empty p { margin: 0; }

.coupon-list,
.commerce-list { display: grid; gap: 9px; }
.coupon-item { min-height: 90px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 18px; padding: 16px; border: 1px solid #e3e6e8; border-radius: 7px; background: #fbfbfb; }
.coupon-item > div { display: grid; gap: 4px; }
.coupon-item strong { color: #f05236; font-size: 21px; }
.coupon-item code { color: #168d83; font-weight: 850; }
.coupon-item small { color: #8b9299; }
.commerce-list > div { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; padding: 13px 0; border-top: 1px solid #eceeef; }
.commerce-list > div:first-child { border-top: 0; }
.commerce-list small { color: #8b9299; }

.notification-list { display: grid; gap: 10px; }
.notification-item { min-height: 118px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid #e0e4e7; border-radius: 8px; background: #fff; }
.notification-item.unread { border-left: 3px solid #f05236; background: #fffafa; }
.notification-type-icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; color: #168d83; border-radius: 7px; background: #eaf7f5; }
.notification-type-icon .ui-icon { width: 21px; height: 21px; }
.notification-item > div:nth-child(2) > span { color: #f05236; font-size: 9px; font-weight: 900; }
.notification-item h2 { margin: 4px 0; font-size: 18px; }
.notification-item p { margin: 0 0 5px; color: #66707a; }
.notification-item small { color: #90979f; }
.notification-actions { display: flex; align-items: center; gap: 7px; }
.notification-actions a,
.notification-actions button { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.notification-actions a { color: #168d83; border: 1px solid #b9ddd9; border-radius: 6px; background: #eef9f7; }

.team-create-band { grid-template-columns: minmax(0, 1fr) minmax(300px, .6fr); }
.team-create-band form { display: grid; gap: 8px; }
.team-create-band input { color: #fff; border-color: #41474e; background: #282d33; }
.team-owner-summary { grid-template-columns: 1fr auto; }
.team-owner-summary > div:last-child { min-width: 180px; display: grid; text-align: right; }
.team-owner-summary > div:last-child strong { color: #57c8bc; font-size: 30px; }
.team-owner-summary > div:last-child span { color: #aab1b9; }
.team-permission-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-permission-list span { opacity: .5; }
.team-permission-list span.on { opacity: 1; }
.team-management-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); }
.commerce-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commerce-form-grid label { display: grid; gap: 7px; }
.commerce-form-grid label > span { color: #525b64; font-size: 12px; font-weight: 750; }
.commerce-form-grid .wide { grid-column: 1 / -1; }
.commerce-form-grid textarea { min-height: 130px; }
.team-member-form fieldset,
.team-member-card fieldset { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0; padding: 13px; border: 1px solid #e1e5e7; border-radius: 6px; }
.team-member-form fieldset label,
.team-member-card fieldset label { display: inline-flex; align-items: center; gap: 6px; }
.team-member-form fieldset input,
.team-member-card fieldset input { width: auto; }
.team-rules ol,
.ticket-help-panel ul { display: grid; gap: 12px; margin: 20px 0 0; padding-left: 20px; color: #616b75; line-height: 1.6; }
.team-member-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.team-member-card { padding: 17px; border: 1px solid #dfe3e6; border-radius: 7px; background: #fafbfb; }
.team-member-card.disabled { opacity: .65; }
.team-member-card header { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-bottom: 14px; }
.team-avatar { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 7px; background: #25292e; font-weight: 900; }
.team-member-card h3 { margin: 0; }
.team-member-card p { margin: 3px 0 0; color: #7b838c; font-size: 11px; }
.team-member-card form { display: grid; gap: 10px; }
.team-member-card form > label { display: grid; gap: 5px; }
.team-member-card form > label span { color: #6b747d; font-size: 11px; }
.team-member-stats { display: flex; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 6px; background: #eef5f4; }
.team-member-stats strong { color: #168d83; }
.team-member-card form + form { margin-top: 7px; }
.commerce-danger { color: #b83a29 !important; border: 1px solid #efc1b9 !important; background: #fff2ef !important; box-shadow: none !important; }

.ticket-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); }
.ticket-create-panel > form > button,
.ticket-reply-panel button,
.withdrawal-form-panel button { margin-top: 16px; }
.ticket-list { display: grid; }
.ticket-list > a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 4px; color: inherit; border-top: 1px solid #e9ecee; }
.ticket-list > a:first-child { border-top: 0; }
.ticket-list h3 { margin: 4px 0; font-size: 16px; }
.ticket-list p { margin: 0; color: #7e868f; font-size: 11px; }
.ticket-list > a > div > span { color: #f05236; font-size: 9px; font-weight: 900; }
.ticket-thread { display: grid; gap: 11px; margin-bottom: 18px; }
.ticket-message { width: min(78%, 760px); padding: 16px; border: 1px solid #dfe4e7; border-radius: 8px; background: #fff; }
.ticket-message.admin { margin-left: auto; border-color: #b9ddd9; background: #eef9f7; }
.ticket-message header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.ticket-message header span { color: #8d949c; font-size: 10px; }
.ticket-message p { margin: 0; color: #3f4851; line-height: 1.7; }
.ticket-reply-panel textarea { min-height: 130px; }

.withdrawal-form-panel { display: grid; grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr); gap: 28px; margin-bottom: 18px; }
.withdraw-review-form { min-width: 360px; display: flex; flex-wrap: wrap; gap: 6px; }
.withdraw-review-form input { flex: 1 1 160px; min-height: 36px; padding: 7px; }
.withdraw-review-form button { min-height: 36px; padding: 7px 10px; }
.agent-admin-form { min-width: 440px; grid-template-columns: 110px 92px 88px auto !important; }
.model-access-form { min-width: 190px; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.model-access-form select,
.model-access-form button { min-height: 35px; padding: 6px 8px; font-size: 11px; }

.commerce-admin-grid,
.agent-level-grid,
.commerce-admin-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.agent-level-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commerce-admin-note { padding: 28px; color: #e9d49b; border: 1px solid #5f512e; border-radius: 8px; background: #1d1a12; }
.commerce-admin-note > span,
.commerce-admin-form-head > div > span { color: #d9b95e; font-size: 9px; font-weight: 900; }
.commerce-admin-note h2 { color: #fff; }
.commerce-admin-note p { color: #aaa18c; line-height: 1.8; }
.commerce-admin-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.commerce-admin-form-head h2 { margin: 4px 0 0; }
.admin-ticket-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid #5e512e; border-radius: 7px; background: #5e512e; }
.admin-ticket-meta span { display: grid; gap: 5px; padding: 15px; color: #9f9681; background: #181713; }
.admin-ticket-meta strong { color: #ead495; }
.admin-ticket-thread .ticket-message { color: #e6e1d5; border-color: #3c3930; background: #1b1a17; }
.admin-ticket-thread .ticket-message.admin { border-color: #655833; background: #272316; }
.admin-ticket-thread .ticket-message p { color: #c7c0b0; }

.developer-version { padding: 9px 12px; color: #126d73; border: 1px solid #b8dddf; border-radius: 6px; background: #edfafa; font-size: 12px; font-weight: 900; }
.developer-secret-band { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: end; margin-bottom: 18px; padding: 24px; color: #fff; border-radius: 8px; background: #15242d; box-shadow: 0 18px 40px rgba(16, 37, 48, .16); }
.developer-secret-band > div > span,
.developer-payload > div > span { color: #64d4ca; font-size: 10px; font-weight: 900; }
.developer-secret-band h2 { margin: 5px 0; color: #fff; }
.developer-secret-band p { margin: 0; color: #aabac1; line-height: 1.6; }
.developer-secret-band label { display: grid; gap: 7px; color: #b9c7cc; font-size: 12px; }
.developer-secret-band label > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.developer-secret-band input { min-width: 0; color: #dffaf7; border-color: #38505a; background: #0e1a21; }
.developer-secret-band button { min-width: 70px; }
.developer-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; margin-bottom: 18px; }
.developer-create form { display: grid; gap: 13px; }
.developer-create label { display: grid; gap: 7px; }
.developer-endpoints { display: grid; gap: 9px; }
.developer-endpoints > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line, #e4e8ec); }
.developer-endpoints code { color: #0d6970; font-weight: 800; }
.developer-endpoints small { color: #6d7a86; line-height: 1.7; }
.developer-client-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.developer-client-card { padding: 20px; border: 1px solid #dce5e8; border-radius: 8px; background: #fff; box-shadow: 0 10px 26px rgba(26, 50, 60, .06); }
.developer-client-card header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.developer-client-card header div > span { color: #87949d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.developer-client-card h3 { margin: 5px 0 0; }
.developer-client-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 16px; overflow: hidden; border: 1px solid #e4eaec; border-radius: 6px; background: #e4eaec; }
.developer-client-meta span { min-width: 0; display: grid; gap: 4px; padding: 11px; background: #f8fafb; }
.developer-client-meta small { color: #84919a; }
.developer-client-meta strong { overflow: hidden; color: #24343e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.developer-client-card form { display: grid; gap: 10px; margin-top: 10px; }
.developer-client-card label:not(.developer-check) { display: grid; gap: 6px; }
.developer-check { display: flex; align-items: center; gap: 8px; color: #60717b; }
.developer-check input { width: 18px; height: 18px; }
.developer-payload { display: grid; grid-template-columns: minmax(180px, .5fr) minmax(0, 1.5fr); gap: 20px; align-items: start; margin-top: 18px; padding: 24px; color: #dbe9ed; border-radius: 8px; background: #101c23; }
.developer-payload h2 { color: #fff; }
.developer-payload pre { max-width: 100%; margin: 0; overflow: auto; color: #bfebe6; white-space: pre-wrap; }

.admin-body .provider-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.admin-body .provider-account-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-body .provider-account-list > .commerce-section-head { grid-column: 1 / -1; }
.provider-route-edit { min-width: 430px; }
.provider-route-edit > form { display: grid; gap: 9px; padding: 12px 0; }
.provider-route-edit label { display: grid; gap: 5px; }
.provider-route-edit input,
.provider-route-edit select { min-height: 36px; }
.profit-filter { display: flex; align-items: center; gap: 8px; }
.profit-filter input,
.profit-filter button { min-height: 38px; }
.profit-kpis { margin-bottom: 18px; }
.profit-value { color: #7ecb9b; }
.profit-value.negative { color: #ed8b7c; }
.monitor-health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.monitor-health-card { position: relative; min-height: 138px; padding: 18px; border: 1px solid #34332e; border-radius: 7px; background: #181713; }
.monitor-health-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: #827552; }
.monitor-health-card.healthy::before { background: #4fbd91; }
.monitor-health-card.degraded::before { background: #d7ad53; }
.monitor-health-card.down::before { background: #d76558; }
.monitor-health-card header { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.monitor-health-card header > span { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: #d8bc78; border: 1px solid #554a31; border-radius: 5px; }
.monitor-health-card header .ui-icon { width: 15px; }
.monitor-health-card header strong { color: #f4efe4; font-size: 13px; }
.monitor-health-card header em { color: #958d7c; font-size: 10px; font-style: normal; text-transform: uppercase; }
.monitor-health-card p { min-height: 40px; margin: 15px 0 6px; color: #c1b9a8; }
.monitor-health-card small { color: #777166; }
.monitor-summary-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid #37352f; border-radius: 7px; background: #37352f; }
.monitor-summary-band > div { display: grid; gap: 5px; padding: 18px; background: #151512; }
.monitor-summary-band span { color: #c3a866; font-size: 9px; font-weight: 900; }
.monitor-summary-band strong { color: #fff; font-size: 28px; }
.monitor-summary-band small { color: #817a6d; }
.api-client-admin-form { min-width: 270px; display: grid; grid-template-columns: 92px 80px auto; gap: 7px; }
.api-client-admin-form input,
.api-client-admin-form select,
.api-client-admin-form button { min-height: 36px; }
.admin-body .status.healthy,
.admin-body .status.sent { color: #77d1aa; border-color: rgba(79, 189, 145, .32); background: rgba(79, 189, 145, .1); }
.admin-body .status.degraded,
.admin-body .status.warning,
.admin-body .status.unknown { color: #e4c16e; border-color: rgba(215, 173, 83, .34); background: rgba(215, 173, 83, .1); }
.admin-body .status.down,
.admin-body .status.critical,
.admin-body .status.failed,
.admin-body .status.blocked { color: #ef9488; border-color: rgba(215, 101, 88, .35); background: rgba(215, 101, 88, .1); }
.admin-body .status.passed { color: #77d1aa; border-color: rgba(79, 189, 145, .32); background: rgba(79, 189, 145, .1); }

.status.available,
.status.active,
.status.approved,
.status.resolved { color: #08766d; border-color: #b9ddd9; background: #e8f7f4; }
.status.locked,
.status.pending,
.status.open,
.status.waiting_user { color: #896411; border-color: #ead7a0; background: #fff7dc; }
.status.paid,
.status.in_progress { color: #2856a4; border-color: #bfd0ef; background: #edf3ff; }
.status.rejected,
.status.closed { color: #b63729; border-color: #efc0b9; background: #fff0ed; }

@media (max-width: 1050px) {
  .member-current-band,
  .team-member-overview { grid-template-columns: minmax(0, 1fr) auto; }
  .member-current-features,
  .team-permission-list { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-level-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .member-current-band,
  .team-create-band,
  .team-member-overview,
  .team-owner-summary,
  .member-plan-grid,
  .commerce-two-column,
  .team-management-grid,
  .ticket-layout,
  .withdrawal-form-panel,
  .commerce-admin-grid,
  .commerce-admin-card-list { grid-template-columns: 1fr; }
  .developer-secret-band,
  .developer-grid,
  .developer-payload { grid-template-columns: 1fr; }
  .developer-client-list { grid-template-columns: 1fr; }
  .admin-body .provider-admin-grid,
  .admin-body .provider-account-list,
  .monitor-health-grid { grid-template-columns: 1fr; }
  .monitor-summary-band { grid-template-columns: 1fr; }
  .profit-filter { width: 100%; flex-wrap: wrap; }
  .member-current-features,
  .team-permission-list { grid-column: auto; }
  .member-current-metric,
  .team-quota-ring { width: 100%; }
  .team-owner-summary > div:last-child { text-align: left; }
  .member-plan-card { padding: 22px; }
  .benefit-entry-grid form { grid-template-columns: 1fr; }
  .coupon-item { grid-template-columns: 1fr auto; }
  .coupon-item > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .notification-item { grid-template-columns: 42px minmax(0, 1fr); }
  .notification-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .commerce-form-grid,
  .team-member-list { grid-template-columns: 1fr; }
  .commerce-form-grid .wide { grid-column: auto; }
  .ticket-message { width: 90%; }
  .admin-ticket-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 460px) {
  .member-current-band,
  .team-create-band,
  .team-member-overview,
  .team-owner-summary,
  .commerce-panel,
  .commerce-section { padding: 18px; }
  .member-plan-price strong { font-size: 39px; }
  .member-current-features,
  .team-permission-list { grid-template-columns: 1fr; }
  .commerce-list > div { grid-template-columns: 1fr; }
  .team-member-card header { grid-template-columns: 42px minmax(0, 1fr); }
  .team-member-card header .status { grid-column: 1 / -1; justify-self: start; }
}

/* API channel center */
.admin-body .provider-page-head .btn { display: inline-flex; align-items: center; gap: 8px; }
.admin-body .provider-page-head .btn .ui-icon { width: 16px; height: 16px; }
.admin-body .provider-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.admin-body .provider-overview article {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--ag-line);
  border-radius: 8px;
  background: #151512;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}
.provider-overview-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 164, 95, .28);
  border-radius: 7px;
  color: var(--ag-gold-bright);
  background: rgba(201, 164, 95, .1);
}
.provider-overview-icon.green { color: #68c9a3; border-color: rgba(79, 189, 145, .25); background: rgba(79, 189, 145, .08); }
.provider-overview-icon.blue { color: #82aef0; border-color: rgba(93, 139, 207, .27); background: rgba(93, 139, 207, .09); }
.provider-overview-icon.red { color: #e58d7f; border-color: rgba(220, 109, 97, .27); background: rgba(220, 109, 97, .08); }
.provider-overview-icon .ui-icon { width: 19px; height: 19px; }
.provider-overview article > div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: end; }
.provider-overview small { color: var(--ag-muted); font-size: 10px; font-weight: 800; }
.provider-overview strong { grid-row: 1 / span 2; grid-column: 2; color: var(--ag-text); font-size: 25px; line-height: 1; }
.provider-overview p { overflow: hidden; margin: 0; color: #6f6c65; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.admin-body .provider-principle-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid var(--ag-line);
  border-radius: 8px;
  background: #10100e;
}
.provider-principle-band > div { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 1px 9px; align-items: center; }
.provider-principle-band > div > span { grid-row: 1 / span 2; color: var(--ag-gold); font-size: 12px; font-weight: 900; }
.provider-principle-band strong { color: var(--ag-text-soft); font-size: 12px; }
.provider-principle-band small { overflow: hidden; color: #6d6961; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provider-principle-band > i { height: 1px; background: linear-gradient(90deg, transparent, var(--ag-line-strong), transparent); }

.admin-body .provider-builder-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 14px; margin-bottom: 25px; align-items: start; }
.admin-body .provider-console-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ag-line-strong);
  border-radius: 8px;
  background: #171714;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .2);
}
.admin-body .provider-console-card.route-builder { border-top-color: rgba(100, 145, 214, .45); }
.provider-card-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--ag-line); }
.provider-feature-icon { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; color: #17130b; border-radius: 7px; background: var(--ag-gold); }
.route-builder .provider-feature-icon { color: #eaf1ff; background: #345a8d; }
.provider-feature-icon .ui-icon { width: 18px; height: 18px; }
.provider-card-title > div { min-width: 0; }
.provider-card-title small, .provider-section-heading small { color: var(--ag-gold); font-size: 9px; font-weight: 900; }
.provider-card-title h2 { margin: 3px 0 4px; color: var(--ag-text); font-size: 20px; }
.provider-card-title p { margin: 0; color: var(--ag-muted); font-size: 11px; line-height: 1.6; }

.admin-body .provider-config-form { display: grid; gap: 12px; }
.admin-body .provider-config-form > label,
.admin-body .provider-field-grid > label,
.admin-body .provider-path-grid > label,
.admin-body .provider-json-grid > label { min-width: 0; display: grid; gap: 6px; margin: 0; }
.provider-config-form label > span { color: #bbb6aa; font-size: 11px; font-weight: 760; }
.provider-config-form label > small { color: #6f6b63; font-size: 10px; line-height: 1.55; }
.admin-body .provider-config-form input,
.admin-body .provider-config-form select,
.admin-body .provider-config-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 9px 11px;
  color: var(--ag-text);
  border: 1px solid #36342e;
  border-radius: 6px;
  outline: none;
  background: #0e0e0c;
  box-shadow: none;
  font-size: 12px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.admin-body .provider-config-form textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.admin-body .provider-config-form input:focus,
.admin-body .provider-config-form select:focus,
.admin-body .provider-config-form textarea:focus { border-color: var(--ag-gold); background: #12110e; box-shadow: 0 0 0 3px rgba(201, 164, 95, .08); }
.provider-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.provider-field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.provider-auth-custom[hidden], .provider-mapping-panel[hidden] { display: none !important; }
.provider-advanced-settings, .provider-advanced-map { border: 1px solid #2d2b26; border-radius: 6px; background: #121210; }
.provider-advanced-settings > summary, .provider-advanced-map > summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; padding: 9px 11px; color: #9e998f; font-size: 11px; font-weight: 800; list-style: none; }
.provider-advanced-settings > summary::-webkit-details-marker, .provider-advanced-map > summary::-webkit-details-marker { display: none; }
.provider-advanced-settings[open] > summary, .provider-advanced-map[open] > summary { color: var(--ag-gold-bright); border-bottom: 1px solid var(--ag-line); }
.provider-advanced-settings > div, .provider-advanced-settings > label { margin: 11px; }
.provider-primary-action, .admin-body .provider-config-form > button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #17130d;
  border: 1px solid #e0c17e;
  border-radius: 6px;
  background: var(--ag-gold);
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.provider-primary-action:hover, .admin-body .provider-config-form > button:hover { background: var(--ag-gold-bright); box-shadow: 0 10px 24px rgba(201, 164, 95, .15); transform: translateY(-1px); }
.provider-primary-action .ui-icon, .provider-config-form > button .ui-icon { width: 15px; height: 15px; }

.provider-mapping-panel { display: grid; gap: 13px; padding: 14px; border: 1px solid rgba(93, 139, 207, .34); border-radius: 7px; background: rgba(33, 54, 80, .22); }
.provider-mapping-head { display: flex; align-items: center; gap: 10px; }
.provider-mapping-head .provider-feature-icon { width: 34px; height: 34px; flex-basis: 34px; color: #dfeaff; background: #345a8d; }
.provider-mapping-head > div { min-width: 0; display: grid; gap: 2px; }
.provider-mapping-head strong { color: #dfe8f7; font-size: 12px; }
.provider-mapping-head small { color: #728197; font-size: 10px; line-height: 1.5; }
.provider-path-grid { display: grid; gap: 10px; }
.provider-path-grid.advanced { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
.provider-json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.provider-json-grid > label:last-child { align-content: start; }

.admin-body .provider-section { margin-top: 24px; }
.provider-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ag-line); }
.provider-section-heading h2 { margin: 3px 0; color: var(--ag-text); font-size: 22px; }
.provider-section-heading p { margin: 0; color: var(--ag-muted); font-size: 11px; }
.provider-section-heading > span { color: #6d685f; font-size: 10px; font-weight: 850; }
.provider-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provider-channel-card { min-width: 0; padding: 17px; border: 1px solid var(--ag-line); border-radius: 8px; background: #151512; box-shadow: 0 16px 38px rgba(0, 0, 0, .17); }
.provider-channel-card.is-online { border-top-color: rgba(79, 189, 145, .48); }
.provider-channel-card.is-offline { opacity: .72; }
.provider-channel-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.provider-channel-symbol { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: var(--ag-gold-bright); border: 1px solid var(--ag-line-strong); border-radius: 7px; background: var(--ag-gold-soft); }
.provider-channel-symbol .ui-icon { width: 18px; height: 18px; }
.provider-channel-head > div { min-width: 0; }
.provider-channel-head small { color: #77736b; font-size: 9px; font-weight: 850; }
.provider-channel-head h3 { overflow: hidden; margin: 3px 0; color: var(--ag-text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.provider-channel-head p { overflow: hidden; margin: 0; color: #716d65; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provider-live-state { display: inline-flex; align-items: center; gap: 6px; color: #8f8a81; font-size: 10px; font-weight: 800; }
.provider-live-state i { width: 6px; height: 6px; border-radius: 50%; background: #656159; }
.is-online .provider-live-state { color: #68c9a3; }
.is-online .provider-live-state i { background: var(--ag-green); box-shadow: 0 0 0 3px rgba(79, 189, 145, .1); }
.provider-channel-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 14px 0; }
.provider-channel-meta > span { min-width: 0; display: grid; gap: 3px; padding: 9px; border: 1px solid #292823; border-radius: 6px; color: #625f58; background: #10100e; font-size: 8px; font-weight: 800; }
.provider-channel-meta b { overflow: hidden; color: #b5b0a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provider-channel-editor, .provider-route-editor { border-top: 1px solid var(--ag-line); }
.provider-channel-editor > summary, .provider-route-editor > summary { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: #8b877f; font-size: 11px; font-weight: 800; list-style: none; }
.provider-channel-editor > summary::-webkit-details-marker, .provider-route-editor > summary::-webkit-details-marker { display: none; }
.provider-channel-editor > summary .ui-icon, .provider-route-editor > summary .ui-icon { width: 14px; height: 14px; }
.provider-channel-editor[open] > summary, .provider-route-editor[open] > summary { color: var(--ag-gold-bright); }
.provider-channel-editor .provider-config-form { padding: 13px; border: 1px solid #292823; border-radius: 7px; background: #10100e; }
.provider-channel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.provider-channel-actions form { margin: 0; }
.provider-channel-actions button, .provider-reset-form button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  color: #17130d;
  border: 1px solid var(--ag-gold);
  border-radius: 6px;
  background: var(--ag-gold);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}
.provider-channel-actions button.secondary, .provider-reset-form button.secondary { color: #aaa59b; border-color: #35332d; background: #11110f; }
.provider-channel-actions .ui-icon, .provider-reset-form .ui-icon { width: 14px; height: 14px; }

.provider-route-list { display: grid; gap: 9px; }
.provider-route-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(170px, .75fr) minmax(210px, 1.2fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--ag-line);
  border-left: 2px solid #5e5b54;
  border-radius: 7px;
  background: #151512;
}
.provider-route-card[data-status="healthy"] { border-left-color: var(--ag-green); }
.provider-route-card[data-status="degraded"] { border-left-color: var(--ag-gold); }
.provider-route-card[data-status="down"] { border-left-color: var(--ag-red); }
.provider-route-rank { display: grid; gap: 2px; padding-right: 13px; border-right: 1px solid var(--ag-line); }
.provider-route-rank span { color: var(--ag-gold-bright); font-size: 18px; font-weight: 900; }
.provider-route-rank small, .provider-route-endpoint small, .provider-route-metrics small { color: #615e57; font-size: 8px; font-weight: 850; }
.provider-route-main { min-width: 0; }
.provider-route-main > span { color: var(--ag-gold); font-size: 9px; font-weight: 800; }
.provider-route-main h3 { overflow: hidden; margin: 3px 0; color: var(--ag-text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.provider-route-main p { overflow: hidden; margin: 0; color: #77736b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provider-route-endpoint { min-width: 0; display: grid; gap: 4px; }
.provider-route-endpoint code { overflow: hidden; display: block; color: #979186; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provider-route-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.provider-route-metrics > span { min-width: 0; display: grid; gap: 3px; }
.provider-route-metrics b { color: #b9b4aa; font-size: 10px; white-space: nowrap; }
.provider-health { min-width: 67px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; color: #9a958b; border: 1px solid #37352f; border-radius: 5px; background: #11110f; font-size: 9px; font-weight: 850; }
.provider-health i { width: 5px; height: 5px; border-radius: 50%; background: #77736b; }
.provider-health.healthy { color: #68c9a3; border-color: rgba(79, 189, 145, .28); background: rgba(79, 189, 145, .07); }
.provider-health.healthy i { background: var(--ag-green); }
.provider-health.degraded { color: var(--ag-gold-bright); border-color: var(--ag-line-strong); background: var(--ag-gold-soft); }
.provider-health.degraded i { background: var(--ag-gold); }
.provider-health.down { color: #e58d7f; border-color: rgba(220, 109, 97, .3); background: rgba(220, 109, 97, .08); }
.provider-health.down i { background: var(--ag-red); }
.provider-route-editor { grid-column: 1 / -1; }
.provider-route-editor .provider-config-form { padding: 15px; border: 1px solid #2b2a25; border-radius: 7px; background: #10100e; }
.provider-reset-form { margin-top: 9px; }
.provider-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 25px; border: 1px dashed var(--ag-line-strong); border-radius: 8px; color: var(--ag-muted); background: #121210; text-align: center; }
.provider-empty > span { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: var(--ag-gold); border: 1px solid var(--ag-line); border-radius: 7px; }
.provider-empty .ui-icon { width: 18px; height: 18px; }
.provider-empty strong { color: var(--ag-text-soft); font-size: 14px; }
.provider-empty p { margin: 0; font-size: 11px; }

@media (max-width: 1280px) {
  .admin-body .provider-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-route-card { grid-template-columns: 62px minmax(160px, .8fr) minmax(180px, 1fr) auto; }
  .provider-route-metrics { grid-column: 2 / 4; }
  .provider-health { grid-column: 4; grid-row: 1; }
}

@media (max-width: 980px) {
  .admin-body .provider-builder-grid, .provider-channel-grid { grid-template-columns: 1fr; }
  .provider-field-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-route-card { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .provider-route-endpoint, .provider-route-metrics { grid-column: 2 / -1; }
  .provider-health { grid-column: 3; grid-row: 1; }
}

@media (max-width: 700px) {
  .admin-body .provider-overview { grid-template-columns: 1fr; }
  .admin-body .provider-principle-band { grid-template-columns: 1fr; }
  .provider-principle-band > i { display: none; }
  .admin-body .provider-console-card { padding: 15px; }
  .provider-field-grid, .provider-field-grid.four, .provider-path-grid.advanced, .provider-json-grid { grid-template-columns: 1fr; }
  .provider-channel-head { grid-template-columns: 40px minmax(0, 1fr); }
  .provider-live-state { grid-column: 2; justify-self: start; }
  .provider-channel-meta { grid-template-columns: 1fr; }
  .provider-route-card { grid-template-columns: 1fr auto; gap: 10px; }
  .provider-route-rank { grid-row: 1; display: flex; align-items: baseline; gap: 6px; padding: 0; border: 0; }
  .provider-route-main, .provider-route-endpoint, .provider-route-metrics { grid-column: 1 / -1; }
  .provider-health { grid-column: 2; grid-row: 1; }
  .provider-route-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .provider-section-heading { align-items: flex-start; }
  .provider-section-heading > span { display: none; }
}
