.team-desk {
    --team-blue: #3d75b9;
    --team-green: var(--available);
    --team-purple: #775dc3;
    min-width: 0;
}
:root[data-theme="skyroof"] .team-desk {
    --team-blue: #7db7ff;
    --team-purple: #bba7ff;
}
.team-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-block-end: 1px solid var(--line);
}
.team-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: .57rem .8rem;
    border-block-end: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 650;
}
.team-tabs a:hover, .team-tabs a:focus-visible, .team-tabs a[aria-current] {
    color: var(--ink);
    background: var(--secondary);
    border-radius: 8px 8px 0 0;
}
.team-tabs a[aria-current] {
    border-color: var(--accent);
    color: var(--primary);
}
.team-tab-count, .team-count {
    padding: .1rem .44rem;
    border-radius: 8px;
    background: var(--secondary);
    color: var(--ink);
    font-size: .75rem;
    white-space: nowrap;
}
.team-tab-count {
    background: var(--accent-soft);
    color: var(--primary);
}
.team-quick {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: .75rem;
}
.team-quick-card {
    --team-kind: var(--team-blue);
    min-width: 0;
    min-height: 78px;
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}
.team-kind-leave { --team-kind: var(--team-green); }
.team-kind-general { --team-kind: var(--team-purple); }
.team-quick-card:hover, .team-quick-card:focus-visible, .team-conversations a:hover, .team-conversations a:focus-visible { border-color: var(--team-kind,var(--accent)); }
.team-kind-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 43px;
    height: 43px;
    border-radius: 11px;
    color: var(--team-kind,var(--primary));
    background: color-mix(in srgb,var(--team-kind,var(--primary)) 13%,var(--surface));
}
.team-quick-card strong, .team-quick-card small { display: block; }
.team-quick-card small {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.55;
}
.team-quick-add {
    display: flex;
    margin-inline-start: auto;
    align-self: center;
    color: var(--muted);
}
.team-record, .team-editor, .team-stack, .team-content { min-width: 0; }
.team-record > header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px 12px;
    margin-block-end: .75rem;
}
.team-record h2 {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-size: 1.04rem;
}
.team-record h2 svg { color: var(--primary); }
.team-record .team-filter { margin-block-end: .85rem; }
.team-filter label:first-of-type { flex: 2 1 180px; }
.team-filter label { flex: 1 1 140px; }
.team-requests { min-width: 36rem; }
.team-requests td:first-of-type { min-width: 12rem; }
.team-status {
    --team-status-color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 25px;
    padding: .05rem .52rem;
    border-radius: 8px;
    color: var(--team-status-color);
    background: color-mix(in srgb,var(--team-status-color) 11%,var(--surface));
    font-size: .78rem;
    font-weight: 650;
    white-space: nowrap;
}
.team-status::before {
    content: "";
    width: .36rem;
    height: .36rem;
    border-radius: 50%;
    background: currentColor;
}
.team-status-submitted { --team-status-color: var(--primary); }
.team-status-approved, .team-status-fulfilled { --team-status-color: var(--available); }
.team-status-rejected { --team-status-color: var(--sold); }
.team-empty {
    margin-block: 1rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
}
.team-empty p { margin: .25rem 0; }
.team-empty svg { color: var(--primary); }
.team-content {
    display: grid;
    grid-template-columns: minmax(0,1.8fr) minmax(15.5rem,1fr);
    gap: 14px;
    align-items: start;
}
.team-stack { display: grid; gap: 14px; }
.team-details {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(7.4rem,1fr));
    gap: .65rem;
    margin: .5rem 0 .75rem;
}
.team-details div {
    padding: .45rem .6rem;
    border-radius: 8px;
    background: var(--secondary);
}
.team-details dt { color: var(--muted); font-size: .77rem; }
.team-details dd { margin: .08rem 0 0; font-weight: 700; }
.team-body-text, .team-messages p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: .45rem 0 0;
}
.team-history ol, .team-messages, .team-conversations { margin: 0; padding: 0; list-style: none; }
.team-history li {
    position: relative;
    display: grid;
    grid-template-columns: .62rem minmax(0,1fr);
    gap: .65rem;
    padding-block: .45rem;
}
.team-history li:not(:last-child)::before {
    content: "";
    position: absolute;
    inset: 1rem .28rem -.45rem auto;
    width: 1px;
    background: var(--line);
}
.team-history-dot {
    position: relative;
    margin-block-start: .48rem;
    border-radius: 50%;
    height: .62rem;
    background: var(--primary);
    border: 2px solid var(--surface);
}
.team-history li p {
    margin: .13rem 0 0;
    color: var(--muted);
    font-size: .8rem;
}
.team-history form { margin-top: .85rem; padding-top: .85rem; border-block-start: 1px solid var(--line); }
.team-editor { max-width: 58rem; width: 100%; }
.team-record textarea, .team-editor textarea { min-height: 5rem; resize: vertical; }
.team-purchase-items {
    min-width: 0;
    margin: 0;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: .65rem;
}
.team-purchase-items legend { padding-inline: .35rem; color: var(--ink); font-weight: 700; }
.team-purchase-rows { display: grid; gap: .55rem; }
.team-purchase-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1.15fr) 2.75rem;
    align-items: end;
    gap: .55rem;
}
.team-purchase-row + .team-purchase-row { border-block-start: 1px solid var(--line); padding-block-start: .55rem; }
.team-purchase-row label { min-width: 0; }
.team-purchase-row [data-team-purchase-remove] { min-height: 42px; justify-content: center; padding-inline: 0; }
.team-purchase-items [data-team-purchase-add] { justify-self: start; }
.team-request-items { margin-block: .85rem; }
.team-request-items caption { text-align: start; padding-block-end: .35rem; font-weight: 700; }
.team-request-items table th, .team-request-items table td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 530px) {
    .team-purchase-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 2.75rem; }
    .team-purchase-row label:first-child { grid-column: 1 / -1; }
}
.team-messages {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-height: 33rem;
    overflow: auto;
    margin-block: .75rem;
    padding: .3rem;
    border-radius: 10px;
}
.team-messages li {
    align-self: flex-start;
    width: fit-content;
    max-width: min(32rem,94%);
    padding: .65rem .8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--secondary);
    overflow-wrap: anywhere;
}
.team-messages li.team-message-own {
    align-self: flex-end;
    background: color-mix(in srgb,var(--primary) 8%,var(--surface));
}
.team-messages header {
    display: flex;
    gap: .2rem .8rem;
    flex-wrap: wrap;
    align-items: baseline;
    font-size: .8rem;
}
.team-messages time, .team-conversations time {
    font-size: .75rem;
    color: var(--muted);
}
.team-conversations {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: .6rem;
}
.team-conversations li { min-width: 0; }
.team-conversations a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .68rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--secondary);
    text-decoration: none;
}
.team-conversation-copy { flex: 1; min-width: 0; }
.team-conversation-copy strong, .team-conversation-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team-conversation-copy span { color: var(--muted); font-size: .8rem; }
.team-next { display: inline-flex; margin-top: .85rem; }
@media(max-width: 1000px) {
    .team-content { grid-template-columns: 1fr; }
}
@media(max-width: 710px) {
    .team-quick { grid-template-columns: minmax(0,1fr); gap: .45rem; }
    .team-quick-card { min-height: 0; padding: .55rem .65rem; }
    .team-quick-card small { line-height: 1.3; }
    .team-kind-icon { width: 35px; height: 35px; }
    .team-tabs a { padding: .48rem .4rem; gap: .3rem; font-size: .78rem; }
    .team-tabs a svg { width: 14px; height: 14px; }
    .team-conversations a { display: grid; grid-template-columns: auto minmax(0,1fr); }
    .team-conversations time { grid-column: 2; }
}
