/* Admin GUI on top of Pico CSS (pico.min.css, light theme). Pico styles the plain HTML (forms, tables, buttons,
   articles as cards); this file holds only the layout and the few things Pico has no element for. */
@font-face { font-family: "Inter"; src: url("../fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --pico-font-family: "Inter", system-ui, sans-serif;
  --ok: #187a3b; --warn: #9a6700; --error: #b3261e;
  --pico-font-size: 100%;
  --pico-spacing: 0.9rem;
}
main.container { padding-top: 1.2rem; padding-bottom: 3rem; }
main.container.narrow { max-width: 440px; margin-top: 12vh; }
h1 { font-size: 1.6rem; margin-bottom: 0.6rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; }
.muted { color: var(--pico-muted-color); }
small.muted, .muted small { font-size: 0.85em; }

/* top bar */
.bar { background: #10202f; color: #fff; }
.bar-inner { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.bar .brand { color: #fff; font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.bar .menu { display: flex; justify-content: flex-start; gap: 0.2rem; flex-wrap: wrap; flex: 1; }
.bar .menu a { color: #c7d3df; text-decoration: none; padding: 0.3rem 0.65rem; border-radius: 0.4rem; font-size: 0.95rem; }
.bar .menu a:hover { background: #1d3246; color: #fff; }
.bar .menu a.current { background: #fff; color: #10202f; font-weight: 600; }
.bar .logout { margin: 0; }
button.link { display: inline; width: auto; margin: 0; padding: 0; border: 0; background: none; color: var(--pico-primary); text-decoration: underline; font: inherit; cursor: pointer; }
.bar button.link { color: #c7d3df; font-size: 0.9rem; }

/* flashes */
.flash { margin-bottom: 1rem; padding: 0.7rem 1rem; border-radius: var(--pico-border-radius); border: 1px solid; }
.flash-ok { color: var(--ok); border-color: var(--ok); background: #eef8f1; }
.flash-warn { color: var(--warn); border-color: var(--warn); background: #fdf6e3; }
.flash-error { color: var(--error); border-color: var(--error); background: #fdeeed; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.cards .card { margin: 0; }
.card h2 { margin: 0 0 0.3rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pico-muted-color); }
.card .big { font-size: 1.9rem; font-weight: 700; margin: 0; line-height: 1.2; }
.card p:last-child { margin-bottom: 0; }
.card-ok { border-top: 4px solid var(--ok); }
.card-warn { border-top: 4px solid var(--warn); }
.checks { margin: 0; padding-left: 1.1rem; }
.checks li { margin-bottom: 0.4rem; }

/* tables */
table.small { font-size: 0.9rem; }
table.small th, table.small td { padding: 0.4rem 0.5rem; }
th.num, td.num { text-align: right; white-space: nowrap; }
th.c, td.c { text-align: center; }
td.actions { text-align: right; white-space: nowrap; }
td.msg { max-width: 28rem; font-size: 0.85em; color: var(--pico-muted-color); }
tr.dimmed td { color: var(--pico-muted-color); }
.narrow-table { max-width: 52rem; }
table.people select { margin: 0; padding: 0.25rem 2rem 0.25rem 0.5rem; font-size: 0.9rem; height: auto; min-width: 12rem; }
table input[type=checkbox] { margin: 0; }
table input.order { width: 5rem; margin: 0; padding: 0.25rem 0.5rem; height: auto; text-align: right; }

.tag { display: inline-block; padding: 0 0.4rem; border-radius: 0.3rem; background: #e7ebef; color: #4a5866; font-size: 0.78rem; font-weight: 600; vertical-align: 0.05rem; }
.tag.warn { background: #fdf0d2; color: var(--warn); }
.status { font-weight: 600; }
.status-ok { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-error { color: var(--error); }
.person-status { font-weight: 600; }
.person-status.inne { color: var(--ok); }
.person-status.franvaro { color: #4a5866; }
.person-status.gatt_hem, .person-status.ej_instamplad { color: var(--pico-muted-color); font-weight: 500; }

/* forms */
form > button[type=submit], .sticky-save button { width: auto; padding-left: 2rem; padding-right: 2rem; }
.crumbs { margin: 0; font-size: 0.9rem; }
.h-link { font-size: 0.9rem; font-weight: 500; margin-left: 0.8rem; }
.inline-form form, form.inline-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; margin: 0 0 1rem; }
.inline-form label { flex: 1; min-width: 12rem; margin: 0; }
.inline-form input, .inline-form select, .inline-form button { margin: 0; width: auto; }
.inline-form input[name=note] { flex: 1; min-width: 10rem; }
article.inline-form { margin-top: 1.5rem; }
.narrow-form { max-width: 40rem; }
.pick { columns: 3 16rem; column-gap: 1.5rem; margin-bottom: 1rem; }
.pick fieldset { break-inside: avoid; margin-bottom: 1rem; }
.pick legend { font-weight: 700; }
.pick label { font-size: 0.92rem; margin-bottom: 0.2rem; }
.danger-zone { margin-top: 2.5rem; }
.danger-zone button { width: auto; }
.sticky-save { position: sticky; bottom: 0; background: var(--pico-background-color); padding: 0.8rem 0; border-top: 1px solid var(--pico-muted-border-color); }
.sticky-save button { margin: 0; }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 2rem; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* busy time per day on a machine's page */
.busy-chart { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 11rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--pico-muted-border-color); }
.busy-chart::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(1.4rem + (100% - 1.4rem) * var(--avail) / 100); border-top: 2px dashed #b3261e88; }
.busy-chart .day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; }
.busy-chart .b { background: #5aa9ff; border-radius: 3px 3px 0 0; display: flex; flex-direction: column-reverse; overflow: hidden; }
.busy-chart .u { background: #1f5fa8; }
.busy-chart .day.off .b { background: #b9c3cd; }
.busy-chart .day span { position: absolute; bottom: -1.3rem; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--pico-muted-color); white-space: nowrap; }
