/* Team and join pages */
.tm { max-width: none; margin: 0; padding: 36px var(--pad, 32px) 80px; }
.tm-head { margin-bottom: 26px; }
.tm-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.tm-head h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 450; letter-spacing: -0.04em; }
.tm-sub { margin: 8px 0 0; color: var(--ink-soft); }
.tm-note, .tm-gate { padding: 16px 18px; border-radius: 14px; background: #f4f4f5; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.tm-note[hidden], .tm-gate[hidden] { display: none; }
.tm-sec { margin-top: 30px; }
.tm-sec[hidden] { display: none; }
.tm-sec h2 { margin: 0 0 12px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.tm-sec h2 span { color: var(--ink-soft); font-weight: 400; }
.tm-form { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-form input, .tm-form select, .tm-ctl select { height: 44px; padding: 0 14px; border: 1px solid var(--sh-line, var(--line)); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; }
.tm-form input { flex: 1 1 240px; }
.tm-ctl select { height: 38px; font-size: 14px; }
.tm-say { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.tm-say.is-bad { color: #b3261e; }
.tm-roles { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.tm-list { border-top: 1px solid var(--sh-line, var(--line)); }
.tm-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--sh-line, var(--line)); }
.tm-av { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #111; font-weight: 600; }
.tm-av--wait { background: #e9e9eb; color: var(--ink-soft); }
.tm-who { display: grid; flex: 1 1 auto; min-width: 0; }
.tm-who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-who small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-ctl { display: flex; align-items: center; gap: 12px; }
.tm-pill { padding: 5px 12px; border-radius: 999px; background: #f0f0f1; font-size: 13px; color: var(--ink); }
.tm-link { border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.tm-link:hover { color: var(--accent); }
.tm-actions { display: flex; gap: 10px; margin-top: 18px; }
.tm-actions[hidden] { display: none; }
@media (max-width: 600px) { .tm-row { flex-wrap: wrap; } .tm-ctl { width: 100%; justify-content: flex-end; } }
.tm-plan { display: inline-block; margin: 12px 0 0; padding: 7px 14px; border-radius: 999px; background: #f4f4f5; font-size: 13.5px; color: var(--ink-soft); }
.tm-plan[hidden] { display: none; }
.tm-plan a { color: var(--accent); }
.tm-form input[type="email"], .tm-form input[type="text"] { flex: 1 1 260px; }
.tm-form select { flex: 0 1 200px; }
.tm-title { width: 150px; height: 38px; padding: 0 10px; border: 1px solid var(--sh-line, var(--line)); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
@media (max-width: 600px) { .tm-title { flex: 1 1 auto; } }
.tm-role { border-bottom: 1px solid var(--sh-line, var(--line)); }
.tm-role-top { display: flex; align-items: center; gap: 14px; padding: 14px 4px; }
.tm-role-form { display: grid; gap: 14px; padding: 4px 4px 18px; }
.tm-role-form > label, .tm-matrix label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.tm-role-form input, .tm-matrix select { height: 40px; padding: 0 10px; border: 1px solid var(--sh-line, var(--line)); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.tm-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 18px; }
#tmNewRole { margin-top: 14px; }
.tm-role-form .wk-actions { display: flex; align-items: center; gap: 18px; }

/* logins issued by the workspace */
.tm-login-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tm-login-form .tm-pass { display: flex; gap: 8px; align-items: center; }
.tm-login-form .tm-pass input { flex: 1 1 auto; min-width: 0; }
.tm-login-form input, .tm-login-form select { width: 100%; }
.tm-login-form button[type="submit"] { justify-self: start; }
.tm-issued { margin-top: 14px; padding: 16px 18px; border: 1.5px solid var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tm-issued h3 { margin: 0 0 6px; font-size: 16px; }
.tm-issued p { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.tm-issued dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; font-size: 15px; }
.tm-issued dt { color: var(--ink-soft); }
.tm-issued dd { margin: 0; font-weight: 600; word-break: break-all; }
@media (max-width: 720px) { .tm-login-form { grid-template-columns: 1fr; } }

/* employee numbers */
.tm-empno { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.tm-num-prefix { display: grid; gap: 6px; max-width: 320px; margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); }
.tm-num-prefix input { height: 44px; padding: 0 14px; border: 1px solid var(--sh-line, var(--line)); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; text-transform: uppercase; }
.tm-num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 16px; }
.tm-num { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--sh-line, var(--line)); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms ease, transform 140ms ease; }
.tm-num:hover { border-color: var(--accent); transform: translateY(-1px); }
.tm-num.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.tm-num-n { grid-row: 1 / span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: 13px; font-weight: 600; }
.tm-num.is-on .tm-num-n { background: var(--accent); color: #111; }
.tm-num-t { font-size: 13px; color: var(--ink-soft); }
.tm-num b { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* the business code */
.tm-code { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tm-code-v { display: inline-block; padding: 10px 20px; border: 1.5px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 26px; font-weight: 700; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; }

/* the inbox */
.ib-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.ib-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--sh-line, var(--line)); border-radius: 999px; background: transparent; font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.ib-tab:hover { border-color: var(--accent); color: var(--accent); }
.ib-tab.is-on, .ib-tab.is-on:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ib-count, .sh-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.ib-tab.is-on .ib-count { background: #fff; color: var(--accent); }
.ib-count[hidden], .sh-badge[hidden] { display: none; }
.sh-badge { margin-left: auto; }
.ib-bar { display: flex; justify-content: flex-end; min-height: 8px; margin-bottom: 8px; }
.ib-list { border-top: 1px solid var(--sh-line, var(--line)); }
.ib-msg { border-bottom: 1px solid var(--sh-line, var(--line)); }
.ib-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 4px; border: 0; background: none; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.ib-head--static { cursor: default; }
.ib-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.ib-msg.is-unread .ib-dot { background: var(--accent); }
.ib-sub { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.ib-sub b { font-weight: 450; overflow: hidden; text-overflow: ellipsis; }
.ib-msg.is-unread .ib-sub b { font-weight: 650; }
.ib-sub small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-head time { flex: 0 0 auto; font-size: 13px; color: var(--ink-soft); }
.ib-imp { justify-self: start; padding: 2px 10px; border-radius: 999px; background: #fdf0e4; color: #b45309; font-size: 12px; font-weight: 600; }
.ib-body { padding: 0 4px 22px 28px; font-size: 15.5px; line-height: 1.65; max-width: 70ch; }
.ib-body p { margin: 0 0 12px; }
.ib-form { display: grid; gap: 18px; max-width: 640px; }
.ib-form label, .ib-form fieldset { display: grid; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.ib-form fieldset { margin: 0; padding: 0; border: 0; }
.ib-form legend { padding: 0; margin-bottom: 6px; }
.ib-form input:not([type=checkbox]), .ib-form select, .ib-form textarea { padding: 12px 14px; border: 1px solid var(--sh-line, var(--line)); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.ib-form textarea { resize: vertical; min-height: 140px; }
.ib-form small { color: var(--ink-soft); font-size: 12.5px; }
.ib-form .ib-check, .ib-people .ib-check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; }
.ib-people { display: grid; gap: 4px; max-height: 260px; overflow: auto; padding: 8px 12px; border: 1px solid var(--sh-line, var(--line)); border-radius: 12px; }

.ib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 14px; }
.ib-search { flex: 1 1 280px; }
.ib-search input { width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--sh-line, var(--line)); border-radius: 999px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); box-sizing: border-box; }
.ib-search input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.ib-chips { display: flex; gap: 8px; }
.ib-chip { min-height: 38px; padding: 0 16px; border: 1px solid var(--sh-line, var(--line)); border-radius: 999px; background: transparent; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.ib-chip:hover { border-color: var(--accent); color: var(--accent); }
.ib-chip.is-on, .ib-chip.is-on:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ib-card { width: min(640px, 100%); }
.ib-read { font-size: 16px; line-height: 1.7; }
.ib-read p { margin: 0 0 14px; }
.ib-act { align-items: center; }
.ib-pos { margin-right: auto; font-size: 13px; color: var(--ink-soft); }
.ib-act .wk-link[disabled] { opacity: 0.4; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the setup sections on the Team page sit in cards with room to breathe */
#tmInviteBox, #tmCodeBox, #tmLoginBox, #tmNumBox { padding: 26px 28px 28px; border: 1px solid var(--sh-line, var(--line)); border-radius: 20px; background: #fff; }
#tmInviteBox h2, #tmCodeBox h2, #tmLoginBox h2, #tmNumBox h2 { margin: 0 0 10px; }
#tmInviteBox > .tm-roles, #tmCodeBox > .tm-roles, #tmLoginBox > .tm-roles, #tmNumBox > .tm-roles { max-width: 74ch; margin: 0 0 22px; line-height: 1.65; }
#tmCodeBox .tm-code { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
#tmCodeBox .tm-code-v { display: inline-flex; align-items: center; justify-content: center; min-width: 230px; padding: 16px 28px; border: 1.5px dashed var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, transparent); font-family: inherit; font-size: 30px; font-weight: 600; letter-spacing: 0.14em; line-height: 1; white-space: nowrap; }
#tmCodeBox .tm-code-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#tmCodeBox .tm-say { margin-top: 14px; }
@media (max-width: 640px) { #tmInviteBox, #tmCodeBox, #tmLoginBox, #tmNumBox { padding: 20px 18px 22px; } #tmCodeBox .tm-code-v { width: 100%; min-width: 0; font-size: 26px; } }
#tmInviteBox .tm-form, #tmLoginBox .tm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: center; }
#tmInviteBox .tm-form input, #tmInviteBox .tm-form select, #tmLoginBox .tm-form input, #tmLoginBox .tm-form select { width: 100%; box-sizing: border-box; }
#tmInviteBox .tm-form .tl-btn, #tmLoginBox .tm-form .tl-btn { justify-self: start; }
#tmCodeBox .tm-code-v { min-width: 0; padding: 10px 20px; border-radius: 12px; font-size: 20px; font-weight: 600; letter-spacing: 0.1em; }
@media (max-width: 640px) { #tmCodeBox .tm-code-v { width: auto; font-size: 20px; } }

.tm-rot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--sh-line, var(--line)); }
.tm-rot[hidden] { display: none; }
.tm-rot label { font-size: 14px; color: var(--ink-soft); }
.tm-rot select { height: 40px; padding: 0 14px; border: 1px solid var(--sh-line, var(--line)); border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); }
.tm-rot-next { flex: 1 1 100%; font-size: 13.5px; color: var(--ink-soft); }
#tmCodeBox .tm-rot select { width: auto; min-width: 260px; max-width: 100%; flex: 0 0 auto; }
#tmCodeBox .tm-rot:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
#tmCodeBox .tm-rot .cs, #tmCodeBox .tm-rot .cs.cs--wide { width: 280px; max-width: 100%; flex: 0 0 auto; }
