/* ============================================
   ЦУП Руслайн — дизайн-система в стиле «Графика смен РусЛайн»
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Фирменные токены графика смен */
  --rusline: #d42027;
  --rusline-dark: #9b1219;
  --rusline-soft: rgba(212, 32, 39, 0.09);
  --ink: #161a20;
  --ink-2: #5c6673;
  --ink-3: #98a2b0;
  --line: #e3e7ec;
  --line-2: #eff2f5;
  --weekend: #c0503e;
  --weekend-bg: #fff7f5;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Переменные, на которые ссылаются шаблоны (переназначены на фирменные) */
  --color-primary: var(--rusline);
  --color-primary-light: var(--rusline);
  --color-primary-dark: var(--rusline-dark);
  --color-accent: #0e9f6e;
  --color-accent-light: #10b981;
  --color-destructive: #d42027;
  --color-destructive-light: #fcebed;
  --color-warning: #b97812;
  --color-warning-light: #fff7e7;

  --bg-body: #f5f6f8;
  --bg-card: #ffffff;
  --bg-muted: #f8f9fb;
  --bg-hover: #f7f8fa;

  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --text-inverse: #ffffff;

  --border-color: var(--line);
  --border-light: var(--line-2);

  --shadow-sm: 0 1px 2px rgba(20, 25, 35, 0.04);
  --shadow-md: 0 1px 2px rgba(20, 25, 35, 0.04), 0 10px 30px -14px rgba(20, 25, 35, 0.14);
  --shadow-lg: 0 10px 24px -18px rgba(20, 25, 35, 0.5);
  --shadow-xl: 0 24px 80px -26px rgba(10, 14, 20, 0.55);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Bootstrap */
  --bs-body-font-family: var(--font);
  --bs-body-color: #161a20;
  --bs-body-bg: #f5f6f8;
  --bs-primary: #d42027;
  --bs-primary-rgb: 212, 32, 39;
  --bs-secondary-rgb: 92, 102, 115;
  --bs-link-color: #d42027;
  --bs-link-color-rgb: 212, 32, 39;
  --bs-link-hover-color: #9b1219;
  --bs-link-hover-color-rgb: 155, 18, 25;
  --bs-border-color: #e3e7ec;
  --bs-secondary-color: #5c6673;
  --bs-focus-ring-color: rgba(212, 32, 39, 0.25);
}

/* --- Global Reset & Base --- */
* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-body);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--rusline-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 800;
  letter-spacing: 0;
}

.fw-semibold {
  font-weight: 700 !important;
}

/* --- Navbar --- */
.navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none;
  padding: 0.65rem 0;
  backdrop-filter: saturate(1.4) blur(10px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink) !important;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand-logo {
  display: block;
  width: auto;
  height: 40px;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1.5px;
  height: 26px;
  border-radius: 2px;
  background: var(--line);
}

.brand-text {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.navbar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-2) !important;
  font-weight: 700;
  font-size: 13px;
  padding: 0.5rem 0.8rem !important;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar-nav .nav-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.navbar-nav .nav-link:hover {
  color: var(--ink) !important;
  background: var(--line-2);
}

