#admin-panel[data-page="team"] .admin-stats { display: none; }
#admin-team-view { min-width: 0; }
.team-member-panel { position: fixed; inset: 0; z-index: 55; overflow-y: auto; padding: 24px max(16px, calc((100vw - 1040px) / 2)) 70px; color: var(--text); background: radial-gradient(circle at 90% 0%, #a9824d2b, transparent 34%), var(--bg); }
.team-member-panel:not([hidden]) { display: block; }
.team-member-header, .team-brand, .team-card-head, .team-card-meta, .team-card-actions { display: flex; align-items: center; }
.team-member-header { justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.team-brand { gap: 12px; min-width: 0; }
.team-brand img { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; box-shadow: 0 0 0 1px #e7c89444, 0 10px 28px #0008; }
.team-brand span { display: block; color: var(--accent-2); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.team-brand h1 { margin: 3px 0 0; font-size: clamp(24px, 5vw, 36px); letter-spacing: -.04em; }
.team-lead { margin: 18px 0; color: var(--muted); line-height: 1.6; }
.team-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 22px; }
.team-stats > div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #191b20, #111318); }
.team-stats strong, .team-stats span { display: block; }
.team-stats strong { color: var(--accent-2); font-size: 26px; }
.team-stats span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.team-owner-forms { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px; margin: 18px 0 24px; }
.team-owner-forms summary { cursor: pointer; color: var(--accent-2); font-size: 15px; font-weight: 700; }
.team-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 16px; }
.team-form label, .team-owner-filter label, .team-update-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.team-form input, .team-form select, .team-form textarea, .team-owner-filter select, .team-update-form select, .team-update-form textarea, .team-comment-form textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: var(--bg); font: inherit; font-size: 15px; }
.team-form textarea, .team-update-form textarea, .team-comment-form textarea { resize: vertical; }
.team-form input:focus, .team-form select:focus, .team-form textarea:focus, .team-owner-filter select:focus, .team-update-form select:focus, .team-update-form textarea:focus, .team-comment-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #a9824d22; }
.team-wide { grid-column: 1 / -1; }
.team-members { display: grid; gap: 8px; margin-top: 14px; }
.team-member-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.team-member-row strong, .team-member-row small { display: block; }
.team-member-row small { margin-top: 3px; color: var(--muted); }
.team-member-row.inactive { opacity: .58; }
.team-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.team-filter .selected { border-color: var(--accent); color: var(--accent-2); }
.team-owner-filter { align-items: end; }
.team-owner-filter label { min-width: 180px; flex: 1; }
.team-board { display: grid; gap: 12px; }
.team-card { position: relative; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #191c21f2, #111318f2); box-shadow: 0 16px 42px #0003; }
.team-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: #68707d; }
.team-card.status-in_progress::before { background: #6ea8ff; }
.team-card.status-review::before { background: var(--accent-2); }
.team-card.status-blocked::before { background: #ff7a7a; }
.team-card.status-done::before { background: #66d19e; }
.team-card.overdue { border-color: #8f4d4d; }
.team-card-head { justify-content: space-between; align-items: start; gap: 12px; }
.team-card-head h3 { margin: 0; font-size: 17px; line-height: 1.42; }
.team-badge { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; color: #cbd0d7; background: #30353d; font-size: 10px; }
.team-badge.status-in_progress { color: #bcd7ff; background: #1f3d65; }
.team-badge.status-review { color: #f4d7a8; background: #4a3922; }
.team-badge.status-blocked { color: #ffd1d1; background: #5a292e; }
.team-badge.status-done { color: #adf0cc; background: #183729; }
.team-card-meta { flex-wrap: wrap; gap: 7px 13px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.team-card-description, .team-card-acceptance { margin: 10px 0; color: #dce0e5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.team-card-acceptance { padding: 11px 12px; border-left: 2px solid var(--accent); color: var(--muted); background: #0002; }
.team-progress { position: relative; height: 8px; margin: 14px 0 7px; overflow: hidden; border-radius: 99px; background: #292d34; }
.team-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7d5e38, var(--accent-2)); }
.team-progress-label { color: var(--muted); font-size: 11px; }
.team-timeline { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.team-timeline summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.team-comment { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #090b0f88; }
.team-comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }
.team-comment small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.team-update-form, .team-comment-form { display: grid; gap: 10px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.team-update-grid { display: grid; grid-template-columns: 1fr .7fr; gap: 10px; }
.team-card-actions { flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.team-card-actions .admin-button { min-height: 42px; padding: 9px 12px; font-size: 12px; }
.team-empty { padding: 30px 16px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; line-height: 1.6; }

@media (max-width: 760px) {
  .team-member-panel { padding: 14px 10px 42px; }
  .team-member-header { align-items: start; }
  .team-member-header .admin-button { padding: 9px 10px; font-size: 11px; }
  .team-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .team-stats > div { padding: 12px; }
  .team-stats strong { font-size: 22px; }
  .team-owner-forms { grid-template-columns: minmax(0, 1fr); }
  .team-form, .team-update-grid { grid-template-columns: minmax(0, 1fr); }
  .team-wide { grid-column: auto; }
  .team-card { padding: 15px; }
  .team-card-head { display: grid; }
}
