/* Ekrany T: ekipa, profil pracownika, grafik, zaliczki (prefiks tm-). */

/* --- lista --- */
.tm-row .li-sub { display: flex; flex-direction: column; gap: 1px; white-space: normal; }
.tm-trade { color: var(--muted); font-size: .8rem; }
.tm-line { color: var(--t-ink, var(--ink-2)); font-weight: 600; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- profil: naglowek --- */
.tm-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 6px 0 2px; }
.tm-hero-photo { position: relative; }
.tm-hero-av { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.tm-hero-name { margin: 10px 0 0; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.tm-hero-trade { margin: 0; color: var(--muted); font-size: .9rem; }
.tm-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 12px; }
.tm-tab { display: flex; flex-direction: column; gap: 14px; }

/* --- teraz --- */
.tm-now { display: flex; flex-direction: column; gap: 10px; box-shadow: var(--hairline), var(--shadow-1), inset 3px 0 0 var(--t, var(--line)); }
.tm-now-top { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-now-what { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.tm-now-job { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); color: inherit; text-decoration: none; }
.tm-now-job > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tm-now-job small { color: var(--muted); font-size: .8rem; }
.tm-now-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tm-now-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-now-stats span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.tm-now-stats b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }

/* --- grafik (tydzien osoby) --- */
.tm-weeknav { display: flex; align-items: center; gap: 6px; }
.tm-weeknav-label { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 4px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tm-weeknav-label b { font-family: var(--font-display); font-size: 1.1rem; }
.tm-weeknav-label small { font-size: .76rem; color: var(--muted); }
.tm-week { display: flex; flex-direction: column; }
.tm-wday { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tm-wday:first-child { border-top: 0; }
.tm-wday.is-today { background: var(--accent-soft); }
.tm-wday-date { display: flex; flex-direction: column; align-items: center; width: 34px; flex: none; }
.tm-wday-date small { font-size: .7rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.tm-wday-date b { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.tm-wday-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-wday-job { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm-wday-job b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.tm-wday-body small { color: var(--muted); font-size: .78rem; }
.tm-wday-h { font-family: var(--font-display); font-weight: 700; }
.tm-tip { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .78rem; color: var(--muted); }

/* --- czas pracy --- */
.tm-logdate { display: flex; flex-direction: column; align-items: center; width: 40px; }
.tm-logdate small { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.tm-logdate b { font-family: var(--font-display); font-size: 1.25rem; line-height: 1; }
.tm-logh { font-family: var(--font-display); font-weight: 700; margin-right: 8px; }
.tm-late { color: var(--warn); font-weight: 700; }

/* --- zaliczki --- */
.tm-pay { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tm-pay > div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; }
.tm-pay span { font-size: .88rem; color: var(--ink-2); }
.tm-pay b { font-family: var(--font-display); font-size: 1.15rem; }
.tm-pay small { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); margin-top: -4px; }
.tm-pay .is-total { padding-top: 10px; border-top: 1px dashed var(--line); }
.tm-pay .is-total b { font-size: 1.6rem; color: var(--ok); }
.tm-reqs { display: flex; flex-direction: column; gap: 10px; }
.tm-req-card { display: flex; flex-direction: column; gap: 12px; box-shadow: var(--hairline), var(--shadow-1), inset 3px 0 0 var(--warn); }
.tm-req { display: flex; align-items: center; gap: 12px; }
.tm-req-body { display: flex; flex-direction: column; min-width: 0; }
.tm-req-body small { color: var(--muted); font-size: .82rem; }
.tm-req-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.tm-amt { font-family: var(--font-display); font-size: 1.05rem; }
.tm-adv-hero { display: flex; flex-direction: column; gap: 2px; }
.tm-adv-hero span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tm-adv-hero b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.05; }
.tm-adv-hero small { color: var(--ink-2); font-size: .82rem; }
.tm-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tm-amount { min-height: 48px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1rem var(--font-display); cursor: pointer; }
.tm-amount.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* --- stawki --- */
.tm-rates { display: flex; flex-direction: column; gap: 16px; }
.tm-margin-top { display: flex; align-items: baseline; justify-content: space-between; }
.tm-margin-val { font-family: var(--font-display); font-size: 2rem; color: var(--accent-text); }
.tm-rates-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.tm-rates-flow > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.tm-rates-flow span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.tm-rates-flow b { font-family: var(--font-display); font-size: 1.2rem; }
.tm-rates-arrow { color: var(--muted); display: grid; place-items: center; }
.tm-rates-profit { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; padding: 12px 14px; border-radius: var(--radius); background: var(--ok-soft); }
.tm-rates-profit span { font-weight: 600; color: var(--ink-2); }
.tm-rates-profit b { font-family: var(--font-display); font-size: 1.5rem; color: var(--ok); }
.tm-skills { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- grafik ekipy: dzien --- */
.tm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tm-day { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 54px; padding: 6px 0; border-radius: var(--radius); border: 0; background: var(--surface); box-shadow: var(--hairline); color: inherit; font: inherit; cursor: pointer; }
.tm-day small { font-size: .7rem; font-weight: 700; color: var(--muted); }
.tm-day b { font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }
.tm-day.is-today b { color: var(--accent-text); }
.tm-day.is-on { background: var(--ink); color: var(--bg); }
.tm-day.is-on small, .tm-day.is-on b { color: inherit; }
.tm-jobtag { display: inline-flex; align-items: center; gap: 6px; max-width: 150px; padding: 4px 10px; border-radius: 999px; background: var(--jc-soft); color: var(--ink); font-size: .78rem; font-weight: 600; }
.tm-jobtag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-jobtag .job-dot { flex: none; }

/* --- grafik ekipy: tydzien (siatka przewijana w kontenerze) --- */
.tm-grid-wrap { overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; }
.tm-grid { display: flex; flex-direction: column; gap: 4px; min-width: 340px; }
.tm-grid-row { display: grid; grid-template-columns: 84px repeat(7, minmax(34px, 1fr)); gap: 4px; align-items: center; }
.tm-grid-who { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 4px 2px 0; background: var(--bg); color: inherit; text-decoration: none; font-size: .8rem; font-weight: 600; }
.tm-grid-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-grid-head .tm-grid-who { background: var(--bg); }
.tm-grid-day { display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--muted); font-weight: 700; }
.tm-grid-day b { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.tm-grid-day.is-today b { color: var(--accent-text); }
.tm-cell { height: 40px; border-radius: 8px; border: 1px dashed var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink); font: 700 .78rem var(--font-display); }
.tm-cell.is-job { border: 0; background: var(--jc-soft); box-shadow: inset 0 -3px 0 var(--jc); }
.tm-cell.is-leave, .tm-cell.is-sick { border: 0; background: var(--violet-soft); color: var(--violet); }
.tm-cell.is-off { border: 0; background: var(--surface-2); color: var(--muted); }
.tm-cell.is-today { outline: 2px solid var(--accent); outline-offset: 1px; }
.tm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--ink-2); }
.tm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.tm-cell-mini { display: inline-grid; place-items: center; min-width: 22px; height: 18px; border-radius: 5px; font: 700 .65rem var(--font-display); }
.tm-cell-mini.is-leave, .tm-cell-mini.is-sick { background: var(--violet-soft); color: var(--violet); }

/* --- arkusz przydzialu --- */
.tm-opts { display: flex; flex-direction: column; gap: 6px; }
.tm-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tm-opt.is-on { border-color: var(--accent); background: var(--accent-soft); }
.tm-opt .job-dot { width: 14px; height: 14px; flex: none; margin: 0 4px; }
.tm-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tm-opt-text small { color: var(--muted); font-size: .78rem; }
.tm-opt-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.tm-opt.is-on .tm-opt-radio { border: 6px solid var(--accent); }
.tm-opt-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--t-soft); color: var(--t-ink); flex: none; }
.tm-more summary { cursor: pointer; padding: 8px 4px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.tm-more .tm-opt { margin-bottom: 6px; }
.tm-hours { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
