/* One set of controls (26.11.2026), loaded last: the other sheets keep the layout, this one decides how a control looks and how big it is.
   Colours: green acts, orange is a problem or a block, red deletes or reports an error. Text: 13, 16, 18, 22, 28 px (12 in the bottom bar).
   Corners 12 px. Every control can be touched on an area of at least 44 px. */

/* One main button: filled. */
body .workspace .primary{min-height:52px;padding:12px 20px;border-radius:12px;font-size:16px;font-weight:600}
/* Secondary: framed in green, ordinary text, so it never looks switched off. */
body .workspace .secondary{min-height:48px;padding:10px 18px;border:1.5px solid var(--tk-flow);border-radius:12px;background:var(--tk-surface);color:var(--tk-text);font-size:16px;font-weight:600}
body .workspace .secondary:hover{background:var(--tk-flow-soft)}
/* Link: an underlined word on a full-size touch area. */
body .workspace .quiet{min-width:44px;min-height:44px;padding:8px 6px;border:0;border-radius:12px;background:transparent;color:var(--tk-flow-text);font-size:16px;font-weight:600;text-decoration:underline;text-underline-offset:3px}
body .workspace .quiet:hover{background:var(--tk-flow-soft)}
/* Switched off is visibly different: grey, dashed, no colour. */
body .workspace :is(.primary,.secondary,.quiet):disabled{border:1.5px dashed var(--tk-line);background:var(--tk-surface-raised);color:var(--tk-text-muted);opacity:1;cursor:default;text-decoration:none}

/* Small print is 13 px, not a fraction of its surroundings. */
body .workspace small{font-size:13px}

