:root {
  --bg: #f1f5f2;
  --bg-accent: #e4ebe5;
  --surface: #ffffff;
  --surface-soft: #f7faf7;
  --border: #d4ddd6;
  --text: #1a2e22;
  --muted: #5a7262;
  --primary: #1a7a42;
  --primary-deep: #145e33;
  --success: #1a7a42;
  --warning: #c48a1a;
  --danger: #c43b3b;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-soft: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 10px 25px rgba(0,0,0,0.08);
  --sidebar-bg: #112118;
  --sidebar-text: #b4ccbc;
  --sidebar-active: rgba(34,160,80,0.18);
  --topbar-height: 56px;
}

html,
body {
  min-height: 100%;
}

body.public-shell {
  font-family: "Manrope", "Segoe UI", sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

main {
  position: relative;
}

body.is-search-loading .app-main-col {
  opacity: 0.92;
  transition: opacity 120ms ease-in-out;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

.app-shell-body {
  flex: 1;
  min-height: 0;
}

.app-right-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main-pad {
  padding: 0.95rem 1rem 1rem;
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: 0.005em;
  font-weight: 700;
}

.text-muted,
small,
.small {
  color: var(--muted) !important;
}

.app-topbar {
  border: none !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 0 !important;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1030;
  min-height: var(--topbar-height);
}

.app-sidebar-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--sidebar-bg) !important;
  box-shadow: none !important;
  overflow: hidden;
  min-height: 100%;
  max-height: 100vh;
  overflow-y: auto;
}

.app-sidebar-col {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding-left: 0;
  padding-right: 0;
  transition: width 0.2s ease;
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  z-index: 1040;
  background: var(--sidebar-bg);
  flex-shrink: 0;
}

.app-sidebar-nav {
  gap: 0;
  padding: 0.55rem;
  background: var(--sidebar-bg);
}

.app-sidebar-link {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  margin-bottom: 0.2rem;
  padding: 0.55rem 0.75rem 0.55rem 0.85rem;
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  transition: none;
  font-size: 0.875rem;
}

.app-sidebar-link:last-child {
  margin-bottom: 0;
}

.app-sidebar-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 1.1rem;
  margin-right: 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-sidebar-icon svg {
  width: 100%;
  height: 100%;
}

.app-sidebar-icon .bi {
  font-size: 1.05rem;
  line-height: 1;
}

.app-sidebar-text {
  white-space: nowrap;
}

.app-sidebar-toggle {
  min-width: 2rem;
  padding: 0.18rem 0.35rem;
  border-radius: 8px;
  line-height: 1;
  color: #ffffff;
  border-color: rgba(255,255,255,0.15);
}

.app-sidebar-toggle:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.app-sidebar-toggle-open,
.app-sidebar-toggle-close {
  font-size: 0.95rem;
}

.app-shell:not(.sidebar-collapsed) .app-sidebar-toggle-open {
  display: none;
}

.app-shell.sidebar-collapsed .app-sidebar-toggle-close {
  display: none;
}

.app-sidebar-link:hover,
.app-sidebar-link:focus {
  border-color: transparent !important;
  background: rgba(255,255,255,0.08) !important;
  color: #ffffff;
}

.app-sidebar-link:focus-visible {
  outline: 2px solid rgba(34, 160, 80, 0.5);
  outline-offset: 1px;
}

.app-sidebar-link.active,
.app-sidebar-link.active:hover,
.app-sidebar-link.active:focus {
  border-color: transparent !important;
  background: var(--sidebar-active) !important;
  color: #ffffff !important;
  box-shadow: none;
  font-weight: 600;
  border-left: 3px solid #22a050 !important;
}

.app-sidebar-link.active::before {
  content: none;
}

.app-sidebar-link.active .app-sidebar-icon,
.app-sidebar-link.active .app-sidebar-icon svg {
  color: #3be078;
}

.app-shell.sidebar-collapsed .app-sidebar-title {
  display: none;
}

.app-shell.sidebar-collapsed .app-sidebar-nav {
  padding: 0.45rem;
}

.app-shell.sidebar-collapsed .app-sidebar-link {
  justify-content: center;
  padding: 0.62rem 0.45rem;
}

.app-shell.sidebar-collapsed .app-sidebar-text {
  display: none;
}

