﻿:root {
  /* Основа: тёмно-синий + перивинкль */
  --color-navy-900: #1A1D42;
  --color-navy-800: #2A2D6E;
  --color-navy-700: #3A3F8C;

  --color-bg: #E6EAF4;
  --color-surface: #FFFFFF;
  --color-text: #1A1D42;
  --color-text-muted: #4E5575;
  --color-border: #C8CEE0;
  --color-row-hover: #EEF1F8;

  /* Акцент: насыщенный синий (читается на белом и на голубом фоне) */
  --color-primary: #2F55C8;
  --color-primary-hover: #2346AD;
  --color-primary-light: #4D74E8;
  --color-primary-subtle: rgba(47, 85, 200, 0.12);
  --color-primary-ring: rgba(47, 85, 200, 0.35);

  /* Дополнительный голубой акцент */
  --color-accent: #3BA8E8;
  --color-accent-subtle: rgba(59, 168, 232, 0.14);

  --color-link: #1F46A8;
  --color-link-hover: #17388C;

  --color-success: #1F9B62;
  --color-success-bg: rgba(31, 155, 98, 0.12);
  --color-warning: #D4820A;
  --color-warning-bg: rgba(212, 130, 10, 0.12);
  --color-danger: #D43B3B;
  --color-danger-bg: rgba(212, 59, 59, 0.1);

  --radius: 8px;
  --shadow-card: 0 1px 3px rgba(26, 29, 66, 0.08);
  --sidebar-width: 200px;
  --sidebar-bg: #2A2D6E;
  --sidebar-text: #FFFFFF;
  --sidebar-text-muted: rgba(255, 255, 255, 0.68);
  --sidebar-accent: #7EB8FF;
  --main-area-bg: #C4CAE4;
  --header-height: 56px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Inter, system-ui, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
}

button,
.btn {
  touch-action: manipulation;
}

.hidden { display: none !important; }

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

.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--main-area-bg) 0%, var(--color-bg) 45%, var(--color-surface) 100%);
}

.login-card {
  background: var(--color-surface);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  width: 360px;
}

.login-card h1 {
  margin: 0 0 24px;
  font-size: 22px;
  text-align: center;
  color: var(--color-navy-900);
}

/* App shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  padding: 16px 0;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 0 16px 16px;
  font-weight: 700;
  font-size: 18px;
  color: var(--sidebar-text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-bottom: 4px;
}

.sidebar-section-label {
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sidebar-text-muted);
  user-select: none;
}

.sidebar-section.is-active .sidebar-section-label {
  color: var(--sidebar-accent);
}

.sidebar-section + .sidebar-section {
  margin-top: 12px;
}

.sidebar-item {
  display: block;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-text);
}

.sidebar-item.active {
  background: rgba(126, 184, 255, 0.16);
  border-left-color: var(--sidebar-accent);
  color: var(--sidebar-text);
  font-weight: 600;
}

.sidebar-subitem {
  padding-left: 28px;
  font-size: 13px;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--main-area-bg);
}

.app-header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.app-header-start,
.app-header-end {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-header-end {
  margin-left: auto;
}

.app-header-brand {
  display: none;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-navy-900);
}

.btn-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-menu-toggle:hover {
  background: var(--color-row-hover);
}

.btn-menu-icon,
.btn-menu-icon::before,
.btn-menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

.btn-menu-icon {
  position: relative;
}

.btn-menu-icon::before,
.btn-menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.btn-menu-icon::before { top: -6px; }
.btn-menu-icon::after { top: 6px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

.sidebar-overlay.is-visible {
  display: block;
}

#header-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.app-content { padding: 24px; flex: 1; }

.page-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  color: var(--color-navy-900);
}

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-heading-meta {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  background: var(--color-surface);
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(26, 29, 66, 0.12);
}

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

.btn-primary:focus-visible {
  outline: 2px solid var(--color-primary-ring);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-link);
  border-color: var(--color-primary-light);
  font-weight: 500;
}

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

.btn-secondary.btn-danger {
  color: var(--color-danger);
  border-color: rgba(212, 59, 59, 0.45);
}

.btn-secondary.btn-danger:hover {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
  color: #B82E2E;
}

.btn-ghost {
  background: transparent;
  color: var(--color-link);
  border: none;
  padding: 4px 8px;
  font-weight: 500;
}

.btn-ghost:hover {
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
}

.btn-danger { color: var(--color-danger); }

.btn-ghost.btn-danger {
  color: var(--color-danger);
}

.btn-ghost.btn-danger:hover {
  background: var(--color-danger-bg);
  color: #B82E2E;
}

/* Table */
.card-surface {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.data-table tbody tr { cursor: pointer; }

.data-table tbody tr:hover { background: var(--color-row-hover); }

.data-table td.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 24px;
  cursor: default;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Form */
.field { margin-bottom: 12px; }

.field label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.empty-value { color: var(--color-text-muted); font-style: italic; }

/* Section card */
.section-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  padding: 16px 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0;
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }

.field-grid .field-full { grid-column: 1 / -1; }

.field-view .field-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.field-view .field-value {
  font-size: 15px;
  margin-bottom: 12px;
}

.field-value-editable {
  cursor: pointer;
  border-radius: 4px;
  margin-left: -4px;
  margin-right: -4px;
  padding: 2px 4px;
  transition: background 0.15s;
}

.field-value-editable:hover {
  background: var(--color-bg);
}

.field-value-editable:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

/* Stage bar */
.stage-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: stretch;
}

