/* Batch 6: Zespół, Moje konto and the one-time password page. Tokens come from studio.css. */
.team .page-heading .button-primary { min-height: 44px; }
.team-add-card { margin-bottom: 20px; }
.team-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.team-form > .team-roles, .team-form > .team-actions, .team-wide { grid-column: 1 / -1; }
.team-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team-field label { font-weight: 600; font-size: 14px; }
.team-field input { min-height: 44px; width: 100%; }
.team-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.team-roles legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.team-role { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; min-height: 44px; }
.team-role.is-on { border: 2px solid var(--navy); padding: 11px 13px; background: #f4f7fa; }
.team-role input { margin-top: 4px; accent-color: var(--navy); width: 18px; height: 18px; flex: none; }
.team-role > span { display: flex; flex-direction: column; gap: 2px; }
.team-rules { grid-template-columns: minmax(0, 1fr); }
.team-check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 14px; align-self: end; }
.team-check input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.team-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.team-actions .button-primary { min-height: 44px; }
.team-created { background: var(--green-soft); border: 1px solid #b9d3c2; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.team-created h3 { margin: 0; font-size: 16px; }
.team-created p { margin: 0; font-size: 14px; }
.team-created > .button-text { align-self: flex-start; }
.team-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.team-link code { flex: 1 1 320px; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--white); border: 1px solid #b9d3c2;
  border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; }
.team-table { min-width: 760px; }
.team-table td { padding: 12px 10px; border-bottom: 1px solid #eef2f6; vertical-align: top; font-size: 14px; }
.team-table tr.is-off td { color: var(--muted); }
.team-table select { min-height: 40px; min-width: 150px; max-width: 190px; }
.team-person strong, .team-sub { display: block; }
.team-row-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.team-row-actions .button-text { padding: 6px 8px; font-size: 13px; }
.team-edit-row td { background: #fafbfc; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.team-matrix td, .team-matrix th { padding: 8px 10px; font-size: 14px; border-bottom: 1px solid #eef2f6; }
.team-matrix tbody th { color: var(--ink); font-weight: 500; }
.team-matrix td.is-yes { color: var(--green); font-weight: 600; }
.team-matrix td.is-no { color: #6b7684; }
.team-notice { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); color: var(--navy); font-size: 14px; }
.account-dialog form { display: flex; flex-direction: column; gap: 6px; }
.account-dialog form label { font-weight: 600; font-size: 14px; margin-top: 8px; }
.account-dialog form .button-primary { margin-top: 12px; }
@media (max-width: 900px) {
  .team-form, .team-roles { grid-template-columns: minmax(0, 1fr); }
}

/* The one-time link page (/ustaw-haslo), outside the Studio. */
body.setup-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--paper); }
.setup-card { width: min(440px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 32px 28px; }
.setup-logo { display: block; margin-bottom: 18px; max-width: 160px; max-height: 64px; object-fit: contain; }
.setup-page .brand-wordmark { margin-bottom: 18px; }
.setup-card h1 { margin: 0 0 6px; font-size: 26px; }
.setup-intro { margin: 0 0 16px; color: var(--muted); }
.setup-card form { display: flex; flex-direction: column; gap: 6px; }
.setup-card label { font-weight: 600; font-size: 14px; margin-top: 8px; }
.setup-card input { min-height: 44px; }
.setup-card .button-primary { margin-top: 14px; min-height: 48px; }
.setup-done { margin: 0; padding: 14px; border-radius: var(--radius); background: var(--green-soft); color: var(--green); font-weight: 600; }

/* The phone top bar holds icons only: the team link and the Agent button too on narrow phones. */
@media (max-width: 760px) {
  .app-nav-footer > a { min-height: 44px; min-width: 44px; padding: 0 10px; justify-content: center; margin: 0; }
  .app-nav-footer > a span { display: none; }
}
@media (max-width: 420px) {
  .app-nav-footer { gap: 0; }
  .app-nav-agent span { display: none !important; }
  .app-nav-footer > button, .app-nav-footer > a { padding: 0 6px; min-width: 44px; }
}
