.shell.is-team-view { background: var(--crm-bg); color: var(--crm-ink); font-family: var(--crm-font); }
.shell.is-team-view > .main > .content {
  padding: 22px clamp(14px,2.55vw,28px) 26px;
  overflow: auto;
  background: radial-gradient(ellipse at 12% 0,#e5dffd,transparent 62%),
    radial-gradient(ellipse at 100% 8%,#d3f2f7,transparent 59%),var(--crm-bg);
}
.shell.is-team-view .topbar { height: 40px; min-height: 40px; flex-basis: 40px; background: linear-gradient(105deg,#f5f3ff,#f1fbff); }
.shell.is-team-view > .sidebar { background: linear-gradient(170deg,#fff,#f8f9ff); border-color: var(--crm-border); }
.shell.is-team-view .nav-item.is-active { background: #eee8ff; color: var(--crm-indigo); }

.team-page { min-width: 0; color: var(--crm-ink); font-size: 14px; line-height: 1.4; }
.team-page :is(h1,p,ul) { margin: 0; }
.team-page .icon { width: 16px; height: 16px; flex: none; }
.team-page :is(a,button,select,input):focus-visible { outline: 2px solid var(--crm-indigo); outline-offset: 2px; }
.team-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.team-heading h1 { font-size: clamp(23px,3vw,28px); font-weight: 750; letter-spacing: -.035em; }
.team-heading .button.primary { min-height: 40px; background: var(--crm-gradient); color: #fff; border-color: transparent; }
.team-heading .button.primary:hover:not(:disabled) { background: var(--crm-gradient); filter: brightness(1.07); }
.team-panel { border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: var(--crm-surface); box-shadow: var(--crm-shadow); }
.team-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 10px; border-bottom: 1px solid #e2e8f2; border-radius: 13px 13px 0 0; background: linear-gradient(105deg,#faf8ff,#f4fbff); }
.team-tabs .button.secondary { min-height: 33px; gap: 6px; padding: 4px 8px; border-color: transparent; background: transparent; color: #3e4f6e; font-size: 12px; font-weight: 660; }
.team-tabs .button.secondary[aria-pressed="false"]:hover:not(:disabled) { background: #f0eafe; }
.team-tabs .button.secondary[aria-pressed="true"], .team-tabs .button.secondary[aria-pressed="true"]:hover { background: var(--crm-gradient); border-color: transparent; color: #fff; box-shadow: 0 2px 7px #5145e53c; }
.team-tabs .icon { width: 14px; height: 14px; }
.team-count { display: inline-grid; place-items: center; min-width: 19px; min-height: 17px; padding-inline: 4px; border-radius: 5px; background: #e8ebf6; color: #495776; font-size: 11px; }
.team-tabs [data-value="vacant"][aria-pressed="false"] .team-count { background: #fff0d2; color: #75450d; }
.team-tabs [aria-pressed="true"] .team-count { background: #ffffff35; color: #fff; }

.team-tools { display: flex; align-items: stretch; flex-wrap: wrap; gap: 7px; padding: 8px 10px; border-bottom: 1px solid #e2e8f2; }
.team-search { display: flex; align-items: center; flex: 1 1 190px; min-width: 0; gap: 8px; padding-inline: 9px; border: 1px solid #cfdaed; border-radius: 8px; background: #f8faff; color: var(--crm-muted); }
.team-search:focus-within { border-color: var(--crm-indigo); box-shadow: var(--crm-focus); }
.team-search input { width: 100%; min-width: 0; min-height: 35px; padding: 4px 0; border: 0; outline: none; background: transparent; color: var(--crm-ink); font-size: 13px; }
.team-page .team-search input:focus { outline: none; box-shadow: none; }
.team-search input::placeholder { color: var(--crm-muted); opacity: 1; }
.team-role-filter { width: auto; max-width: min(220px,100%); padding: 5px 8px; font-size: 13px; }
.team-period { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; min-height: 36px; max-width: 100%; padding: 4px 8px; border-radius: 8px; background: var(--crm-gradient-dark); color: #fff; }
.team-period select { width: auto; min-width: 0; min-height: 27px; padding: 3px 5px; border: 0; border-radius: 5px; background: #363858; color: #fff; font-size: 12px; font-weight: 660; }
.team-period span { font-size: 12px; }
.team-custom-period { width: 100%; display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.team-custom-period label { display: grid; gap: 3px; color: var(--crm-muted); font-size: 12px; }
.team-custom-period input { width: auto; min-width: 0; }
.team-custom-period .button { min-height: 35px; }

.team-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: left; }
.team-col-person { width: 25%; }
.team-col-role { width: 18%; }
.team-col-status { width: 17%; }
.team-col-date { width: 23%; }
.team-col-work { width: 22%; }
.team-table th { padding: 7px 10px; background: #eef1fa; color: #435575; font-size: 12px; font-weight: 660; }
.team-table td { padding: 8px 10px; border-bottom: 1px solid #e4eaf4; vertical-align: top; overflow-wrap: anywhere; }
.team-table tbody tr:nth-child(even) { background: #fafcff; }
.team-table tbody tr:hover { background: #f6f3ff; }
.team-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-person > div { min-width: 0; }
.team-avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border: 1px solid #e5dbfb; border-radius: 9px; background: #eee7fb; color: #53369a; font-size: 12px; font-weight: 720; }
.team-page a { color: var(--crm-ink); text-decoration: none; overflow-wrap: anywhere; }
.team-page a:hover { color: #4935a8; text-decoration: underline; }
.team-person-link { font-weight: 700; }
.team-page .team-phone, .team-small { display: block; color: var(--crm-muted); font-size: 12px; }
.team-page .team-phone { margin-top: 2px; font-variant-numeric: tabular-nums; }
.team-badge { display: inline-block; width: fit-content; max-width: 100%; padding: 3px 6px; border-radius: 6px; background: #edf1f8; color: #425775; font-size: 12px; font-weight: 670; line-height: 1.25; overflow-wrap: anywhere; }
.team-badge[data-tone="sound"] { background: #eee7ff; color: #503293; }
.team-badge[data-tone="light"] { background: #e5f1ff; color: #245784; }
.team-badge[data-tone="video"] { background: #e4f2f3; color: #215f63; }
.team-badge[data-tone="today"] { background: #dff3e9; color: #1b6046; }
.team-badge[data-tone="conflict"] { background: #fae7ed; color: #9b2448; }
.team-badge[data-tone="vacant"] { background: #fff0d2; color: #7c490e; }

.performer-page, .performer-card-dialog { color: var(--crm-ink); line-height: 1.4; }
:is(.performer-page,.performer-card-dialog) :is(h1,h2,h3,p,dl,dd,ul) { margin: 0; }
:is(.performer-page,.performer-card-dialog) :is(a,button,summary):focus-visible { outline: 2px solid var(--crm-indigo); outline-offset: 2px; }
.performer-page .icon { width: 16px; height: 16px; flex: none; }
.performer-header, .performer-identity, .performer-actions, .performer-meta { display: flex; align-items: center; gap: 8px; }
.performer-header { justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 14px; }
.performer-identity { min-width: 0; gap: 10px; }
.performer-name { min-width: 0; overflow-wrap: anywhere; }
.performer-avatar { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border: 1px solid #d9cdfc; border-radius: 12px; background: linear-gradient(140deg,#e9dfff,#e1ecff); color: #51389e; font-size: 17px; font-weight: 720; }
.performer-header h1 { color: var(--crm-ink); font-size: clamp(22px,3vw,28px); font-weight: 740; line-height: 1.19; letter-spacing: -.034em; }
.performer-meta { flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 13px; }
.performer-actions { flex-wrap: wrap; }
.performer-header .button { min-height: 40px; border-radius: 9px; }
.performer-header [data-v2="back"] { flex: none; padding-inline: 10px; }
.performer-header .button.primary { border-color: transparent; background: var(--crm-gradient); color: #fff; box-shadow: 0 4px 12px #5145e53a; }
.performer-header .button.primary:hover { background: var(--crm-gradient); filter: brightness(1.07); }
.performer-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(268px,1fr); grid-template-areas: "work contacts" "work payouts" "work extra"; grid-template-rows: auto auto 1fr; align-items: start; gap: 12px; }
.performer-work { grid-area: work; }
.performer-contacts { grid-area: contacts; }
.performer-payouts { grid-area: payouts; }
.performer-extra { grid-area: extra; }
.performer-panel { min-width: 0; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: var(--crm-surface); box-shadow: var(--crm-shadow); }
.performer-panel-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #e4e9f2; border-radius: 13px 13px 0 0; background: linear-gradient(115deg,#faf8ff,#eefaff); }
.performer-panel-head h2 { color: var(--crm-ink); font-size: 18px; line-height: 1.23; font-weight: 710; letter-spacing: -.014em; }
.performer-panel-icon { display: grid; place-items: center; flex: 0 0 27px; height: 27px; border-radius: 7px; color: #5537c5; background: #ebe5ff; }
.performer-count { margin-left: auto; color: var(--crm-muted); font-size: 12px; text-align: right; }
.performer-work-row { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(110px,.84fr) minmax(96px,.67fr); align-items: start; gap: 5px 12px; padding: 8px 12px; overflow-wrap: anywhere; }
.performer-table-head { background: #eef1fa; color: #435574; font-size: 12px; font-weight: 680; }
.performer-group > h3 { padding: 5px 12px; border-block: 1px solid #e6ebf4; background: #f8faff; color: #445676; font-size: 12px; font-weight: 680; }
.performer-group > ul { padding: 0; list-style: none; }
.performer-group .performer-work-row { border-bottom: 1px solid #e9edf5; font-size: 13px; }
.performer-group .performer-work-row:hover { background: #f9f6ff; }
:is(.performer-page,.performer-card-dialog) a, .performer-text-button { color: #4932a7; text-decoration: none; }
:is(.performer-page,.performer-card-dialog) a:hover, .performer-text-button:hover { text-decoration: underline; }
.performer-order { font-weight: 710; }
.performer-number { display: inline-block; margin-left: 3px; padding: 1px 4px; border-radius: 4px; background: #ecf0f8; color: #4c5d79; font-size: 11px; font-weight: 660; white-space: nowrap; }
.performer-small { display: block; color: var(--crm-muted); font-size: 12px; }
.performer-when { color: #35466a; }
.performer-states { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.performer-states .button { min-height: 30px; padding: 4px 7px; font-size: 12px; }
.performer-footer { display: flex; justify-content: flex-end; padding: 4px 12px; }
.performer-text-button { display: inline-flex; align-items: center; justify-self: start; gap: 5px; min-height: 32px; padding: 4px 0; border: 0; border-radius: 4px; background: transparent; font: inherit; font-size: 13px; font-weight: 680; cursor: pointer; }
.performer-body { display: grid; gap: 6px; padding: 10px 12px; }
.performer-contact { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.performer-contact .icon { color: #6053a5; }
.performer-balance, .performer-money-row { display: flex; justify-content: space-between; gap: 5px 8px; }
.performer-balance { align-items: center; flex-wrap: wrap; min-height: 56px; padding: 7px 10px; border-radius: 9px; background: radial-gradient(ellipse at 100% 100%,#542d88,transparent 72%),var(--crm-gradient-dark); color: #fff; }
.performer-balance dt span { display: inline-block; padding: 2px 6px; border-radius: 5px; background: #ffe6b0; color: #633d0b; font-size: 12px; font-weight: 720; }
.performer-balance dt small { display: block; margin-top: 2px; color: #e7e2fb; font-size: 12px; }
.performer-balance dd { font-size: clamp(20px,2vw,26px); letter-spacing: -.027em; }
:is(.performer-balance,.performer-money-row) dd { font-weight: 720; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.performer-money-row { align-items: baseline; padding: 7px 0; border-bottom: 1px solid #e7ecf3; font-size: 13px; }
.performer-money-row dt { color: var(--crm-muted); }
.performer-extra { padding: 9px 12px; }
.performer-extra summary { color: #4932a7; font-size: 13px; font-weight: 670; cursor: pointer; }
.performer-extra[open] summary { margin-bottom: 8px; }
.performer-extra dl { display: grid; gap: 8px; font-size: 13px; }
.performer-extra dt { color: var(--crm-muted); }
.performer-extra dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.performer-extra .button { margin-top: 8px; }
.performer-page .performer-empty, .performer-card-dialog .performer-empty { padding: 8px 12px; color: var(--crm-muted); font-size: 13px; }
.performer-card-dialog { width: min(640px,calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--crm-border); border-radius: var(--crm-radius); background: var(--crm-surface); box-shadow: 0 16px 48px #21164243; }
.performer-card-dialog .performer-panel-head { position: sticky; top: 0; z-index: 1; justify-content: space-between; }
.performer-card-dialog-content { padding: 8px 0; }
.performer-payment { padding: 10px 12px; border-bottom: 1px solid #e9edf5; overflow-wrap: anywhere; }
.performer-payment:last-child, .performer-payment .performer-money-row:last-child { border-bottom: 0; }
.performer-payment h3 { font-size: 14px; }

@media (max-width: 800px) {
  .performer-grid { grid-template-columns: minmax(0,1fr); grid-template-areas: "contacts" "payouts" "work" "extra"; grid-template-rows: auto; gap: 10px; }
}
@media (max-width: 460px) {
  .performer-table-head { display: none; }
  .performer-work-row { grid-template-columns: minmax(0,1fr) auto; }
  .performer-when { grid-area: 2 / 1; }
  .performer-states { justify-items: end; max-width: 104px; text-align: right; }
}
.team-status { display: grid; gap: 4px; }
.team-assignments { display: grid; gap: 5px; padding: 0; list-style: none; }
.team-assignments li + li { border-top: 1px solid #e5eaf4; padding-top: 5px; }
.team-page .team-extra-assignments:not([hidden]) { margin-top: 5px; padding-top: 5px; border-top: 1px solid #e5eaf4; }
.team-page [hidden] { display: none; }
.team-page .team-order-link { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px 5px; color: #4733aa; }
.team-order-number { padding: 1px 4px; border-radius: 4px; background: #ecf0f8; color: #485b79; font-size: 11px; font-weight: 640; white-space: nowrap; }
.team-page [data-v2="team-more"].button.secondary { min-height: 27px; padding: 3px 0; margin-top: 2px; border: 0; background: transparent; color: #4935a8; font-size: 12px; }
.team-page [data-v2="team-more"].button.secondary:hover:not(:disabled) { background: transparent; text-decoration: underline; }
.team-page .team-state-cell :is(.button, .team-person-link) { font-size: 13px; }
.team-state-cell > div + div { margin-top: 4px; }
.team-panel .v2-footer { padding: 7px 10px; border-radius: 0 0 13px 13px; background: #f6f8ff; color: var(--crm-muted); }
.team-panel .v2-footer .button { min-height: 30px; padding: 4px 9px; }
.team-panel .v2-footer > div:not(:has(button:enabled)) { display: none; }
.team-empty { padding: 18px 10px; border-bottom: 1px solid var(--crm-border); color: var(--crm-muted); text-align: center; }
.team-mobile-label { display: none; }

@media (max-width: 650px) {
  .shell.is-team-view > .main > .content { padding: 14px 10px 20px; }
  .team-table :is(colgroup,thead) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.team-table,.team-table tbody) { display: block; }
  .team-table tr { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 7px 8px; padding: 9px 10px; border-bottom: 1px solid #e4eaf4; }
  .team-table td { height: auto; padding: 0; border: 0; }
  .team-assignment-cell, .team-state-cell { grid-column: 1 / -1; }
  .team-role-cell { justify-self: end; text-align: right; }
  .team-mobile-label { display: block; margin-bottom: 3px; color: var(--crm-muted); font-size: 11px; }
  .team-state-cell:empty { display: none; }
  .team-state-cell .team-status { display: flex; align-items: center; gap: 5px; }
}
@media (max-width: 420px) {
  .team-tabs { padding-inline: 6px; gap: 2px; }
  .team-tabs .button.secondary { gap: 4px; padding-inline: 4px; }
  .team-heading .button.primary { min-height: 36px; padding-inline: 8px; font-size: 12px; }
}
@media (max-width: 350px) {
  .team-tabs .icon { display: none; }
}
