/*
 * The Syrkle admin look, design B (owner-approved 23 Oct 2026): a dark side menu grouped by job,
 * white panels on a light grey page, Syrkle magenta for the main button. Loaded after Django's
 * own admin CSS by templates/admin/base_site.html, so it only restyles: every page keeps
 * Django's markup. Light only: the admin no longer switches to Django's dark colours.
 */
:root {
  color-scheme: light;
  --sy-ink: #1E1A34;
  --sy-ink-2: #2B2643;
  --sy-ink-3: #3D3756;
  --sy-magenta: #B52555;
  --sy-magenta-dark: #8F1D45;
  --sy-magenta-tint: #FDF5F8;
  --sy-badge: #F49AAB;
  --sy-cyan-dark: #17707F;
  --sy-bg: #F7F7F9;
  --sy-line: #E4E4EA;
  --sy-field: #D5D5DE;
  --sy-fg2: #4E4E62;
  --sy-fg3: #6F6F83;
  --sy-mute: #B9B5CC;
  --sy-font: Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Django's own variables (later rules win over its dark-mode block too) */
  --primary: var(--sy-ink);
  --secondary: var(--sy-ink);
  --accent: var(--sy-badge);
  --primary-fg: #fff;
  --body-fg: var(--sy-ink);
  --body-bg: #fff;
  --body-quiet-color: var(--sy-fg2);
  --body-loud-color: var(--sy-ink);
  --header-color: #fff;
  --header-branding-color: #fff;
  --header-bg: var(--sy-ink);
  --header-link-color: #fff;
  --breadcrumbs-fg: var(--sy-fg2);
  --breadcrumbs-link-fg: var(--sy-fg2);
  --breadcrumbs-bg: #fff;
  --link-fg: var(--sy-magenta);
  --link-hover-color: var(--sy-magenta-dark);
  --link-selected-fg: var(--sy-magenta);
  --hairline-color: var(--sy-line);
  --border-color: var(--sy-field);
  --error-fg: #B3263E;
  --message-success-bg: #E3F5F8;
  --message-warning-bg: #FFF4E0;
  --message-error-bg: #FDECEF;
  --darkened-bg: #FAFAFC;
  --selected-bg: #F1F1F5;
  --selected-row: var(--sy-magenta-tint);
  --button-fg: #fff;
  --button-bg: var(--sy-ink);
  --button-hover-bg: var(--sy-ink-3);
  --default-button-bg: var(--sy-magenta);
  --default-button-hover-bg: var(--sy-magenta-dark);
  --close-button-bg: var(--sy-fg3);
  --close-button-hover-bg: var(--sy-fg2);
  --delete-button-bg: #B3263E;
  --delete-button-hover-bg: #8F1D35;
  --object-tools-fg: var(--sy-ink);
  --object-tools-bg: #fff;
  --object-tools-hover-bg: var(--sy-bg);
}