.navbar-nav .nav-link.active {
  color: var(--rusline) !important;
  background: var(--rusline-soft);
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .navbar > .container-fluid {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .navbar-nav {
    order: 3;
    width: 100%;
    flex-direction: row;
    gap: 2px;
    margin: 0 !important;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .navbar-nav::-webkit-scrollbar {
    display: none;
  }
}

/* --- Main Container --- */
main.container-fluid {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

/* --- Cards & Panels --- */
.card, .bg-white {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.card:hover, .bg-white:hover {
  box-shadow: var(--shadow-md);
}

/* --- Login Panel --- */
.login-shell {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  background: transparent;
}

.login-panel, .form-panel {
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.login-panel {
  width: 100%;
}

.login-logo {
  display: block;
  width: 210px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 1.1rem;
}

.login-panel h2, .form-panel h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

.form-panel h2.h5 {
  font-size: 17px;
}

.login-panel p, .form-panel p {
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}

.login-panel input, .form-panel input,
.form-panel select, .form-panel textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-panel input:focus, .form-panel input:focus,
.form-panel select:focus, .form-panel textarea:focus {
  outline: none;
  border-color: var(--rusline);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--rusline-soft);
}

.form-panel label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 800;
  font-size: 12px;
  color: var(--ink-2);
}

.form-panel .errorlist {
  list-style: none;
  padding-left: 0;
  margin: 0.4rem 0 0;
  color: var(--color-destructive);
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  font-weight: 700;
  border-radius: 9px;
  padding: 0.55rem 1.1rem;
  font-size: 13.5px;
  letter-spacing: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--rusline) !important;
  border-color: var(--rusline) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -8px rgba(155, 18, 25, 0.55);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--rusline-dark) !important;
  border-color: var(--rusline-dark) !important;
  box-shadow: 0 8px 18px -10px rgba(155, 18, 25, 0.6);
}

.btn-primary:disabled {
  opacity: 0.6;
}

.btn-outline-primary {
  color: var(--rusline) !important;
  border: 1.5px solid var(--line) !important;
  background: var(--bg-card) !important;
}

.btn-outline-primary:hover {
  background: var(--rusline-soft) !important;
  border-color: var(--rusline) !important;
  color: var(--rusline) !important;
}

.btn-outline-secondary {
  color: var(--ink-2) !important;
  border: 1.5px solid var(--line) !important;
  background: var(--bg-card) !important;
}

.btn-outline-secondary:hover {
  color: var(--ink) !important;
  background: var(--bg-card) !important;
  border-color: var(--ink-3) !important;
}

.btn-outline-danger {
  color: var(--rusline) !important;
  border: 1.5px solid var(--line) !important;
  background: var(--bg-card) !important;
}

.btn-outline-danger:hover {
  background: var(--color-destructive-light) !important;
  border-color: var(--rusline) !important;
}

/* --- Stock Grid (Cards) --- */
.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.stock-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-xl);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stock-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, var(--rusline-soft), transparent 70%);
  pointer-events: none;
}

.stock-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stock-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.stock-danger {
  border-left-color: var(--color-destructive);
  background: linear-gradient(135deg, #fff5f5 0%, var(--bg-card) 100%);
}

.stock-danger .stock-number {
  color: var(--color-destructive);
}

.stock-warning {
  border-left-color: var(--color-warning);
  background: linear-gradient(135deg, #fff9eb 0%, var(--bg-card) 100%);
}

.stock-warning .stock-number {
  color: var(--color-warning);
}

.stock-ok {
  border-left-color: var(--color-accent);
}

.stock-ok .stock-number {
  color: var(--color-accent);
}

.stock-unknown {
  border-left-color: var(--ink-3);
  background: var(--bg-muted);
}

.stock-unknown .stock-number {
  color: var(--ink-3);
}

/* --- Table --- */
.table {
  font-size: 13.5px;
  --bs-table-bg: transparent;
}

.table thead th {
  background: var(--bg-muted);
  color: var(--ink-3);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--bg-hover) !important;
}

.stock-row.stock-danger td {
  background: #fff5f5;
}

.stock-row.stock-warning td {
  background: #fff9eb;
}

/* --- Сертификаты дезинсекции --- */
.cert-row td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.cert-row td:first-child {
  box-shadow: inset 5px 0 0 var(--line);
}

.cert-row.cert-success td {
  background: #f2faf6;
}

.cert-row.cert-success td:first-child {
  box-shadow: inset 5px 0 0 var(--color-accent);
}

.cert-row.cert-warning td {
  background: #fff9eb;
}

.cert-row.cert-warning td:first-child {
  box-shadow: inset 5px 0 0 var(--color-warning);
}

.cert-row.cert-danger td {
  background: #fff5f5;
}

.cert-row.cert-danger td:first-child {
  box-shadow: inset 5px 0 0 var(--color-destructive);
}

/* --- Badges --- */
.badge {
  font-weight: 800;
  font-size: 11px;
  padding: 0.4em 0.7em;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.text-bg-danger {
  background: var(--color-destructive) !important;
}

.text-bg-warning {
  background: var(--color-warning) !important;
}

.text-bg-success {
  background: var(--color-accent) !important;
}

.text-bg-secondary {
  background: var(--ink-3) !important;
}

/* --- Chart Panel --- */
.chart-panel {
  min-height: 420px;
  padding: 1.5rem !important;
}

.chart-panel canvas {
  min-height: 300px;
  max-height: 400px;
}

.chart-select {
  max-width: 240px;
  border-radius: var(--radius-md);
}

/* --- Sortable Headers --- */
.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.sortable:hover {
  color: var(--rusline) !important;
}

.sort-arrow {
  display: inline-block;
  width: 16px;
  color: var(--ink-3);
  margin-left: 4px;
}

.sort-arrow::after {
  content: "\2195";
}

.sortable.asc .sort-arrow::after {
  content: "\2191";
  color: var(--rusline);
}

.sortable.desc .sort-arrow::after {
  content: "\2193";
  color: var(--rusline);
}

/* --- Filter Bar --- */
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.filter-bar input,
.filter-bar select {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-body);
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: var(--rusline);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--rusline-soft);
}

