/* Portál auditora – design DQS Cert: klidný, přehledný, světlý, dobře čitelný i na tabletu. */
:root {
  --primary: #005bbf; --primary-hover: #004a9c; --primary-soft: #eaf3ff; --primary-line: #b9d4f5;
  --text: #17202a; --muted: #5f7187; --faint: #8a99ab;
  --bg: #f3f6fa; --surface: #ffffff; --surface-2: #f7f9fc; --border: #dbe3ed; --border-strong: #c3cfdd;
  --success: #16834a; --success-soft: #e6f5ec; --warning: #9a6500; --warning-soft: #fff3d6;
  --danger: #b42318; --danger-soft: #fdecea; --info: #0b6cbd; --info-soft: #e5f1fb; --neutral-soft: #eef1f5;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(23, 32, 42, .05), 0 8px 28px rgba(23, 32, 42, .06);
  --shadow-sm: 0 1px 2px rgba(23, 32, 42, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: 150ms ease;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: var(--offline-bar, 0px); background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(0, 91, 191, .35); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- layout ---------- */
.Topbar { position: sticky; top: var(--offline-bar, 0px); z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.TopbarInner, .Page { width: min(100% - 32px, 1240px); margin: 0 auto; }
.TopbarInner { min-height: 64px; display: flex; align-items: center; gap: 24px; }
.Brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; text-decoration: none !important; color: var(--text); }
.Brand img { height: 26px; width: auto; display: block; }
.Brand span { font-weight: 650; color: var(--muted); font-size: 11.5px; line-height: 1; letter-spacing: .02em; }
.TopNav { display: flex; gap: 4px; }
.TopNav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.TopNav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.TopNav a.is-active { color: var(--primary); background: var(--primary-soft); }
.UserMenu { position: relative; }
.UserButton { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; }
.UserButton:hover { border-color: var(--border-strong); }
.Avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.Menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.Menu button, .Menu a { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; color: var(--text); }
.Menu button:hover, .Menu a:hover { background: var(--surface-2); text-decoration: none; }
.Menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.Page { padding: 28px 0 72px; }
.Footer { color: var(--faint); font-size: 12.5px; padding: 18px 0 32px; text-align: center; }

/* ---------- login ---------- */
.LoginWrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1100px 500px at 15% -10%, #dcebff 0, transparent 60%), radial-gradient(900px 480px at 100% 110%, #e5efff 0, transparent 55%), var(--bg); }
.LoginCard { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 36px 34px 30px; }
.LoginCard img { height: 30px; display: block; margin-bottom: 26px; }
.LoginCard h1 { font-size: 24px; margin-bottom: 6px; }
.LoginCard .lead { color: var(--muted); margin-bottom: 24px; }
.LoginFoot { margin-top: 22px; color: var(--faint); font-size: 12.5px; text-align: center; }

/* ---------- controls ---------- */
.Field { display: grid; gap: 6px; margin-bottom: 14px; }
.Field > label, .Label { font-size: 13px; font-weight: 650; color: var(--text); }
.Field .hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=datetime-local], input[type=number], input[type=search], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 42px; transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #9fb2c8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 91, 191, .16); }
input[readonly], textarea[readonly], select:disabled, input:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
.Btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 650; transition: background var(--ease), border-color var(--ease), box-shadow var(--ease); text-decoration: none !important; }
.Btn:hover { background: var(--surface-2); border-color: #9fb2c8; }
.Btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.Btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 6px 16px rgba(0, 91, 191, .22); }
.Btn.danger { color: var(--danger); border-color: #efc4c0; }
.Btn.danger:hover { background: var(--danger-soft); }
.Btn.ghost { border-color: transparent; background: transparent; color: var(--primary); padding: 0 10px; }
.Btn.ghost:hover { background: var(--primary-soft); }
.Btn.small { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.Btn.block { width: 100%; }
.Btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.Row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.Row.between { justify-content: space-between; }
.Grid2 { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.Grid3 { display: grid; gap: 0 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.Alert { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; margin-bottom: 14px; }
.Alert.error { background: var(--danger-soft); border-color: #f1c6c1; color: #7e1d15; }
.Alert.warn { background: var(--warning-soft); border-color: #f0dc9f; color: #6d4a00; }
.Alert.info { background: var(--info-soft); border-color: #bcd8f1; color: #0a4d86; }
.Alert.ok { background: var(--success-soft); border-color: #bfe3cd; color: #0f5f36; }
.Alert ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- chips ---------- */
.Chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--neutral-soft); color: #3d4b5c; white-space: nowrap; }
.Chip.primary { background: var(--primary-soft); color: var(--primary); }
.Chip.success { background: var(--success-soft); color: var(--success); }
.Chip.warning { background: var(--warning-soft); color: var(--warning); }
.Chip.danger { background: var(--danger-soft); color: var(--danger); }
.Chip.info { background: var(--info-soft); color: var(--info); }
.Dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- cards ---------- */
.Card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.Card.pad { padding: 20px 22px; }
.CardHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.CardHead.wrap { flex-wrap: wrap; }
.CardBody { padding: 18px 22px; }
.Stack { display: grid; gap: 18px; }
.Stack.tight { gap: 10px; }
.Hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.Hero p { color: var(--muted); margin-top: 6px; }
/* agenda Úkoly: the switch and the button stay at the right of the title row; a longer text beside them wraps in its own column instead of pushing them down (they jumped between "Mé úkoly" and "Přidělené") */
.HeroTasks > :first-child { flex: 1 1 320px; min-width: 0; }
.HeroTasks > .Row { flex: 0 0 auto; }

/* ---------- dashboard ---------- */
.Counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.Counter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; box-shadow: var(--shadow-sm); }
.Counter .n { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.Counter .l { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.Counter.is-primary .n { color: var(--primary); } .Counter.is-warning .n { color: var(--warning); } .Counter.is-success .n { color: var(--success); }
.Tasks { display: grid; gap: 10px; margin-bottom: 26px; }
.Task { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; text-decoration: none !important; color: var(--text); transition: box-shadow var(--ease), transform var(--ease); }
.Task:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.Task.review { border-left-color: var(--success); } .Task.findings { border-left-color: var(--danger); } .Task.report { border-left-color: var(--primary); } .Task.statement { border-left-color: var(--warning); } .Task.certificate { border-left-color: var(--success); }
.Task .t { font-weight: 650; } .Task .s { color: var(--muted); font-size: 13.5px; }
.Toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.Segmented { display: inline-flex; padding: 3px; background: var(--neutral-soft); border-radius: 10px; gap: 2px; }
.Segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 650; color: var(--muted); }
.Segmented button.is-active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.AuditGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.AuditCard { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease); }
.AuditCard:hover { box-shadow: var(--shadow); border-color: var(--primary-line); transform: translateY(-1px); }
.AuditCard .no { font-size: 12.5px; color: var(--muted); font-weight: 650; letter-spacing: .02em; }
.AuditCard .client { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.AuditCard .dates { color: var(--muted); font-size: 13.5px; }
.Chips { display: flex; flex-wrap: wrap; gap: 6px; }
.Empty { text-align: center; color: var(--muted); padding: 44px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ---------- audit page ---------- */
.Crumb { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; display: inline-flex; gap: 6px; align-items: center; }
.AuditHead { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 24px 0; margin-bottom: 18px; }
.AuditHead .top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.AuditHead h1 { font-size: 26px; }
.AuditHead .sub { color: var(--muted); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.Tabs { display: flex; gap: 2px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; }
.Tabs::-webkit-scrollbar { display: none; }
.Tabs button { border: 0; background: transparent; padding: 12px 16px; font-weight: 650; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.Tabs button:hover { color: var(--text); }
.Tabs button.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.Badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--neutral-soft); color: #3d4b5c; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.Badge.warning { background: var(--warning-soft, #fdf0d5); color: var(--warning, #9a6700); }
.Badge.danger { background: var(--danger-soft); color: var(--danger); } .Badge.primary { background: var(--primary-soft); color: var(--primary); } .Badge.success { background: var(--success-soft); color: var(--success); }
.Facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 24px; }
.Fact .k { font-size: 12.5px; color: var(--muted); font-weight: 650; margin-bottom: 3px; }
.Fact .v { font-weight: 600; white-space: pre-line; }
.Steps { display: grid; grid-template-columns: repeat(var(--steps, 7), minmax(0, 1fr)); gap: 10px; }
.Step { position: relative; padding: 12px 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.Step .nm { font-size: 13px; font-weight: 700; } .Step .st { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.Step.done { background: var(--success-soft); border-color: #bfe3cd; } .Step.done .st { color: var(--success); }
.Step.now { background: var(--primary-soft); border-color: var(--primary-line); } .Step.now .st { color: var(--primary); }
.Step.warn { background: var(--warning-soft); border-color: #f0dc9f; } .Step.warn .st { color: var(--warning); }
.Table { width: 100%; border-collapse: collapse; }
.Table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.Table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.Table tr:last-child td { border-bottom: 0; }
.Table .day td { background: var(--primary-soft); font-weight: 700; color: var(--primary); }
.Table .travel td, .Table .break td { color: var(--muted); }
.Scroll { overflow-x: auto; }
/* tables with their own column widths: the head of a column stays on one line, the cells wrap inside their column; narrower than the minimum the table scrolls */
.Table.PlanTable, .Table.Declaration { table-layout: fixed; }
.Table.PlanTable th, .Table.Declaration th { white-space: nowrap; }
.Table.PlanTable { min-width: 820px; }
.Table.PlanTable .c-time { width: 156px; } .Table.PlanTable .c-place { width: 19%; } .Table.PlanTable .c-auditor { width: 12%; } .Table.PlanTable .c-client { width: 15%; } .Table.PlanTable .c-act { width: 96px; }
.Table.Attendees { table-layout: fixed; min-width: 640px; }
.Table.Attendees th { white-space: nowrap; }
.Table.Attendees .c-name { width: 28%; } .Table.Attendees .c-pos { width: 28%; } .Table.Attendees .c-talk { width: 14%; } .Table.Attendees .c-act { width: 16%; }
.Table.Attendees td.center, .Table.Attendees th.center { text-align: center; }
.Table.Attendees td { vertical-align: middle; }
.Table.Attendees input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; }
.Table.Declaration { min-width: 600px; }
.Table.Declaration .c-role { width: 22%; } .Table.Declaration .c-name { width: 28%; } .Table.Declaration .c-sign { width: 32%; } .Table.Declaration .c-act { width: 18%; }
/* the signature in a row of the declaration is a small picture: a tall or wide drawing does not stretch the table */
.DeclarationSignature { display: block; flex: none; max-width: 150px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
.DeclarationCell { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.DeclarationCell .small { line-height: 1.3; }
.Table.Declaration td { vertical-align: middle; }
#plan-consent .SignatureCurrent img { max-height: 90px; }

/* ---------- findings, report ---------- */
.Finding { display: grid; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.Finding:last-child { border-bottom: 0; }
.Finding .desc { white-space: pre-line; }
.Finding .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13.5px; }
/* one sheet of the record of nonconformity: the head ("list x z y", the clause, the print of the sheet) and the nonconformities of the clause */
.SheetGroup + .SheetGroup { border-top: 1px solid var(--border); }
.SheetHead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 10px 20px; background: var(--neutral-soft); border-bottom: 1px solid var(--border); }
.SheetGroup > .Finding:last-child { border-bottom: 0; }
.Progress { height: 8px; background: var(--neutral-soft); border-radius: 999px; overflow: hidden; }
.Progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #3a8be0); border-radius: 999px; transition: width 300ms ease; }
.ReportNav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ReportNav a { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 650; font-size: 13.5px; text-decoration: none !important; }
.ReportNav a:hover { color: var(--primary); border-color: var(--primary-line); }
.GroupTitle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-weight: 700; }
.Clause { padding: 16px 22px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.Clause:last-child { border-bottom: 0; }
.Clause .hd { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.Clause .lbl { font-size: 13.5px; font-weight: 650; color: var(--text); max-width: 760px; }
.Clause .RatingHint { font-weight: 400; margin-top: 4px; line-height: 1.45; }
/* 4.3 Shrnutí auditu: the table of the form at the end of the report (a grey head, the findings under it) */
.SummaryTable { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.SummaryRow { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--border); }
.SummaryRow:last-child { border-bottom: 0; }
.SummaryHead { background: var(--surface-2); padding: 10px 14px; font-weight: 650; font-size: 13.5px; }
.SummaryBody { padding: 10px 14px; font-size: 14px; }
.SummaryBody .Field { margin: 0; }
.ConformityList { display: grid; gap: 4px; font-size: 14px; }
.Suggestion { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--info-soft); border-radius: var(--radius); padding: 10px 14px; margin: 6px 0 12px; }
@media (max-width: 640px) { .SummaryRow { grid-template-columns: 1fr; } }
.Choice { display: inline-flex; gap: 4px; background: var(--neutral-soft); padding: 3px; border-radius: 10px; flex-wrap: wrap; }
.Choice button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 650; font-size: 13px; color: var(--muted); }
.Choice button:hover { color: var(--text); }
.Choice button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.Choice button.is-active.ok { color: var(--success); } .Choice button.is-active.imp { color: var(--info); } .Choice button.is-active.nc { color: var(--danger); } .Choice button.is-active.na { color: var(--muted); }
.Choice.rating button { min-width: 38px; text-align: center; font-weight: 750; }
.Saved { font-size: 12.5px; color: var(--faint); min-width: 80px; text-align: right; }
.Saved.is-saving { color: var(--warning); } .Saved.is-ok { color: var(--success); } .Saved.is-error { color: var(--danger); } .Saved.is-dirty { color: var(--warning); font-weight: 650; }
.Person { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; padding: 10px 22px; border-bottom: 1px solid var(--border); }
.Person:last-child { border-bottom: 0; }
.Doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.Doc:last-child { border-bottom: 0; }

/* ---------- modal / toast ---------- */
.Overlay { position: fixed; inset: 0; background: rgba(15, 25, 38, .45); z-index: 80; display: flex; justify-content: flex-end; animation: fade 160ms ease; }
.Overlay.center { justify-content: center; align-items: center; padding: 20px; }
.Sheet { width: min(100%, 640px); height: 100%; background: var(--surface); box-shadow: -12px 0 40px rgba(15, 25, 38, .18); display: flex; flex-direction: column; animation: slide 200ms ease; }
.Sheet.wide { width: min(100%, 940px); }
.Overlay.center .Sheet { height: auto; max-height: calc(100vh - 40px); border-radius: 18px; overflow: hidden; animation: pop 160ms ease; }
.Overlay.center .Sheet footer { border-radius: 0 0 18px 18px; }
.Sheet header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.Sheet .body { padding: 20px 24px; overflow: auto; flex: 1 1 auto; }
.Sheet footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-2); }
.Toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; }
.Toast { background: #17202a; color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 420px; animation: pop 160ms ease; }
.Toast.error { background: #9c1f15; } .Toast.ok { background: #0f6b3c; }
.Spinner { width: 18px; height: 18px; border: 3px solid var(--primary-line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.Loading { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 70px 0; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } } @keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(24px); opacity: .4; } } @keyframes pop { from { transform: scale(.97); opacity: 0; } }

@media (max-width: 860px) {
  .Counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .Steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .Grid2, .Grid3 { grid-template-columns: 1fr; }
  .TopNav { display: none; }
  .Person { grid-template-columns: 1fr; }
  .AuditGrid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
@media print { .Topbar, .Tabs, .Btn, .Footer { display: none !important; } body { background: #fff; } }

/* ---------- podpis na tabletu ---------- */
.SignaturePad { position: relative; margin-top: 14px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #fff; height: 220px; overflow: hidden; }
.SignaturePad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.SignaturePad::after { content: ''; position: absolute; left: 24px; right: 24px; bottom: 52px; border-bottom: 1px solid var(--border); pointer-events: none; }
.SignatureHint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 18px; pointer-events: none; }
.SignatureCurrent { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.SignatureCurrent img { max-height: 120px; max-width: 100%; }

/* ---------- poznámky k blokům zprávy a text ze zdrojové zprávy ---------- */
.NoteBtn.is-filled { background: var(--warning-soft); border-color: #f0dc9f; color: var(--warning); }
.NoteBox { padding: 12px 22px; background: #fffbea; border-bottom: 1px solid #f0dc9f; display: grid; gap: 6px; }
.NoteBox textarea { width: 100%; min-height: 64px; background: #fff; }
.SrcBanner { border-left: 4px solid var(--info); }
.Pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.PairMine textarea, .PairMine input { width: 100%; }
.SrcBox { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 84px; }
.SrcHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.SrcText { white-space: pre-wrap; font-size: 14px; line-height: 1.45; max-height: 320px; overflow: auto; }
.SrcItem { display: block; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text); }
.SrcItem:hover { border-color: var(--primary); background: var(--primary-soft); }
body.is-wide-report .Page, body.is-wide-report .TopbarInner { width: min(100% - 32px, 1760px); }
@media (max-width: 1000px) { .Pair { grid-template-columns: minmax(0, 1fr); } }

/* ---------- souběžná práce na zprávě ---------- */
.PresenceTag { color: var(--warning); font-weight: 650; padding: 2px 0; }
textarea.is-remote, input.is-remote { box-shadow: 0 0 0 3px rgba(22, 131, 74, .28); border-color: var(--success); }
.ConflictBox { margin: 8px 0; }
.Table .center, .Table th.center { text-align: center; }

/* ---------- řádek komentáře: příležitosti (PPZ) a neshody pod článkem ---------- */
.RowFindings { display: grid; gap: 8px; }
.RowFindings:empty { display: none; }
.RowFinding { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.RowFinding.ppz { border-left-color: var(--info); }
.RowFinding.nc { border-left-color: var(--danger); align-items: center; }
.RowFinding.ppz textarea { flex: 1; font-weight: 700; min-height: 56px; }

/* ---------- příloha A: řádek opatření s poznámkou přes celou šířku a barevným zjištěním ---------- */
.AnnexList { display: grid; }
.AnnexRow { padding: 12px 22px; border-bottom: 1px solid var(--border); border-left: 4px solid transparent; display: grid; gap: 8px; }
.AnnexRow:last-child { border-bottom: 0; }
.AnnexRow.has-nc { border-left-color: var(--danger); background: #fff6f5; }
.AnnexRow.has-ppz { border-left-color: var(--info); background: #f3f8fe; }
.AnnexRow.has-nc .AnnexName { color: var(--danger); font-weight: 750; }
.AnnexRow.has-ppz .AnnexName { color: var(--info); font-weight: 750; }
.AnnexTop { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.AnnexName { flex: 1 1 280px; min-width: 220px; }
.AnnexMethods { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.AnnexMethods label { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; cursor: pointer; }
.AnnexMethods input { width: 18px; min-height: 18px; }
.AnnexActions { display: flex; gap: 4px; }
.AnnexNote { width: 100%; min-height: 38px; resize: vertical; overflow: hidden; }

/* ---------- Moje pošta ---------- */
.CorrRow { padding: 12px 20px; border-top: 1px solid var(--border); display: grid; gap: 2px; }
.CorrRow.is-click { cursor: pointer; }
.CorrRow.is-click:hover { background: rgba(23, 32, 42, .03); }
.linkish { background: none; border: 0; padding: 0; color: var(--primary); text-align: left; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.Mail { display: grid; grid-template-columns: 210px minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.MailFolders, .MailList, .MailReader { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.MailFolders { padding: 12px; display: grid; gap: 10px; }
.MailFolders nav { display: grid; gap: 2px; }
.MailFolders nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 600; }
.MailFolders nav a:hover { background: var(--surface-2); text-decoration: none; }
.MailFolders nav a.is-active { background: var(--primary-soft); color: var(--primary); }
.MailSearch { padding: 10px; border-bottom: 1px solid var(--border); }
.MailSearch input { width: 100%; }
.MailRow { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.MailRow:hover { background: var(--surface-2); text-decoration: none; }
.MailRow.is-open { background: var(--primary-soft); }
.MailRow .from { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.MailRow .subj { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.MailRow.is-unread .from, .MailRow.is-unread .subj { font-weight: 750; color: var(--text); }
.MailList { max-height: calc(100vh - 150px); overflow: auto; }
.MailReader { min-height: 320px; }
.MailHead { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.MailFiles { padding: 10px 18px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.MailBody { padding: 14px 18px; }
.MailBody pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 0; }
.MailFrame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.MailBack { display: none; margin-bottom: 8px; }
@media (max-width: 1000px) {
  .Mail { grid-template-columns: 170px minmax(0, 1fr); }
  .Mail .MailReader { display: none; }
  .Mail.is-reading .MailList { display: none; }
  .Mail.is-reading .MailReader { display: block; grid-column: 2; }
  .MailBack { display: inline-flex; }
}
@media (max-width: 640px) {
  .Mail { grid-template-columns: minmax(0, 1fr); }
  .Mail.is-reading .MailFolders, .Mail.is-reading .MailList { display: none; }
  .Mail.is-reading .MailReader { grid-column: 1; }
}

/* Dashboard: kalendář a rozpracovaná práce */
.DashGrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .DashGrid { grid-template-columns: minmax(0, 1fr); } }
.Cal { padding: 0 14px 6px; }
.CalDow, .CalGrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.CalDow span { text-align: center; font-size: 12px; font-weight: 650; color: var(--muted); padding: 4px 0; }
.CalDay { min-height: 84px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 5px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.CalDay .d { font-size: 12px; font-weight: 650; color: var(--muted); }
.CalDay.is-weekend { background: var(--surface-2); }
.CalDay.is-other { opacity: .5; }
.CalDay.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.CalDay.is-today .d { color: var(--primary); }
.CalChip { display: block; font-size: 11.5px; line-height: 1.3; font-weight: 600; padding: 2px 5px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.CalChip.success { background: var(--success-soft); color: var(--success); }
.CalChip.warning { background: var(--warning-soft); color: var(--warning); }
.CalChip.muted { background: var(--neutral-soft); color: var(--muted); }
.CalMore { font-size: 11px; color: var(--muted); }
.CalLegend { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px 16px 14px; font-size: 12.5px; color: var(--muted); }
.CalLegend i.CalChip { display: inline-block; width: 22px; height: 10px; padding: 0; vertical-align: middle; }
@media (max-width: 640px) { .CalDay { min-height: 56px; } .CalChip { font-size: 10.5px; } }

/* Zpráva ve velkém okně */
.Sheet.xl { width: min(100%, 1180px); height: calc(100vh - 40px); }
.Overlay.center .Sheet.xl { height: calc(100vh - 40px); }
.Sheet.xl .body { display: flex; flex-direction: column; gap: 2px; }
.MailWindowBody { flex: 1 1 auto; min-height: 320px; margin-top: 12px; display: flex; flex-direction: column; }
.MailWindowBody .MailFrame { flex: 1 1 auto; height: auto; min-height: 320px; }
.MailWindowBody pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 15px; line-height: 1.55; margin: 0; }

/* stav „naplánováno“ */
.Counters { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.Counter.is-info .n { color: var(--info); }
.CalChip.info { background: var(--info-soft); color: var(--info); }

.Avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.Avatar { overflow: hidden; }

/* Kalendář: týden, den, události CRM */
.CalChip.event { background: #f0e8fa; color: #6a3fa0; }
a.CalChip { text-decoration: none; }
.CalDay a.d { font-size: 12px; font-weight: 650; color: var(--muted); text-decoration: none; align-self: flex-start; }
a.CalMore { text-decoration: none; }
.CalWeek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 0 14px 6px; }
.CalCol { min-height: 150px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.CalCol.is-weekend { background: var(--surface-2); }
.CalCol.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.CalCol .head { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--muted); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.CalCol.is-today .head strong { color: var(--primary); }
.CalNone { color: var(--muted); font-size: 12px; }
.CalDayView { padding: 4px 18px 10px; }
.CalDayView h4 { margin: 8px 0; }
.CalRow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.CalRow .CalChip { flex: 0 0 auto; }
.CalLegend i.CalChip.event { display: inline-block; width: 22px; height: 10px; padding: 0; vertical-align: middle; }
@media (max-width: 960px) { .CalWeek { grid-template-columns: minmax(0, 1fr); } .CalCol { min-height: 0; } }

/* Dashboard: kalendář přes celou šířku, pod ním dva sloupce */
.DashRow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
 (max-width: 960px) { .DashRow { grid-template-columns: minmax(0, 1fr); } }
.DashRow > div { display: flex; flex-direction: column; gap: 20px; }

/* zaškrtávací políčka, pošta: filtr, kontextové menu, příznak „zpracovat“, úkoly */
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--primary); box-shadow: none; flex: 0 0 auto; cursor: pointer; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.MailSearch .Segmented { margin-top: 8px; width: 100%; }
.MailSearch .Segmented button { flex: 1; padding: 6px 4px; font-size: 13px; white-space: nowrap; }
.MailRow.is-flagged { background: #fff8dc; }
.MailRow.is-flagged:hover { background: #fff1b8; }
.MailRow.is-flagged.is-open { background: #ffefb0; }
.MailMenu { position: fixed; z-index: 90; min-width: 230px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 25, 38, .22); padding: 6px; display: grid; }
.MailMenu button { text-align: left; border: 0; background: transparent; padding: 8px 12px; border-radius: 7px; font: inherit; color: var(--text); cursor: pointer; display: flex; gap: 10px; align-items: center; }
.MailMenu button:hover { background: var(--primary-soft); }
.MailMenu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
.DashRow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .DashRow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .DashRow { grid-template-columns: minmax(0, 1fr); } }
.TaskItem { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--border); }
.TaskItem .t { font-weight: 600; cursor: pointer; }
.TaskItem .t:hover { color: var(--primary); }
.TaskItem.is-overdue { border-left: 4px solid var(--danger); padding-left: 12px; }
.TaskItem .due.is-overdue { color: var(--danger); font-weight: 650; }

/* profil v nastavení: foto a výřez fota */
.ProfileTop { display: flex; align-items: center; gap: 18px; margin: 16px 0 18px; flex-wrap: wrap; }
.ProfilePhoto { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 30px; flex: none; }
.ProfilePhoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.PhotoCrop { position: relative; width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); touch-action: none; }
.PhotoCrop canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.PhotoCropGuide { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(255, 255, 255, .62); border: 2px solid #fff; pointer-events: none; }

/* hlavní nabídka v telefonu: lišta dole (horní nabídka se pod 860 px schovává) */
.TabBar { display: none; }
@media (max-width: 860px) {
  .TabBar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .TabBar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-decoration: none; }
  .TabBar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .TabBar a.is-active { color: var(--primary); background: var(--primary-soft); }
  .TabBar .Badge { position: absolute; top: 1px; left: calc(50% + 4px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .Page { padding-bottom: 96px; }
  .Footer { padding-bottom: 84px; }
  .Toasts { left: 12px; right: 12px; bottom: 84px; }
  .UserButton .strong { display: none; }
  .UserButton { padding: 4px; }
}
@media print { .TabBar { display: none !important; } }

/* karta Začínáme na dashboardu, zvýraznění cíle v nastavení */
.Onboarding { margin-bottom: 20px; border-color: var(--primary-line); background: linear-gradient(180deg, var(--primary-soft), var(--surface) 70%); }
.OnbSteps { display: grid; gap: 8px; margin-top: 14px; }
.OnbStep { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.OnbStep.is-done { opacity: .72; }
.OnbMark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; }
.OnbStep.is-done .OnbMark { background: var(--success); border-color: var(--success); }
@keyframes flash { 0%, 100% { box-shadow: none; } 25%, 70% { box-shadow: 0 0 0 4px rgba(0, 91, 191, .28); } }
.Flash { animation: flash 2.2s ease; }

/* náhled dokumentu (PDF v okně) */
.PdfFrame { width: 100%; height: min(72vh, 900px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); display: block; }

/* nová zpráva: výběr organizace a jejích kontaktů */
.OrgSuggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 260px; overflow: auto; display: grid; }
.OrgSuggest button { text-align: left; padding: 9px 12px; background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; font: inherit; color: var(--text); }
.OrgSuggest button:last-child { border-bottom: 0; }
.OrgSuggest button:hover { background: var(--primary-soft); }
.OrgSuggest.hidden { display: none; }
.ContactPick { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; gap: 12px; }

/* práce offline: pruh nahoře, změny uložené v zařízení */
.OfflineBar { display: none; position: fixed; top: 0; left: 0; right: 0; height: 34px; z-index: 60; align-items: center; gap: 12px; padding: 0 16px; background: #fdf0d5; color: #6b4a00; border-bottom: 1px solid #ecd49a; font-size: 13px; font-weight: 600; }
.OfflineBar.is-on { display: flex; }
.OfflineBar.is-offline { background: #17202a; color: #fff; border-bottom-color: #000; }
.OfflineBar.is-attention { background: #fde4e1; color: #9c1f15; border-bottom-color: #f2b8b2; }
.OfflineBar button { background: rgba(255, 255, 255, .22); color: inherit; border: 1px solid currentColor; border-radius: 999px; padding: 2px 12px; font: inherit; cursor: pointer; white-space: nowrap; }
.QueueItem { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.QueueItem.is-conflict, .QueueItem.is-failed { border-color: #f2b8b2; background: #fff7f6; }
.QueueValue { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
@media (max-width: 860px) { .OfflineBar { font-size: 12px; padding: 0 10px; } .OfflineBar .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* změna termínu auditu */
.DayRow input[type=date] { max-width: 220px; }

/* Super admin: lišta převzaté identity, položka nabídky, seznam uživatelů, kód v textu */
.SaBar { position: sticky; top: calc(var(--offline-bar, 0px) + 65px); z-index: 29; background: #b42318; color: #fff; border-bottom: 1px solid #7e1d15; box-shadow: 0 2px 10px rgba(126, 29, 21, .25); }
.SaBarInner { width: min(100% - 32px, 1240px); margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: 14px; }
.SaBar .Btn { background: #fff; color: #7e1d15; border-color: #fff; font-weight: 700; white-space: nowrap; }
.SaBar .Btn:hover { background: #fdecea; }
.SaBar .small { opacity: .85; margin-left: 6px; }
.Menu .SaItem { color: #b42318; font-weight: 650; }
.SaUser { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.SaUser:hover { border-color: var(--border-strong); background: var(--surface-2); }
.Page code, .Alert code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
@media (max-width: 860px) { .SaBarInner { flex-wrap: wrap; gap: 8px; } .SaBar { top: calc(var(--offline-bar, 0px) + 65px); } }

/* ---------- report: criteria with the controls of the annex A, the time deviation, the fields that grow with their text ---------- */
.AutoGrow textarea { overflow-y: hidden; resize: none; }
.AnnexGroup { border-top: 1px solid var(--border); }
.AnnexHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 22px; background: var(--neutral-soft); border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13.5px; }
.AnnexRow .NoteBox { margin: 0 -22px; }
.AnnexActions { flex-wrap: wrap; }

/* ---------- the bell: notifications of the CRM in the top bar ---------- */
.TopRight { display: flex; align-items: center; gap: 10px; }
.BellWrap { position: relative; }
.BellButton { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; }
.BellButton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.BellButton:hover, .BellButton[aria-expanded="true"] { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.BellBadge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 750; line-height: 19px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box; }
.BellPanel { position: absolute; right: 0; top: calc(100% + 10px); width: 420px; max-width: calc(100vw - 24px); max-height: min(72vh, 600px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 45; overflow: hidden; }
.BellHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.BellNote { padding: 8px 14px; background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 600; }
.BellList { overflow-y: auto; }
.BellItem { display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; color: var(--text); text-decoration: none !important; cursor: pointer; }
.BellItem:hover { background: var(--surface-2); }
.BellItem.is-unread { background: var(--primary-soft); border-left-color: var(--primary); }
.BellIcon { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--neutral-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.BellIcon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.BellIcon.assign { background: var(--success-soft); color: var(--success); } .BellIcon.mail { background: var(--info-soft); color: var(--info); } .BellIcon.removed { background: var(--danger-soft); color: var(--danger); } .BellIcon.system { background: var(--warning-soft); color: var(--warning); }
.BellText { display: grid; gap: 1px; min-width: 0; flex: 1; }
.BellTitle { font-weight: 650; font-size: 13.5px; overflow-wrap: anywhere; }
.BellLine { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.BellTime { color: var(--faint); font-size: 12px; }
.BellDot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 6px; }
.BellEmpty { padding: 28px 14px; text-align: center; color: var(--muted); }
.BellMore { padding: 8px; text-align: center; }
@media (max-width: 860px) { .BellPanel { position: fixed; left: 8px; right: 8px; top: calc(var(--offline-bar, 0px) + 68px); width: auto; max-width: none; max-height: calc(100vh - 150px); } }

/* the time deviation of a block of the commentary (the ISMS report): one strip under the title of the block */
.DeviationBlock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 10px 22px; background: var(--surface-2); border-bottom: 1px dashed var(--border-strong); }
.DeviationBlock label { margin: 0; font-weight: 650; }
.DeviationBlock .DeviationInput { display: inline-flex; align-items: center; gap: 6px; }
.DeviationBlock input { width: 110px; }
.DeviationBlock .DeviationText { display: grid; gap: 2px; }
.DeviationBlock .hint { display: block; }

/* the text that is printed when the field is left empty (e.g. "Bez připomínek") is shown grey, lighter than what a person writes */
.Field textarea::placeholder, .Field input::placeholder { color: #9aa3b2; opacity: 1; }

/* the steps of the audit that have a page are links: the unfinished ones look clickable (an arrow, a lift on hover) */
a.Step.StepLink { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
a.Step.StepLink:hover, a.Step.StepLink:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-sm, 0 4px 14px rgba(15, 30, 60, .12)); text-decoration: none; }
a.Step.StepLink:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a.Step.StepLink.is-open .nm::after { content: ' ›'; color: var(--primary); font-weight: 700; }
/* tasks given to several people: the line of the one who gave it, the list of people with what each did, the choice of the people */
.GivenLine { cursor: pointer; }
.GivenPeople { margin-top: 8px; display: grid; gap: 6px; }
.GivenPerson { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.CheckList { max-height: 190px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; display: grid; gap: 2px; background: #fff; }
.CheckItem { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: 500; cursor: pointer; }
.CheckItem input { width: 18px; min-height: 18px; flex: none; }

/* ---------- kruh uživatele a přepínač režimu ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.UserButton { padding: 3px; }
.Avatar { overflow: hidden; }
.Avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.Avatar.big { width: 46px; height: 46px; font-size: 16px; flex: none; }
.Menu { min-width: 260px; }
.MenuHead { display: flex; align-items: center; gap: 12px; padding: 8px 12px 6px; }
.Menu .MenuModes { display: flex; align-items: center; gap: 6px; padding: 6px 12px; }
.Menu .MenuModes button { width: auto; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; font-weight: 650; }
.Menu .MenuModes button.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.TopRight { display: flex; align-items: center; gap: 10px; }
.ModeSwitch { display: inline-flex; padding: 3px; background: var(--neutral-soft); border-radius: 999px; gap: 2px; }
.ModeSwitch button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 650; color: var(--muted); font-size: 13.5px; }
.ModeSwitch button.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---------- režim Vedení: jiná barva lišty a odstín odkazů, aby nikdo nejednal ve špatném režimu ---------- */
body.mode-mgmt { --primary: #4a3aa7; --primary-hover: #3b2e88; --primary-soft: #efecfb; --primary-line: #cdc5ef; }
body.mode-mgmt :focus-visible { outline-color: rgba(74, 58, 167, .4); }
.Topbar.is-mgmt { background: #241a5e; border-bottom: 0; backdrop-filter: none; }
.Topbar.is-mgmt .Brand span { color: #d9d3f7; }
.Topbar.is-mgmt .Brand img { background: #fff; padding: 4px 8px; border-radius: 8px; box-sizing: content-box; }
.ModeBadge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: #ffc83d; color: #2a1c00; font-weight: 800; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.Topbar.is-mgmt .ModeSwitch { background: rgba(255, 255, 255, .14); }
.Topbar.is-mgmt .ModeSwitch button { color: #d9d3f7; }
.Topbar.is-mgmt .ModeSwitch button.is-active { background: #ffc83d; color: #2a1c00; }
.MgmtNav { background: #f1eefb; border-bottom: 3px solid #6c5ce7; }
.MgmtNavInner { width: min(100% - 32px, 1240px); margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-height: 46px; }
.MgmtItem { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; color: #3b2e88; font-weight: 650; font-size: 14px; white-space: nowrap; text-decoration: none; }
.MgmtItem:hover { background: #e3ddf8; text-decoration: none; }
.MgmtItem.is-active { background: #4a3aa7; color: #fff; }
.MgmtItem .Ext, .MgmtSub .Ext, .MoreRow .Ext, .OvItem .Ext { font-size: 12px; opacity: .7; }
.MgmtItem .Caret { font-size: 11px; opacity: .8; }
.MgmtDrop { position: relative; }
.MgmtDropPanel { position: absolute; left: 0; top: calc(100% + 6px); min-width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 45; }
.MgmtNavInner > .MgmtDrop:last-of-type .MgmtDropPanel, .MgmtNavInner > .grow ~ .MgmtDrop .MgmtDropPanel { left: auto; right: 0; }
.MgmtSub { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
a.MgmtSub:hover { background: var(--primary-soft); text-decoration: none; }
.MgmtSub.is-soon { color: var(--faint); cursor: default; }
.MgmtSub em, .MoreRow em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); }
.MoreList { display: grid; gap: 2px; }
.MoreGroup { margin-top: 8px; padding: 4px 10px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.MoreRow { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.MoreRow.sub { padding-left: 24px; font-weight: 500; }
.MoreRow.is-soon { color: var(--faint); }
a.MoreRow:hover { background: var(--primary-soft); text-decoration: none; }
.TabBar.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.TabBar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border: 0; background: transparent; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.TabBar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Přehled vedení ---------- */
.OvCounters .Counter { text-decoration: none; color: inherit; cursor: pointer; }
.OvGroup { margin-bottom: 26px; }
.OvGroup h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 12px; }
.OvGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.OvCard.is-empty .OvHead { padding: 11px 18px; }
.OvCard.is-empty h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.OvHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.OvCard:not(.is-empty) .OvHead { border-bottom: 1px solid var(--border); }
.OvNone { color: var(--faint); font-size: 13px; white-space: nowrap; }
.OvItems { display: grid; }
.OvItem { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.OvItem:last-child { border-bottom: 0; }
a.OvItem:hover { background: var(--primary-soft); }
.OvItem .t { font-weight: 650; overflow-wrap: anywhere; }
.OvItem .s { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.OvFoot { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 8px 18px; border-top: 1px solid var(--border); }
.OvForbidden { margin-top: 8px; }

@media (max-width: 860px) {
  .ModeSwitch { display: none; }
  .MgmtNav { display: none; }
  .TopbarInner { gap: 10px; }
  .TopRight { gap: 8px; margin-left: auto; }
  .Topbar.is-mgmt .TopbarInner { min-height: 58px; }
  .ModeBadge { padding: 3px 8px; font-size: 11px; letter-spacing: .04em; }
  .Topbar.is-mgmt .Brand img { height: 20px; padding: 3px 6px; }
  .Topbar.is-mgmt .Brand span { font-size: 10.5px; }
  .TopbarInner .BellButton { width: 38px; height: 38px; }
  .UserButton .Avatar { width: 32px; height: 32px; }
  .Brand { min-width: 0; }
  .OvGrid { grid-template-columns: minmax(0, 1fr); }
  .OvCounters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .TabBar.five a, .TabBar.five button { font-size: 10px; }
}

/* ===== SCREENS-A BEGIN: obrazovky vedení - audity, plánování, přezkoumání, rozhodnutí (styly patří jen té fázi; vkládej před značku END) ===== */
/* Audity, Plánování (fáze 2) */
.SaSection { margin-bottom: 16px; overflow: hidden; }
.SaHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.SaHead h3 { font-size: 15px; }
.SaRows { display: grid; }
.SaRow { display: flex; align-items: flex-start; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.SaRow:last-child { border-bottom: 0; }
.SaRow .t { font-weight: 650; overflow-wrap: anywhere; }
.SaRow .s { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.SaRow .s strong.danger { color: var(--danger); }
.SaProblem { color: var(--warning) !important; }
.SaActions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.SaLinks { display: flex; gap: 12px; font-size: 13px; }
.SaLink { font-weight: 600; white-space: nowrap; }
.SaMore { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 18px 0 6px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .SaRow { flex-direction: column; }
  .SaActions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
/* Přezkoumání a rozhodnutí (fáze 3a) */
.SaSection.is-empty .SaHead { padding: 11px 18px; border-bottom: 0; }
.SaSection.is-empty h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.SaSection.is-quiet { opacity: .8; }
.SaHint { padding: 8px 18px 0; }
.SaButtons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.SaChecks { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.SaChecks td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.SaCheckIcon { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.SaCheckIcon.success { color: var(--success); } .SaCheckIcon.danger { color: var(--danger); } .SaCheckIcon.info { color: var(--info); }
.SaDetails { margin: 10px 0 14px; }
.SaDetails summary { cursor: pointer; }
.SaDetails ul { margin: 6px 0 0; padding-left: 20px; }
.SaFacts { margin-bottom: 14px; gap: 10px 22px; }
.SaFacts .Fact { min-width: 0; }
.SaObstacles { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; background: var(--surface-2); }
.SaObstacles h4 { margin-bottom: 6px; }
.SaObstacles ul { margin: 0; padding-left: 20px; color: #7e1d15; }
.SaObstacles.is-blocked { border-color: #f1c6c1; background: var(--danger-soft); }
.SaOk { color: var(--success); font-weight: 650; }
.SaFollow { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.SaList { margin: 6px 0 10px; padding-left: 20px; }
/* ===== SCREENS-A END ===== */

/* ===== SCREENS-B BEGIN: obrazovky vedení - certifikáty (styly patří jen té fázi; vkládej před značku END) ===== */
/* certifikáty: registr */
.CertFilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.CertFilter { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 650; font-size: 13.5px; text-decoration: none !important; }
.CertFilter:hover { border-color: var(--primary-line); color: var(--primary); }
.CertFilter.is-active { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.CertFilter .n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--neutral-soft); color: #3d4b5c; text-align: center; font-size: 12px; line-height: 20px; }
.CertFilter.is-active .n { background: var(--primary); color: #fff; }
.CertTools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 14px; padding: 12px 16px; }
.CertSearch { flex: 1 1 280px; min-width: 0; }
.CertSort { flex: 0 1 220px; min-width: 0; }
.CertCheck { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.CertCheck input { width: 18px; min-height: 18px; margin-top: 2px; flex: none; }
.CertTable { overflow: hidden; }
.CertRow { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(150px, 1.4fr) minmax(120px, 1fr) 118px 138px 100px 150px; gap: 8px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.CertRow:last-child { border-bottom: 0; }
a.CertRow:hover { background: var(--primary-soft); }
.CertRow > span { min-width: 0; overflow-wrap: anywhere; }
.CertRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.CertLabel { display: none; }
.CertSoon { color: var(--danger); font-weight: 650; }
.is-busy { opacity: .55; pointer-events: none; transition: opacity .15s; }
.CertPager { margin: 12px 2px 0; }
@media (max-width: 1100px) {
  .CertRowHead { display: none; }
  .CertRow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num state" "client client" "std acc" "issued valid"; padding: 12px 16px; }
  .CertRow .c-num { grid-area: num; } .CertRow .c-state { grid-area: state; text-align: right; } .CertRow .c-client { grid-area: client; color: var(--muted); }
  .CertRow .c-std { grid-area: std; font-size: 13.5px; } .CertRow .c-acc { grid-area: acc; text-align: right; }
  .CertRow .c-issued { grid-area: issued; font-size: 13px; color: var(--muted); } .CertRow .c-valid { grid-area: valid; font-size: 13px; text-align: right; }
  .CertLabel { display: inline; color: var(--faint); font-size: 12px; }
}
/* certifikáty: detail */
.CertActions { margin: 16px 0 18px; display: grid; gap: 12px; }
.CertDecisions { border-top: 1px solid var(--border); padding-top: 12px; }
.CertWhy { margin: 0; padding-left: 18px; }
.CertScope { white-space: pre-line; }
.CertLinks { width: 100%; border-collapse: collapse; }
.CertLinks th { text-align: left; font-weight: 650; color: var(--muted); font-size: 13px; width: 210px; padding: 9px 12px 9px 0; vertical-align: top; }
.CertLinks td { padding: 9px 0; overflow-wrap: anywhere; }
.CertLinks tr + tr > * { border-top: 1px solid var(--border); }
.CertRevs { display: grid; gap: 6px; }
.CertRev { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none !important; }
.CertRev:hover { background: var(--primary-soft); }
.CertRev.is-current { border-color: var(--primary-line); background: var(--primary-soft); }
.CertNotice, .CertDecision { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 2px; }
.CertNotice:last-child, .CertDecision:last-child { border-bottom: 0; }
.CertH { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.CertStd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 130px 120px; gap: 4px 14px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.CertStd:last-child { border-bottom: 0; }
.CertStd.is-current { background: var(--primary-soft); border-radius: 8px; }
.CertSuspended { margin: 0 0 18px; }
.CertStd > span { min-width: 0; overflow-wrap: anywhere; }
.CertRecipients { display: grid; gap: 8px; }
.CertDismiss { margin-top: 6px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.CertDialog .Sheet footer { flex-wrap: wrap; }
@media (max-width: 640px) {
  .CertDialog .Sheet footer .Btn { flex: 1 1 100%; }
  .CertLinks th { width: 110px; }
  .CertActions .Btn { flex: 1 1 100%; }
  .CertStd { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name chip" "cert date"; }
  .CertStd .s-name { grid-area: name; } .CertStd .s-cert { grid-area: cert; } .CertStd .s-chip { grid-area: chip; text-align: right; } .CertStd .s-date { grid-area: date; text-align: right; }
}
/* ===== SCREENS-B END ===== */

/* ===== SCREENS-C BEGIN: obrazovky vedení - žádosti a smlouvy (styly patří jen té fázi; vkládej před značku END) ===== */
/* žádosti: seznam */
.AplTable { overflow: hidden; }
.AplRow { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, 1.5fr) minmax(130px, 1.2fr) 160px 110px minmax(130px, 1fr); gap: 8px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.AplRow:last-child { border-bottom: 0; }
a.AplRow:hover { background: var(--primary-soft); }
.AplRow > span { min-width: 0; overflow-wrap: anywhere; }
.AplRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.AplSub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.AplLabel { display: none; }
@media (max-width: 1100px) {
  .AplRowHead { display: none; }
  .AplRow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "code state" "org org" "std std" "date acc"; padding: 12px 16px; }
  .AplRow .a-code { grid-area: code; } .AplRow .a-state { grid-area: state; text-align: right; } .AplRow .a-org { grid-area: org; } .AplRow .a-std { grid-area: std; font-size: 13.5px; color: var(--muted); }
  .AplRow .a-date { grid-area: date; font-size: 13px; color: var(--muted); } .AplRow .a-acc { grid-area: acc; font-size: 13px; color: var(--muted); text-align: right; }
  .AplLabel { display: inline; color: var(--faint); font-size: 12px; }
}
/* žádosti: detail */
.AplSteps { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; margin: 0 0 16px; padding: 0; }
.AplSteps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.AplStepNo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--neutral-soft); color: #3d4b5c; font-size: 12px; }
.AplSteps li.is-done { color: var(--success); border-color: #bfe3cd; background: var(--success-soft); }
.AplSteps li.is-done .AplStepNo { background: var(--success); color: #fff; }
.AplSteps li.is-now { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.AplSteps li.is-now .AplStepNo { background: var(--primary); color: #fff; }
.AplSteps li.is-bad { color: var(--danger); border-color: #f1c6c1; background: var(--danger-soft); }
.AplSteps li.is-bad .AplStepNo { background: var(--danger); color: #fff; }
.AplList { margin: 6px 0 0; padding-left: 20px; }
.AplStd { display: grid; grid-template-columns: minmax(0, 1.4fr) 150px 110px minmax(0, 1.4fr); gap: 4px 14px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.AplStd:last-of-type { border-bottom: 0; }
.AplStdHead, .AplActHead { color: var(--muted); font-size: 12.5px; font-weight: 650; background: var(--surface-2); border-radius: 8px; }
.AplAct { display: grid; grid-template-columns: minmax(0, 2fr) 110px minmax(0, 1fr); gap: 4px 14px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.AplStd > span, .AplAct > span { min-width: 0; overflow-wrap: anywhere; }
.AplSite { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.AplSite:last-child { border-bottom: 0; }
.AplChecks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.AplChecks li { color: var(--muted); }
.AplChecks li.is-yes { color: var(--text); }
.AplCheck { display: inline-block; width: 20px; font-weight: 800; color: var(--muted); }
.AplChecks li.is-yes .AplCheck { color: var(--success); }
.AplQ, .AplEvent { padding: 8px 0; border-bottom: 1px solid var(--border); }
.AplQ:last-child, .AplEvent:last-of-type { border-bottom: 0; }
@media (max-width: 720px) {
  .AplStd { grid-template-columns: minmax(0, 1fr) auto; }
  .AplStdHead, .AplActHead { display: none; }
  .AplAct { grid-template-columns: minmax(0, 1fr) auto; }
}
/* žádosti: okna */
.AplTabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.AplTabs button { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 650; color: var(--muted); cursor: pointer; }
.AplTabs button.is-active { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.AplTabs button:disabled { opacity: .5; cursor: not-allowed; }
.AplCands { display: grid; gap: 6px; max-height: 260px; overflow: auto; margin-bottom: 12px; }
.AplCand { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.AplCand:hover { background: var(--primary-soft); }
.AplCand input { width: 18px; min-height: 18px; margin-top: 3px; flex: none; }
.AplForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.AplDiff { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.AplDiff th, .AplDiff td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.AplDiff th { color: var(--muted); font-size: 12.5px; }
.AplChecksEdit { display: grid; gap: 8px; margin-bottom: 8px; }
.AplEac { display: grid; gap: 6px; max-height: 190px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.AplSuggest { font-size: 12px; color: var(--primary); font-style: normal; font-weight: 650; }
.AplModes { display: grid; gap: 10px; }
.AplMode { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 150px minmax(0, 1.3fr); gap: 8px 14px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.AplMode > div { min-width: 0; }
.AplRepl { display: grid; gap: 8px; }
button.AplCand { width: 100%; text-align: left; background: var(--surface); }
/* smlouvy: seznam */
.CtrTable { overflow: hidden; }
.CtrRow { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(160px, 1.4fr) minmax(130px, 1.1fr) 150px 100px 170px; gap: 8px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.CtrRow:last-child { border-bottom: 0; }
a.CtrRow:hover { background: var(--primary-soft); }
.CtrRow > span { min-width: 0; overflow-wrap: anywhere; }
.CtrRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
@media (max-width: 1100px) {
  .CtrRowHead { display: none; }
  .CtrRow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "num state" "org org" "std std" "date date2"; padding: 12px 16px; }
  .CtrRow .c-num { grid-area: num; } .CtrRow .c-state { grid-area: state; text-align: right; } .CtrRow .c-org { grid-area: org; } .CtrRow .c-std { grid-area: std; font-size: 13.5px; color: var(--muted); }
  .CtrRow .c-date { grid-area: date; font-size: 13px; color: var(--muted); } .CtrRow .c-date2 { grid-area: date2; font-size: 13px; color: var(--muted); text-align: right; }
}
@media (max-width: 720px) {
  .AplForm { grid-template-columns: minmax(0, 1fr); }
  .AplMode { grid-template-columns: minmax(0, 1fr); }
}
/* ===== SCREENS-C END ===== */

/* ===== SCREENS-D BEGIN: obrazovky vedení - finance (styly patří jen té fázi; vkládej před značku END) ===== */
/* finance: pruh částí, filtry, hledání */
.FinTabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.FinTab { padding: 9px 14px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 650; text-decoration: none !important; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.FinTab:hover { color: var(--text); background: var(--surface-2); }
.FinTab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.FinFilters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.FinFilter { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 650; font-size: 13.5px; text-decoration: none !important; }
.FinFilter:hover { border-color: var(--primary-line); color: var(--primary); }
.FinFilter.is-active { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.FinFilter .n { min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--neutral-soft); color: #3d4b5c; text-align: center; font-size: 12px; line-height: 20px; }
.FinFilter .n:empty { display: none; }
.FinFilter.is-active .n { background: var(--primary); color: #fff; }
.FinTools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 14px; padding: 12px 16px; }
.FinSearch { flex: 1 1 280px; min-width: 0; }
.FinSort { flex: 0 1 330px; min-width: 0; }
.FinOpen { margin: 0 2px 12px; color: var(--muted); }
.FinPager { margin: 12px 2px 0; }
/* finance: seznam */
.FinTable { overflow: hidden; }
.FinRow { display: grid; grid-template-columns: var(--fin-cols, 1fr); gap: 6px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.FinRow:last-child { border-bottom: 0; }
a.FinRow:hover { background: var(--primary-soft); }
.FinRow > .c { min-width: 0; overflow-wrap: anywhere; }
.FinRow .num, .FinItems .num, .FinVat .num { text-align: right; font-variant-numeric: tabular-nums; }
.FinRow .nowrap { white-space: nowrap; }
.FinRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.FinLate { color: var(--danger); font-weight: 650; }
@media (max-width: 1100px) {
  .FinRowHead { display: none; }
  .FinRow { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; }
  .FinRow > .c.primary { grid-column: 1 / -1; font-size: 16px; }
  .FinRow > .c:not(.primary)::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
  .FinRow .num { text-align: left; }
}
/* finance: detail */
.FinActions { margin: 0 0 18px; display: grid; gap: 12px; }
.FinWhy { margin: 0; padding-left: 18px; }
.FinHeadAmount { text-align: right; }
.FinItemsBody { overflow-x: auto; }
.FinItems, .FinVat { width: 100%; border-collapse: collapse; font-size: 14px; }
.FinItems th, .FinVat th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.FinItems td, .FinVat td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.FinItems th.num, .FinVat th.num { text-align: right; }
.FinItems tr:last-child td, .FinVat tr:last-child td { border-bottom: 0; }
.FinVat { max-width: 560px; margin-bottom: 14px; }
.FinSums { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; max-width: 420px; margin: 8px 0 0 auto; }
.FinSums dt { color: var(--muted); } .FinSums dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.FinSums .total { color: var(--text); font-size: 16px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.FinH { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.FinLinks { width: 100%; border-collapse: collapse; }
.FinLinks th { text-align: left; font-weight: 650; color: var(--muted); font-size: 13px; width: 230px; padding: 9px 12px 9px 0; vertical-align: top; }
.FinLinks td { padding: 9px 0; overflow-wrap: anywhere; }
.FinLinks tr + tr > * { border-top: 1px solid var(--border); }
.FinRefs { display: grid; gap: 6px; }
.FinRef { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none !important; margin-bottom: 6px; }
.FinRef:hover { background: var(--primary-soft); }
.FinAlloc, .FinMail, .FinRev, .FinDeduction { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 2px; }
.FinAlloc:last-child, .FinMail:last-child, .FinRev:last-child, .FinDeduction:last-child { border-bottom: 0; }
.FinAlloc.is-cancelled { opacity: .7; }
.FinRev { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.FinRev > .small:not(.muted) { flex: 1 1 100%; }
/* finance: okna */
.FinDialog .Sheet footer { flex-wrap: wrap; }
.FinRecipients { display: grid; gap: 8px; }
.FinCheck { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.FinCheck input { width: 18px; min-height: 18px; margin-top: 2px; flex: none; }
.FinConfirm { padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--warning-soft); margin-bottom: 8px; }
.FinPair { display: grid; gap: 4px; margin-bottom: 14px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.FinPreview { margin-bottom: 12px; }
.FinCandidate { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.FinCandidate:last-child { border-bottom: 0; }
.FinMismatch { display: grid; gap: 2px; margin-top: 4px; }
.FinBlock { color: var(--danger); font-weight: 650; } .FinSoft { color: var(--warning); }
@media (max-width: 700px) {
  .FinDialog .Sheet footer .Btn { flex: 1 1 100%; }
  .FinActions .Btn { flex: 1 1 100%; }
  .FinHeadAmount { text-align: left; }
  .FinSums { margin-left: 0; max-width: none; }
  .FinLinks th { width: 110px; }
  .FinCandidate { flex-wrap: wrap; }
  .FinItems thead, .FinVat thead { display: none; }
  .FinItems, .FinItems tbody, .FinItems tr, .FinItems td, .FinVat, .FinVat tbody, .FinVat tr, .FinVat td { display: block; width: 100%; }
  .FinItems tr, .FinVat tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .FinItems td, .FinVat td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .FinItems td:first-child { display: block; text-align: left; }
  .FinItems td::before, .FinVat td::before { content: attr(data-label); color: var(--faint); font-size: 12px; text-align: left; flex: none; }
  .FinItems td:first-child::before { display: none; }
}
/* zápis dokladů: řádky konceptu v okně, nabídka organizací */
.FinItemsWrap { overflow-x: auto; }
.FinItemsEdit { width: 100%; border-collapse: collapse; font-size: 14px; }
.FinItemsEdit th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; padding: 4px 6px; white-space: nowrap; }
.FinItemsEdit td { padding: 3px 4px; vertical-align: middle; }
.FinItemsEdit input, .FinItemsEdit select { width: 100%; min-width: 60px; }
.FinItemsEdit td:first-child input { min-width: 180px; }
.FinPick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* program auditů cyklu: audity jako řádky mřížky (na telefonu pod sebou) */
.PrgVisits { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.PrgHead, .PrgVisit { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(170px, 1fr) minmax(130px, 1fr); gap: 8px 14px; align-items: center; padding: 10px 14px; }
.PrgHead { background: var(--panel-2, #f6f7fb); font-size: 12px; font-weight: 650; color: var(--muted); }
.PrgVisit { border-top: 1px solid var(--border); }
.PrgType { display: flex; gap: 8px; align-items: baseline; }
.PrgNo { color: var(--muted); font-size: 12px; min-width: 1.2em; }
.PrgMore { grid-column: 1 / -1; }
.PrgMore summary { cursor: pointer; }
@media (max-width: 720px) {
  .PrgHead { display: none; }
  .PrgVisit { grid-template-columns: 1fr; gap: 6px; }
}
/* ===== SCREENS-D END ===== */

/* ===== SCREENS-E BEGIN: obrazovky vedení - klienti a cykly (styly patří jen té fázi; vkládej před značku END) ===== */
.CliTabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.CliTab { padding: 9px 14px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 650; text-decoration: none !important; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.CliTab:hover { color: var(--text); background: var(--surface-2); }
.CliTab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.AuditHead.CertHead { padding-bottom: 18px; }   /* (the header of the audit has tabs under it and no bottom padding; a header with only chips under the title needs it, or the chips touch the edge of the card) */
.CliTable { overflow: hidden; }
.CliRow { display: grid; grid-template-columns: var(--cli-cols, 1fr); gap: 6px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.CliRow:last-child { border-bottom: 0; }
a.CliRow:hover { background: var(--primary-soft); }
.CliRow > .c { min-width: 0; overflow-wrap: anywhere; }
.CliRow .num { text-align: right; font-variant-numeric: tabular-nums; }
.CliRow .nowrap { white-space: nowrap; }
.CliRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.CliSub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.CliScroll { overflow-x: auto; }
@media (max-width: 1100px) {
  .CliRowHead { display: none; }
  .CliRow { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px; }
  .CliRow > .c.primary { grid-column: 1 / -1; font-size: 16px; }
  .CliRow > .c:not(.primary)::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
  .CliRow .num { text-align: left; }
}
/* okno „Normy a režim certifikace“ na cyklu (zapisovací služba) */
.CycStdH { margin: 16px 0 8px; font-size: 15px; }
.CycStd { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.CycStdRow { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.3fr) minmax(190px, 1fr); gap: 8px 16px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.CycStdRow:last-child { border-bottom: 0; }
.CycStdMode select { width: 100%; }
.CycStdForm { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; }
.CycStdForm .Field { margin: 0; }
.CycStdForm .Field.grow { flex: 1 1 260px; }
@media (max-width: 700px) {
  .CycStdRow { grid-template-columns: 1fr; }
  .CycStdForm .Field, .CycStdForm .Field .Btn { width: 100%; }
}
/* okno „Ceny cyklu“ (zapisovací služba) */
.CycPrcBar { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.CycPrc { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.CycPrcRow { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(170px, 1.2fr) auto; gap: 6px 14px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.CycPrcRow:last-child { border-bottom: 0; }
.CycPrcRow.is-old { background: var(--surface-2); color: var(--muted); }
.CycPrcActions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.CycPrcNote { grid-column: 1 / -1; }
.CycPrcForm { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.CycPrcForm .Field { margin: 0; min-width: 110px; }
.CycPrcForm .Field.grow { flex: 1 1 260px; }
@media (max-width: 700px) {
  .CycPrcRow { grid-template-columns: 1fr; }
  .CycPrcActions { justify-content: flex-start; }
  .CycPrcForm .Field, .CycPrcForm .Field input, .CycPrcForm .Field select { width: 100%; }
}
/* okno „Údaje organizace“ (zapisovací služba) */
.CliEditGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 14px; }
.CliEditGrid .Field { margin: 0; }
.CliEditGrid .Field.wide { grid-column: 1 / -1; }
.CliEditRo { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 14px; }
.CliEditRo .Field { margin: 0; }
@media (max-width: 700px) { .CliEditGrid, .CliEditRo { grid-template-columns: 1fr; } }
/* ===== SCREENS-E END ===== */

/* ===== SCREENS-F BEGIN: obrazovky vedení - lidé a akreditace (styly patří jen té fázi; vkládej před značku END) ===== */
/* auditoři: seznam */
.PplTable { overflow: hidden; }
.PplRow { display: grid; grid-template-columns: minmax(170px, 1.3fr) 90px 130px minmax(140px, 1.3fr) minmax(130px, 1fr) 140px; gap: 8px 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.PplRow:last-child { border-bottom: 0; }
a.PplRow:hover { background: var(--primary-soft); }
.PplRow > span { min-width: 0; overflow-wrap: anywhere; }
.PplRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.PplSoon { color: var(--danger); font-weight: 650; }
/* auditoři: odbornosti v detailu */
.PplComps { display: grid; }
.PplComp { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.3fr) 150px 120px minmax(200px, 1.7fr); gap: 6px 14px; align-items: start; padding: 11px 6px; border-bottom: 1px solid var(--border); }
.PplComp:last-child { border-bottom: 0; }
.PplComp > div, .PplComp > span { min-width: 0; overflow-wrap: anywhere; }
.PplCompHead { color: var(--muted); font-size: 12.5px; font-weight: 650; padding-top: 0; }
.PplComp .c-note { grid-column: 1 / -1; }
/* akreditační rozsah */
.AcrPeriods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 8px; }
.AcrTable { overflow: hidden; }
.AcrRow { display: grid; grid-template-columns: minmax(170px, 1.4fr) minmax(130px, 1fr) 190px 110px minmax(200px, 1.6fr); gap: 6px 14px; align-items: start; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.AcrRow:last-child { border-bottom: 0; }
.AcrRow > span { min-width: 0; overflow-wrap: anywhere; }
.AcrRowHead { background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 650; align-items: center; }
.AcrRow .a-note { grid-column: 1 / -1; white-space: pre-line; }
@media (max-width: 1100px) {
  .PplRowHead, .AcrRowHead, .PplCompHead { display: none; }
  .PplRow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name state" "kind kind" "std std" "comp end"; padding: 12px 16px; }
  .PplRow .p-name { grid-area: name; } .PplRow .p-state { grid-area: state; text-align: right; } .PplRow .p-kind { grid-area: kind; } .PplRow .p-std { grid-area: std; font-size: 13.5px; color: var(--muted); }
  .PplRow .p-comp { grid-area: comp; font-size: 13px; } .PplRow .p-end { grid-area: end; font-size: 13px; color: var(--muted); text-align: right; }
  .PplComp { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what state" "std valid" "verdict verdict"; }
  .PplComp .c-what { grid-area: what; } .PplComp .c-state { grid-area: state; text-align: right; } .PplComp .c-std { grid-area: std; } .PplComp .c-valid { grid-area: valid; text-align: right; } .PplComp .c-verdict { grid-area: verdict; }
  .AcrRow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "std state" "eac eac" "valid valid" "verdict verdict"; padding: 12px 16px; }
  .AcrRow .a-std { grid-area: std; } .AcrRow .a-state { grid-area: state; text-align: right; } .AcrRow .a-eac { grid-area: eac; } .AcrRow .a-valid { grid-area: valid; font-size: 13px; color: var(--muted); } .AcrRow .a-verdict { grid-area: verdict; }
  .AcrRow .a-note { grid-area: auto; }
}
/* ===== SCREENS-F END ===== */

/* NEXT-STEP: „Průběh certifikace“ a tlačítko „Další krok“ na detailu cyklu */
.NextBar { margin-bottom: 16px; }
.NextSteps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; }
.NextStep { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2, #f1f2f6); color: var(--muted, #667); font-size: 13px; }
.NextStep .NextDot { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--line, #d8dae3); color: #fff; font-size: 12px; font-weight: 600; }
.NextStep.is-done .NextDot { background: #2e8b57; }
.NextStep.is-current .NextDot, .NextStep.is-todo .NextDot { background: #c98a00; }
.NextStep.is-waiting .NextDot { background: #8a93a8; }
.NextStep.is-next { background: #e9e7fb; color: #2d2a6e; font-weight: 600; box-shadow: inset 0 0 0 1px #6b63d6; }
.NextStep.is-next .NextDot { background: #5a52c9; }
.NextMain { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.NextTitle { font-size: 18px; font-weight: 600; }
.NextGo { min-height: 44px; padding: 10px 22px; font-size: 15px; }
.is-flash { animation: nextFlash 2.5s ease-out; }
@keyframes nextFlash { 0% { box-shadow: 0 0 0 4px #8d86e6; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 600px) { .NextGo { width: 100%; } .NextStep .NextLbl { font-size: 12px; } }
.NextDone { margin: -4px 0 12px; padding: 8px 12px; border-radius: 8px; background: #e6f4ec; color: #1d6b43; font-weight: 600; }

/* OVERVIEW-ACTIONS: tlačítko na řádku karty přehledu a blok „Co dnes udělat“ */
.OvItem .OvAct { flex: 0 0 auto; white-space: nowrap; pointer-events: none; }
.OvToday { margin-bottom: 22px; border-left: 4px solid #c98a00; }
.OvToday .OvHead { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px 10px; }
.OvToday .OvHead h3 { font-size: 17px; }
@media (max-width: 600px) { .OvItem .OvAct { padding: 4px 10px; } }
@media (max-width: 600px) { .OvItem { flex-wrap: wrap; } .OvItem .grow { flex: 1 1 100%; min-width: 0; } .OvItem .OvAct { margin-left: auto; white-space: normal; } }

/* NEXT-HINT: „→ Další krok“ pod stavem řádku seznamu */
.NextHint { display: block; margin-top: 3px; font-size: 12px; color: #4a42b5; font-weight: 600; }

/* NAV-COUNTS: počet čekajících věcí u položky menu (čísla z karet Přehledu) */
.NavCount::after { content: attr(data-count); }
.NavCount { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: #d9534f; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; }
.MgmtItem.is-active .NavCount { background: #fff; color: #4a3aa7; }
.MgmtSub .NavCount { margin-left: 8px; }
.TabBar a { position: relative; }
.TabBar a .NavCount { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 16px; height: 16px; font-size: 10px; }

/* TOP-QUICK: úkoly, pošta a kalendář vedle zvonku (režim Vedení) */
.TopQuick { display: flex; align-items: center; gap: 6px; }
.QuickButton { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; }
.QuickButton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.QuickButton:hover, .QuickButton.is-active { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); text-decoration: none; }
.QuickButton .NavCount { position: absolute; top: -4px; right: -4px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
@media (max-width: 859px) { .TopQuick { display: none; } }

/* NEXT-CELL: sloupec „Další krok“ v seznamech klientů a cyklů */
.NextCell { font-size: 13px; line-height: 1.3; }
.NextCell.is-act { color: #4a3aa7; font-weight: 700; }
.NextCell.is-wait { color: var(--muted); }
.NextCell.is-done { color: #2f7a46; }