html, body { background: var(--sy-bg); }
body { font-family: var(--sy-font); font-size: 14px; color: var(--sy-ink); }
a:link, a:visited { color: var(--sy-magenta); }
a:focus, a:hover { color: var(--sy-magenta-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sy-ink); outline-offset: 2px;
}
#nav-sidebar a:focus-visible, #nav-sidebar summary:focus-visible, #header a:focus-visible, #header button:focus-visible,
.sy-login-side a:focus-visible { outline-color: #6AD1E3; }
.sy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1 { margin: 0 0 16px; font: 700 22px/28px var(--sy-font); color: var(--sy-ink); }
h2 { font-family: var(--sy-font); }
.help, p.help, form p.help, div.help, form div.help ul { color: var(--sy-fg3); font-size: 12px; }

/* ---------- Shell: menu on the left, then the top bar, breadcrumbs and page ---------- */
#container { min-height: 100vh; }
.main > #nav-sidebar + .content, .main.shifted > #nav-sidebar + .content { max-width: none; }
.main > .content { flex: 1 1 auto; min-width: 0; }  /* wide tables scroll in their box, not the page */
.sy-action { max-width: 100%; white-space: normal; text-align: left; }
#content { padding: 24px; box-sizing: border-box; }
.dashboard #content { width: auto; }

#header {
  height: auto; min-height: 56px; padding: 8px 24px; box-sizing: border-box; display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; gap: 8px 16px; background: var(--sy-ink); color: #fff; overflow: visible;
}
#header a:link, #header a:visited { color: #fff; }
#branding { display: flex; align-items: center; gap: 4px; margin: 0; }
.sy-brand, .sy-side-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sy-brand img, .sy-side-brand img { display: block; width: 96px; height: auto; }
.sy-brand span, .sy-side-brand span { font: 500 11px/20px var(--sy-font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sy-mute); }
.sy-menu-button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0;
  border-radius: 8px; background: transparent; color: #fff; cursor: pointer;
}
.sy-menu-button[hidden] { display: none; }
.sy-search { position: relative; flex: 0 1 380px; margin-left: auto; color: var(--sy-fg3); }
.sy-search svg { position: absolute; left: 11px; top: 10px; }
#header .sy-search input {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 40px 0 36px; border: 1px solid var(--sy-line);
  border-radius: 8px; background: var(--sy-bg); font: 400 14px var(--sy-font); color: var(--sy-ink);
}
.sy-search kbd {
  position: absolute; right: 9px; top: 9px; padding: 0 6px; border: 1px solid var(--sy-line); border-radius: 4px;
  background: #fff; font: 500 12px/18px var(--sy-font); color: var(--sy-fg3);
}
#user-tools {
  float: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0; padding: 0;
  font: 400 14px var(--sy-font); letter-spacing: 0; text-transform: none; text-align: left;
}
#user-tools a { border: 0; text-decoration: none; }
#user-tools a:hover, #user-tools a:focus { text-decoration: underline; color: inherit; border: 0; }
.sy-welcome { color: var(--sy-mute); }

div.breadcrumbs {
  padding: 10px 24px; background: #fff; color: var(--sy-fg2); border-bottom: 1px solid var(--sy-line);
  font-size: 13px; line-height: 20px;
}
div.breadcrumbs a { color: var(--sy-fg2); }
div.breadcrumbs a:hover, div.breadcrumbs a:focus { color: var(--sy-magenta); }