@media (max-width: 1100px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
}

/* --- Toast / Messages --- */
.toast {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-lg) !important;
  font-weight: 600;
}

.text-bg-success {
  background: var(--color-accent) !important;
  color: white !important;
}

.text-bg-danger {
  background: var(--color-destructive) !important;
  color: white !important;
}

.text-bg-warning {
  background: var(--color-warning) !important;
  color: white !important;
}

.text-bg-info {
  background: var(--ink) !important;
  color: white !important;
}

/* --- Modal --- */
.modal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--line-2);
  padding: 1.1rem 1.4rem;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.modal-body {
  padding: 1.4rem;
}

.modal-footer {
  border-top: 1px solid var(--line-2);
  padding: 1rem 1.4rem;
}

/* --- Pagination --- */
.page-link {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-2) !important;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.page-link:hover {
  background: var(--rusline-soft) !important;
  border-color: var(--rusline) !important;
  color: var(--rusline) !important;
}

.page-item.active .page-link {
  background: var(--rusline) !important;
  border-color: var(--rusline) !important;
  color: white !important;
}

/* --- Form Controls (enhanced) --- */
.form-control, .form-select {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  background-color: var(--bg-card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--rusline);
  box-shadow: 0 0 0 3px var(--rusline-soft);
}

.form-label {
  font-weight: 800;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 0.4rem;
}

.form-check-input:checked {
  background-color: var(--rusline);
  border-color: var(--rusline);
}

.form-check-input:focus {
  border-color: var(--rusline);
  box-shadow: 0 0 0 3px var(--rusline-soft);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
}

/* --- Selection --- */
::selection {
  background: rgba(212, 32, 39, 0.18);
  color: var(--ink);
}

