:root {
  --bg: #eef2f8;
  --bg-soft: #f7f9fd;
  --surface: #ffffff;
  --surface-muted: #f6f8fc;
  --surface-hover: #f0f5ff;
  --topbar: #18263d;
  --topbar-soft: #24344f;
  --sidebar: #1d2c45;
  --sidebar-hover: #2a3d5d;
  --text: #1a2940;
  --text-muted: #718097;
  --text-soft: #aebbd0;
  --line: #dde4ef;
  --line-strong: #c9d3e3;
  --primary: #367bdc;
  --primary-dark: #2466c5;
  --primary-soft: #e7f0ff;
  --success: #27835e;
  --success-soft: #e7f6ee;
  --danger: #c34c58;
  --danger-soft: #fdecef;
  --warning: #a76a07;
  --warning-soft: #fff6dc;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 5px 16px rgba(31, 53, 88, 0.06);
  --shadow: 0 16px 38px rgba(31, 53, 88, 0.1);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 31px);
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 5px;
  font-size: 16px;
}

p {
  color: var(--text-muted);
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.app-shell {
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 25px;
  background: var(--topbar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(15, 29, 52, 0.16);
}

.topbar-left,
.topbar-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.app-logo {
  display: inline-grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #5f91e5, #426eb7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #5f91e5, #426eb7);
  border-radius: 10px;
  font-size: 22px;
  font-weight: 800;
}

.app-logo .brand-mark {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
}

.topbar-brand {
  display: grid;
  min-width: 155px;
  gap: 1px;
}

.topbar-brand strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
}

.topbar-brand span,
.topbar-date {
  color: #aab8cc;
  font-size: 12px;
}

.topbar-date {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  color: #c9d5e7;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  font-weight: 700;
}

.user-chip {
  display: inline-flex;
  max-width: 230px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  padding: 8px 11px;
  color: #e8eef9;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.user-chip__icon {
  color: #80e0a6;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #f6f9ff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 20px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.23);
}

.app-body {
  display: grid;
  min-height: calc(100vh - 72px);
  grid-template-columns: 238px minmax(0, 1fr);
}

.app-sidebar {
  display: flex;
  min-height: calc(100vh - 72px);
  flex-direction: column;
  padding: 18px 12px;
  background: var(--sidebar);
  border-right: 1px solid rgba(13, 30, 57, 0.2);
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: #c0cce0;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(74, 132, 223, 0.33), rgba(74, 132, 223, 0.12));
  border-color: rgba(119, 165, 239, 0.22);
}

.nav-item__icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8db9ff;
  font-size: 18px;
  line-height: 1;
}

.sidebar-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding: 16px 11px 4px;
  color: #8fa0bc;
  font-size: 12px;
}

.sidebar-footer strong {
  color: #b7c7de;
}

.sidebar-note {
  color: #8fa0bc;
}

.app-main {
  min-width: 0;
  padding: 28px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.mobile-menu-button {
  display: none;
  padding: 8px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 18px;
}

.module-card,
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.module-card {
  display: flex;
  min-height: 255px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.module-card--primary {
  border-color: #b7d1fa;
  box-shadow: 0 14px 34px rgba(54, 123, 220, 0.11);
}

.module-card__icon,
.empty-state__icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 18px;
  color: #367bdc;
  background: var(--primary-soft);
  border: 1px solid #d5e5ff;
  border-radius: 12px;
  font-size: 21px;
  font-weight: 800;
}

.module-card__content {
  flex: 1;
}

.module-card__content p {
  margin: 10px 0 22px;
  font-size: 13px;
  line-height: 1.6;
}

.content-card {
  padding: 23px;
}

.content-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 9px;
}

.card-description {
  max-width: 760px;
  margin: 0 0 21px;
}

.status-badge,
.result-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.status-badge--neutral {
  color: #5c6980;
  background: #f2f5fa;
  border-color: #e3e9f2;
}

.status-badge--info {
  color: #2862b3;
  background: #ebf3ff;
  border-color: #d6e7ff;
}

.status-badge--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #ccebdc;
}

.btn {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(54, 123, 220, 0.22);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  color: #275fba;
  background: #eff5ff;
  border-color: #d1e1fb;
}

.btn-secondary:hover {
  background: #e2eeff;
  border-color: #bdd5fb;
}

.btn-ghost {
  color: #56657d;
  background: #fff;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-muted);
}

.btn-block {
  width: 100%;
}

.dashboard-info {
  padding-bottom: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.info-item {
  display: flex;
  gap: 11px;
  padding: 14px;
  background: var(--surface-muted);
  border: 1px solid #e8edf5;
  border-radius: 12px;
}

.info-item__number {
  display: inline-grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  color: #367bdc;
  background: #e5efff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.info-item strong {
  color: var(--text);
  font-size: 13px;
}

.info-item p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(500px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field>span {
  color: #4f5e76;
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 41px;
  padding: 9px 10px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.14);
}

.field input::placeholder {
  color: #a0aabc;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.form-message.is-loading {
  color: #63728a;
}

.form-message.is-success {
  color: var(--success);
}

.form-message.is-error {
  color: var(--danger);
}

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.reconciliation-stack {
  display: grid;
  gap: 20px;
}

.reconciliation-form__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.reconciliation-form__heading p {
  margin-bottom: 0;
  font-size: 12px;
}

.result-badge:empty {
  display: none;
}

.result-badge.is-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #c8e9da;
}

.result-badge.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f5d1d6;
}

.section-divider {
  height: 1px;
  background: var(--line);
}

.empty-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 180px;
}

.empty-state__icon {
  margin: 0;
}

.empty-state h2 {
  margin-bottom: 7px;
}

.empty-state p {
  max-width: 630px;
  margin-bottom: 0;
}

.alert {
  margin: 16px 0;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.alert-danger {
  color: #a63d49;
  background: var(--danger-soft);
  border-color: #f0c7cd;
}

.auth-page {
  background:
    radial-gradient(circle at top left, rgba(78, 133, 220, 0.3), transparent 33%),
    linear-gradient(135deg, #152740, #0e1e36);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 29px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.auth-card>.brand-mark {
  margin-bottom: 21px;
}

.auth-heading h1 {
  margin-bottom: 9px;
}

.auth-heading p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

@media (max-width: 1280px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .form-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .app-body {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    z-index: 95;
    top: 72px;
    bottom: 0;
    left: 0;
    width: 255px;
    min-height: auto;
    transform: translateX(-103%);
    box-shadow: 15px 0 35px rgba(15, 29, 52, 0.2);
    transition: transform 0.2s ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .dashboard-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-topbar {
    min-height: 65px;
    padding: 9px 14px;
  }

  .topbar-date,
  .topbar-brand span,
  .user-chip {
    display: none;
  }

  .app-body {
    min-height: calc(100vh - 65px);
  }

  .app-sidebar {
    top: 65px;
  }

  .app-main {
    padding: 19px 14px;
  }

  .page-heading {
    align-items: center;
    margin-bottom: 16px;
  }

  .content-card,
  .module-card {
    padding: 17px;
    border-radius: 14px;
  }

  .content-card__header,
  .form-actions,
  .reconciliation-form__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .form-grid--four {
    grid-template-columns: 1fr;
  }

  .form-actions .btn {
    width: 100%;
  }

  .empty-state {
    grid-template-columns: 1fr;
  }

  .empty-state .btn {
    width: 100%;
  }
}

/* ============================================================
   Checklist module
   ============================================================ */

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #ab3946;
  border-color: #ab3946;
}

.btn-danger-outline {
  color: var(--danger);
  background: #fff;
  border-color: #efc3c9;
}

.btn-danger-outline:hover {
  background: var(--danger-soft);
  border-color: #e5a8b1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checklist-page {
  display: grid;
  gap: 18px;
}

.checklist-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
}

.checklist-toolbar__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-toolbar__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-layout {
  display: grid;
  grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.checklist-sections {
  position: sticky;
  top: 92px;
  padding: 14px;
}

.checklist-sections__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 3px 3px 0;
}

.checklist-sections__heading h3 {
  margin: 0;
}

.section-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  padding: 3px 7px;
  color: #4e6482;
  background: #eef3fb;
  border: 1px solid #dde8f7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.checklist-sections__list {
  display: grid;
  gap: 7px;
}