/* the side menu */
#container #nav-sidebar {
  display: flex; flex-direction: column; flex: 0 0 248px; width: 248px; left: auto; margin: 0; border: 0;
  box-sizing: border-box; padding: 0 0 8px; background: var(--sy-ink); color: #fff; overflow-y: auto;
  position: sticky; top: 0; height: 100vh; max-height: 100vh; z-index: 40;
}
#nav-sidebar a:link, #nav-sidebar a:visited { color: #D9D6E6; text-decoration: none; }
.sy-side-brand { min-height: 64px; padding: 0 20px; flex: 0 0 auto; }
.sy-top-link, .sy-group > summary {
  display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 1px 10px; padding: 0 10px;
  border-radius: 8px; color: #D9D6E6; font: 400 14px var(--sy-font); cursor: pointer; list-style: none;
}
.sy-group > summary::-webkit-details-marker { display: none; }
.sy-group > summary > span:first-of-type { flex: 1 1 auto; }
.sy-group > summary::after {
  content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid var(--sy-mute);
  border-bottom: 1.5px solid var(--sy-mute); transform: rotate(-45deg); flex: 0 0 auto;
}
.sy-group[open] > summary::after { transform: rotate(45deg); }
.sy-top-link:hover, .sy-group > summary:hover { background: var(--sy-ink-2); color: #fff; }
#nav-sidebar .sy-top-link[aria-current], .sy-group[open] > summary { color: #fff; font-weight: 500; }
#nav-sidebar .sy-top-link[aria-current] { background: var(--sy-ink-2); }
.sy-group ul { list-style: none; margin: 0; padding: 0 0 4px; }
.sy-group li { list-style: none; padding: 0; }
.sy-group li > a, .sy-group li > span {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px;
  margin: 1px 10px 1px 40px; padding: 4px 10px; box-sizing: border-box; border-radius: 8px; font: 400 13px/18px var(--sy-font);
}
#nav-sidebar .sy-group li > a:link, #nav-sidebar .sy-group li > a:visited, .sy-group li > span { color: var(--sy-mute); }
#nav-sidebar .sy-group li > a:hover { background: var(--sy-ink-2); color: #fff; }
#nav-sidebar .sy-group li > a[aria-current] { background: var(--sy-ink-3); color: #fff; font-weight: 500; }
.sy-badge, .sy-count {
  min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 6px; background: var(--sy-badge);
  color: var(--sy-ink); font: 700 12px/20px var(--sy-font); text-align: center; flex: 0 0 auto;
}
.sy-side-foot {
  margin: auto 10px 0; padding: 12px 10px 4px; border-top: 1px solid var(--sy-ink-3); display: flex;
  flex-wrap: wrap; align-items: center; gap: 10px;
}
.sy-avatar {
  width: 32px; height: 32px; border-radius: 8px; background: #A0204C; color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font: 700 13px var(--sy-font);
}
.sy-who { flex: 1 1 auto; min-width: 0; font: 400 13px/17px var(--sy-font); color: #fff; overflow-wrap: anywhere; }
.sy-who small { color: var(--sy-mute); font-size: 12px; }
#nav-sidebar .sy-logout { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--sy-mute); }
#nav-sidebar .sy-logout:hover { background: var(--sy-ink-2); color: #fff; }
.sy-side-links { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
#nav-sidebar .sy-side-links a { display: inline-flex; align-items: center; min-height: 32px; }

@media (min-width: 1025px) {
  /* :has() picks pages with the side menu; browsers without it keep Django's own layout. */
  #container:has(> .main > #nav-sidebar) {
    display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: auto auto 1fr;
  }
  #container:has(> .main > #nav-sidebar) > #header {
    grid-column: 2; grid-row: 1; background: #fff; color: var(--sy-ink); border-bottom: 1px solid var(--sy-line);
  }
  #container:has(> .main > #nav-sidebar) > .breadcrumbs { grid-column: 2; grid-row: 2; }
  #container:has(> .main > #nav-sidebar) > .main { display: contents; }
  #container:has(> .main > #nav-sidebar) > .main > #nav-sidebar { grid-column: 1; grid-row: 1 / span 3; }
  #container:has(> .main > #nav-sidebar) > .main > .content { grid-column: 2; grid-row: 3; min-width: 0; }
  #container:has(> .main > #nav-sidebar) #header a:link, #container:has(> .main > #nav-sidebar) #header a:visited { color: var(--sy-ink); }
  #container:has(> .main > #nav-sidebar) #branding { display: none; }
  #container:has(> .main > #nav-sidebar) .sy-welcome { color: var(--sy-fg3); }
  .sy-side-links { display: none; }
}

@media (max-width: 1024px) {
  #header { padding: 6px 12px; }
  .sy-search { flex: 1 1 100%; order: 3; margin: 0 0 6px; }
  #user-tools { display: none; }
  #content { padding: 16px; }
  div.breadcrumbs { padding: 10px 16px; }
  /* the menu slides in from the left */
  #container #nav-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: 100%; max-height: none;
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
    box-shadow: 8px 0 24px rgba(30, 26, 52, .25);
  }
  body.sy-menu-open #container #nav-sidebar { transform: none; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { #container #nav-sidebar { transition: none; } }

/* ---------- Messages, panels, buttons ---------- */
ul.messagelist { padding: 16px 24px 0; margin: 0; }
ul.messagelist li {
  margin: 0 0 8px; border-radius: 8px; color: var(--sy-ink); font-size: 14px; background-position: 14px 12px;
  padding: 10px 14px 10px 40px;
}
p.errornote, ul.errorlist { border-radius: 8px; }
p.errornote { border: 0; background: #FDECEF; color: #8F1D45; font-weight: 500; }

.module, .sy-panel, .inline-group {
  background: #fff; border: 1px solid var(--sy-line); border-radius: 8px; box-sizing: border-box; min-width: 0;
}
.module { margin-bottom: 16px; overflow: hidden; }
.module h2, .module caption, .inline-group h2 {
  background: transparent; color: var(--sy-ink); font: 700 15px/20px var(--sy-font); padding: 14px 16px 8px;
  text-transform: none; letter-spacing: 0; text-align: left;
}
.module h2 a, .module caption a { color: var(--sy-ink); }
fieldset.collapsed .collapse-toggle, fieldset .collapse-toggle { color: var(--sy-magenta); }
.inline-group { margin-bottom: 16px; overflow: hidden; }
.inline-group .module { border: 0; margin: 0; border-radius: 0; }
.inline-group .tabular tr.add-row td { background: #FAFAFC; }

.button, input[type=submit], input[type=button], .submit-row input, a.button {
  min-height: 36px; padding: 8px 14px; box-sizing: border-box; border: 1px solid var(--sy-line); border-radius: 8px;
  background: #fff; color: var(--sy-ink); font: 500 14px/18px var(--sy-font); cursor: pointer;
}
.button:hover, input[type=submit]:hover, input[type=button]:hover, .submit-row input:hover, a.button:hover {
  background: var(--sy-bg); color: var(--sy-ink);
}
.button.default, input[type=submit].default, .submit-row input.default {
  background: var(--sy-magenta); border-color: var(--sy-magenta); color: #fff; float: none; text-transform: none;
}
.button.default:hover, input[type=submit].default:hover, .submit-row input.default:hover {
  background: var(--sy-magenta-dark); border-color: var(--sy-magenta-dark); color: #fff;
}
.sy-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px;
  box-sizing: border-box; border: 1px solid var(--sy-line); border-radius: 8px; background: #fff;
  font: 500 13px var(--sy-font); text-decoration: none; cursor: pointer;
}
a.sy-btn:link, a.sy-btn:visited, button.sy-btn { color: var(--sy-ink); }
.sy-btn:hover { background: var(--sy-bg); }
.sy-btn-primary, button.sy-btn-primary { background: var(--sy-magenta); border-color: var(--sy-magenta); color: #fff; }
.sy-btn-primary:hover { background: var(--sy-magenta-dark); }
.sy-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: #EEEEF2;
  color: var(--sy-fg2); font: 500 12px var(--sy-font); white-space: nowrap; vertical-align: middle;
}
.sy-pill-wait { background: #FDECEF; color: #8F1D45; }
.sy-pill-ok { background: #E3F5F8; color: var(--sy-cyan-dark); }
.sy-quiet { color: var(--sy-fg3); font-size: 13px; }
.sy-nowrap { white-space: nowrap; }

/* object tools: History, Add, Download last calendar month, Post locum shifts */
/* beside the page title on wide screens, under it otherwise; never floated, so lists keep their full width */
.object-tools {
  float: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: fit-content; max-width: 55%;
  margin: -52px 0 16px auto; padding: 0;
}
@media (max-width: 1279px) { .object-tools { max-width: none; margin: 0 0 16px; justify-content: flex-start; } }
.object-tools li, .object-tools li + li { float: none; height: auto; margin: 0; }
.object-tools a:link, .object-tools a:visited {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid var(--sy-line); border-radius: 8px; background: #fff; color: var(--sy-ink);
  font: 500 14px var(--sy-font); text-transform: none; letter-spacing: 0; float: none;
}
.object-tools a:hover, .object-tools a:focus { background: var(--sy-bg); color: var(--sy-ink); }
.object-tools a.addlink, .object-tools a.addlink:link, .object-tools a.addlink:visited {
  background: var(--sy-magenta); border-color: var(--sy-magenta); color: #fff; background-image: none; padding-right: 14px;
}
.object-tools a.addlink::before { content: "+"; margin-right: 6px; font-size: 16px; }
.object-tools a.addlink:hover { background: var(--sy-magenta-dark); }

/* ---------- Lists (change lists) ---------- */
/* overflow visible so the filter drop-downs are never cut off */
#changelist { display: flex; flex-direction: column; align-items: stretch; background: transparent; border: 0; overflow: visible; }
#changelist .results, #changelist .paginator { box-sizing: border-box; width: 100%; }
#changelist .changelist-form-container { width: 100%; min-width: 0; }
.sy-tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 12px; border-bottom: 1px solid var(--sy-line); }
.sy-tabs a:link, .sy-tabs a:visited {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; color: var(--sy-fg2);
  font: 500 14px var(--sy-font); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.sy-tabs a[aria-current] { color: var(--sy-ink); border-bottom-color: var(--sy-magenta); }
.sy-tabs a span { color: var(--sy-fg3); font-size: 12px; font-variant-numeric: tabular-nums; }

#changelist #toolbar { padding: 0; margin: 0 0 12px; background: transparent; border: 0; color: var(--sy-fg2); }
#changelist #toolbar form > div { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#changelist #toolbar form label { position: static; }
#changelist #toolbar form #searchbar {
  height: 36px; width: min(420px, 100%); box-sizing: border-box; padding: 0 12px 0 34px; border: 1px solid var(--sy-field);
  border-radius: 8px; font: 400 14px var(--sy-font); vertical-align: middle; margin: 0;
}
#changelist-search img { position: absolute; left: 11px; top: 10px; }
#changelist #toolbar form input[type=submit] { padding: 8px 14px; border-radius: 8px; }
#changelist #toolbar .small.quiet { font-size: 13px; }

#changelist-filter {
  order: -1; flex: none; position: static; width: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 0; background: transparent; border: 0;
}
#changelist-filter h2 { display: none; }
#changelist-filter #changelist-filter-clear { order: 99; margin: 0; padding: 0; font-size: 13px; border: 0; }
#changelist-filter #changelist-filter-clear a { color: var(--sy-magenta); }
.sy-filter { position: relative; }
.sy-filter > summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--sy-line); border-radius: 8px; background: #fff; color: var(--sy-fg2); font: 400 13px var(--sy-font);
  cursor: pointer; list-style: none;
}
.sy-filter > summary::-webkit-details-marker { display: none; }
.sy-filter > summary b { color: var(--sy-ink); font-weight: 500; }
.sy-filter > summary::after {
  content: ""; width: 6px; height: 6px; margin: 0 2px 3px 4px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
#changelist-filter .sy-filter ul {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 200px; max-width: 320px;
  max-height: 320px; overflow: auto; margin: 0; padding: 4px; list-style: none; background: #fff;
  border: 1px solid var(--sy-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(30, 26, 52, .12);
}
#changelist-filter .sy-filter li, #changelist-filter .sy-filter li.selected { margin: 0; padding: 0; border: 0; list-style: none; }
#changelist-filter .sy-filter li a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--sy-ink); white-space: normal; }
#changelist-filter .sy-filter li a:hover { background: var(--sy-bg); color: var(--sy-ink); }
#changelist-filter .sy-filter li.selected a { color: var(--sy-magenta); font-weight: 500; background: var(--sy-magenta-tint); }

/* the actions bar turns dark once rows are ticked */
#changelist .actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; box-sizing: border-box;
  background: #fff; border: 1px solid var(--sy-line); border-bottom: 0; border-radius: 8px 8px 0 0;
  color: var(--sy-fg2); line-height: normal; font-size: 13px;
}
#changelist .actions label { display: inline-flex; align-items: center; gap: 6px; }
#changelist .actions select { height: 32px; border-radius: 6px; }
#changelist .actions .button {
  height: auto; min-height: 32px; padding: 6px 12px; border: 1px solid var(--sy-line); border-radius: 8px;
  background: #fff; box-shadow: none; color: var(--sy-ink); font: 500 13px/18px var(--sy-font); transition: none;
}
#changelist .actions .button:hover { background: var(--sy-bg); }
#changelist .actions span.all, #changelist .actions span.action-counter, #changelist .actions span.clear, #changelist .actions span.question {
  font-size: 13px; margin: 0;
}
.sy-action-buttons { display: contents; }
html.sy-js .sy-action-select, html.sy-js .sy-action-go { display: none; }
html:not(.sy-js) .sy-action-buttons { display: none; }
#changelist .actions .sy-action-delete { color: #B3263E; border-color: #F3C9D2; }
#changelist-form:has(.action-select:checked) .actions { background: var(--sy-ink); border-color: var(--sy-ink); color: #fff; }
#changelist-form:has(.action-select:checked) .actions a { color: #fff; }
#changelist-form:has(.action-select:checked) .actions .sy-action { background: var(--sy-ink-2); border-color: var(--sy-ink-3); color: #fff; }
#changelist-form:has(.action-select:checked) .actions .sy-action[data-action*="approve"] { background: var(--sy-magenta); border-color: var(--sy-magenta); }