.stage-bar-work {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.stage-bar-finals {
  display: flex;
  gap: 4px;
  align-items: stretch;
  flex-shrink: 0;
}

.stage-fork-label {
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  user-select: none;
}

.stage-bar-finals .stage-step {
  flex: 0 1 auto;
  min-width: 110px;
}

.stage-step {
  flex: 1;
  min-width: 100px;
  min-height: 52px;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  border: 1px solid var(--color-border);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stage-step:hover {
  border-color: var(--color-primary-light);
}

/* Settings — stage colors */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-color-input {
  width: 40px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  background: var(--color-surface);
}

.stage-color-text {
  width: 88px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.success-msg {
  color: #157A4C;
  font-size: 13px;
  font-weight: 500;
}

/* Files */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.file-thumb {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb .file-name {
  font-size: 10px;
  padding: 4px;
  word-break: break-all;
  color: var(--color-text-muted);
}

.file-thumb .btn-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}

.file-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 24px;
  width: min(480px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 { margin: 0 0 16px; font-size: 18px; }

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.role-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 16px;
  font-size: 14px;
  color: var(--color-text);
}

.error-msg {
  color: var(--color-danger);
  font-size: 13px;
  margin-top: 8px;
}

.back-link {
  color: var(--color-link);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  display: inline-block;
}

.back-link:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Address picker */
.address-input-wrap {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.address-input-wrap input {
  flex: 1;
  min-width: 0;
}

.btn-address-map {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-link);
  cursor: pointer;
}

.btn-address-map:hover {
  background: var(--color-primary-subtle);
  border-color: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.address-suggest {
  position: absolute;
  left: 0;
  right: 44px;
  top: calc(100% + 2px);
  z-index: 50;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  max-height: 220px;
  overflow-y: auto;
}

.address-suggest-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
}

.address-suggest-item:hover,
.address-suggest-item.active {
  background: var(--color-row-hover);
}

.modal-map {
  width: min(720px, 92vw);
}

.map-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.map-search-row {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.map-search-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.map-search-row input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.address-map-suggest {
  left: 0;
  right: 0;
  top: calc(100% + 2px);
}

.address-map {
  height: 380px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  z-index: 0;
}

.address-map-label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-text);
  min-height: 1.4em;
}

/* Kanban */
.kanban-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
  min-height: calc(100vh - var(--header-height) - 120px);
}

.kanban-column {
  flex: 0 0 240px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-height: calc(100vh - var(--header-height) - 120px);
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  padding: 12px 14px;
  border-top: 3px solid;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.kanban-column-title {
  line-height: 1.3;
}

.kanban-column-count {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kanban-column-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
  transition: background 0.15s;
}

.kanban-column-body.drag-over {
  background: var(--color-accent-subtle);
  outline: 2px dashed var(--color-primary-light);
  outline-offset: -2px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.kanban-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kanban-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(47, 85, 200, 0.12);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
}

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.kanban-card-responsible {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── Responsive ── */

@media (max-width: 1024px) {
  .app-content { padding: 16px; }

  .kanban-column {
    flex: 0 0 220px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 52px;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .btn-menu-toggle {
    display: inline-flex;
  }

  .app-header-brand {
    display: block;
  }

  .app-header {
    padding: 0 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  #header-user-name {
    max-width: 120px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: min(var(--sidebar-width), 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

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

  .login-page {
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .login-card {
    width: 100%;
    max-width: 360px;
    padding: 24px 20px;
  }

  .app-content {
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .page-title {
    font-size: 20px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .toolbar .btn {
    width: 100%;
  }

  .card-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .card-header-row .btn {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .section-header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .section-header .btn {
    flex: 1;
    min-width: 0;
  }

  .field-row,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .stage-bar {
    flex-direction: column;
    gap: 12px;
  }

  .stage-bar-work {
    flex-wrap: wrap;
  }

  .stage-bar-finals {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .stage-step {
    min-width: 80px;
    flex: 1 1 calc(50% - 4px);
  }

  .stage-bar-finals .stage-step {
    flex: 1 1 auto;
    min-width: 100px;
  }

  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-height: 85vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

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

  .color-picker-row {
    flex-wrap: wrap;
  }

  .kanban-board {
    min-height: calc(100vh - var(--header-height) - 160px);
  }

  .kanban-column {
    flex: 0 0 260px;
    max-height: calc(100vh - var(--header-height) - 160px);
  }

  /* Таблицы → карточки */
  .table-responsive {
    overflow: visible;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
  }

  .data-table tbody tr:last-child {
    border-bottom: none;
  }

  .data-table td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: none;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    text-align: left;
    flex-shrink: 0;
    max-width: 45%;
  }

  .data-table td[data-label=""]::before,
  .data-table td:not([data-label])::before {
    display: none;
  }

  .data-table td.cell-actions {
    justify-content: flex-end;
    padding-top: 10px;
  }

  .data-table td.cell-actions::before {
    display: none;
  }

  .data-table td.cell-actions .btn {
    min-height: 36px;
  }

  .address-map {
    height: 280px;
  }

  .data-table td .color-picker-row {
    flex: 1;
    justify-content: flex-end;
  }

  .data-table td[data-label="Цвет"] {
    flex-wrap: wrap;
  }

@media (max-width: 480px) {
  .app-header-end .btn-secondary {
    padding: 8px 12px;
    font-size: 13px;
  }

  #header-user-name {
    display: none;
  }

  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }

  .stage-step {
    flex: 1 1 100%;
    min-height: 44px;
  }

  .kanban-column {
    flex: 0 0 calc(100vw - 48px);
  }

  .role-checkboxes label {
    display: flex;
    margin-right: 0;
    margin-bottom: 8px;
  }
}

@media (min-width: 769px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