.checklist-section-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  color: var(--text);
  text-align: left;
  background: var(--surface-muted);
  border: 1px solid #e6ebf3;
  border-radius: 11px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.checklist-section-item:hover {
  background: #eef5ff;
  border-color: #c9dcf9;
}

.checklist-section-item.is-active {
  background: #edf5ff;
  border-color: #90b7ee;
  box-shadow: 0 0 0 3px rgba(76, 142, 234, 0.1);
}

.checklist-section-item__main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.checklist-section-item__main strong {
  overflow: hidden;
  color: #283952;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checklist-section-item__main small {
  color: #7b899d;
  font-size: 11px;
  font-weight: 700;
}

.section-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.section-state.is-open {
  color: #267654;
  background: #e7f5ed;
}

.section-state.is-collapsed {
  color: #7e8b9f;
  background: #ebeff5;
}

.sections-empty,
.checklist-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.sections-empty {
  margin: 5px 3px;
}

.checklist-hint {
  margin: 14px 3px 2px;
}

.checklist-content {
  min-height: 580px;
}

.checklist-content__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.checklist-content__header h2 {
  overflow-wrap: anywhere;
}

.checklist-section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(140px, 165px) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e0e7f1;
  border-left: 4px solid #9fb5d7;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(35, 57, 94, 0.035);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.task-card:hover {
  border-color: #c4d2e6;
  box-shadow: 0 7px 18px rgba(35, 57, 94, 0.075);
}

.task-card.status-not_started {
  border-left-color: #70a4ea;
}

.task-card.status-in_progress {
  border-left-color: #e4ad42;
}

.task-card.status-done {
  border-left-color: #53ad7f;
}

.task-card.status-warning {
  border-left-color: #db6a75;
}

.task-card.is-dragging {
  opacity: 0.48;
}

.task-card.is-drop-target {
  border-color: #4e91e9;
  box-shadow: 0 0 0 3px rgba(74, 137, 229, 0.13);
}

.task-card.is-hiding {
  opacity: 0;
  transform: translateY(-5px);
}

.task-card__drag {
  color: #9daaba;
  cursor: grab;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.task-card__drag:active {
  cursor: grabbing;
}

.task-card__body {
  min-width: 0;
}

.task-title-input {
  width: 100%;
  min-height: 37px;
  padding: 7px 8px;
  color: var(--text);
  outline: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 750;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.task-title-input:focus {
  background: #fff;
  border-color: #83afe8;
  box-shadow: 0 0 0 3px rgba(94, 156, 235, 0.12);
}

.task-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  color: #7a899e;
  font-size: 11px;
  font-weight: 700;
}

.task-status-dot {
  width: 7px;
  height: 7px;
  background: #70a4ea;
  border-radius: 50%;
}

.status-in_progress .task-status-dot {
  background: #e4ad42;
}

.status-done .task-status-dot {
  background: #53ad7f;
}

.status-warning .task-status-dot {
  background: #db6a75;
}

.task-comment-indicator {
  margin-left: 3px;
  padding: 2px 6px;
  color: #5675a0;
  background: #eaf2ff;
  border-radius: 999px;
  font-size: 10px;
}

.task-status-control select {
  width: 100%;
  min-height: 37px;
  padding: 7px 28px 7px 9px;
  color: #384961;
  outline: none;
  background: #f9fbfe;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.status-not_started .task-status-control select {
  background: #f0f6ff;
  border-color: #c7ddfb;
}

.status-in_progress .task-status-control select {
  background: #fff8e8;
  border-color: #f1dcaa;
}

.status-done .task-status-control select {
  background: #eef9f2;
  border-color: #c7e7d2;
}

.status-warning .task-status-control select {
  background: #fff1f2;
  border-color: #f3c9cd;
}

.task-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.task-action {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  color: #63738b;
  background: #f7f9fc;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.task-action:hover {
  color: #326fc6;
  background: #edf5ff;
  border-color: #bbd6fa;
}

.task-action.has-comment {
  color: #356ec0;
  background: #eaf2ff;
  border-color: #c9dcfa;
}

.task-action--danger:hover {
  color: #bd4754;
  background: #fff1f2;
  border-color: #efc5cb;
}

.new-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.new-task-form .field {
  display: block;
}

.new-task-form input {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.new-task-form input:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.14);
}

.checklist-empty,
.tasks-empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  padding: 30px;
  color: var(--text-muted);
  text-align: center;
  background: #fafcff;
  border: 1px dashed #d8e2ef;
  border-radius: 13px;
}

.checklist-empty p,
.tasks-empty-state p {
  max-width: 430px;
  margin: 0 0 16px;
  font-size: 13px;
}

.tasks-empty-state {
  min-height: 210px;
}

.tasks-empty-state__icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #5d85bb;
  background: #eaf2ff;
  border-radius: 10px;
  font-size: 19px;
  font-weight: 900;
}

.dialog-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 33, 55, 0.48);
  backdrop-filter: blur(3px);
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog-card {
  width: min(540px, 100%);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 17px;
  box-shadow: 0 22px 60px rgba(10, 28, 57, 0.28);
}

.dialog-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 21px 14px;
  border-bottom: 1px solid #e8edf4;
}

.dialog-card__header h2 {
  margin: 0;
  font-size: 19px;
}

.dialog-close {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  color: #6d7d93;
  background: #f5f7fb;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
}

.dialog-close:hover {
  color: #34455e;
  background: #edf2f8;
}

.dialog-card__body {
  padding: 19px 21px;
}

.dialog-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 21px 20px;
  border-top: 1px solid #edf1f6;
}

.dialog-field {
  display: grid;
  gap: 7px;
}

.dialog-field>span {
  color: #4d5e77;
  font-size: 12px;
  font-weight: 800;
}

.dialog-field input,
.dialog-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.dialog-field textarea {
  min-height: 132px;
  resize: vertical;
}

.dialog-field input:focus,
.dialog-field textarea:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.14);
}

.dialog-text {
  margin: 0;
  color: #58687e;
  font-size: 14px;
  line-height: 1.55;
}

.toast-stack {
  position: fixed;
  z-index: 700;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(365px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  padding: 12px 13px;
  color: #506077;
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(34, 51, 78, 0.14);
  font-size: 13px;
  font-weight: 750;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}

.toast--success {
  color: #237452;
  background: #f0faf4;
  border-color: #cbe8d7;
}

.toast--error {
  color: #af3f4c;
  background: #fff4f5;
  border-color: #f1c9ce;
}

.toast--info {
  color: #45658f;
  background: #f2f7ff;
  border-color: #d4e3f8;
}

@media (max-width: 1180px) {
  .checklist-layout {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .task-card {
    grid-template-columns: 21px minmax(0, 1fr) 145px;
  }

  .task-card__actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {

  .checklist-toolbar,
  .checklist-content__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .checklist-toolbar__actions {
    justify-content: flex-start;
  }

  .checklist-layout {
    grid-template-columns: 1fr;
  }

  .checklist-sections {
    position: static;
  }

  .checklist-sections__list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 680px) {

  .checklist-toolbar__actions,
  .checklist-section-actions {
    width: 100%;
  }

  .checklist-toolbar__actions .btn,
  .checklist-section-actions .btn {
    flex: 1 1 auto;
  }

  .checklist-section-actions .btn-danger-outline {
    flex-basis: 100%;
  }

  .task-card {
    grid-template-columns: 19px minmax(0, 1fr);
    gap: 8px;
  }

  .task-card__drag {
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 11px;
  }

  .task-status-control {
    grid-column: 2;
  }

  .task-card__actions {
    grid-column: 2;
  }

  .new-task-form {
    grid-template-columns: 1fr;
  }

  .new-task-form .btn {
    width: 100%;
  }

  .dialog-card__actions {
    flex-direction: column-reverse;
  }

  .dialog-card__actions .btn {
    width: 100%;
  }
}

/* ============================================================
   KPI reports module
   ============================================================ */

.reports-page {
  display: grid;
  gap: 18px;
}

.reports-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
}

.reports-toolbar__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reports-toolbar__actions,
.reports-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.report-mode-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 5px 9px;
  color: #5c6b80;
  background: #eef2f7;
  border: 1px solid #dfe6ee;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.report-filter {
  display: block;
}

.report-filter input {
  width: 155px;
  min-height: 39px;
  padding: 8px 10px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 13px;
}

.report-filter input:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.14);
}

.reports-card {
  padding: 0;
  overflow: hidden;
}