/* Fields. */
body .workspace :is(input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=hidden]),select){min-height:48px;border-radius:12px;font-size:16px}
body .workspace textarea{border-radius:12px;font-size:16px}
body .workspace summary{min-height:44px;padding-block:10px;box-sizing:border-box}
body .workspace :is(input[type=checkbox],input[type=radio]){inline-size:20px;block-size:20px;accent-color:var(--tk-flow)}
body .workspace label:has(>input:is([type=checkbox],[type=radio])){min-height:44px}
.stock-pick-hit{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
body .workspace .stock-pick{inline-size:24px;block-size:24px}

/* Small controls that were under the touch size. */
.signed-in .rail-link{min-height:44px}
body .workspace .file-name{min-height:44px}
body.app-signed-in .top .icon-btn{flex:0 0 44px;min-width:44px}
body.app-signed-in .top .brand{min-width:44px;min-height:44px;justify-content:center}
body.app-signed-in .top :is(.new-work,.top-problem){min-height:48px;border-radius:12px;font-size:16px}
body.app-signed-in .app-bottom button{font-size:12px}

/* Footer of the application: links and the cookie button sit on one line. */
body:has(#portal-layout.signed-in) .app-legal{align-items:center}
body:has(#portal-layout.signed-in) .app-legal :is(a,.link-btn){display:inline-flex;align-items:center;min-height:44px;margin:0;padding:0;font-size:13px}

/* The task screen: what it is, what to do now, and everything else under "Mai mult". */
body .workspace .task-screen{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:560px}
body .workspace .task-screen :is(.primary,.secondary,.problem){width:100%;max-width:100%;margin:0}
body .workspace .task-screen .quick-replies .secondary{width:auto}
body .workspace .task-screen .task-state{font-family:inherit;font-size:13px;letter-spacing:0;text-transform:none}
body .workspace .task-screen>*{margin-block:0;min-width:0}
body .workspace .task-screen>[hidden]{display:none}
body .workspace .task-screen>:is(.task-back,.task-state){justify-self:start}
.task-result{font-size:18px}
.task-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px}
body .workspace .task-screen .task-tabs .secondary{padding-inline:4px}
body .workspace .task-screen .execution-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
body .workspace .task-screen .execution-actions[hidden]{display:none}
#execution-checklist:empty{display:none}
/* Orange: a problem to report, or a block that stands. */
body .workspace .problem{min-height:48px;padding:10px 18px;border:1.5px solid var(--tk-signal);border-radius:12px;background:color-mix(in srgb,var(--tk-signal) 12%,var(--tk-surface));color:var(--tk-text);font-size:16px;font-weight:700}
body .workspace .problem[hidden]{display:none}
.task-blocker{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.task-blocker>*{margin-block:0}
.task-blocker .quick-replies{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.blocker-banner{padding:12px 16px;border:1.5px solid var(--tk-signal);border-radius:12px;background:color-mix(in srgb,var(--tk-signal) 14%,var(--tk-surface));font-weight:700;overflow-wrap:anywhere}
.blocker-reason{margin-inline:0;padding:8px 16px;border-left:3px solid var(--tk-signal);overflow-wrap:anywhere}
.task-more>summary,.task-reject>summary,.task-new-more>summary{color:var(--tk-flow-text);font-weight:600;cursor:pointer}
.task-more-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding-top:8px}
.task-more-list>*{margin-block:0}
.task-new-form{max-width:560px}
#parity-task #parity-assignee{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;justify-items:start}
#parity-task #parity-assignee>:is(.field,select){width:100%;margin:0}
body .workspace #parity-task .primary{width:100%;max-width:100%}

/* A short list of places to go: one per row, the whole row to touch. */
.hr-menu{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;max-width:560px;margin-block:12px}
body .workspace .hr-menu .secondary{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;max-width:100%;margin:0;text-align:left}

/* Two views under one tab: side by side, the open one filled softly. */
.project-subtabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;max-width:560px;margin:0 0 16px}
body .workspace .project-subtabs .secondary{width:100%;max-width:100%;margin:0}
body .workspace .project-subtabs .secondary[aria-current="page"]{background:var(--tk-flow-soft)}

/* Tabs are not links: no underline on the words, a green line under the open one. */
body .workspace #screen .project-tabs .quiet{flex:1 1 0;min-width:0;min-height:48px;border-bottom:3px solid transparent;border-radius:0;color:var(--tk-text-muted);text-decoration:none;white-space:normal;line-height:1.25}
body .workspace #screen .project-tabs .quiet[aria-current="page"]{border-bottom-color:var(--tk-flow);color:var(--tk-text);background:transparent}
/* A figure that opens its list is a card, not an underlined link. */
body .workspace .project-metrics .quiet{color:var(--tk-text);text-decoration:none}

/* Forms stay readable on wide screens: a field does not stretch across the monitor. */
@media(min-width:760px){body .workspace :is(form:not(.project-search,.admin-search-form) .field){max-width:560px}}

/* Lists first: an add-form and the filters open on request (26.11.2026, stage 4). */
.tk-add,.tk-filters{margin:12px 0;min-width:0}
.tk-add>summary,.tk-filters>summary{list-style:none;display:flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;cursor:pointer;text-align:center}
.tk-add>summary::-webkit-details-marker,.tk-filters>summary::-webkit-details-marker{display:none}
body .workspace .tk-add>summary,body .workspace .tk-filters>summary{width:fit-content;max-width:100%;margin:0}
body .workspace .tk-add[open]>summary{justify-content:flex-start;min-height:48px;padding:8px 0;border:0;background:transparent;color:var(--tk-text);font-size:18px;font-weight:600}
body .workspace .tk-add[open]>summary::after,body .workspace .tk-filters[open]>summary::after{content:"▴"}
body .workspace .tk-filters:not([open])>summary::after{content:"▾"}
body .workspace .tk-filters[open]>summary{background:var(--tk-flow-soft)}
.tk-add-body,.tk-filters-body{min-width:0;padding-top:4px}
.tk-add-body>.work-panel:first-child{margin-top:0}
.tk-filters-on{margin:-4px 0 12px;color:var(--tk-text-muted);font-size:13px}
/* What the person does most stays under the thumb on a long list. */
.stock-toolbar>.tk-filters,.report-filters>.tk-filters{margin:0}
body .workspace :is(.stock-toolbar,.report-filters)>button{margin:0}
.stock-toolbar>.tk-filters[open],.report-filters>.tk-filters[open]{flex-basis:100%}

@media screen and (max-width:599.98px){
  body .workspace .tk-add>summary{width:100%}
  body .workspace .stock-toolbar>.field{flex:1 1 100%;max-width:100%}
  body .workspace .tk-add[open]>summary{width:fit-content}
  body.app-signed-in .workspace .tk-add.tk-stick:not([open]){position:sticky;bottom:calc(84px + env(safe-area-inset-bottom));z-index:5}
  /* A table row is a card: the title first, every other value after the name of its column. */
  body .workspace table.tk-cards,body .workspace .tk-cards :is(tbody,tfoot,caption){display:block;width:100%;min-width:0}
  body .workspace .tk-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  body .workspace .tk-cards tr{position:relative;display:flex;flex-direction:column;gap:4px;box-sizing:border-box;margin:0 0 8px;padding:12px 16px;border:1px solid var(--tk-line);border-radius:12px;background:var(--tk-surface)}
  body .workspace .tk-cards tr[hidden]{display:none}
  body .workspace .tk-cards :is(td,tbody th,tfoot th){display:flow-root;box-sizing:border-box;width:auto;max-width:100%;padding:0;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:16px}
  body .workspace .tk-cards :is(td,th)[hidden]{display:none}
  /* The name sits in the left 42%; a value that wraps stays in its own column and the row grows with the taller of the two. */
  body .workspace .tk-cards :is(td,tbody th)[data-label]{padding-left:42%}
  body .workspace .tk-cards :is(td,tbody th)[data-label]::before{content:attr(data-label);float:left;width:72.4138%;margin-left:-72.4138%;padding-right:8px;box-sizing:border-box;color:var(--tk-text-muted);font-size:13px;font-weight:400;line-height:1.7;text-align:left;overflow-wrap:break-word}
  body .workspace .tk-cards .tk-card-title{order:-1;font-weight:700}
  body .workspace .tk-cards tr:has(.tk-card-pick) .tk-card-title{padding-right:52px}
  body .workspace .tk-cards .tk-card-pick{position:absolute;top:4px;right:6px}
  body .workspace .tk-cards .tk-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:4px}
  body .workspace .tk-cards .tk-card-actions>:is(button,a){flex:1 1 120px;max-width:100%;margin:0}
  body .workspace .tk-cards .tk-card-actions:not(:has(*)){display:none}
  body .workspace .tk-cards td:empty{display:none}
  body .workspace .tk-cards td :is(select,input:not([type=checkbox],[type=radio])){max-width:100%}
  body .workspace .tk-cards tfoot tr{flex-direction:row;justify-content:space-between;gap:12px}
  body .workspace .tk-cards tfoot td:last-child:empty{display:none}
}
/* Two-step setup on the phone itself: open the app, or copy the key. */
body .workspace a.secondary{display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none}
body .workspace .mfa-key code{display:block;padding:12px;border:1px solid var(--tk-line);border-radius:12px;background:var(--tk-surface);color:var(--tk-text);font-size:18px;overflow-wrap:anywhere;user-select:all}

/* Result verification: the choice on a new task, the correction asked for, the mark on a task sent back. */
#screen .task-review-choice{align-items:flex-start;margin:4px 0;padding:10px 12px;border:1px solid var(--tk-line);border-radius:12px;background:var(--tk-surface)}
#screen .task-review-choice strong,#screen .task-review-choice small{display:block}
#screen .task-review-choice small{color:var(--tk-text-muted);font-size:14px}
#screen .task-review-choice input:disabled+span strong{color:var(--tk-text-muted)}
.task-returned{margin:12px 0;padding:12px 16px;border:1.5px solid color-mix(in srgb,var(--tk-blocker-access) 55%,transparent);border-radius:12px;background:color-mix(in srgb,var(--tk-blocker-access) 12%,var(--tk-surface));overflow-wrap:anywhere}
.task-returned strong{display:block;color:var(--tk-blocker-access)}
.task-returned p{margin:6px 0 0}
.task-asked{margin:12px 0;padding:10px 12px;border:1px solid var(--tk-line);border-left:4px solid var(--tk-blocker-access);border-radius:10px;background:var(--tk-surface);overflow-wrap:anywhere}
.task-asked p{margin:2px 0 0}
.task-tag{display:inline-block;margin:2px 6px 2px 0;padding:1px 10px;border:1px solid color-mix(in srgb,var(--tk-blocker-access) 55%,transparent);border-radius:999px;background:color-mix(in srgb,var(--tk-blocker-access) 12%,var(--tk-surface));color:var(--tk-blocker-access);font-size:13px;font-weight:600}