#changelist .results, #changelist .paginator { background: #fff; border: 1px solid var(--sy-line); }
#changelist .results { overflow-x: auto; border-bottom: 0; }
#changelist .paginator {
  margin: 0; padding: 10px 12px; border-radius: 0 0 8px 8px; color: var(--sy-fg2); font-size: 13px; line-height: 32px;
}
.paginator a:link, .paginator a:visited, .paginator .this-page {
  display: inline-block; min-width: 32px; padding: 0 8px; box-sizing: border-box; border-radius: 6px; text-align: center;
}
.paginator a:link, .paginator a:visited { background: #fff; border: 1px solid var(--sy-line); color: var(--sy-ink); }
.paginator a:hover, .paginator a:focus { background: var(--sy-bg); color: var(--sy-ink); }
.paginator .this-page { background: var(--sy-ink); color: #fff; font-size: 13px; }
.paginator a.showall:link, .paginator a.showall:visited { border: 0; color: var(--sy-magenta); }
#changelist .paginator input[type=submit] { margin-left: 8px; }

#result_list { width: 100%; }
#result_list thead th {
  background: #FAFAFC; color: var(--sy-fg3); font: 500 12px var(--sy-font); letter-spacing: .04em; text-transform: uppercase;
  border-top: 0; border-bottom: 1px solid var(--sy-line);
}
#result_list thead th.sorted { background: #F1F1F5; }
#result_list thead th .text a, #result_list thead th .text span { padding: 9px 12px; }
#result_list thead th .text a:link, #result_list thead th .text a:visited { color: var(--sy-fg2); }
#result_list td, #result_list th { padding: 9px 12px; border-bottom: 1px solid var(--sy-line); font-size: 14px; line-height: 20px; vertical-align: middle; }
#result_list th a { font-weight: 500; }
#result_list tbody tr:hover { background: #FAFAFC; }
#result_list tbody tr.selected { background: var(--sy-magenta-tint); }
@supports selector(:has(a)) {
  /* the approved column as words: Waiting or Approved (Django's tick and cross stay for screen readers) */
  #result_list td.field-approved { position: relative; }
  #result_list td.field-approved img { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #result_list td.field-approved:has(img[alt="True"])::before,
  #result_list td.field-approved:has(img[alt="False"])::before {
    display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px var(--sy-font);
  }
  #result_list td.field-approved:has(img[alt="True"])::before { content: "Approved"; background: #E3F5F8; color: var(--sy-cyan-dark); }
  #result_list td.field-approved:has(img[alt="False"])::before { content: "Waiting"; background: #FDECEF; color: #8F1D45; }
}