.reports-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.reports-card__header h2 {
  margin: 0;
}

.report-table-wrap {
  width: 100%;
  overflow: auto;
}

.report-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.report-table th,
.report-table td {
  padding: 11px;
  vertical-align: middle;
  border-right: 1px solid #e7edf5;
  border-bottom: 1px solid #e3e9f1;
}

.report-table th:last-child,
.report-table td:last-child {
  border-right: 0;
}

.report-table tbody tr:last-child td {
  border-bottom: 0;
}

.report-table th {
  position: sticky;
  /*top: 72px;*/
  z-index: 2;
  min-width: 145px;
  color: #50617a;
  text-align: left;
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 800;
}

.report-table__head {
  min-width: 160px !important;
}

.report-table__actions-head {
  min-width: 110px !important;
}

.report-table__metric-label,
.report-table__target {
  display: block;
}

.report-table__metric-label {
  margin-bottom: 4px;
  color: #455773;
}

.report-table__target {
  color: #8290a4;
  font-size: 10px;
  font-weight: 700;
}

.report-rowhead {
  min-width: 160px;
  color: #44556e;
  font-weight: 800;
  white-space: nowrap;
}

.report-table__cell {
  min-width: 156px;
}

.report-metric {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px 8px 11px;
  background: #f8fafc;
  border: 1px solid #e7edf4;
  border-left: 4px solid #a4b9d8;
  border-radius: 8px;
}

.report-metric.is-ok {
  background: #f0faf4;
  border-color: #d8efdf;
  border-left-color: #45a878;
}

.report-metric.is-bad {
  background: #fff5f5;
  border-color: #f3d9dc;
  border-left-color: #d96571;
}

.report-metric__value {
  color: #33455e;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.report-trend {
  color: #8795a9;
  font-size: 14px;
  font-weight: 900;
}

.report-trend.is-up {
  color: #279365;
}

.report-trend.is-down {
  color: #d35c68;
}

.report-cell-input {
  width: 100%;
  min-height: 35px;
  margin-top: 7px;
  padding: 7px 8px;
  color: #344761;
  outline: none;
  background: #fff;
  border: 1px solid #d4deea;
  border-radius: 8px;
  font-size: 12px;
}

.report-cell-input:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.12);
}

.report-rowhead>.report-cell-input {
  min-width: 145px;
  margin-top: 0;
  font-weight: 750;
}

.table-delete-button {
  padding: 7px 9px;
  color: #b34551;
  background: #fff;
  border: 1px solid #efc9ce;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.table-delete-button:hover {
  background: #fff2f3;
  border-color: #e8aeb5;
}

.report-table__empty {
  padding: 28px !important;
  color: #8090a6;
  text-align: center;
  background: #fbfcfe;
}

.report-view-mode .report-table__actions,
.report-view-mode .report-table__actions-head {
  display: none;
}

.report-view-mode .report-table th:last-child,
.report-view-mode .report-table td:last-child {
  border-right: 0;
}

.report-view-mode .report-table {
  min-width: 700px;
}

.report-dialog-card {
  width: min(620px, 100%);
}

.report-dialog-card__body {
  max-height: min(65vh, 650px);
  overflow: auto;
}

.report-metric-form {
  display: grid;
  gap: 15px;
}

.report-type-fieldset {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 0;
  padding: 13px;
  border: 1px solid #e0e7f0;
  border-radius: 10px;
}

.report-type-fieldset legend {
  padding: 0 5px;
  color: #607089;
  font-size: 12px;
  font-weight: 800;
}

.report-type-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f6078;
  font-size: 13px;
  font-weight: 700;
}

.report-settings-grid {
  display: grid;
  gap: 21px;
}

.report-settings-section {
  display: grid;
  gap: 11px;
}

.report-settings-section__heading h3 {
  margin: 0 0 4px;
}

.report-settings-section__heading p {
  margin: 0;
  font-size: 12px;
}

.report-target-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-target-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e1e8f1;
  border-radius: 9px;
}

.report-target-item>span:first-child {
  overflow: hidden;
  color: #4c5e77;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-target-item__input {
  display: flex;
  align-items: center;
  gap: 7px;
}

.report-target-item input {
  width: 100%;
  min-height: 35px;
  padding: 7px 8px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid #cfd9e6;
  border-radius: 7px;
}

.report-target-item input:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.12);
}

.report-target-item small {
  min-width: 40px;
  color: #8190a4;
  font-size: 10px;
  font-weight: 800;
}

.report-chart-backdrop {
  position: fixed;
  z-index: 550;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 33, 55, 0.5);
  backdrop-filter: blur(3px);
}

.report-chart-backdrop[hidden] {
  display: none;
}

.report-chart-dialog {
  display: flex;
  width: min(1200px, 100%);
  max-height: min(90vh, 900px);
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(13, 29, 56, 0.31);
}

.report-chart-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 21px 15px;
  border-bottom: 1px solid #e5ebf3;
}

.report-chart-dialog__header h2 {
  margin: 0;
}

.report-chart-dialog__body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 0;
  overflow: auto;
}

.report-chart-main {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 18px;
}

.report-summary-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.report-summary-empty {
  width: 100%;
  padding: 14px;
  color: #7d8ca0;
  background: #f8fafc;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  font-size: 13px;
}

.report-summary-item {
  display: grid;
  min-width: 130px;
  gap: 3px;
  padding: 10px 12px;
  background: #f5f8fd;
  border: 1px solid #e1e9f4;
  border-radius: 10px;
}

.report-summary-item>span {
  color: #7b899d;
  font-size: 11px;
  font-weight: 750;
}

.report-summary-item strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #354761;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.report-chart-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.report-chart-tab {
  padding: 8px 10px;
  color: #55677f;
  background: #f5f8fc;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.report-chart-tab:hover {
  background: #ebf3ff;
  border-color: #bfd6f5;
}

.report-chart-tab.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.report-chart-canvas-wrap {
  position: relative;
  height: min(52vh, 430px);
  min-height: 280px;
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid #e0e8f2;
  border-radius: 12px;
}

.report-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.report-employee-cards {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 18px;
  overflow: auto;
  background: #f8fafd;
  border-left: 1px solid #e4eaf2;
}

.report-employee-card {
  padding: 11px;
  background: #fff;
  border: 1px solid #e0e7f1;
  border-radius: 10px;
}

.report-employee-card.has-low-metrics {
  background: linear-gradient(100deg, #fff7f7 0%, #fff 78%);
  border-color: #f0cdd1;
}

.report-employee-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 9px;
}

.report-employee-card__header strong {
  overflow: hidden;
  color: #40526b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-low-indicator {
  flex: 0 0 auto;
  padding: 3px 5px;
  color: #a56a0a;
  background: #fff3d7;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
}

.report-employee-card__metrics {
  display: grid;
  gap: 5px;
}

.report-employee-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #758399;
  font-size: 11px;
}

.report-employee-metric strong {
  color: #4c5f78;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.report-employee-metric strong.is-low {
  color: #c95361;
}

.report-employee-empty {
  padding: 15px;
  color: #7c8b9f;
  text-align: center;
  font-size: 12px;
}

.btn.is-unsaved {
  position: relative;
  box-shadow: 0 7px 16px rgba(54, 123, 220, 0.31);
}

.btn.is-unsaved::before {
  width: 6px;
  height: 6px;
  content: "";
  background: #f7d54a;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72);
}

@media (max-width: 1120px) {
  .reports-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reports-toolbar__actions {
    justify-content: flex-start;
  }

  .report-chart-dialog__body {
    grid-template-columns: 1fr;
  }

  .report-employee-cards {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    overflow: visible;
    border-top: 1px solid #e4eaf2;
    border-left: 0;
  }
}

@media (max-width: 700px) {

  .reports-toolbar__actions,
  .reports-card__actions {
    width: 100%;
  }

  .reports-toolbar__actions .btn,
  .reports-card__actions .btn {
    flex: 1 1 auto;
  }

  .report-filter {
    width: 100%;
  }

  .report-filter input {
    width: 100%;
  }

  .reports-card__header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 16px 15px;
  }

  .report-target-list {
    grid-template-columns: 1fr;
  }

  .report-chart-backdrop {
    padding: 8px;
  }

  .report-chart-dialog {
    max-height: 94vh;
    border-radius: 13px;
  }

  .report-chart-dialog__header,
  .report-chart-main,
  .report-employee-cards {
    padding: 14px;
  }

  .report-chart-canvas-wrap {
    height: 320px;
    min-height: 240px;
  }
}

