/* Teams environment — shared-mailbox index + per-mailbox settings.
   Real classes replace the old inline styles so the pages read as one system
   and spacing/typography can be tuned centrally. */

/* Wider, breathing container than the old 820px strip. */
.teams-wrap { max-width: 1100px; margin: 0 auto; }

.teams-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.teams-head .h { font-size: 26px; font-weight: 800; letter-spacing: -.02em; flex: 1; min-width: 0; }

/* Mailbox cards as a responsive grid — high information density, no dead space. */
.mailbox-grid {
  display: grid; gap: 14px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.mailbox-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 18px; text-decoration: none; color: inherit; position: relative;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.mailbox-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(20,16,45,.08); transform: translateY(-1px); }
.mailbox-card .mc-top { display: flex; align-items: center; gap: 11px; }
.mailbox-card .mc-avatar {
  width: 40px; height: 40px; border-radius: 11px; color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.mailbox-card .mc-name { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.mailbox-card .mc-addr { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailbox-card .mc-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }

/* Stat row — the numbers that make a card worth scanning. */
.mc-stats { display: flex; gap: 18px; padding-top: 2px; }
.mc-stat .v { font-size: 20px; font-weight: 800; line-height: 1; }
.mc-stat .l { font-size: 11px; color: var(--muted); margin-top: 3px; }

.mc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.mc-avatars { display: flex; }
.mc-avatars .a {
  width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); margin-left: -7px;
}
.mc-avatars .a:first-child { margin-left: 0; }
.mc-role { font-size: 11.5px; color: var(--muted-3); margin-left: auto; }

/* ── Per-mailbox settings: tabbed, consistent sections ── */
.team-detail-wrap { max-width: 900px; margin: 0 auto; }
.team-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 10px 0 6px; }
.team-hero .th-avatar {
  width: 40px; height: 40px; border-radius: 11px; color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.team-hero .th-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.team-hero .th-addr { font-size: 12.5px; color: var(--muted); }

.team-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 16px 0 0; flex-wrap: wrap; }
.team-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.team-tab:hover { color: var(--text); }
.team-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.team-panel { display: none; margin-top: 16px; }
.team-panel.active { display: block; }

.team-section-h { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.team-section-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.45; }

@media (max-width: 860px) {
  .mailbox-grid { grid-template-columns: 1fr; }
  .team-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .team-tab { white-space: nowrap; }
}