/* ---------- Forms (change forms) ---------- */
.form-row { padding: 12px 16px; border-bottom: 1px solid var(--sy-line); }
.aligned label { color: var(--sy-fg2); font-weight: 500; }
.aligned label.required, .required { color: var(--sy-ink); }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=tel],
input[type=search], textarea, select, .vTextField {
  border: 1px solid var(--sy-field); border-radius: 6px; padding: 7px 10px; font: 400 14px var(--sy-font);
  color: var(--sy-ink); background: #fff; box-sizing: border-box;
}
select { height: 36px; padding-top: 0; padding-bottom: 0; }
select[multiple] { height: auto; }
input:focus, select:focus, textarea:focus { border-color: var(--sy-ink); }
.sy-yn { display: inline-flex; border: 1px solid var(--sy-field); border-radius: 6px; overflow: hidden; vertical-align: middle; }
.aligned .sy-yn label, .sy-yn label {
  position: relative; float: none; width: auto; min-width: 0; padding: 0; margin: 0; display: inline-flex; cursor: pointer;
  border-left: 1px solid var(--sy-field); font-weight: 400; line-height: 1;
}
.aligned .sy-yn label:first-child, .sy-yn label:first-child { border-left: 0; }
.sy-yn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sy-yn span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; color: var(--sy-ink); font-size: 13px; }
.sy-yn input:checked + span { background: var(--sy-ink); color: #fff; }
.sy-yn input:focus-visible + span { outline: 2px solid #2FA8BC; outline-offset: -2px; }
.sy-yn input:disabled + span { opacity: .6; cursor: default; }

.submit-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--sy-line); border-radius: 8px; text-align: left; overflow: visible;
}
.submit-row input { margin: 0; }
.submit-row p.deletelink-box { float: none; margin: 0 0 0 auto; order: 10; }
.submit-row a.deletelink:link, .submit-row a.deletelink:visited {
  display: inline-flex; align-items: center; height: auto; min-height: 36px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid #F3C9D2; border-radius: 8px; background: #fff; color: #B3263E; line-height: 1;
}
.submit-row a.deletelink:hover { background: #FDECEF; color: #8F1D35; }
.submit-row a.closelink:link, .submit-row a.closelink:visited { border-radius: 8px; height: auto; line-height: 20px; }
@media (min-width: 1100px) {
  /* the form on the left, the Save buttons in a column on the right that stays in view */
  .change-form #content-main > form > div {
    display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 16px; row-gap: 0; align-items: start;
  }
  .change-form #content-main > form > div > * { grid-column: 1; }
  .change-form #content-main > form > div > .submit-row {
    grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 16px; flex-direction: column; align-items: stretch;
  }
  .change-form #content-main > form > div > .submit-row p.deletelink-box { margin: 8px 0 0; }
  .change-form #content-main > form > div > .submit-row a.deletelink { width: 100%; justify-content: center; }
}
@media (max-width: 1099px) {
  .change-form .submit-row { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -4px 16px rgba(30, 26, 52, .08); }
}

