/* Planning > turnos -- the shift planner. Every colour is a token from app.css; none of its own. */

.tn-wrap { display: flex; flex-direction: column; gap: 10px; padding: 14px 24px 18px; min-height: 0; height: 100%; box-sizing: border-box; font-family: var(--sans, 'IBM Plex Sans', sans-serif); color: var(--ink); }
.tn-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.tn-head .tn-title { font-size: 28px; font-weight: 600; margin-top: 2px; }
.tn-micro { font-family: var(--mono, 'IBM Plex Mono', monospace); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tn-grow { flex: 1 1 auto; }
.tn-btn { height: 38px; padding: 0 14px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.tn-btn:hover { background: var(--field-focus); }
.tn-btn.tn-dark { background: var(--ink); color: var(--panel-figure); border-color: var(--ink); }
.tn-btn.tn-sq { width: 38px; padding: 0; font-size: 16px; }
.tn-btn[disabled] { opacity: .45; cursor: default; }
.tn-btn.tn-danger { border-color: var(--alarm); color: var(--alarm); }
.tn-msg { font-size: 13px; color: var(--body); min-height: 18px; }
.tn-msg.tn-bad { color: var(--alarm); }
/* workers' requests waiting for an answer, above the grid */
.tn-reqs { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; }
.tn-req { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tn-req-t { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--body); }
.tn-req-n { color: var(--muted); }
.tn-req-bill { color: var(--warn-ink); font-weight: 600; }

.tn-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--body); }
.tn-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tn-sw { width: 12px; height: 12px; display: inline-block; }
.tn-sw.tn-sw-draft { border: 1.5px dashed var(--ink); }

.tn-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--hairline); background: var(--card); }
.tn-grid { display: grid; grid-template-columns: 180px repeat(7, minmax(108px, 1fr)); font-size: 12px; min-width: 940px; }
.tn-dayh { position: sticky; top: 0; z-index: 1; background: var(--card); border-bottom: 1px solid var(--hairline); border-right: 1px solid var(--rule); padding: 10px 12px; font-family: var(--mono, monospace); text-transform: uppercase; }
.tn-dayh.tn-weekend { color: var(--muted); }
.tn-who { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); padding: 10px 12px; }
.tn-who .tn-name { font-size: 14px; font-weight: 500; }
.tn-who .tn-sub { font-family: var(--mono, monospace); color: var(--muted); margin-top: 2px; font-size: 11px; }
.tn-who .tn-flex { margin-top: 6px; font-size: 11px; color: var(--accent-purple); }
.tn-who .tn-flex.tn-owed { color: var(--alarm); }
.tn-cell { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); padding: 5px; display: flex; flex-direction: column; gap: 4px; min-height: 64px; cursor: pointer; position: relative; }
.tn-cell.tn-weekend { background: var(--surface-2); }
.tn-cell.tn-todaycol { background: var(--field-focus); }

.tn-card { display: block; width: 100%; box-sizing: border-box; text-align: left; border: 0; padding: 5px 7px; color: #fff; font: inherit; font-size: 12px; cursor: pointer; position: relative; }
.tn-card .tn-t { font-weight: 600; }
.tn-card .tn-pl { font-family: var(--mono, monospace); font-size: 11px; margin-top: 2px; }
.tn-card.tn-draft { background: var(--card) !important; color: var(--ink); border: 1.5px dashed currentColor; }
.tn-card.tn-cancelled { background: var(--surface-2) !important; color: var(--muted); text-decoration: line-through; }
.tn-card.tn-corrected { outline: 2px solid var(--alarm); outline-offset: -2px; }
.tn-badge { font-family: var(--mono, monospace); font-size: 10px; background: var(--card); color: var(--ink); padding: 0 3px; margin-left: 4px; }
.tn-dot { color: var(--alarm); font-weight: 700; margin-left: 4px; }
.tn-leave { padding: 6px; font-family: var(--mono, monospace); font-size: 11px; text-transform: uppercase; color: var(--body);
  background: repeating-linear-gradient(45deg, var(--rule) 0 6px, var(--surface-2) 6px 12px); }

.tn-foot { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--rule); padding: 8px 14px; font-size: 13px; }