.app-shell.sidebar-collapsed .app-sidebar-icon {
  margin-right: 0;
}

.app-sidebar-card .card-header {
  border-bottom: none;
  background: var(--sidebar-bg);
  color: #7a9b84;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.75rem 0.95rem;
}

.app-sidebar-nav .list-group-item {
  border: none !important;
  color: #ffffff !important;
}

.app-sidebar-card,
.app-sidebar-card .card-header,
.app-sidebar-card .app-sidebar-nav {
  background-color: var(--sidebar-bg) !important;
}

/* ── Table sorting ── */
.sortable-th {
  position: relative;
  white-space: nowrap;
  cursor: pointer;
}

.sortable-th:hover {
  background: rgba(0,0,0,0.04);
}

/* ── Clickable table rows ── */
tr[role="button"] {
  cursor: pointer;
}

tr[role="button"]:hover > td {
  background-color: rgba(26, 122, 66, 0.05);
}

tr[role="button"]:focus-visible {
  outline: 2px solid rgba(26, 122, 66, 0.4);
  outline-offset: -2px;
}

/* ── Card links (settings / reports grids) ── */
a.text-decoration-none > .card {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a.text-decoration-none:hover > .card {
  border-color: #6db88a;
  box-shadow: 0 4px 12px rgba(26, 122, 66, 0.1);
}

a.text-decoration-none:focus-visible > .card {
  outline: 2px solid rgba(26, 122, 66, 0.4);
  outline-offset: 2px;
}

.sort-indicator {
  font-size: 0.7em;
  opacity: 0.7;
  margin-left: 2px;
}

.sortable-th:not(.sort-asc):not(.sort-desc):hover .sort-indicator::after {
  content: " ⇅";
  font-size: 0.85em;
  opacity: 0.4;
}

/* ── Global sidebar search ── */
.app-global-search-wrap {
  padding-top: 0.35rem;
}

.app-global-search-wrap .form-control {
  border-radius: 8px;
  font-size: 0.875rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #ddeee2;
  padding: 0.45rem 0.65rem;
}

.app-global-search-wrap .form-control::placeholder {
  color: #7a9b84;
}

.app-global-search-wrap .form-control:focus {
  background: rgba(255,255,255,0.15);
  border-color: #22a050;
  color: #ffffff;
  box-shadow: none;
}

.app-global-search-results {
  position: fixed;
  z-index: 1050;
  min-width: 680px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.gs-group {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  margin-bottom: 0.25rem;
}

.gs-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.gs-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.2rem;
  letter-spacing: 0.04em;
}

.gs-item {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  /* Лейбл виден целиком: длинные строки переносятся, а не обрезаются
     многоточием — иначе хвост (компания, бэдж Inactive) терялся. */
  white-space: normal;
  overflow-wrap: anywhere;
}

.gs-item:hover {
  background: #f1f5f9;
  color: var(--primary-deep);
}

.gs-badge-inactive {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.gs-empty {
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  color: #888;
}

.app-shell.sidebar-collapsed .app-global-search-wrap {
  display: none;
}

@media (min-width: 768px) {
  .app-sidebar-col {
    width: 190px;
    max-width: 190px;
    flex: 0 0 190px;
  }

  .app-shell.sidebar-collapsed .app-sidebar-col {
    width: 56px;
    max-width: 56px;
    flex: 0 0 56px;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.card-header {
  border-bottom: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  background: var(--surface-soft);
  font-weight: 700;
}

.list-group-item {
  border-color: var(--border);
  color: var(--text);
}

.list-group-item.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────────
   Custom button system — Linear/Stripe-inspired strict flat buttons.
   Overrides all Bootstrap .btn-* and .btn-outline-* variants project-wide.
   Sizes (padding/font-size/line-height) follow Bootstrap defaults so
   layouts are not affected.
   ───────────────────────────────────────────────────────────────────── */
.btn {
  --bs-btn-border-width: 1px;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background-color .12s ease, border-color .12s ease,
              color .12s ease, box-shadow .12s ease, transform .04s ease;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, .12);
}
.btn:active { transform: translateY(0.5px); }

/* Solid variants — flat, single colour, darker on hover */
.btn-primary {
  --bs-btn-bg: #1f2937;            /* slate-800 */
  --bs-btn-border-color: #1f2937;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #111827;       /* slate-900 */
  --bs-btn-hover-border-color: #111827;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #0b1220;
  --bs-btn-active-border-color: #0b1220;
  --bs-btn-disabled-bg: #1f2937;
  --bs-btn-disabled-border-color: #1f2937;
}
.btn-secondary {
  --bs-btn-bg: #f1f5f9;             /* slate-100 */
  --bs-btn-border-color: #cbd5e1;   /* slate-300 */
  --bs-btn-color: #1f2937;
  --bs-btn-hover-bg: #e2e8f0;
  --bs-btn-hover-border-color: #94a3b8;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-active-bg: #cbd5e1;
  --bs-btn-active-border-color: #94a3b8;
}
.btn-success {
  --bs-btn-bg: #16a34a;             /* green-600 */
  --bs-btn-border-color: #16a34a;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #15803d;
  --bs-btn-hover-border-color: #15803d;
  --bs-btn-active-bg: #166534;
  --bs-btn-active-border-color: #166534;
  --bs-btn-disabled-bg: #16a34a;
  --bs-btn-disabled-border-color: #16a34a;
}
.btn-danger {
  --bs-btn-bg: #dc2626;             /* red-600 */
  --bs-btn-border-color: #dc2626;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #b91c1c;
  --bs-btn-hover-border-color: #b91c1c;
  --bs-btn-active-bg: #991b1b;
  --bs-btn-active-border-color: #991b1b;
  --bs-btn-disabled-bg: #dc2626;
  --bs-btn-disabled-border-color: #dc2626;
}
.btn-warning {
  --bs-btn-bg: #f59e0b;             /* amber-500 */
  --bs-btn-border-color: #f59e0b;
  --bs-btn-color: #1f2937;
  --bs-btn-hover-bg: #d97706;
  --bs-btn-hover-border-color: #d97706;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #b45309;
  --bs-btn-active-border-color: #b45309;
}
.btn-info {
  --bs-btn-bg: #0891b2;             /* cyan-600 */
  --bs-btn-border-color: #0891b2;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #0e7490;
  --bs-btn-hover-border-color: #0e7490;
  --bs-btn-active-bg: #155e75;
  --bs-btn-active-border-color: #155e75;
}
.btn-light {
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #e2e8f0;
  --bs-btn-color: #1f2937;
  --bs-btn-hover-bg: #f8fafc;
  --bs-btn-hover-border-color: #cbd5e1;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-active-bg: #f1f5f9;
  --bs-btn-active-border-color: #94a3b8;
}
.btn-dark {
  --bs-btn-bg: #0f172a;
  --bs-btn-border-color: #0f172a;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #020617;
  --bs-btn-hover-border-color: #020617;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
}

/* Outline variants — white background, coloured border + text */
.btn-outline-primary {
  --bs-btn-color: #1f2937;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-bg: #1f2937;
  --bs-btn-hover-border-color: #1f2937;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #111827;
  --bs-btn-active-border-color: #111827;
  --bs-btn-active-color: #fff;
}
.btn-outline-secondary {
  --bs-btn-color: #475569;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-bg: #f1f5f9;
  --bs-btn-hover-border-color: #94a3b8;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-active-bg: #e2e8f0;
  --bs-btn-active-border-color: #64748b;
  --bs-btn-active-color: #0f172a;
}
.btn-outline-success {
  --bs-btn-color: #15803d;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #86efac;
  --bs-btn-hover-bg: #16a34a;
  --bs-btn-hover-border-color: #16a34a;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #15803d;
  --bs-btn-active-border-color: #15803d;
  --bs-btn-active-color: #fff;
}
.btn-outline-danger {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #dc2626;
  --bs-btn-border-color: #dc2626;
  --bs-btn-hover-bg: #b91c1c;
  --bs-btn-hover-border-color: #b91c1c;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #991b1b;
  --bs-btn-active-border-color: #991b1b;
  --bs-btn-active-color: #fff;
}
.btn-outline-warning {
  --bs-btn-color: #92400e;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #fcd34d;
  --bs-btn-hover-bg: #f59e0b;
  --bs-btn-hover-border-color: #f59e0b;
  --bs-btn-hover-color: #1f2937;
  --bs-btn-active-bg: #d97706;
  --bs-btn-active-border-color: #d97706;
  --bs-btn-active-color: #fff;
}
.btn-outline-info {
  --bs-btn-color: #155e75;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #67e8f9;
  --bs-btn-hover-bg: #0891b2;
  --bs-btn-hover-border-color: #0891b2;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #0e7490;
  --bs-btn-active-border-color: #0e7490;
  --bs-btn-active-color: #fff;
}
.btn-outline-dark {
  --bs-btn-color: #0f172a;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-bg: #0f172a;
  --bs-btn-hover-border-color: #0f172a;
  --bs-btn-hover-color: #fff;
}

.form-label {
  margin-bottom: 0.35rem;
  color: #334155;
  font-weight: 600;
}

.form-control,
.form-select,
textarea.form-control {
  border: 1px solid #94a3b8;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(26, 122, 66, 0.15);
}

input[type="date"].form-control,
input[type="date"].form-select,
input[type="date"] {
  border-color: #94a3b8;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  min-height: calc(1.5em + 0.75rem + 2px);
}

input[type="date"]:hover {
  border-color: #6db88a;
}

input[type="date"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(26, 122, 66, 0.15);
}

input[type="date"]::-webkit-datetime-edit {
  color: var(--text);
  font-weight: 600;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  background-color: rgba(26, 122, 66, 0.1);
  transition: background-color 0.15s ease;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator {
  background-color: rgba(26, 122, 66, 0.2);
}

.ss-date-input {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: var(--text) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%231a7a42' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='12' height='11' rx='2'/%3E%3Cpath d='M5 1.8v2.6M11 1.8v2.6M2.8 6.2h10.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  cursor: pointer;
}

.ss-date-input:hover {
  border-color: #6db88a !important;
}

.ss-date-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(26, 122, 66, 0.15) !important;
}

.flatpickr-calendar {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  overflow: hidden;
}

.flatpickr-months {
  background: var(--primary);
  color: #ffffff;
}

.flatpickr-current-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #ffffff !important;
  fill: #ffffff !important;
  font-weight: 700;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: #ffffff !important;
  fill: #ffffff !important;
}

.flatpickr-weekdays {
  background: #f1f5f9;
}

span.flatpickr-weekday {
  color: #475569;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}

.flatpickr-day:hover {
  background: #e0f2fe;
  border-color: #e0f2fe;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.flatpickr-day.today {
  border-color: var(--primary);
  color: var(--primary);
}

.flatpickr-day.today:hover {
  background: #dbeafe;
  border-color: var(--primary);
}

.wo-filter-form {
  position: relative;
  margin-left: 0;
  margin-right: 0;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}

.wo-filter-form .wo-date-row {
  margin-top: 0.15rem;
  padding: 0.1rem 0;
}

@media (min-width: 768px) {
  .wo-filter-form {
    padding-right: 6.5rem;
  }

  .wo-filter-form .wo-reset-wrap {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
  }
}

.wo-filter-form .date-preset-select {
  border-color: #cbd5e1;
  background-color: #ffffff;
  font-weight: 600;
  color: var(--text);
}

.wo-filter-form .date-range-group {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.wo-filter-form .date-range-group .input-group-text {
  border: 0;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wo-filter-form .date-range-group .date-filter-input {
  border: 0;
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
}

.wo-filter-form .date-range-group .date-filter-input:focus {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.wo-filter-form .date-filter-input::-webkit-calendar-picker-indicator {
  opacity: 0.95;
  border-radius: 6px;
  padding: 2px;
  background-color: rgba(59, 130, 246, 0.1);
}

.wo-totals-center {
  display: flex;
  justify-content: center;
}

.wo-pagination-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wo-pagination-meta {
  white-space: nowrap;
}

.wo-pagination-totals {
  flex: 1 1 auto;
}

.wo-pagination-actions {
  flex: 0 0 auto;
}

/* WO list: выделенная группа "In Work" (взяты механиками, done не нажат) */
.wo-table-group-row td {
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background-color: rgba(26, 122, 66, 0.08);
  border-bottom: 0;
}

.wo-inwork-group > tr > td {
  background-color: rgba(26, 122, 66, 0.04);
}

.wo-inwork-group > tr:last-child > td {
  border-bottom: 2px solid rgba(26, 122, 66, 0.35);
}

.wo-totals-box {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.wo-totals-box strong {
  color: var(--primary);
}

@media (max-width: 767.98px) {
  .wo-pagination-row {
    flex-wrap: wrap;
  }

  .wo-pagination-meta,
  .wo-pagination-totals,
  .wo-pagination-actions {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.table-responsive {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.table {
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--border);
  padding: 0.42rem 0.68rem !important;
  vertical-align: middle;
}

.table > thead > tr > th {
  border-bottom-width: 1px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table > tbody > tr {
  transition: background-color 0.15s ease;
}

.table > tbody > tr:nth-child(odd) {
  background-color: #ffffff;
}

.table > tbody > tr:nth-child(even) {
  background-color: #f8fafc;
}

.table > tbody > tr:hover > td {
  background-color: #f1f5f9 !important;
}

.table > tbody > tr:focus-within > td {
  background-color: #e2e8f0 !important;
}

/* ── Склад: строки ниже / близко к минимальному остатку (Parts, min stock) ── */
.table > tbody > tr.stock-row--below > td {
  background-color: #fef2f2;
}

.table > tbody > tr.stock-row--below > td:first-child {
  box-shadow: inset 3px 0 0 #dc3545;
}

.table > tbody > tr.stock-row--near > td {
  background-color: #fffbeb;
}

.table > tbody > tr.stock-row--near > td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

/* ── AI assistant widget (открывается из сайдбара) ───────────────── */
.assistant-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1045;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 540px;
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.assistant-panel.d-none {
  display: none;
}

.assistant-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.assistant-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0.25rem;
  opacity: 0.6;
}

.assistant-close:hover {
  opacity: 1;
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.assistant-msg {
  max-width: 88%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  overflow-wrap: break-word;
}

.assistant-msg-user {
  align-self: flex-end;
  background: #0d6efd;
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.assistant-msg-assistant {
  align-self: flex-start;
  background: #f1f5f9;
  color: #0f172a;
  border-bottom-left-radius: 0.25rem;
}

.assistant-msg-error {
  background: #fdecec;
  color: #b42318;
}

.assistant-typing {
  opacity: 0.6;
}

.assistant-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.75rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.assistant-input-row textarea {
  resize: none;
}

/* Section header rows inside data tables (Standard Reports etc.):
   контрастная полоса-заголовок группы, не реагирует на hover. */
.table > tbody > tr.table-section-row > td {
  background-color: #e2e8f0 !important;
  color: #334155;
}

.table > tbody > tr.table-section-row:hover > td,
.table > tbody > tr.table-section-row:focus-within > td {
  background-color: #e2e8f0 !important;
}

/* Show row actions only for the hovered/focused row. */
.table > tbody > tr > td.text-end:has(.btn, button, form, a) .btn,
.table > tbody > tr > td.text-end:has(.btn, button, form, a) button,
.table > tbody > tr > td.text-end:has(.btn, button, form, a) form,
.table > tbody > tr > td.text-end:has(.btn, button, form, a) a {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.table > tbody > tr:hover > td.text-end:has(.btn, button, form, a) .btn,
.table > tbody > tr:hover > td.text-end:has(.btn, button, form, a) button,
.table > tbody > tr:hover > td.text-end:has(.btn, button, form, a) form,
.table > tbody > tr:hover > td.text-end:has(.btn, button, form, a) a,
.table > tbody > tr:focus-within > td.text-end:has(.btn, button, form, a) .btn,
.table > tbody > tr:focus-within > td.text-end:has(.btn, button, form, a) button,
.table > tbody > tr:focus-within > td.text-end:has(.btn, button, form, a) form,
.table > tbody > tr:focus-within > td.text-end:has(.btn, button, form, a) a {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Touch devices have no :hover. Always show row action buttons there
   so they remain reachable. */
@media (hover: none) {
  .table > tbody > tr > td.text-end:has(.btn, button, form, a) .btn,
  .table > tbody > tr > td.text-end:has(.btn, button, form, a) button,
  .table > tbody > tr > td.text-end:has(.btn, button, form, a) form,
  .table > tbody > tr > td.text-end:has(.btn, button, form, a) a {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.badge {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modal-content {
  border: 1px solid #cfd8d1;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.modal-footer {
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.alert {
  border-radius: var(--radius-sm);
  border-width: 1px;
}

/* Unified tab style across the app (matches Customer Portal). */
.nav-tabs {
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  padding-bottom: 0;
}

.nav-tabs .nav-link {
  color: #145e33;
  font-weight: 600;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0.65rem 1.1rem;
  background: transparent;
  transition: none;
}

.tab-content > .tab-pane {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: #145e33;
  background: transparent;
  border-color: transparent transparent #c8e0d3;
  isolation: auto;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  color: #145e33;
  background: transparent;
  border-color: transparent transparent #145e33;
  box-shadow: none;
}

.nav-tabs .nav-link.disabled {
  color: #9ca3af;
  border-color: transparent;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-deep);
}

@media (max-width: 992px) {
  .app-topbar .ms-auto {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .app-topbar form .form-select {
    min-width: 180px !important;
  }
}

@media (max-width: 768px) {
  .app-sidebar-col {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .app-sidebar-card {
    max-height: none;
    overflow: visible;
  }

  .container-fluid,
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .app-sidebar-card {
    border-radius: 0;
  }

  .app-sidebar-title {
    display: inline;
  }

  .app-sidebar-link {
    transform: none !important;
  }

  .app-topbar {
    padding: 0.8rem !important;
  }

  .table > :not(caption) > * > * {
    padding: 0.34rem 0.5rem !important;
  }
}

/* -- Parts search dropdown (work order details) ------------------- */

.parts-dd {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,.15));
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  color: var(--text, #1a2e22);
}

.parts-dd-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
}

.parts-dd-item:last-child {
  border-bottom: 0;
}

.parts-dd-item:hover,
.parts-dd-item:focus,
.parts-dd-item.is-active {
  background: var(--surface-soft, #f1f3f5);
}

.parts-dd-item-onetime {
  background: var(--surface-soft, #f8f9fa);
}

/* Взаимозаменяемый парт (cross reference) под основным результатом поиска */
.parts-dd-item-alt {
  padding-left: 28px;
  background: var(--surface-soft, #f8f9fa);
  border-left: 3px solid var(--border, rgba(0,0,0,.15));
}

/* То же для автокомплитов на list-group (парт-ордера, кросс-рефы) */
.cross-ref-alt-item {
  padding-left: 1.9rem !important;
  border-left: 3px solid var(--border, rgba(0,0,0,.15));
}

.parts-dd-title {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text, #1a2e22);
}

.parts-dd-meta {
  font-size: 12px;
  color: var(--muted, #6c757d);
  margin-top: 2px;
}

.parts-dd-empty {
  padding: 10px;
  color: var(--muted, #6c757d);
}

/* ── Icon tiles (карточки Settings / Reports и т.п.) ─────────────────
   Единый класс вместо инлайн-стилей: фон и цвет иконки задаются
   вариантом, SVG внутри должен использовать stroke="currentColor".
   Тёмные варианты — в theme_dark.css. */
.icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.icon-tile-lg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 40px;
}
.icon-tile-green { background: #edf7f0; color: #1a7a42; }
.icon-tile-amber { background: #fdf6ec; color: #c48a1a; }
.icon-tile-sage  { background: #f0f5f2; color: #2d8b58; }
.icon-tile-blue  { background: #eef3fb; color: #3a6fbf; }
.icon-tile-red   { background: #fdf0ec; color: #c43b3b; }

/* Скруглённые модалки (вместо инлайн border-radius) */
.modal-content-rounded {
  border-radius: 16px;
  overflow: hidden;
}

/* Почти полноэкранная модалка (истории, большие таблицы) */
.modal-dialog-wide {
  max-width: 95%;
}

/* ── Бренд в топбаре (вместо инлайн-стиля в app_base) ───────────────── */
.app-topbar .navbar-brand {
  color: #16a34a;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  -webkit-text-stroke: 1px #16a34a;
}

.topbar-shop-select {
  min-width: 220px;
}

/* ── Пустые состояния списков/таблиц ─────────────────────────────────
   Использовать через макрос empty_state() из components/ui.html. */
.empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--muted);
}

.empty-state-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.empty-state-hint {
  font-size: 0.85rem;
}

/* ── Мелкие утилиты (вместо повторяющихся инлайн-стилей) ────────────── */
/* Компактный спиннер в ячейках таблиц */
.spinner-border-xs {
  width: 0.75rem;
  height: 0.75rem;
  border-width: 0.14em;
}

/* Кастомные поисковые дропдауны (parts, presets, calendar и т.п.) */
.dd-scroll {
  z-index: 1060;
  max-height: 260px;
  overflow-y: auto;
}

/* Dropdown-меню с чекбокс-фильтром (reports) */
.dropdown-menu-filter {
  min-width: 100%;
  max-height: 350px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
}

/* Обёртка графика Chart.js фиксированной высоты */
.chart-wrap {
  position: relative;
  height: 320px;
}

/* Прокручиваемый <pre> с логом/JSON */
.pre-scroll {
  max-height: 240px;
  overflow: auto;
}

.pre-scroll-lg {
  max-height: 480px;
}

/* Пунктирная карточка-плейсхолдер («добавить ещё», пустой слот) */
.card-dashed {
  border-style: dashed !important;
}

/* Узкая форма/инпут внутри широкой страницы */
.form-narrow {
  max-width: 400px;
}

/* ── Раскрываемые строки таблиц (общий паттерн) ──────────────────────
   Таблица .table-row-groups: одна запись = один <tbody> (строка записи +
   скрытая строка-деталь .table-detail-row), зебра идёт по записям, а не по
   <tr>. Кнопка .row-toggle[data-row-toggle="#id"] показывает/прячет деталь,
   [data-row-toggle-all="#table"] — все сразу (обработчик в public.js). */
.table.table-row-groups > tbody:nth-of-type(odd) > tr {
  background-color: #ffffff;
}

.table.table-row-groups > tbody:nth-of-type(even) > tr {
  background-color: #f8fafc;
}

.row-toggle,
.row-toggle-spacer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.15rem;
  vertical-align: middle;
}

.row-toggle {
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.row-toggle:hover,
.row-toggle:focus-visible {
  background: var(--bg-accent);
  color: var(--text);
}

.row-toggle .bi {
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.row-toggle[aria-expanded="true"] .bi {
  transform: rotate(90deg);
}

.table > tbody > tr.table-detail-row > td,
.table > tbody > tr.table-detail-row:hover > td,
.table > tbody > tr.table-detail-row:focus-within > td {
  padding: 0;
  background-color: var(--surface-soft) !important;
}

.table-detail-panel {
  padding: 0.6rem 1rem 0.75rem 2.6rem;
  border-left: 3px solid var(--primary);
}

/* Компактная сетка внутри строки-детали: подпись | содержимое | число.
   Сетка из <div> (role="table"), а не вложенная <table>: правила скрытия
   колонок flex_tables.js («tr > *:nth-child») задели бы вложенные <tr>. */
.detail-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  width: fit-content;
  min-width: min(100%, 520px);
  max-width: 100%;
  font-size: 0.82rem;
  color: var(--text);
}

.detail-grid-row {
  display: contents;
}

.detail-grid-head,
.detail-grid-cell {
  padding: 0.3rem 1.25rem 0.3rem 0;
}

.detail-grid-head {
  padding-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-grid-cell {
  border-top: 1px solid var(--border);
}

.detail-grid-head:last-child,
.detail-grid-cell:last-child {
  padding-right: 0;
}

.detail-grid-span2 {
  grid-column: span 2;
}

.detail-grid .text-end {
  font-variant-numeric: tabular-nums;
}

/* бэдж внутри мелкой сетки — не мельче её текста */
.detail-grid .badge {
  font-size: 0.78rem;
}

/* ── VIN-валидация (общая для WO details и unit details) ───────────── */
.vin-checking { border-color: #0d6efd !important; background-color: #e7f1ff !important; }
.vin-valid    { border-color: #198754 !important; }
.vin-invalid  { border-color: #dc3545 !important; }

/* ── Раскрытые работы WO (история юнита): карточка на работу ───────── */
.wo-labors-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.wo-labors-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wo-labors-item-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  flex-wrap: wrap;
}

.wo-labors-item-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 122, 66, 0.12);
  color: #1a7a42;
  font-size: 0.8rem;
}

.wo-labors-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
}

.wo-labors-hours-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  white-space: nowrap;
}

.wo-labors-item-total {
  margin-left: auto;
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}

.wo-labors-item-total strong {
  color: #0f172a;
}

.wo-labors-parts-table {
  font-size: 0.8rem;
}

.wo-labors-parts-table td,
.wo-labors-parts-table th {
  padding: 0.35rem 0.8rem;
}

.wo-labors-parts-table td.text-end,
.wo-labors-parts-table th.text-end {
  font-variant-numeric: tabular-nums;
}

.wo-labors-part-number {
  font-weight: 600;
}

.wo-labors-noparts {
  font-size: 0.78rem;
  padding: 0 0.8rem 0.6rem;
}

/* ── Flex tables: меню колонок, ресайз (см. static/js/flex_tables.js) ── */
.ft-host { position: relative; }

.ft-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 22px;
  margin-bottom: 3px;
}

.ft-gear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e0e5ec;
  background: transparent;
  color: #6b7280;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.ft-gear svg { flex: none; }
.ft-gear:hover,
.ft-gear:focus {
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.45);
  background: rgba(13, 110, 253, 0.05);
}

.ft-menu {
  display: none;
  position: absolute;
  top: 20px;
  right: 3px;
  z-index: 40;
  min-width: 210px;
  max-height: 340px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 4px 0 2px;
}
.ft-menu.show { display: block; }

.ft-menu__title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a93a2;
  padding: 6px 12px 4px;
}

.ft-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}
.ft-menu__item:hover { background: rgba(13, 110, 253, 0.07); }
.ft-menu__item .form-check-input { margin: 0; flex: none; }

.ft-menu__reset {
  display: block;
  width: calc(100% - 24px);
  margin: 6px 12px 8px;
  padding: 3px 8px;
  font-size: 0.8rem;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
}
.ft-menu__reset:hover { background: rgba(0, 0, 0, 0.05); color: #374151; }

.ft-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  user-select: none;
}
/* Постоянный разделитель между колонками шапки — видно, что колонки
   можно тянуть; при наведении разгорается и растягивается на всю высоту */
.ft-resize-handle::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  left: 3px;
  width: 2px;
  border-radius: 2px;
  background: rgba(100, 116, 139, 0.28);
  transition: background-color 0.12s ease, top 0.12s ease, bottom 0.12s ease;
}
.ft-resize-handle:hover::after,
body.ft-resizing .ft-resize-handle::after {
  top: 8%;
  bottom: 8%;
  background: rgba(13, 110, 253, 0.65);
}
/* У последней колонки разделитель не рисуем — край таблицы */
th:last-child > .ft-resize-handle::after { background: transparent; }
th:last-child > .ft-resize-handle:hover::after,
body.ft-resizing th:last-child > .ft-resize-handle::after { background: rgba(13, 110, 253, 0.65); }

body.ft-resizing { cursor: col-resize; user-select: none; }

/* ── Activity Journal (Reports → Activity Journal) ── */
.journal-row[data-bs-toggle="collapse"] {
  cursor: pointer;
}

.journal-row--technical td {
  color: #6c757d;
}

.journal-row--failed td:first-child {
  box-shadow: inset 3px 0 0 #dc3545;
}

.journal-expand-hint {
  color: #9aa0a6;
  font-style: italic;
}

.journal-details-cell {
  background: #f8f9fa;
  border-top: 0 !important;
  padding: .6rem 1rem .8rem 1.5rem !important;
}

.journal-changes {
  max-width: 980px;
  font-size: .85rem;
}

.journal-changes td {
  word-break: break-word;
}

.journal-old {
  color: #b02a37;
  text-decoration: line-through;
  text-decoration-color: rgba(176, 42, 55, .45);
}

.journal-new {
  color: #146c43;
  font-weight: 500;
}

.journal-payload {
  font-size: .75rem;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: .5rem;
}

/* AI-помощник: скриншоты и ссылки на уроки Education Center в ответах */
.assistant-shot {
  display: block;
  margin: 0.4rem 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}
.assistant-shot img { display: block; width: 100%; height: auto; }
.assistant-shot-caption {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.3rem 0.5rem;
}
.assistant-lesson-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.assistant-lesson-link:hover { text-decoration: underline; }
.assistant-edu-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.assistant-edu-link:hover { text-decoration: underline; }