@media print {

  .app-topbar,
  .app-sidebar,
  .page-heading,
  .reports-toolbar,
  .reports-card__actions,
  .report-table__actions,
  .report-table__actions-head,
  .report-cell-input,
  .toast-stack,
  .dialog-backdrop,
  .report-chart-backdrop {
    display: none !important;
  }

  .app-body {
    display: block;
  }

  .app-main {
    padding: 0;
  }

  .reports-page {
    display: block;
  }

  .reports-card {
    margin: 0 0 18px;
    border: 1px solid #c8cfd8;
    box-shadow: none;
    break-inside: avoid;
  }

  .reports-card__header {
    padding: 12px 14px;
  }

  .report-table {
    min-width: 0;
  }

  .report-table th {
    position: static;
    color: #111;
    background: #f1f1f1;
  }

  .report-table th,
  .report-table td {
    color: #111;
    border-color: #c8cfd8;
  }

  .report-metric {
    color: #111;
    background: #fff;
    border-color: #c8cfd8;
  }

  .report-metric__value,
  .report-rowhead {
    color: #111;
  }
}

/* ============================================================
   Dashboard module
   ============================================================ */

.dashboard-page {
  display: grid;
  gap: 18px;
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-toolbar h2 {
  margin: 0;
}

.dashboard-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-updated {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.dashboard-stat-card {
  display: grid;
  min-height: 155px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dashboard-stat-card__icon {
  display: inline-grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: #477ab8;
  background: #ebf3ff;
  border: 1px solid #d4e4fb;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.dashboard-stat-card__content {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
}

.dashboard-stat-card__content>span {
  color: #77879c;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-stat-card__content strong {
  color: #2c405b;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.dashboard-stat-card__content small {
  overflow: hidden;
  color: #8a98ab;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}

.dashboard-stat-card__link {
  grid-column: 1 / -1;
  align-self: end;
  color: #4b79b6;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-stat-card--progress .dashboard-stat-card__icon {
  color: #a87513;
  background: #fff6e2;
  border-color: #f4dfab;
}

.dashboard-stat-card--warning .dashboard-stat-card__icon {
  color: #bc5260;
  background: #fff0f1;
  border-color: #f3cbd0;
}

.dashboard-stat-card--employees .dashboard-stat-card__icon {
  color: #437e65;
  background: #e9f7ef;
  border-color: #d0ebdc;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(330px, 0.88fr);
  gap: 18px;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: 18px;
}

.dashboard-panel {
  padding: 20px;
}

.dashboard-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.dashboard-panel__header h2 {
  margin: 0;
  font-size: 19px;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-kpi-card {
  display: grid;
  min-height: 101px;
  align-content: start;
  gap: 5px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e4ebf4;
  border-left: 4px solid #a5b8d4;
  border-radius: 10px;
}

.dashboard-kpi-card.is-ok {
  background: #f0faf4;
  border-color: #d9eee1;
  border-left-color: #42a676;
}

.dashboard-kpi-card.is-bad {
  background: #fff6f6;
  border-color: #f1dadd;
  border-left-color: #d96672;
}

.dashboard-kpi-card__label {
  overflow: hidden;
  color: #74839a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-kpi-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #354962;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi-card small {
  color: #8391a3;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-trend {
  color: #8492a6;
  font-size: 14px;
}

.dashboard-trend.is-up {
  color: #279365;
}

.dashboard-trend.is-down {
  color: #d45c69;
}

.dashboard-warning-list,
.dashboard-employee-list,
.quick-action-list {
  display: grid;
  gap: 8px;
}

.dashboard-warning-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  background: #fff9f1;
  border: 1px solid #f2dfbd;
  border-radius: 10px;
}

.dashboard-warning-item__icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ad750f;
  background: #ffefcc;
  border-radius: 8px;
  font-weight: 900;
}

.dashboard-warning-item strong,
.dashboard-employee-item strong {
  display: block;
  overflow: hidden;
  color: #43546c;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.dashboard-warning-item small,
.dashboard-employee-item small {
  display: block;
  margin-top: 2px;
  color: #8090a5;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-warning-item p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: #6e7e93;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.45;
}

.dashboard-employee-item {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  background: #f9fbfd;
  border: 1px solid #e4ebf3;
  border-radius: 10px;
}

.dashboard-employee-item.has-low {
  background: linear-gradient(90deg, #fff7f7, #fff 77%);
  border-color: #efd6d9;
}

.dashboard-employee-item__avatar {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #5077ae;
  background: #e9f1ff;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-low-count,
.dashboard-ok-label {
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-low-count {
  color: #b54c58;
  background: #ffebed;
}

.dashboard-ok-label {
  color: #267553;
  background: #e8f7ee;
}

.quick-action {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fafcff;
  border: 1px solid #e2eaf4;
  border-radius: 10px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.quick-action:hover {
  background: #f0f6ff;
  border-color: #c7daf6;
  transform: translateY(-1px);
}

.quick-action__icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #4378bd;
  background: #e8f1ff;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 900;
}

.quick-action strong {
  display: block;
  color: #40536d;
  font-size: 12px;
}

.quick-action small {
  display: block;
  margin-top: 2px;
  color: #8391a4;
  font-size: 10px;
  font-weight: 700;
}

.quick-action>b {
  color: #7c90ad;
  font-size: 17px;
}

.dashboard-empty,
.dashboard-loading {
  display: grid;
  min-height: 88px;
  place-items: center;
  padding: 16px;
  color: #8190a4;
  text-align: center;
  background: #fafcff;
  border: 1px dashed #dbe5f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-empty--good {
  color: #2d7f5b;
  border-color: #cce7d8;
  background: #f0faf4;
}

.dashboard-empty--good span {
  margin-right: 5px;
  font-size: 16px;
}

@media (max-width: 1250px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {

  .dashboard-toolbar,
  .dashboard-toolbar__right,
  .dashboard-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-toolbar__right {
    width: 100%;
  }

  .dashboard-toolbar__right .btn {
    width: 100%;
  }

  .dashboard-stat-grid,
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel {
    padding: 16px;
  }

  .dashboard-panel__header .btn {
    width: 100%;
  }

  .dashboard-employee-item {
    grid-template-columns: 31px minmax(0, 1fr);
  }

  .dashboard-low-count,
  .dashboard-ok-label {
    grid-column: 2;
    justify-self: start;
  }
}

/* ============================================================
   Settings module
   ============================================================ */

.settings-page {
  display: grid;
  gap: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.settings-profile-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 21px;
}

.settings-profile-card__icon {
  display: inline-grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #477ab8;
  background: #e8f1ff;
  border: 1px solid #cfe0fb;
  border-radius: 14px;
  font-size: 24px;
  font-weight: 900;
}

.settings-profile-card h2 {
  margin-bottom: 7px;
}

.settings-profile-card p {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.settings-profile-card__meta {
  justify-self: end;
}

.settings-password-card,
.settings-info-card,
.settings-legacy-card {
  padding: 21px;
}

.settings-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.settings-card-heading h2 {
  margin: 0;
  font-size: 20px;
}

.settings-card-heading__icon {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #6680a5;
  background: #f0f5fc;
  border: 1px solid #dce7f4;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 900;
}

.settings-password-form {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.field-hint {
  color: #8492a5;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.settings-password-status {
  display: none;
  min-height: 20px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.settings-password-status:not(:empty) {
  display: block;
}

.settings-password-status.is-loading {
  color: #566d8d;
  background: #f0f6ff;
  border-color: #d5e4fb;
}

.settings-password-status.is-success {
  color: #287755;
  background: #effaf3;
  border-color: #cbe8d7;
}

.settings-password-status.is-error {
  color: #b04450;
  background: #fff3f4;
  border-color: #f1c9ce;
}

.settings-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.settings-info-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.settings-info-list>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e7edf4;
}

.settings-info-list>div:last-child {
  border-bottom: 0;
}

.settings-info-list dt {
  color: #7a889c;
  font-size: 12px;
  font-weight: 750;
}

.settings-info-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #40536c;
  text-align: right;
  font-size: 12px;
  font-weight: 850;
}

.settings-legacy-links {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 850px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-profile-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .settings-profile-card__meta {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {

  .settings-profile-card,
  .settings-password-card,
  .settings-info-card,
  .settings-legacy-card {
    padding: 16px;
  }

  .settings-profile-card {
    grid-template-columns: 1fr;
  }

  .settings-form-actions,
  .settings-legacy-links {
    flex-direction: column;
  }

  .settings-form-actions .btn,
  .settings-legacy-links .btn {
    width: 100%;
  }

  .settings-info-list>div {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .settings-info-list dd {
    text-align: left;
  }
}

/* ============================================================
   Backups module
   ============================================================ */

.backups-page {
  display: grid;
  gap: 18px;
}

.backups-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.backups-toolbar h2 {
  margin: 0;
}

.backups-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.backups-intro-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.backups-intro-card__icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #4a78b2;
  background: #e8f1ff;
  border: 1px solid #d0e0fa;
  border-radius: 12px;
  font-size: 21px;
  font-weight: 900;
}

.backups-intro-card h2 {
  margin-bottom: 6px;
}

.backups-intro-card p {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.backups-intro-card code {
  padding: 1px 4px;
  color: #42638e;
  background: #edf3fc;
  border-radius: 4px;
  font-size: 11px;
}

.backups-intro-card__limit {
  display: grid;
  justify-items: end;
  gap: 3px;
  padding-left: 15px;
  border-left: 1px solid #e4eaf3;
}

.backups-intro-card__limit span {
  color: #8190a4;
  font-size: 11px;
  font-weight: 750;
}

.backups-intro-card__limit strong {
  color: #4d617d;
  font-size: 13px;
}

.backups-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.17fr) minmax(330px, 0.83fr);
  gap: 18px;
}

.backups-list-card,
.backups-audit-card {
  padding: 20px;
}

.backups-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 15px;
}

.backups-card-heading h2 {
  margin: 0;
  font-size: 19px;
}

.backups-list,
.backups-audit-list {
  display: grid;
  gap: 8px;
}

.backup-item {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fafcff;
  border: 1px solid #e2eaf3;
  border-radius: 10px;
}

.backup-item__icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #4d78b1;
  background: #eaf2ff;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 900;
}

.backup-item__main {
  min-width: 0;
}

.backup-item__main strong {
  display: block;
  overflow: hidden;
  color: #465a74;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.backup-item__main small {
  display: block;
  margin-top: 3px;
  color: #8291a5;
  font-size: 10px;
  font-weight: 700;
}

.backup-item__actions {
  display: flex;
  gap: 6px;
}

.backup-item__actions .btn {
  min-height: 33px;
  padding: 7px 9px;
  font-size: 11px;
}

.backup-delete-button {
  min-height: 33px;
  padding: 7px 9px;
  color: #b34551;
  background: #fff;
  border: 1px solid #efc9ce;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.backup-delete-button:hover {
  background: #fff2f3;
  border-color: #e9afb6;
}

.backup-audit-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid #e8edf4;
}

.backup-audit-item:last-child {
  border-bottom: 0;
}

.backup-audit-item__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  background: #6594ce;
  border-radius: 50%;
}

.backup-audit-item strong {
  display: block;
  color: #4b5d75;
  font-size: 12px;
}

.backup-audit-item small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #74859c;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}

.backup-audit-item p {
  margin: 3px 0 0;
  color: #8a98aa;
  font-size: 10px;
  font-weight: 650;
}

.backups-empty,
.backups-loading {
  display: grid;
  min-height: 145px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 18px;
  color: #8291a5;
  text-align: center;
  background: #fafcff;
  border: 1px dashed #dbe5f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.backups-empty>span {
  color: #6b8fbe;
  font-size: 21px;
}

.backups-empty strong {
  color: #60738e;
}

.backups-empty p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.backups-note-card {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 11px;
  padding: 16px 19px;
  background: #fffaf0;
  border-color: #f0dfbd;
}

.backups-note-card__icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #a87617;
  background: #ffefcf;
  border-radius: 8px;
  font-weight: 900;
}

.backups-note-card h3 {
  margin-bottom: 4px;
  color: #695322;
  font-size: 14px;
}

.backups-note-card p {
  max-width: 900px;
  margin-bottom: 0;
  color: #806d43;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .backups-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {

  .backups-toolbar,
  .backups-intro-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .backups-toolbar {
    display: flex;
  }

  .backups-toolbar__actions {
    width: 100%;
  }

  .backups-toolbar__actions .btn {
    flex: 1 1 auto;
  }

  .backups-intro-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .backups-intro-card__limit {
    justify-items: start;
    padding-top: 11px;
    padding-left: 0;
    border-top: 1px solid #e4eaf3;
    border-left: 0;
  }

  .backup-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .backup-item__actions {
    grid-column: 1 / -1;
  }

  .backup-item__actions .btn,
  .backup-delete-button {
    flex: 1 1 auto;
  }

  .backups-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ============================================================
   MySQL migration module
   ============================================================ */

.migration-page {
  display: grid;
  gap: 18px;
}

.migration-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.migration-toolbar h2 {
  margin: 0;
}

.migration-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.migration-intro-card {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.migration-intro-card__icon {
  display: inline-grid;
  width: 47px;
  height: 47px;
  place-items: center;
  color: #4c78b0;
  background: #e9f1ff;
  border: 1px solid #d1e0f9;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}

.migration-intro-card h2 {
  margin-bottom: 6px;
}

.migration-intro-card p {
  max-width: 790px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.migration-summary-card,
.migration-runs-card {
  padding: 20px;
}

.migration-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.migration-card-heading h2 {
  margin: 0;
  font-size: 19px;
}

.migration-validation-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  color: #68778d;
  background: #f1f4f8;
  border: 1px solid #e1e7ef;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.migration-validation-badge.is-ok {
  color: #287754;
  background: #eaf8ef;
  border-color: #cce9d8;
}

.migration-validation-badge.is-warning {
  color: #a06c12;
  background: #fff6df;
  border-color: #f0dfb0;
}

.migration-validation-badge.is-error {
  color: #b44551;
  background: #fff0f2;
  border-color: #f0c8cd;
}

.migration-table-wrap {
  overflow: auto;
}

.migration-table {
  width: 100%;
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0;
}

.migration-table th,
.migration-table td {
  padding: 11px;
  color: #506079;
  text-align: left;
  border-right: 1px solid #e6ecf4;
  border-bottom: 1px solid #e2e9f2;
  font-size: 12px;
}

.migration-table th:last-child,
.migration-table td:last-child {
  border-right: 0;
}

.migration-table tbody tr:last-child td {
  border-bottom: 0;
}

.migration-table th {
  color: #60718a;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 850;
}

.migration-table td:nth-child(2),
.migration-table td:nth-child(3) {
  color: #3e536e;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.migration-row-status {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
}

.migration-row-status.is-ok {
  color: #267652;
  background: #e9f7ee;
}

.migration-row-status.is-warning {
  color: #a06b0c;
  background: #fff3d8;
}

.migration-loading,
.migration-empty {
  min-height: 95px;
  padding: 18px !important;
  color: #8090a4 !important;
  text-align: center;
  background: #fafcff;
  border: 1px dashed #dbe5f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.migration-runs-list {
  display: grid;
  gap: 8px;
}

.migration-run-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  background: #fafcff;
  border: 1px solid #e2eaf4;
  border-radius: 10px;
}

.migration-run-item__main {
  min-width: 0;
}

.migration-run-item__main strong {
  display: block;
  color: #4a5d76;
  font-size: 12px;
}

.migration-run-item__main small {
  display: block;
  margin-top: 3px;
  color: #8291a5;
  font-size: 10px;
  font-weight: 700;
}

.migration-run-status {
  align-self: start;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 850;
}

.migration-run-status.is-success {
  color: #267652;
  background: #e9f7ee;
}

.migration-run-status.is-failed {
  color: #b34551;
  background: #fff0f2;
}

.migration-run-status.is-running {
  color: #476f9e;
  background: #eaf2ff;
}

.migration-run-item__error {
  grid-column: 1 / -1;
  margin: 0;
  color: #b34b57;
  font-size: 11px;
  line-height: 1.45;
}

.migration-warning-card {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 11px;
  padding: 16px 19px;
  background: #fffaf0;
  border-color: #f0dfbd;
}

.migration-warning-card__icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #a87617;
  background: #ffefcf;
  border-radius: 8px;
  font-weight: 900;
}

.migration-warning-card h3 {
  margin-bottom: 4px;
  color: #695322;
  font-size: 14px;
}

.migration-warning-card p {
  margin-bottom: 0;
  color: #806d43;
  font-size: 12px;
  line-height: 1.55;
}

.migration-confirm-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  color: #53657d;
  background: #f7faff;
  border: 1px solid #dce8f8;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.migration-confirm-field input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 1px 0 0;
}

@media (max-width: 820px) {

  .migration-toolbar,
  .migration-intro-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-toolbar {
    display: flex;
  }

  .migration-toolbar__actions {
    width: 100%;
  }

  .migration-toolbar__actions .btn {
    flex: 1 1 auto;
  }

  .migration-intro-card {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   System status module
   ============================================================ */

.system-status-page {
  display: grid;
  gap: 18px;
}

.system-status-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.system-status-toolbar h2 {
  margin: 0;
}

.system-status-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-status-updated {
  color: #8190a4;
  font-size: 12px;
  font-weight: 700;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.system-status-card {
  padding: 17px;
}

.system-status-card__header {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.system-status-card__icon {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #527dac;
  background: #eaf2ff;
  border: 1px solid #d5e4fb;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 900;
}

.system-status-card__header span:not(.system-status-card__icon) {
  display: block;
  margin-bottom: 2px;
  color: #7c8ba0;
  font-size: 11px;
  font-weight: 750;
}

.system-status-card__header strong {
  color: #465a74;
  font-size: 14px;
}

.system-status-value.is-ok {
  color: #287754;
}

.system-status-value.is-error {
  color: #b34450;
}

.system-status-card__meta {
  display: grid;
  gap: 0;
  margin: 0;
}

.system-status-card__meta>div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #edf1f6;
}

.system-status-card__meta dt {
  color: #8795a8;
  font-size: 10px;
  font-weight: 700;
}

.system-status-card__meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #52647c;
  text-align: right;
  font-size: 10px;
  font-weight: 850;
}

.system-status-table-card {
  padding: 20px;
}

.system-status-table-card__header {
  margin-bottom: 15px;
}

.system-status-table-card__header h2 {
  margin: 0;
  font-size: 19px;
}

.system-status-table-wrap {
  overflow: auto;
}

.system-status-table {
  width: 100%;
  min-width: 420px;
  border-collapse: separate;
  border-spacing: 0;
}

.system-status-table th,
.system-status-table td {
  padding: 11px;
  color: #506079;
  text-align: left;
  border-right: 1px solid #e6ecf4;
  border-bottom: 1px solid #e2e9f2;
  font-size: 12px;
}

.system-status-table th:last-child,
.system-status-table td:last-child {
  border-right: 0;
}

.system-status-table tbody tr:last-child td {
  border-bottom: 0;
}

.system-status-table th {
  color: #60718a;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 850;
}

.system-status-table td:last-child {
  color: #40536e;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.system-status-loading {
  min-height: 80px;
  color: #8190a4 !important;
  text-align: center !important;
  background: #fafcff;
  font-weight: 700;
}

.system-status-note {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  gap: 11px;
  padding: 16px 19px;
  background: #f0f7ff;
  border-color: #d6e5f8;
}

.system-status-note__icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #4277b6;
  background: #e1eeff;
  border-radius: 8px;
  font-weight: 900;
}

.system-status-note h3 {
  margin-bottom: 4px;
  color: #49698e;
  font-size: 14px;
}

.system-status-note p {
  margin-bottom: 0;
  color: #68809d;
  font-size: 12px;
  line-height: 1.55;
}

.system-status-note code {
  padding: 1px 4px;
  color: #42638e;
  background: #e5effd;
  border-radius: 4px;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .system-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {

  .system-status-toolbar,
  .system-status-toolbar__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .system-status-toolbar {
    display: flex;
  }

  .system-status-toolbar__actions {
    width: 100%;
  }

  .system-status-toolbar__actions .btn {
    width: 100%;
  }

  .system-status-grid {
    grid-template-columns: 1fr;
  }

  .system-status-table-card {
    padding: 16px;
  }
}

/* ============================================================
   Checklist history
   ============================================================ */

.checklist-history-page {
  display: grid;
  gap: 18px;
}

.checklist-history-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.checklist-history-toolbar h2 {
  margin: 0;
}

.checklist-history-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-history-intro {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.checklist-history-intro__icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #507bac;
  background: #eaf2ff;
  border: 1px solid #d3e2fb;
  border-radius: 12px;
  font-size: 21px;
  font-weight: 900;
}

.checklist-history-intro h2 {
  margin-bottom: 6px;
}

.checklist-history-intro p {
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.55;
}

.checklist-history-list-card {
  padding: 20px;
}

.checklist-history-list-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.checklist-history-list-card__header h2 {
  margin: 0;
  font-size: 19px;
}

.checklist-history-list {
  display: grid;
  gap: 9px;
}

.checklist-history-item {
  display: grid;
  grid-template-columns: 135px minmax(200px, 1fr) minmax(230px, auto) auto;
  align-items: center;
  gap: 14px;
  padding: 13px;
  background: #fafcff;
  border: 1px solid #e2eaf3;
  border-radius: 11px;
}

.checklist-history-item__date {
  display: grid;
  gap: 3px;
}

.checklist-history-item__date strong {
  color: #455a75;
  font-size: 13px;
}

.checklist-history-item__date span {
  width: fit-content;
  padding: 3px 6px;
  color: #637792;
  background: #edf2f9;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}

.checklist-history-item__progress {
  display: grid;
  gap: 6px;
}

.checklist-history-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  color: #78879b;
  font-size: 11px;
  font-weight: 700;
}

.checklist-history-progress-head strong {
  color: #51657f;
  font-size: 12px;
}

.checklist-history-progress-bar {
  height: 7px;
  overflow: hidden;
  background: #e7edf5;
  border-radius: 999px;
}

.checklist-history-progress-bar span {
  display: block;
  height: 100%;
  background: #65a2e9;
  border-radius: inherit;
}

.checklist-history-progress-bar span.is-complete {
  background: #48aa78;
}

.checklist-history-progress-bar span.is-warning {
  background: #dca443;
}

.checklist-history-item__stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.history-stat {
  padding: 4px 6px;
  color: #738399;
  background: #edf2f8;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.history-stat.is-progress {
  color: #426eaa;
  background: #e9f1ff;
}

.history-stat.is-warning {
  color: #a57418;
  background: #fff2d6;
}

.checklist-history-empty,
.checklist-history-loading {
  display: grid;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 20px;
  color: #8291a5;
  text-align: center;
  background: #fafcff;
  border: 1px dashed #dbe5f0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.checklist-history-empty>span {
  color: #6f92c1;
  font-size: 22px;
}

.checklist-history-empty strong {
  color: #61738d;
}

.checklist-history-empty p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .checklist-history-item {
    grid-template-columns: 135px minmax(0, 1fr) auto;
  }

  .checklist-history-item__stats {
    grid-column: 2 / -1;
  }
}

@media (max-width: 700px) {

  .checklist-history-toolbar,
  .checklist-history-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .checklist-history-toolbar {
    display: flex;
  }

  .checklist-history-toolbar__actions {
    width: 100%;
  }

  .checklist-history-toolbar__actions .btn {
    flex: 1 1 auto;
  }

  .checklist-history-intro {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checklist-history-list-card {
    padding: 16px;
  }

  .checklist-history-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .checklist-history-item__stats {
    grid-column: auto;
  }

  .checklist-history-item .btn {
    width: 100%;
  }
}

/* ============================================================
   Checklist priorities and daily due time
   ============================================================ */

.task-card {
  position: relative;
}

.task-card.priority-low {
  border-top-color: #9eb0c7;
}

.task-card.priority-normal {
  border-top-color: #76a5e8;
}

.task-card.priority-high {
  border-top-color: #e2a746;
}

.task-card.priority-critical {
  border-top-color: #d65f6c;
}

.task-card.is-overdue {
  background: linear-gradient(90deg, #fff5f5 0%, #ffffff 72%);
  border-color: #efc8cd;
  box-shadow: 0 7px 18px rgba(194, 74, 87, 0.1);
}

.task-card__badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 3px 8px 0;
}

.task-priority-badge,
.task-due-badge {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.task-priority-badge.priority-low {
  color: #687b94;
  background: #edf1f6;
}

.task-priority-badge.priority-normal {
  color: #416fae;
  background: #e8f1ff;
}

.task-priority-badge.priority-high {
  color: #a57214;
  background: #fff1d5;
}

.task-priority-badge.priority-critical {
  color: #bd4653;
  background: #ffe9eb;
}

.task-due-badge {
  color: #586c85;
  background: #f1f5fa;
}

.task-due-badge.is-overdue {
  color: #bb4652;
  background: #ffe7e9;
}

.task-extra-controls {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) 88px;
  gap: 6px;
  align-items: center;
}

.task-priority-control select,
.task-due-control input {
  width: 100%;
  min-height: 34px;
  padding: 6px 7px;
  color: #4b5d76;
  outline: none;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
}

.task-priority-control select:focus,
.task-due-control input:focus {
  border-color: #76a8ec;
  box-shadow: 0 0 0 3px rgba(83, 150, 237, 0.12);
}

.task-priority-control select:disabled,
.task-due-control input:disabled {
  cursor: default;
  opacity: 0.72;
  background: #f3f6fa;
}

@media (max-width: 1180px) {
  .task-extra-controls {
    grid-column: 2 / -1;
    max-width: 270px;
  }
}

@media (max-width: 680px) {
  .task-extra-controls {
    grid-column: 2;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 90px;
  }
}

/* ============================================================
   Checklist task controls layout fix
   ============================================================ */

/*
|--------------------------------------------------------------------------
| Desktop
|--------------------------------------------------------------------------
|
| Карточка теперь содержит 5 прямых grid-элементов:
|
| 1. .task-card__drag
| 2. .task-card__body
| 3. .task-status-control
| 4. .task-extra-controls
| 5. .task-card__actions
|
*/

.task-card {
  grid-template-columns:
    24px minmax(220px, 1fr) minmax(132px, 155px) minmax(190px, 215px) auto;
  align-items: center;
}

/*
|--------------------------------------------------------------------------
| Блок priority + time
|--------------------------------------------------------------------------
*/

.task-extra-controls {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) 82px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.task-priority-control,
.task-due-control {
  display: block;
  min-width: 0;
}

.task-priority-control select,
.task-due-control input {
  width: 100%;
  min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Кнопки действий
|--------------------------------------------------------------------------
*/

.task-card__actions {
  grid-column: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: max-content;
}

/*
|--------------------------------------------------------------------------
| Средние экраны
|--------------------------------------------------------------------------
|
| На ширине до 1260px переносим controls и buttons под основную область.
|
*/

@media (max-width: 1260px) {
  .task-card {
    grid-template-columns:
      24px minmax(0, 1fr) minmax(135px, 155px);
  }

  .task-extra-controls {
    grid-column: 2 / 3;
    grid-row: 2;
    width: min(100%, 320px);
  }

  .task-card__actions {
    grid-column: 3;
    grid-row: 2;
    justify-content: flex-end;
    align-self: center;
  }
}

/*
|--------------------------------------------------------------------------
| Планшет и телефон
|--------------------------------------------------------------------------
*/

@media (max-width: 760px) {
  .task-card {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
  }

  .task-card__drag {
    grid-column: 1;
    grid-row: 1 / span 4;
    align-self: start;
    padding-top: 10px;
  }

  .task-card__body {
    grid-column: 2;
    grid-row: 1;
  }

  .task-status-control {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }

  .task-extra-controls {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .task-card__actions {
    grid-column: 2;
    grid-row: 4;
    justify-content: flex-start;
    width: 100%;
    padding-top: 1px;
  }
}

/*
|--------------------------------------------------------------------------
| Очень маленькие экраны
|--------------------------------------------------------------------------
*/

@media (max-width: 430px) {
  .task-extra-controls {
    grid-template-columns: 1fr;
  }

  .task-due-control {
    max-width: none;
  }

  .task-card__actions {
    flex-wrap: wrap;
  }
}

/* ============================================================
   Checklist filters


.checklist-filters-card {
  padding: 16px 18px;
}

.checklist-filters-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.checklist-filters-card__header h3 {
  margin: 0;
  font-size: 17px;
}

.checklist-filter-reset {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

.checklist-filters {
  display: grid;
  gap: 13px;
}

.checklist-search {
  display: block;
}

.checklist-search input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.checklist-search input:focus {
  border-color: #76a8ec;
  box-shadow: 0 0 0 3px rgba(83, 150, 237, 0.12);
}

.checklist-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checklist-filter-group__label {
  width: 75px;
  flex: 0 0 75px;
  padding-top: 7px;
  color: #75859a;
  font-size: 11px;
  font-weight: 850;
}

.checklist-filter-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.checklist-filter-button {
  min-height: 29px;
  padding: 5px 8px;
  color: #64758d;
  background: #f5f8fc;
  border: 1px solid #dfe7f1;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.checklist-filter-button:hover {
  color: #456eaa;
  background: #edf4ff;
  border-color: #c5daf8;
}

.checklist-filter-button.is-active {
  color: #fff;
  background: #4e88d5;
  border-color: #4e88d5;
}

@media (max-width: 680px) {
  .checklist-filters-card {
    padding: 15px;
  }

  .checklist-filter-group {
    flex-direction: column;
    gap: 6px;
  }

  .checklist-filter-group__label {
    width: auto;
    flex-basis: auto;
    padding-top: 0;
  }
}
  ============================================================ */
/* ============================================================
   Checklist sidebar filters
   ============================================================ */

.checklist-sidebar-filters {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #e4ebf4;
}

.checklist-sidebar-filters__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.checklist-sidebar-filters__header .eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

.checklist-sidebar-filters__header h4 {
  margin: 0;
  color: #52657e;
  font-size: 13px;
}

.checklist-sidebar-filter-reset {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  color: #6f8098;
  background: #f5f8fc;
  border: 1px solid #dde6f1;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.checklist-sidebar-filter-reset:hover {
  color: #416fae;
  background: #eaf2ff;
  border-color: #c8daf5;
}

.checklist-sidebar-search {
  display: block;
}

.checklist-sidebar-search input {
  width: 100%;
  min-height: 35px;
  padding: 7px 9px;
  color: var(--text);
  outline: none;
  background: #fff;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  font-size: 12px;
}

.checklist-sidebar-search input:focus {
  border-color: #76a8ec;
  box-shadow: 0 0 0 3px rgba(83, 150, 237, 0.11);
}

.checklist-filter-details {
  overflow: hidden;
  background: #fafcff;
  border: 1px solid #e2eaf4;
  border-radius: 8px;
}

.checklist-filter-details summary {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  color: #687991;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 850;
}

.checklist-filter-details summary::-webkit-details-marker {
  display: none;
}

.checklist-filter-details summary::after {
  content: "⌄";
  color: #90a0b5;
  font-size: 14px;
  transition: transform 0.16s ease;
}

.checklist-filter-details[open] summary {
  border-bottom: 1px solid #e4ebf4;
}

.checklist-filter-details[open] summary::after {
  transform: rotate(180deg);
}

.checklist-filter-buttons--sidebar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 8px;
}

.checklist-filter-buttons--sidebar .checklist-filter-button {
  min-height: 26px;
  padding: 4px 6px;
  font-size: 10px;
}

@media (max-width: 900px) {
  .checklist-sidebar-filters {
    margin-top: 13px;
  }

  .checklist-filter-details {
    max-width: 100%;
  }
}

/* ============================================================
   Dashboard urgent tasks
   ============================================================ */

.dashboard-urgent-list {
  display: grid;
  gap: 8px;
}

.dashboard-urgent-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #fafcff;
  border: 1px solid #e2eaf3;
  border-left: 4px solid #8eabd0;
  border-radius: 10px;
}

.dashboard-urgent-item.priority-low {
  border-left-color: #a5b5c9;
}

.dashboard-urgent-item.priority-normal {
  border-left-color: #73a4e5;
}

.dashboard-urgent-item.priority-high {
  background: #fffaf0;
  border-color: #f0dfba;
  border-left-color: #dda344;
}

.dashboard-urgent-item.priority-critical {
  background: #fff5f6;
  border-color: #f0c9ce;
  border-left-color: #d45d6a;
}

.dashboard-urgent-item.is-overdue {
  background: linear-gradient(90deg, #fff0f2 0%, #fff 78%);
  border-color: #efc1c7;
  border-left-color: #c94756;
}

.dashboard-urgent-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-urgent-priority,
.dashboard-urgent-time {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-urgent-priority.priority-low {
  color: #697b94;
  background: #edf1f6;
}

.dashboard-urgent-priority.priority-normal {
  color: #416fae;
  background: #e8f1ff;
}

.dashboard-urgent-priority.priority-high {
  color: #9f7016;
  background: #fff0d4;
}

.dashboard-urgent-priority.priority-critical {
  color: #bd4654;
  background: #ffe8eb;
}

.dashboard-urgent-time {
  color: #64758d;
  background: #eef3f8;
}

.dashboard-urgent-time.is-overdue {
  color: #b94451;
  background: #ffe5e8;
}

.dashboard-urgent-item strong {
  overflow: hidden;
  color: #445870;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.dashboard-urgent-item small {
  color: #8190a4;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-urgent-item p {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  color: #728298;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.4;
}

/* ============================================================
   Dashboard urgent task actions
   ============================================================ */

.dashboard-urgent-item__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.dashboard-task-action,
.dashboard-task-open {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  color: #456faa;
  background: #edf4ff;
  border: 1px solid #cbdcf6;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.dashboard-task-action:hover,
.dashboard-task-open:hover {
  color: #315f9d;
  background: #e2eeff;
  border-color: #aecaf2;
}

.dashboard-task-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.dashboard-task-action--done {
  color: #297653;
  background: #eaf8ef;
  border-color: #cce8d7;
}

.dashboard-task-action--done:hover {
  color: #1f6444;
  background: #ddf3e6;
  border-color: #afd9c0;
}

@media (max-width: 540px) {
  .dashboard-urgent-item__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-task-open {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   Checklist task focus from dashboard
   ============================================================ */

.task-card.is-url-focused {
  position: relative;
  z-index: 2;
  border-color: #4c8fe8;
  box-shadow:
    0 0 0 4px rgba(76, 143, 232, 0.2),
    0 12px 28px rgba(52, 105, 181, 0.18);
  animation: checklist-task-focus 2.8s ease forwards;
}

@keyframes checklist-task-focus {
  0% {
    background: #e9f3ff;
    transform: translateY(-2px);
  }

  18% {
    background: #dcecff;
    transform: translateY(0);
  }

  100% {
    background: inherit;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-card.is-url-focused {
    animation: none;
  }
}

/* ============================================================
   Checklist sort control
   ============================================================ */

.checklist-sort-control {
  display: grid;
  min-width: 165px;
  gap: 4px;
}

.checklist-sort-control>span {
  color: #7b899d;
  font-size: 10px;
  font-weight: 800;
}

.checklist-sort-control select {
  width: 100%;
  min-height: 35px;
  padding: 6px 28px 6px 8px;
  color: #52657d;
  outline: none;
  background: #f8fafc;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
}

.checklist-sort-control select:focus {
  border-color: #76a8ec;
  box-shadow: 0 0 0 3px rgba(83, 150, 237, 0.12);
}

.checklist-sort-control select:disabled {
  cursor: default;
  opacity: 0.65;
}

@media (max-width: 900px) {
  .checklist-sort-control {
    width: 100%;
    max-width: 260px;
  }
}

@media (max-width: 680px) {
  .checklist-sort-control {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================
   New checklist task controls
   ============================================================ */

.new-task-form {
  grid-template-columns:
    minmax(220px, 1fr) minmax(115px, 135px) 88px auto;
  align-items: end;
}

.new-task-form__text {
  min-width: 0;
}

.new-task-form__priority,
.new-task-form__time {
  display: block;
}

.new-task-form__priority select,
.new-task-form__time input {
  width: 100%;
  min-height: 41px;
  padding: 9px 8px;
  color: #4f617a;
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.new-task-form__priority select:focus,
.new-task-form__time input:focus {
  border-color: #75a8ef;
  box-shadow: 0 0 0 3px rgba(80, 145, 234, 0.14);
}

@media (max-width: 980px) {
  .new-task-form {
    grid-template-columns: minmax(0, 1fr) 135px 88px;
  }

  .new-task-form>.btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .new-task-form {
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .new-task-form__text {
    grid-column: 1 / -1;
  }

  .new-task-form__priority {
    grid-column: 1;
  }

  .new-task-form__time {
    grid-column: 2;
  }
}

/* ============================================================
   Checklist compact section creation and top quick task form
   ============================================================ */

.checklist-sections__heading-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-add-button {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  color: #3f72b1;
  background: #eaf2ff;
  border: 1px solid #ccddf7;
  border-radius: 7px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.section-add-button:hover {
  color: #fff;
  background: #4e88d5;
  border-color: #4e88d5;
  transform: translateY(-1px);
}

.section-add-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 136, 213, 0.2);
}

/*
|--------------------------------------------------------------------------
| Форма быстрой задачи теперь находится под header секции.
|--------------------------------------------------------------------------
*/

.checklist-content>.new-task-form {
  margin-top: 0;
  margin-bottom: 16px;
  padding-top: 0;
  padding-bottom: 16px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.checklist-content>.new-task-form[hidden] {
  display: none;
}

/*
|--------------------------------------------------------------------------
| При отсутствии секций убираем лишнюю границу у скрытой формы.
|--------------------------------------------------------------------------
*/

.tasks-empty-state--compact {
  min-height: 180px;
  margin-top: 4px;
}

.tasks-empty-state--compact b {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #3f72b1;
  background: #eaf2ff;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 680px) {
  .section-add-button {
    width: 28px;
    height: 28px;
    font-size: 20px;
  }

  .checklist-content>.new-task-form {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
}

.task-category-badge {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--category-color, #7c8da6);
  border-radius: 10px;
  white-space: nowrap;
}

.task-category-badge {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--category-color, #7c8da6);
  border-radius: 10px;
  white-space: nowrap;
  margin-left: 6px;
}

.new-task-field__control {
  width: 100%;
  min-height: 41px;
  padding: 9px 8px;
  color: #4f617a;
  outline: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.task-category-control select {
  display: flex;
  align-items: center;
  gap: 6px;
  appearance: none;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  padding: 4px 28px 4px 10px;
  font-size: 13px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
  cursor: pointer;
  min-width: 140px;
}

.task-category-control select:hover {
  border-color: #cfd5dc;
}

.task-category-control select:focus {
  outline: none;
  border-color: #3f72b1;
  box-shadow: 0 0 0 3px rgba(63, 114, 177, 0.15);
}

.task-card.category-none .task-category-badge {
  display: none;
}

.section-count-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  color: #3f72b1;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.btn-icon:hover {
  border-color: #3f72b1;
  background: #eaf2ff;
}

.btn-icon:focus {
  outline: none;
  border-color: #3f72b1;
  box-shadow: 0 0 0 3px rgba(63, 114, 177, 0.15);
}

.dashboard-urgent-category {
  display: inline-grid;
  place-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--category-color, #7c8da6);
  border-radius: 10px;
  white-space: nowrap;
  margin-left: 6px;
}

/*Дни недели*/
.template-days {
  margin: 16px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.template-days__list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.day-btn {
  padding: 6px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.day-btn:hover {
  border-color: #3f72b1;
  color: #3f72b1;
}

.day-btn.is-active {
  background: #3f72b1;
  border-color: #3f72b1;
  color: #fff;
}

.checklist-section-item-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-section-item-wrapper .checklist-section-item {
  flex: 1;
  min-width: 0;
}

.section-day-select {
  appearance: none;
  width: 88px;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  padding: 4px 22px 4px 8px;
  font-size: 12px;
  color: #4b5563;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 12px;
  cursor: pointer;
}

.section-day-select:hover {
  border-color: #3f72b1;
}

.section-day-select:focus {
  outline: none;
  border-color: #3f72b1;
  box-shadow: 0 0 0 2px rgba(63, 114, 177, 0.15);
  <<<<<<< HEAD
}

.task-assignee-control select {
  appearance: none;
  border: 1px solid #dfe3e8;
  border-radius: 6px;
  padding: 4px 26px ß4px 8px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 14px;
  cursor: pointer;
  min-width: 150px;
}

.task-assignee-control select:focus {
  outline: none;
  border-color: #3f72b1;
  box-shadow: 0 0 0 3px rgba(63, 114, 177, 0.15);
}

.task-assignee-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  background: #eef2f7;
  =======>>>>>>>bd5e556f8b5f6fb74feac9edb5bf268613b91826
}