/* the side panel: add or edit a shift, or a flexible-hours assignment */
.tn-scrim { position: fixed; inset: 0; background: rgba(20, 20, 19, .18); z-index: 20; }
.tn-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 100vw; background: var(--card); border-left: 1.5px solid var(--hairline); z-index: 21; display: flex; flex-direction: column; box-sizing: border-box; }
.tn-panel-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: flex-start; }
.tn-panel-h .tn-ptitle { font-size: 22px; font-weight: 600; margin-top: 4px; }
.tn-panel-b { padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; overflow: auto; flex: 1 1 auto; }
.tn-field { display: flex; flex-direction: column; gap: 5px; }
.tn-field > span { font-family: var(--mono, monospace); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.tn-field input, .tn-field select, .tn-field textarea { height: 42px; border: 1.5px solid var(--ink); font: inherit; font-size: 15px; padding: 0 10px; background: var(--card); color: var(--ink); min-width: 0; box-sizing: border-box; }
.tn-field textarea { height: 64px; padding: 8px 10px; resize: none; }
.tn-row { display: flex; gap: 10px; }
.tn-row > .tn-field { flex: 1 1 0; min-width: 0; }
.tn-row > .tn-field input, .tn-row > .tn-field select { width: 100%; min-width: 0; box-sizing: border-box; }
.tn-wp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tn-wp button { height: 38px; border: 1.5px solid var(--rule); background: var(--card); font-family: var(--mono, monospace); font-size: 13px; cursor: pointer; color: var(--ink); }
.tn-wp button[aria-pressed="true"] { background: var(--dep-projects); border-color: var(--dep-projects); color: #fff; }
/* A shift's project and its part (Paul 16/11, «13 C»): two square buttons, the chosen one black; the chip on the card. */
.tn-part { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tn-part button { height: 38px; border: 1.5px solid var(--rule); background: var(--card); font-family: var(--mono, monospace); font-size: 13px; cursor: pointer; color: var(--ink); }
.tn-part button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.tn-pj { display: inline-flex; gap: 4px; margin-top: 3px; padding: 0 4px; border: 1px solid currentColor; font-family: var(--mono, monospace); font-size: 11px; line-height: 16px; max-width: 100%; white-space: nowrap; }
.tn-pj span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tn-pj b { flex: none; font-weight: 600; }
.tn-pj.is-inherited { border-style: dashed; }
.tn-field[hidden] { display: none; }
.tn-note { background: var(--surface-2); border: 1px solid var(--rule); padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.tn-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--rule); }
.tn-actions .tn-btn { flex: 1 1 auto; height: 44px; }

@media (max-width: 900px) {
  .tn-wrap { padding: 10px; }
  .tn-head .tn-title { font-size: 22px; }
}

/* filters and views (Paul, 2026-11-09, from the gaps against Sling) */
.tn-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-filters select { font: inherit; font-size: 12px; padding: 4px 6px; max-width: 260px; }
.tn-views .tn-btn[aria-pressed="true"] { cursor: default; }
.tn-grid.tn-grid-day { grid-template-columns: 210px minmax(260px, 1fr); min-width: 0; }
.tn-dayh.tn-dayh-click { cursor: pointer; }
.tn-dayh.tn-dayh-click:hover { text-decoration: underline; }
.tn-cell.tn-ro { cursor: default; }
.tn-cell.tn-ro:hover { outline: 0; }
.tn-card .tn-trade { font-weight: 600; }
.tn-month { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); font-size: 12px; min-width: 800px; border-left: 1px solid var(--rule); }
.tn-mday { display: flex; flex-direction: column; gap: 2px; min-height: 96px; padding: 5px; text-align: left; font: inherit; font-size: 11px;
  background: var(--card); border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: pointer; }
.tn-mday:hover { outline: 2px solid var(--ink); outline-offset: -2px; }
.tn-mday.is-blank { background: var(--surface-2); cursor: default; }
.tn-mday.tn-mtoday b { background: var(--panel); color: var(--panel-figure); padding: 0 4px; }
.tn-mline { border-left: 4px solid var(--muted); padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-mline.tn-mdraft { border-left-style: dashed; color: var(--muted); }
.tn-mmore { color: var(--muted); }

/* Paul, 2026-11-15: the shift form lines up (time pickers as tall as the date), the hours line where
   «Actividad» was: worked hours upright, planned in italics. */
.tn-field .al-tselw { display: block; }
.tn-field .al-tsel { width: 100%; height: 42px; border: 1.5px solid var(--ink); font-size: 15px; text-align: left; padding: 0 10px; }
.tn-wrap .tn-field input[type="date"] { height: 42px; padding: 0 10px; border: 1.5px solid var(--ink); }
.tn-field > span { display: flex; align-items: center; height: 16px; line-height: 16px; }
.tn-field > span .info-i { font-size: 12px; }
.tn-htot { display: inline-flex; gap: 6px; }
.tn-legend .tn-hdone { font-style: normal; margin-left: 4px; }
.tn-legend .tn-hplan { font-style: italic; margin-left: 4px; color: var(--body); }
.tn-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }

/* Paul's «tests» notes, 2026-11-15 (Sling's planner, in our look). */
/* The day header: weekday small, the number bold; today in colour and bold, not on black. */
.tn-dayh { display: flex; align-items: baseline; gap: 6px; }
.tn-dayh .tn-dow { font-size: 11px; color: var(--muted); }
.tn-dayh .tn-dnum { font: 700 17px var(--sans); color: var(--ink); }
.tn-dayh.tn-today { box-shadow: inset 0 -3px 0 var(--remote); }
.tn-dayh.tn-today .tn-dow, .tn-dayh.tn-today .tn-dnum { color: var(--remote); font-weight: 700; }
.tn-dayh.tn-weekend .tn-dnum { color: var(--muted); }
.tn-corner { display: flex; align-items: center; gap: 8px; }
.tn-when { display: flex; flex-direction: column; gap: 4px; }
/* Hovering a cell: «+ turno» at its foot, where a click adds one. */
.tn-addcue { display: none; align-self: stretch; margin-top: auto; border: 1px dashed var(--rule); background: none; color: var(--muted); font: 12px var(--mono); padding: 3px 0; cursor: pointer; text-align: center; }
@media (hover: hover) { .tn-cell:hover .tn-addcue { display: block; } .tn-cell:hover .tn-addcue:hover { border-color: var(--ink); color: var(--ink); } }
.tn-cell.is-drop { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--field-focus); }
.tn-card.tn-drag { cursor: grab; }
.tn-card.is-dragging { opacity: .45; }
/* the four marks: small white squares on the card's first line */
.tn-card .tn-t { display: flex; align-items: center; gap: 4px; padding-left: 0; }
.tn-marks { margin-left: auto; display: inline-flex; gap: 3px; }
.tn-mk { display: inline-flex; align-items: center; gap: 1px; height: 16px; min-width: 16px; justify-content: center; background: var(--card); color: var(--ink); border: 1px solid var(--ink); box-sizing: border-box; }
.tn-mk i { font: 600 10px var(--mono); font-style: normal; padding-right: 2px; }
.tn-mk-changed { color: var(--alarm); border-color: var(--alarm); }
.tn-legend .tn-mk { vertical-align: middle; }
/* tick boxes: on a card (on hover, or always once some are ticked), a row, the page */
.tn-tick { width: 16px; height: 16px; flex: 0 0 16px; border: 1.5px solid var(--ink); background: var(--card); padding: 0; cursor: pointer; position: relative; vertical-align: middle; }
.tn-tick.is-on::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tn-tick.is-some::after { content: ''; position: absolute; left: 3px; right: 3px; top: 6px; height: 2px; background: var(--ink); }
.tn-tick[disabled] { opacity: .35; cursor: default; }
.tn-who .tn-name { display: flex; align-items: center; gap: 8px; }
.tn-card > .tn-tick { position: absolute; top: 4px; left: 4px; display: none; }
@media (hover: hover) { .tn-card:hover > .tn-tick { display: block; } }
.tn-card.tn-selmode > .tn-tick, .tn-card.is-sel > .tn-tick { display: block; }
.tn-card:hover .tn-t, .tn-card.tn-selmode .tn-t, .tn-card.is-sel .tn-t { padding-left: 20px; }
.tn-card.is-sel { box-shadow: 0 0 0 2px var(--ink); }
.tn-card .tn-pn { font-weight: 600; }
.tn-who.tn-empty { grid-column: 1 / -1; color: var(--muted); }
/* the ticked shifts' bar */
.tn-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; background: var(--card); border: 1.5px solid var(--ink); }
.tn-selbar .tn-btn { height: 34px; }
/* the filter box with its chips (GitHub Projects' way), and «Agrupar» */
.tn-filters { align-items: center; gap: 12px; }
.tn-fbox { flex: 1 1 360px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; padding: 3px 8px; border: 1.5px solid var(--ink); background: var(--card); cursor: text; box-sizing: border-box; }
.tn-fic { color: var(--muted); font-size: 16px; }
.tn-chips { display: contents; }
.tn-fwrap { position: relative; flex: 1 1 160px; min-width: 120px; }
.tn-fin { width: 100%; border: 0; outline: 0; font: 14px var(--sans); background: none; color: var(--ink); padding: 4px 0; }
.tn-chip { --chip: var(--ink); display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 2px 0 8px; font-size: 13px; background: var(--card); color: var(--ink); border: 1.5px solid var(--chip); box-shadow: inset 4px 0 0 var(--chip); padding-left: 10px; }
.tn-chip i { font: 10px var(--mono); font-style: normal; text-transform: uppercase; color: var(--muted); }
.tn-chip-text { border-style: dashed; }
.tn-chip-x { border: 0; background: none; font-size: 16px; line-height: 1; padding: 0 6px; cursor: pointer; color: var(--muted); }
.tn-chip-x:hover { color: var(--ink); }
.tn-sugg { position: absolute; top: calc(100% + 6px); left: -8px; z-index: 30; min-width: 280px; background: var(--card); border: 1.5px solid var(--ink); display: flex; flex-direction: column; padding: 4px 0; box-shadow: 0 6px 18px rgba(20, 20, 19, .14); }
.tn-sopt { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 7px 12px; font: 14px var(--sans); color: var(--ink); cursor: pointer; }
.tn-sopt i { margin-left: auto; font: 10px var(--mono); font-style: normal; text-transform: uppercase; color: var(--muted); }
.tn-sopt.is-hi, .tn-sopt:hover { background: var(--field-focus); }
.tn-link { border: 0; background: none; color: var(--ink); text-decoration: underline; font: 13px var(--sans); cursor: pointer; padding: 0; }
.tn-seg { display: inline-flex; align-items: center; }
.tn-seg .tn-micro { margin-right: 8px; }
.tn-seg button { height: 34px; padding: 0 12px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: 13px var(--sans); cursor: pointer; }
.tn-seg button + button { border-left-width: 0; }
.tn-seg button.is-on { background: var(--ink); color: var(--panel-figure); }
@media (max-width: 700px) { .tn-seg { flex-wrap: wrap; } .tn-fbox { flex-basis: 100%; } }
.tn-sugg[hidden] { display: none; }
.tn-mday.tn-mtoday b { background: none; color: var(--remote); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
/* Paul's narrow pane (~886 px): the whole week fits without scrolling sideways. */
@media (max-width: 960px) {
  .tn-grid { grid-template-columns: 140px repeat(7, minmax(88px, 1fr)); min-width: 760px; }
  .tn-who .tn-sub { font-size: 10px; }
  .tn-card { padding: 4px 5px; font-size: 11px; }
}