/* --- Utility Classes --- */
.text-primary-custom {
  color: var(--rusline) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

.bg-gradient-primary {
  background: linear-gradient(120deg, #e8323a 0%, #c4161c 55%, #8f1015 100%);
}

/* ============================================
   График смен
   ============================================ */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 0 0 4px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
}

.page-heading p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

.sync-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; align-items: center; gap: 9px; min-width: 238px; padding: 8px 8px 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); box-shadow: 0 8px 24px -18px rgba(20, 25, 35, 0.35); }
.sync-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #edf7f2; color: #0e8c62; }
.sync-card.loading .sync-icon { background: #fff7e7; color: #b97812; }
.sync-card.offline .sync-icon { background: #fcebed; color: var(--rusline); }
.sync-icon svg { width: 16px; height: 16px; }
.sync-card > span:nth-child(2) { min-width: 0; }
.sync-card b, .sync-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-card b { font-size: 11px; font-weight: 800; }
.sync-card small { margin-top: 1px; color: var(--ink-3); font-size: 10px; font-weight: 600; }
.sync-card button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; background: var(--line-2); color: var(--ink-2); cursor: pointer; }
.sync-card button:hover { background: var(--rusline-soft); color: var(--rusline); }
.sync-card button:active { transform: scale(0.94); }
.sync-card button svg { width: 15px; height: 15px; }

.hero-banner { position: relative; overflow: hidden; margin-bottom: 16px; padding: 16px 24px 14px; border-radius: 10px; background: linear-gradient(120deg, #e8323a 0%, #c4161c 55%, #8f1015 100%); color: #fff; box-shadow: var(--shadow-md); animation: slide-in 0.35s ease both; }
.hero-plane { position: absolute; top: 50%; right: 22px; z-index: 1; display: block; width: 358px; height: auto; transform: translateY(-50%) rotate(-3deg); filter: drop-shadow(0 10px 14px rgba(70, 5, 10, 0.38)); pointer-events: none; }
@media (min-width: 1101px) { .hero-banner .banner-flex { padding-right: 340px; } }
@media (max-width: 1100px) { .hero-plane { display: none; } }
.banner-tag { position: relative; z-index: 1; margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.82; }
.banner-flex { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 28px; }
.banner-column { min-width: 0; }
.banner-column > span { display: block; margin-bottom: 3px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.76; }
.banner-column strong { display: block; overflow: hidden; font-size: clamp(18px, 2.1vw, 26px); font-weight: 800; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.banner-column.cycle strong { font-size: clamp(17px, 1.9vw, 22px); }
.banner-column small { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; opacity: 0.74; }
.banner-note { position: relative; z-index: 1; margin: 11px 0 0; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.24); font-size: 11.5px; font-weight: 600; line-height: 1.45; opacity: 0.9; }
.banner-note a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.schedule-workspace { padding: 26px 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); animation: fade-up 0.4s 0.08s ease both; }
.workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.workspace-heading h2 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.workspace-heading p { margin: 0; color: var(--ink-3); font-size: 13px; }
.calendar-key { display: inline-flex; align-items: center; gap: 7px; padding-top: 3px; color: var(--ink-2); font-size: 11px; font-weight: 700; white-space: nowrap; }
.weekend-swatch { width: 13px; height: 13px; border: 1.5px solid #e58b80; border-radius: 4px; background: #ffe3de; }

.calendar-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.calendar-nav { display: grid; grid-template-columns: 38px minmax(190px, auto) 38px auto; align-items: center; justify-content: start; gap: 13px; }
.calendar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-muted); }
.view-toggle button { padding: 5px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.view-toggle button:hover:not(.active) { color: var(--ink); }
.view-toggle button.active { background: var(--bg-card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 25, 35, 0.16); }
.view-toggle button:focus-visible { outline: 2px solid var(--rusline); outline-offset: 1px; }
.schedule-workspace[data-view="sheet"] #summary { display: none; }
.calendar-title { font-size: 19px; font-weight: 800; text-align: center; }
.nav-button { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-card); color: var(--ink-2); cursor: pointer; }
.nav-button:hover:not(:disabled) { border-color: var(--rusline); color: var(--rusline); }
.nav-button:active:not(:disabled) { transform: scale(0.95); }
.nav-button:disabled { cursor: default; opacity: 0.35; }
.nav-button svg { width: 17px; height: 17px; }
.today-button { justify-self: start; margin-left: 4px; }
.today-button:disabled { opacity: 0.45; }

.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; touch-action: pan-y; }
.dow { padding-bottom: 6px; color: var(--ink-3); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-align: center; text-transform: uppercase; }
.dow.weekend { color: var(--weekend); }
.day-spacer { min-width: 0; }
.day-card { position: relative; display: flex; min-width: 0; min-height: 112px; padding: 9px; flex-direction: column; gap: 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg-card); color: var(--ink); font: inherit; cursor: pointer; text-align: left; touch-action: manipulation; transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.day-card:hover { z-index: 1; transform: scale(1.02); border-color: var(--ink-3); box-shadow: 0 10px 24px -18px rgba(20, 25, 35, 0.5); }
.day-card:active { transform: scale(0.98); }
.day-card:focus-visible { outline: 2px solid var(--rusline); outline-offset: 2px; }
.day-card.weekend { border-color: #ebbdb4; background: #fff0ed; }
.day-card.holiday { border-color: var(--rusline); background: #ffe6e2; }
.day-card.holiday .date-row time { color: var(--rusline); }
.day-card .holiday-name { color: var(--rusline-dark); font-weight: 800; }
.day-card.weekend:hover { border-color: var(--weekend); }
.day-card.today { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(22, 26, 32, 0.14); }
.day-card.changed::after { position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--rusline); content: ""; }
.date-row { display: flex; min-height: 18px; align-items: center; gap: 6px; }
.date-row time { color: var(--ink-3); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.day-card.weekend .date-row time { color: var(--weekend); }
.day-card.today .date-row time { color: var(--ink); }
.date-row b { padding: 2px 5px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 8px; font-weight: 800; letter-spacing: 0.05em; line-height: 1.3; text-transform: uppercase; }
.date-row i { width: 5px; height: 5px; margin-left: auto; margin-right: 10px; border-radius: 50%; background: #243b6b; }
.shift-chip { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; width: 100%; min-height: 32px; padding: 6px 8px; border-radius: 9px; background: var(--employee); color: var(--employee-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); font-size: 11px; font-weight: 800; line-height: 1.15; }
.shift-chip.empty { background: var(--line-2); color: var(--ink-3); }
.shift-chip .desktop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-chip svg { width: 13px; height: 13px; opacity: 0.72; }
.mobile-code { display: none; }
.day-note { display: -webkit-box; overflow: hidden; color: var(--ink-2); font-size: 9.5px; font-weight: 600; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.calendar-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 12px; height: 12px; border-radius: 4px; }
.calendar-legend .legend-weekend i { border: 1.5px solid #e58b80; background: #ffe3de; }
.calendar-legend .legend-holiday i { border: 1.5px solid var(--rusline); background: #f9c4bc; }
.month-summary { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 20px; padding-top: 19px; border-top: 1px solid var(--line-2); }
.summary-title { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.summary-title svg { width: 16px; height: 16px; }
.summary-person { color: var(--ink-2); font-size: 12px; }
.summary-person b { display: block; margin-top: 2px; color: var(--ink); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

.modal-dialog.editor-dialog { max-width: 470px; }
.editor-dialog .modal-content { border: 1px solid var(--line); border-radius: 14px !important; background: var(--bg-card); box-shadow: var(--shadow-xl); }
.editor-dialog .modal-header { align-items: flex-start; border-bottom: 0; padding-bottom: 0.5rem; }
.editor-dialog .modal-title::first-letter { text-transform: uppercase; }
.editor-description { margin: 4px 0 0; color: var(--ink-3); font-size: 12px; font-weight: 500; line-height: 1.5; }
.editor-dialog .modal-body { display: grid; gap: 16px; padding-top: 0.75rem; }
.editor-dialog .modal-footer { border-top: 0; padding-top: 0; }
.employee-picker { display: grid; gap: 7px; }
.employee-picker button { display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 7px 11px 7px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.employee-picker button:hover { border-color: var(--employee); }
.employee-picker button[aria-checked="true"] { border-color: var(--employee); background: color-mix(in srgb, var(--employee) 7%, #fff); }
.employee-picker button > svg { width: 17px; height: 17px; color: var(--employee); }
.employee-color { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: var(--employee); color: var(--employee-text); font-size: 12px; font-weight: 800; }
.note-field { display: grid; gap: 7px; margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 800; }
.note-field > span { margin-top: -23px; justify-self: end; color: var(--ink-3); font-size: 10px; font-weight: 600; }
.note-field textarea { min-height: 88px; resize: vertical; border-color: var(--line); border-radius: 10px; background: var(--bg-body); color: var(--ink); font-size: 13px; font-weight: 500; }
.note-field textarea:focus { border-color: var(--rusline); background: var(--bg-card); box-shadow: 0 0 0 3px var(--rusline-soft); }
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; }
.dialog-actions .btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 6px; margin: 0; font-weight: 800; }
.dialog-actions .btn svg { width: 16px; height: 16px; }

@keyframes slide-in { from { opacity: 0; transform: translateY(-10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .banner-flex { grid-template-columns: 1fr 1fr; gap: 24px; }
  .banner-column.cycle { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .calendar { gap: 5px; }
  .day-card { min-height: 92px; padding: 6px; border-radius: 10px; }
  .shift-chip { padding-inline: 6px; font-size: 9px; }
  .day-note { font-size: 8.5px; }
}

@media (max-width: 600px) {
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 16px; }
  .page-heading h1 { font-size: 19px; }
  .page-heading p { font-size: 11px; }
  .sync-card { grid-template-columns: 26px minmax(0, 1fr) 30px; min-width: 0; width: 154px; flex: 0 0 auto; padding: 6px; gap: 6px; border-radius: 9px; }
  .sync-icon { width: 26px; height: 26px; }
  .sync-card b { font-size: 9px; }
  .sync-card small { font-size: 8px; }
  .sync-card button { width: 30px; height: 30px; }
  .hero-banner { margin-bottom: 14px; padding: 20px 16px 17px; border-radius: 8px; }
    .banner-tag { margin-bottom: 15px; font-size: 9px; }
  .banner-flex { grid-template-columns: 1fr 1fr; gap: 16px; }
  .banner-column > span { margin-bottom: 5px; font-size: 8px; letter-spacing: 0.06em; }
  .banner-column strong { font-size: 17px; }
  .banner-column.primary strong { font-size: 19px; }
  .banner-column.cycle { grid-column: 1 / -1; padding-top: 13px; }
  .banner-column.cycle strong { font-size: 17px; }
  .banner-column small { margin-top: 5px; font-size: 9px; }
  .banner-note { margin-top: 14px; padding-top: 12px; font-size: 9.5px; }
  .schedule-workspace { padding: 16px 10px; border-radius: 8px; }
  .workspace-heading { margin-bottom: 16px; }
  .workspace-heading h2 { font-size: 15px; }
  .workspace-heading p { font-size: 10px; }
  .calendar-key { display: none; }
  .calendar-bar { gap: 10px; margin-bottom: 14px; }
  .calendar-nav { grid-template-columns: 34px minmax(120px, 1fr) 34px auto; justify-content: stretch; width: 100%; gap: 8px; }
  .calendar-tools { width: 100%; }
  .view-toggle button { padding: 5px 10px; }
  .calendar-title { font-size: 16px; }
  .nav-button { width: 34px; height: 34px; border-radius: 9px; }
  .today-button { margin-left: 0; padding-inline: 0.6rem; }
  .calendar { gap: 4px; }
  .dow { padding-bottom: 3px; font-size: 9px; letter-spacing: 0.04em; }
  .day-card { min-height: 72px; padding: 5px 4px; gap: 4px; border-width: 1.2px; border-radius: 9px; }
  .day-card:hover { transform: none; box-shadow: none; }
  .day-card.changed::after { top: 4px; right: 4px; width: 4px; height: 4px; }
  .date-row { min-height: 13px; gap: 2px; }
  .date-row time { font-size: 11px; }
  .date-row b { width: 4px; height: 4px; padding: 0; overflow: hidden; border-radius: 50%; color: transparent; }
  .date-row i { display: none; }
  .shift-chip { display: grid; min-height: 25px; padding: 3px; place-items: center; border-radius: 6px; font-size: 10px; }
  .desktop-name, .shift-chip svg { display: none; }
  .mobile-code { display: inline; }
  .day-note { display: none; }
  .calendar-legend { gap: 8px 10px; margin-top: 14px; font-size: 9px; }
  .calendar-legend i { width: 9px; height: 9px; border-radius: 3px; }
  .month-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 5px; margin-top: 15px; padding-top: 14px; }
  .summary-title { grid-column: 1 / -1; font-size: 10px; }
  .summary-person { min-width: 0; font-size: 8.5px; }
  .summary-person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .summary-person b { font-size: 17px; }
  .modal-dialog.editor-dialog { position: fixed; right: 0; bottom: 0; left: 0; width: 100%; max-width: none; margin: 0; }
  .modal.fade .modal-dialog.editor-dialog { transform: translateY(24px); }
  .modal.show .modal-dialog.editor-dialog { transform: none; }
  .editor-dialog .modal-content { border-radius: 16px 16px 0 0 !important; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .schedule-workspace { padding-inline: 7px; }
  .calendar { gap: 3px; }
  .day-card { min-height: 67px; padding-inline: 3px; border-radius: 8px; }
  .shift-chip { min-height: 23px; }
  .sync-card { width: 146px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  main.container-fluid {
    padding: 1rem 0.75rem 3rem;
  }

  .stock-grid {
    grid-template-columns: 1fr;
  }

  .stock-card {
    padding: 1rem;
  }

  .stock-number {
    font-size: 1.75rem;
  }

  .navbar-nav .nav-link {
    padding: 0.45rem 0.7rem !important;
    font-size: 12.5px;
  }
}

@media (max-width: 576px) {
  .d-flex.gap-2 {
    flex-direction: column;
    width: 100%;
  }

  .d-flex.gap-2 .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================
   Циклы ВС
   ============================================ */
.priority-pill { display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cycles-number { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cycles-note { max-width: 260px; color: var(--ink-2); font-size: 12.5px; }

.status-picker { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.status-picker input { position: absolute; opacity: 0; pointer-events: none; }
.status-picker label { display: flex; align-items: center; gap: 9px; min-height: 46px; margin: 0; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-card); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast); }
.status-picker label::before { content: ""; width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: var(--dot, var(--ink-3)); }
.status-picker label:hover { border-color: var(--dot, var(--ink-3)); }
.status-picker .st-ok { --dot: var(--color-accent); }
.status-picker .st-warn { --dot: #e8a317; }
.status-picker .st-stop { --dot: var(--color-destructive); }
.status-picker input:checked + label { border-color: var(--dot, var(--ink-3)); background: color-mix(in srgb, var(--dot, var(--ink-3)) 8%, #fff); }
.status-picker input:focus-visible + label { outline: 2px solid var(--rusline); outline-offset: 2px; }

/* ============================================
   График: таблица «как в Excel» в стиле сайта, отпуска
   ============================================ */
.sheet-wrap[hidden], .sheet-tools[hidden], .calendar[hidden], .vacation-panel[hidden] { display: none; }
.sheet-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.sheet-hint { flex: 1 1 280px; margin: 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.sheet-hint a { color: var(--rusline); font-weight: 800; }

.sheet-card { border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg-card); overflow: hidden; }
.sheet-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sheet-table { width: 100%; min-width: max-content; border-collapse: separate; border-spacing: 0; color: var(--ink); font-size: 12px; }
.sheet-table th, .sheet-table td { padding: 0; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); text-align: center; }
.sheet-table tbody tr:last-child > * { border-bottom: 0; }
.sheet-table tr > :last-child { border-right: 0; }

.sheet-head { height: 46px; min-width: 36px; background: var(--bg-muted); color: var(--ink-2); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; vertical-align: middle; }
.sheet-head small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 8.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.sheet-head.weekend { background: #ffdcd6; color: var(--rusline-dark); }
.sheet-head.weekend small { color: var(--rusline-dark); opacity: 0.8; }
.sheet-head.holiday { background: #f8b9b0; color: #7d1018; }
.sheet-head.holiday small { opacity: 1; }
.sheet-head.workday small { color: var(--ink-2); text-decoration: underline dotted; }
.sheet-head.short-day::after { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #d19a1d; content: ""; }
.sheet-head { position: relative; }
.sheet-head.today { background: var(--rusline); color: #fff; }
.sheet-head.today small { color: rgba(255, 255, 255, 0.82); }

.sheet-table th.sheet-name { position: sticky; left: 0; z-index: 2; display: table-cell; min-width: 178px; padding: 0 14px; border-right: 1.5px solid var(--line); background: var(--bg-card); text-align: left; white-space: nowrap; }
.sheet-table th.sheet-corner { z-index: 3; background: var(--bg-muted); color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sheet-name { vertical-align: middle; }
.sheet-name > * { vertical-align: middle; }
.sheet-dot { display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 3px; background: var(--employee); }
.sheet-name-text { display: inline-block; line-height: 1.2; }
.sheet-name-text b { display: block; font-size: 13px; font-weight: 800; }
.sheet-name-text small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 10px; font-weight: 700; }

.sheet-director th.sheet-name, .sheet-director .sheet-cell { background: var(--bg-muted); }
.sheet-director th.sheet-name b { color: var(--ink-2); font-weight: 700; }
.sheet-cell { height: 32px; color: var(--ink-3); font-size: 10px; font-weight: 800; }
.sheet-cell.weekend { background: #fff0ed; }
.sheet-cell.holiday { background: #ffe6e2; }

.sheet-day { height: 46px; min-width: 36px; padding: 4px !important; background: var(--bg-card); cursor: pointer; transition: background 0.12s ease; }
.sheet-day.weekend { background: #fff0ed; }
.sheet-day.holiday { background: #ffe6e2; }
.sheet-day.today:not(.shift) { background: var(--rusline-soft); }
.sheet-pill { display: grid; height: 100%; min-height: 36px; place-items: center; border-radius: 8px; background: var(--employee); color: var(--employee-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); font-size: 12px; font-weight: 800; }
.sheet-day.today .sheet-pill { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--ink); }
.sheet-table[data-paint="shift"] .sheet-day:not(.shift):hover { background: color-mix(in srgb, var(--employee) 16%, #fff); }
.sheet-table[data-paint="shift"] .sheet-day.shift:hover .sheet-pill { filter: brightness(1.08); transform: scale(0.96); }
.sheet-table[data-paint="vacation"] .sheet-day:hover { background: #fff1c9; }
.sheet-day.range { background: #ffe9a8 !important; }
.sheet-day.range-start { box-shadow: inset 0 0 0 2px #c58a12; }

.sheet-vacation { padding: 4px !important; background: var(--bg-card); }
.sheet-band { display: flex; height: 100%; min-height: 36px; align-items: center; justify-content: center; padding: 0 10px; overflow: hidden; border: 1px solid #ecd48a; border-radius: 8px; background: linear-gradient(135deg, #fff6d6, #ffeaa6); color: #7a4e00; font-size: 12px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.sheet-vacation.editable { cursor: pointer; }
.sheet-vacation.editable:hover .sheet-band { border-color: #c58a12; box-shadow: 0 6px 14px -10px rgba(122, 78, 0, 0.7); }

.sheet-summary { margin-top: 16px; }
.calendar-legend .legend-vacation i { border: 1px solid #ecd48a; background: #ffeaa6; }

.vacation-panel { display: grid; gap: 10px; margin-top: 18px; }
.vacation-warning { padding: 11px 14px; border: 1.5px solid #f2c4c7; border-radius: 12px; background: #fff4f4; color: var(--rusline-dark); font-size: 13px; }
.vacation-conflict-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; font-weight: 700; }
.vacation-date { padding: 2px 9px; border: 1.5px solid #f2c4c7; border-radius: 8px; background: #fff; color: var(--rusline-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; font-variant-numeric: tabular-nums; }
.vacation-date:hover { border-color: var(--rusline); background: var(--rusline-soft); }
.vacation-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vacation-list-title { color: var(--ink-3); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.vacation-chip { padding: 5px 11px; border: 1.5px solid #ecd48a; border-radius: 999px; background: #fff8dd; color: var(--ink); font: inherit; font-size: 12.5px; }
button.vacation-chip { cursor: pointer; }
button.vacation-chip:hover { border-color: #c58a12; }
.day-card.vacation-conflict { border-color: var(--rusline); background: #fff4f4; }
.vacation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.vacation-fields label { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.vacation-fields label:first-child { grid-column: 1 / -1; }
.vacation-fields .form-control, .vacation-fields .form-select { margin-top: 5px; }

@media (max-width: 640px) {
  .sheet-table th.sheet-name { min-width: 128px; padding: 0 10px; }
  .sheet-dot { margin-right: 7px; }
  .sheet-head, .sheet-day { min-width: 33px; }
  .sheet-hint { font-size: 12px; }
}

/* Обводка блоков выходных и праздников */
.sheet-table { --off-line: #e58b80; }
.sheet-table .off-start { border-left: 2px solid var(--off-line) !important; }
.sheet-table .off-end { border-right: 2px solid var(--off-line) !important; }
.sheet-table thead .sheet-head.off { border-top: 2px solid var(--off-line); }
.sheet-table tbody tr:last-child .off { border-bottom: 2px solid var(--off-line) !important; }
.sheet-table .holiday.off-start { border-left-color: var(--rusline) !important; }
.sheet-table .holiday.off-end { border-right-color: var(--rusline) !important; }

.sheet-holidays { margin: 12px 2px 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.55; }
.sheet-holidays b { color: var(--rusline-dark); font-weight: 800; }

/* Комментарии к сменам */
.sheet-day { position: relative; }
.sheet-day.has-note::after { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--ink); content: ""; pointer-events: none; }
.notes-panel[hidden] { display: none; }
.notes-panel { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.notes-title { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: var(--ink-2); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.notes-title b { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; letter-spacing: 0; }
.notes-list { display: grid; gap: 8px; }
.note-item { display: grid; grid-template-columns: 74px 104px minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-left: 5px solid var(--employee); border-radius: 12px; background: var(--bg-card); color: var(--ink); font: inherit; text-align: left; }
button.note-item { cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
button.note-item:hover { border-color: var(--employee); box-shadow: 0 8px 20px -16px rgba(20, 25, 35, 0.5); }
.note-when b { display: block; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.note-when small { color: var(--ink-3); font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.note-who { justify-self: start; padding: 3px 10px; border-radius: 8px; background: var(--employee); color: var(--employee-text); font-size: 12px; font-weight: 800; }
.note-text { min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.note-meta { color: var(--ink-3); font-size: 11px; font-weight: 600; text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .note-item { grid-template-columns: 62px minmax(0, 1fr); padding: 10px 12px; }
  .note-who { grid-column: 2; grid-row: 1; }
  .note-text { grid-column: 1 / -1; }
  .note-meta { grid-column: 1 / -1; text-align: left; }
}