/* ---------- Dashboard ---------- */
.sy-title h1 { margin: 0; }
.sy-title p { margin: 2px 0 16px; color: var(--sy-fg2); }
.sy-dash .sy-panel { padding: 16px; }
.sy-dash .sy-panel.sy-flush, .sy-search-page .sy-flush { padding: 0; }
.sy-panel h2 { margin: 0 0 12px; padding: 0; background: none; color: var(--sy-ink); font: 700 15px/20px var(--sy-font); text-transform: none; letter-spacing: 0; }
.sy-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 14px 16px; }
.sy-panel-head h2 { margin: 0; }
.sy-panel-head span { color: var(--sy-fg3); font-size: 13px; }
.sy-figures { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.sy-figures li { list-style: none; padding: 14px 16px; }
.sy-figures span { display: block; color: var(--sy-fg2); font-size: 13px; }
.sy-figures b { display: block; margin-top: 6px; font: 700 28px/32px var(--sy-font); font-variant-numeric: tabular-nums; }
.sy-figures .sy-loud { color: var(--sy-magenta); }
.sy-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.sy-col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sy-col-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sy-scroll { overflow-x: auto; }
.sy-queue { width: 100%; min-width: 560px; border-collapse: collapse; }
.sy-queue td { padding: 10px 12px; border-top: 1px solid var(--sy-line); border-bottom: 0; vertical-align: middle; font-size: 14px; line-height: 20px; }
.sy-queue td:first-child { padding-left: 16px; }
.sy-queue td.sy-wide { width: 100%; }
.sy-queue td.sy-wide a { font-weight: 500; }
.sy-actions-cell { text-align: right; white-space: nowrap; padding-right: 16px; }
.sy-actions-cell form { display: inline; }
@media (max-width: 767px) {
  /* each waiting review as a small card: kind, then the place and who, then when and the buttons */
  .sy-queue { min-width: 0; }
  .sy-queue tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; padding: 12px 16px; border-top: 1px solid var(--sy-line); }
  .sy-queue td, .sy-queue td:first-child { display: block; width: auto; padding: 0; border: 0; }
  .sy-queue td.sy-wide { grid-column: 1 / -1; width: auto; }
  .sy-actions-cell { padding-right: 0; }
}
.sy-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 24px; }
.sy-group-list h3 { margin: 8px 0 4px; padding: 0; font: 500 12px var(--sy-font); letter-spacing: .06em; text-transform: uppercase; color: var(--sy-fg3); }
.sy-group-list ul { list-style: none; margin: 0; padding: 0; }
.sy-group-list li { list-style: none; display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.sy-group-list li > a:first-child, .sy-group-list li > span:first-child { flex: 1 1 auto; }
.sy-group-list li > a:first-child:link, .sy-group-list li > a:first-child:visited { color: var(--sy-ink); text-decoration: none; }
.sy-group-list li > a:first-child:hover { color: var(--sy-magenta); text-decoration: underline; }
.sy-add { font-size: 13px; font-weight: 500; }
.sy-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.sy-quick a:link, .sy-quick a:visited {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--sy-line);
  border-radius: 8px; color: var(--sy-ink); font-weight: 500; font-size: 13px; text-decoration: none;
}
.sy-quick a:hover { background: var(--sy-bg); }
#recent-actions-module ul.actionlist { list-style: none; margin: 0; padding: 0; }
#recent-actions-module ul.actionlist li,
#recent-actions-module ul.actionlist li.addlink, #recent-actions-module ul.actionlist li.changelink, #recent-actions-module ul.actionlist li.deletelink {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--sy-line);
  background-image: none; font-size: 13px; line-height: 18px; overflow-wrap: anywhere;
}

