

.team-type-choice,.team-type-option,.team-type-badge,.team-personal-notice{border-color:var(--aidc-border-default);color:var(--aidc-text-primary);background:var(--aidc-bg-elevated)}
.team-type-option:has(input:checked){border-color:var(--aidc-action-primary-from);background:color-mix(in srgb,var(--aidc-action-primary-from) 10%,var(--aidc-bg-elevated))}
.team-type-option input{accent-color:var(--aidc-action-primary-from)}
.team-type-badge[data-team-type="personal_subscriptions"]{border-color:var(--aidc-action-primary-from);color:var(--aidc-action-primary-from)}

body:has(#team-dashboard) .account-layout>section.panel{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important
}

body:has(#team-dashboard) .team-accent-text,
body:has(#team-dashboard) .team-create-icon{
  color:var(--aidc-action-primary-from)!important
}

body:has(#team-dashboard) .btn-primary,
body:has(#team-dashboard) .plan-gate__cta{
  background:linear-gradient(135deg,var(--aidc-action-primary-from),var(--aidc-action-primary-to))!important;
  color:var(--aidc-text-inverse)!important;
  box-shadow:0 0 22px var(--aidc-action-primary-glow)!important
}

body:has(#team-dashboard) .btn-ghost,
body:has(#team-dashboard) .aidc-seat-method{
  background:var(--aidc-btn-secondary-bg)!important;
  border-color:var(--aidc-border-default)!important;
  color:var(--aidc-text-secondary)!important
}

body:has(#team-dashboard) .btn-danger{
  background:color-mix(in srgb,var(--aidc-red-500) 10%,transparent)!important;
  border-color:var(--aidc-action-danger-border)!important;
  color:color-mix(in srgb,var(--aidc-red-500) 64%,white 36%)!important
}

body:has(#team-dashboard) .team-avatar,
body:has(#team-dashboard) .team-avatar--sm{
  background:linear-gradient(135deg,var(--aidc-action-primary-from),var(--aidc-action-primary-to))!important;
  color:var(--aidc-text-inverse)!important
}

body:has(#team-dashboard) .stat-value,
body:has(#team-dashboard) .team-seat-billing__title,
body:has(#team-dashboard) .aidc-seat-modal__head h3,
body:has(#team-dashboard) .aidc-seat-quote__row strong,
body:has(#team-dashboard) .member-card__name,
body:has(#team-dashboard) .plan-gate__title,
body:has(#team-dashboard) .plan-gate__features li strong{
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .muted,
body:has(#team-dashboard) .stat-label,
body:has(#team-dashboard) .member-table th,
body:has(#team-dashboard) .form-group label,
body:has(#team-dashboard) .pending-invite .invite-meta,
body:has(#team-dashboard) .transfer-date,
body:has(#team-dashboard) .team-card__chevron,
body:has(#team-dashboard) .team-section-title,
body:has(#team-dashboard) .team-seat-billing__hint,
body:has(#team-dashboard) .aidc-seat-modal__text,
body:has(#team-dashboard) .aidc-seat-modal__grid label,
body:has(#team-dashboard) .aidc-seat-modal__field,
body:has(#team-dashboard) .aidc-seat-modal__quote,
body:has(#team-dashboard) .aidc-seat-quote__row,
body:has(#team-dashboard) .member-card__email,
body:has(#team-dashboard) .member-card__row,
body:has(#team-dashboard) .plan-gate__subtitle,
body:has(#team-dashboard) .plan-gate__note{
  color:var(--aidc-text-muted)!important
}

body:has(#team-dashboard) .stat-box,
body:has(#team-dashboard) .invite-section,
body:has(#team-dashboard) .pending-invite,
body:has(#team-dashboard) .mode-hint,
body:has(#team-dashboard) .member-card{
  background:var(--aidc-bg-card)!important;
  border-color:var(--aidc-border-subtle)!important
}

body:has(#team-dashboard) .member-table th,
body:has(#team-dashboard) .member-table td,
body:has(#team-dashboard) .transfer-row,
body:has(#team-dashboard) .tab-bar{
  border-color:var(--aidc-border-subtle)!important
}

body:has(#team-dashboard) .member-table td,
body:has(#team-dashboard) .transfer-row,
body:has(#team-dashboard) .plan-gate__features li{
  color:var(--aidc-text-secondary)!important
}

body:has(#team-dashboard) .member-table tr:hover td{
  background:var(--aidc-btn-secondary-bg)!important
}

body:has(#team-dashboard) .role-owner{background:color-mix(in srgb,var(--aidc-amber-500) 12%,transparent)!important;color:var(--aidc-amber-500)!important;border-color:color-mix(in srgb,var(--aidc-amber-500) 32%,transparent)!important}
body:has(#team-dashboard) .role-admin{background:color-mix(in srgb,var(--aidc-violet-500) 12%,transparent)!important;color:var(--aidc-violet-500)!important;border-color:color-mix(in srgb,var(--aidc-violet-500) 32%,transparent)!important}
body:has(#team-dashboard) .role-editor{background:color-mix(in srgb,var(--aidc-cyan-500) 12%,transparent)!important;color:var(--aidc-cyan-500)!important;border-color:color-mix(in srgb,var(--aidc-cyan-500) 32%,transparent)!important}
body:has(#team-dashboard) .role-member{background:color-mix(in srgb,var(--aidc-action-focus) 12%,transparent)!important;color:var(--aidc-action-focus)!important;border-color:color-mix(in srgb,var(--aidc-action-focus) 32%,transparent)!important}
body:has(#team-dashboard) .role-viewer{background:var(--aidc-btn-secondary-bg)!important;color:var(--aidc-text-muted)!important;border-color:var(--aidc-border-default)!important}

body:has(#team-dashboard) .usage-bar{background:var(--aidc-btn-secondary-bg-hover)!important}
body:has(#team-dashboard) .usage-ok{background:linear-gradient(90deg,var(--aidc-green-500),color-mix(in srgb,var(--aidc-green-500) 62%,white 38%))!important}
body:has(#team-dashboard) .usage-warn{background:linear-gradient(90deg,var(--aidc-amber-500),color-mix(in srgb,var(--aidc-amber-500) 62%,white 38%))!important}
body:has(#team-dashboard) .usage-danger{background:linear-gradient(90deg,var(--aidc-red-500),color-mix(in srgb,var(--aidc-red-500) 62%,white 38%))!important}

body:has(#team-dashboard) .invite-link-box,
body:has(#team-dashboard) .input,
body:has(#team-dashboard) .aidc-select .aidc-select__btn{
  background:var(--aidc-bg-elevated)!important;
  border-color:var(--aidc-border-default)!important;
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .input:focus,
body:has(#team-dashboard) .aidc-select .aidc-select__btn:focus,
body:has(#team-dashboard) .aidc-select .aidc-select__btn[aria-expanded="true"]{
  border-color:var(--aidc-action-focus)!important;
  box-shadow:0 0 0 3px var(--aidc-action-focus-ring)!important
}

body:has(#team-dashboard) .pending-invite .invite-info,
body:has(#team-dashboard) .invite-link-box,
body:has(#team-dashboard) .team-seat-billing__badge,
body:has(#team-dashboard) .aidc-seat-modal__eyebrow{
  color:var(--aidc-cyan-500)!important
}

body:has(#team-dashboard) .tab-btn{
  background:transparent!important;
  color:var(--aidc-text-muted)!important
}

body:has(#team-dashboard) .tab-btn:hover{
  background:var(--aidc-btn-secondary-bg)!important;
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .tab-btn.active{
  background:color-mix(in srgb,var(--aidc-action-primary-from) 10%,transparent)!important;
  color:var(--aidc-text-primary)!important;
  border-bottom-color:var(--aidc-action-primary-from)!important
}

body:has(#team-dashboard) .toast-copy{
  background:var(--aidc-green-500)!important;
  color:var(--aidc-bg-page)!important
}

body:has(#team-dashboard) .transfer-amount{color:var(--aidc-green-500)!important}
body:has(#team-dashboard) .mode-hint strong{color:var(--aidc-text-primary)!important}
body:has(#team-dashboard) .mode-hint .mode-hint__title,
body:has(#team-dashboard) .plan-gate__subtitle strong{color:var(--aidc-action-primary-from)!important}

body:has(#team-dashboard) .team-seat-billing{
  background:color-mix(in srgb,var(--aidc-cyan-500) 6%,var(--aidc-bg-card) 94%)!important;
  border-color:var(--aidc-border-subtle)!important
}

body:has(#team-dashboard) .team-seat-billing__badge{
  background:color-mix(in srgb,var(--aidc-cyan-500) 10%,transparent)!important;
  border-color:color-mix(in srgb,var(--aidc-cyan-500) 28%,transparent)!important
}

body:has(#team-dashboard) .aidc-seat-modal__backdrop{background:var(--aidc-backdrop)!important}
body:has(#team-dashboard) .aidc-seat-modal__panel{
  background:var(--aidc-bg-modal)!important;
  border-color:var(--aidc-border-default)!important;
  box-shadow:var(--aidc-shadow-modal)!important
}

body:has(#team-dashboard) .aidc-seat-modal__quote{
  background:var(--aidc-bg-card)!important;
  border-color:var(--aidc-border-subtle)!important
}

body:has(#team-dashboard) .aidc-seat-method:hover{
  background:var(--aidc-btn-secondary-bg-hover)!important;
  border-color:var(--aidc-border-strong)!important;
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .aidc-seat-method.is-active{
  background:color-mix(in srgb,var(--aidc-cyan-500) 12%,transparent)!important;
  border-color:var(--aidc-cyan-500)!important;
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .aidc-seat-modal__consent{color:var(--aidc-text-secondary)!important}
body:has(#team-dashboard) .aidc-seat-modal__consent input{accent-color:var(--aidc-green-500)!important}
body:has(#team-dashboard) .aidc-seat-modal__error{color:var(--aidc-red-500)!important}

/* Permanent team deletion policy modal. Runtime JS owns behavior; this adapter
   normalizes the legacy inline visual strings until the DOM builder is class-only. */
body:has(#team-dashboard) .team-permanent-delete-modal{
  background:var(--aidc-backdrop)!important;
  backdrop-filter:blur(10px)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal > div{
  background:var(--aidc-bg-modal)!important;
  border-color:var(--aidc-border-default)!important;
  color:var(--aidc-text-primary)!important;
  box-shadow:var(--aidc-shadow-modal)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal > div > div:nth-child(2),
body:has(#team-dashboard) .team-permanent-delete-modal [data-policy] span{
  color:var(--aidc-text-muted)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-policy]{
  background:var(--aidc-bg-card)!important;
  border-color:var(--aidc-border-default)!important;
  color:var(--aidc-text-primary)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-policy]:hover,
body:has(#team-dashboard) .team-permanent-delete-modal [data-policy]:focus-visible{
  background:var(--aidc-btn-secondary-bg-hover)!important;
  border-color:var(--aidc-border-strong)!important;
  outline:none
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-policy="transfer_to_owner"]{
  border-color:color-mix(in srgb,var(--aidc-cyan-500) 34%,var(--aidc-border-default))!important
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-policy="delete_assets"]{
  border-color:var(--aidc-action-danger-border)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-cancel]{
  background:var(--aidc-btn-secondary-bg)!important;
  border-color:var(--aidc-border-default)!important;
  color:var(--aidc-text-secondary)!important
}

body:has(#team-dashboard) .team-permanent-delete-modal [data-cancel]:hover,
body:has(#team-dashboard) .team-permanent-delete-modal [data-cancel]:focus-visible{
  background:var(--aidc-btn-secondary-bg-hover)!important;
  border-color:var(--aidc-border-strong)!important;
  color:var(--aidc-text-primary)!important;
  outline:none
}


/* Team controls must follow the shared light/dark contract. Native browser
   spinner/select chrome caused black arrows and foreign button surfaces in the
   light theme, so visual ownership stays in this adapter. */
body:has(#team-dashboard) .btn {
  border-color:var(--aidc-border-default)!important;
  background:var(--aidc-btn-secondary-bg)!important;
  color:var(--aidc-text-primary)!important;
  box-shadow:none!important;
}
body:has(#team-dashboard) .btn:hover:not(:disabled) {
  background:var(--aidc-btn-secondary-bg-hover)!important;
  border-color:var(--aidc-border-strong)!important;
  color:var(--aidc-text-primary)!important;
}
body:has(#team-dashboard) .btn:disabled {
  background:var(--aidc-btn-disabled-bg)!important;
  border-color:var(--aidc-btn-disabled-border)!important;
  color:var(--aidc-btn-disabled-text)!important;
  box-shadow:none!important;
  opacity:1!important;
}
body:has(#team-dashboard) .btn svg,
body:has(#team-dashboard) .tab-btn svg,
body:has(#team-dashboard) .team-card__chevron svg {
  stroke:currentColor!important;
}
body:has(#team-dashboard) select.input {
  background-color:var(--aidc-bg-elevated)!important;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--aidc-text-muted) 50%),
    linear-gradient(135deg,var(--aidc-text-muted) 50%,transparent 50%)!important;
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%!important;
  background-size:5px 5px,5px 5px!important;
  background-repeat:no-repeat!important;
  color:var(--aidc-text-primary)!important;
}
body:has(#team-dashboard) input[type="number"].input {
  appearance:textfield;
  -moz-appearance:textfield;
  color-scheme:inherit;
}
body:has(#team-dashboard) input[type="number"].input::-webkit-inner-spin-button,
body:has(#team-dashboard) input[type="number"].input::-webkit-outer-spin-button {
  -webkit-appearance:none;
  margin:0;
}
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .btn-primary,
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .plan-gate__cta {
  background:var(--aidc-btn-primary-bg)!important;
  border-color:var(--aidc-btn-primary-border)!important;
  color:var(--aidc-btn-primary-text)!important;
  -webkit-text-fill-color:var(--aidc-btn-primary-text)!important;
  box-shadow:var(--aidc-btn-primary-shadow)!important;
  filter:none!important;
}
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .btn-primary:hover:not(:disabled),
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .plan-gate__cta:hover {
  background:var(--aidc-btn-primary-bg-hover)!important;
  border-color:var(--aidc-btn-primary-border-hover)!important;
  box-shadow:none!important;
}
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .btn-danger {
  background:var(--aidc-status-danger-bg)!important;
  border-color:var(--aidc-action-danger-border)!important;
  color:var(--aidc-red-500)!important;
  box-shadow:none!important;
}
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .team-card__chevron,
html[data-aidc-color-mode="light"] body:has(#team-dashboard) .tab-btn svg {
  color:var(--aidc-text-secondary)!important;
}