/* ---------- Search everything ---------- */
.sy-search-page > * + * { margin-top: 12px; }
.sy-search-big { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-search-big input { flex: 1 1 260px; height: 44px; font-size: 16px; padding: 0 12px; border-radius: 8px; }
.sy-search-big .sy-btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.sy-results { list-style: none; margin: 0; padding: 0; }
.sy-results li { list-style: none; padding: 0; }
.sy-results a:link, .sy-results a:visited { display: block; padding: 10px 16px; border-top: 1px solid var(--sy-line); color: var(--sy-ink); text-decoration: none; }
.sy-results a:hover { background: var(--sy-bg); color: var(--sy-magenta); }
p.sy-panel { padding: 16px; margin: 12px 0 0; }

/* ---------- Log in ---------- */
body.login { background: #fff; }
body.login #header, body.login .breadcrumbs { display: none; }
body.login #container { width: auto; max-width: none; min-height: 100vh; margin: 0; border: 0; border-radius: 0; background: transparent; }
body.login .main, body.login .content { display: block; }
body.login #content { padding: 0; }
.sy-login { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sy-login-side {
  flex: 1 1 420px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px;
  box-sizing: border-box; background: var(--sy-ink); color: #fff;
}
.sy-login-side img { width: 140px; height: auto; display: block; }
.sy-login-side h1 { margin: 8px 0 0; color: #fff; font: 700 34px/40px var(--sy-font); }
.sy-login-side p { margin: 12px 0 0; max-width: 360px; color: #D9D6E6; font: 300 16px/24px var(--sy-font); }
.sy-login-side p.sy-kicker { margin: 0; color: var(--sy-mute); font: 500 12px var(--sy-font); letter-spacing: .1em; text-transform: uppercase; }
.sy-login-side a:link, .sy-login-side a:visited { color: #fff; }
.sy-login-main { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: center; padding: 48px 24px; box-sizing: border-box; min-width: 0; }
.sy-login-main > * { width: 100%; max-width: 380px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.sy-login-main > h2 { margin-bottom: 16px; font: 700 22px var(--sy-font); color: var(--sy-ink); }
.sy-login-main #content-main { float: none; }
#login-form .form-row { padding: 0; margin: 0 0 16px; border: 0; }
#login-form label { display: block; float: none; width: auto; padding: 0; margin: 0 0 6px; color: var(--sy-ink); font: 500 13px var(--sy-font); }
#login-form input[type=text], #login-form input[type=password], #login-form input[type=email] {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 8px; font-size: 16px;
}
#login-form .help { margin: 6px 0 0; padding: 0; }
#login-form .submit-row { padding: 0; margin: 8px 0 0; border: 0; background: transparent; }
#login-form .submit-row input {
  width: 100%; min-height: 44px; background: var(--sy-magenta); border-color: var(--sy-magenta); color: #fff; font-size: 15px;
}
#login-form .submit-row input:hover { background: var(--sy-magenta-dark); }
#login-form .otp-email { margin: 4px 0 0; text-align: center; }
#login-form .otp-email input {
  min-height: 44px; width: 100%; padding: 0; border: 0; background: none; color: var(--sy-magenta);
  font: 500 14px var(--sy-font); text-decoration: underline; cursor: pointer;
}
@media (max-width: 767px) {
  .sy-login-side { padding: 24px; gap: 16px; flex-basis: 100%; }
  .sy-login-side h1 { font-size: 26px; line-height: 32px; }
  .sy-login-main { padding: 24px 16px 40px; }
}
