/* ============================================================
   Дизайн-система «Сборка мебели» — v5
   Реализация макета из Claude Design («Карточка заявки»): тёплая
   терракотовая палитра, Manrope, оверлайн-подписи полей, timeline
   для истории статусов, компактные чипы вместо голых ссылок.
   ============================================================ */

/* Шрифты размещены вместе с приложением, чтобы интерфейс полностью загружался
   в сетях, где Google Fonts недоступен или открывается только через VPN. */
@font-face {
  font-family: 'Manrope';
  src: url('../vendor/fonts/manrope-400.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../vendor/fonts/manrope-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../vendor/fonts/manrope-600.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../vendor/fonts/manrope-700.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../vendor/fonts/manrope-800.ttf') format('truetype');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #1d1614;
  --ink-muted: #8a7d78;
  --ink-faint: #a89c97;

  --brand: #8a3527;
  --brand-dark: #6d2a1f;
  --brand-light: #f4ece9;

  --border: #e7e1dd;
  --bg: #f8f5f3;
  --surface: #ffffff;
  --neutral-bg: #f2efed;

  --success: #256b4c;
  --success-bg: #e6f2ec;
  --warning: #8a5b12;
  --warning-bg: #fdf5e3;
  --danger: #a8172f;
  --danger-bg: #fdecea;
  --info: #2563a8;
  --info-bg: #eaf1fa;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(29, 22, 20, 0.05), 0 1px 1px rgba(29, 22, 20, 0.03);
  --shadow-md: 0 8px 24px rgba(29, 22, 20, 0.08), 0 2px 6px rgba(29, 22, 20, 0.05);
  --shadow-lg: 0 20px 48px rgba(29, 22, 20, 0.14), 0 4px 12px rgba(29, 22, 20, 0.06);

  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Bootstrap 5.3 включает scroll-behavior: smooth через селектор :root —
   он специфичнее голого "html" (класс-уровня против тега), поэтому "html {}"
   не побеждал. На длинных страницах (карточка заявки и т.п.) плавный скролл
   ощущается как "залипание"/задержка — возвращаем обычный мгновенный скролл. */
:root, html { scroll-behavior: auto; }
html, body { background: var(--bg); }

body {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Bootstrap задаёт свой font-weight на .h1-.h6 (класс, специфичность 0,0,1,0) —
   он побеждает голый тег h1-h6 (0,0,0,1), поэтому здесь оба варианта явно. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.navbar-brand {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.h4, h1.h4 { font-size: 1.5rem; }
.h6, h6 { font-size: 0.95rem; font-weight: 700; }

a { color: var(--brand); text-decoration-color: rgba(138, 53, 39, 0.35); }
a:hover { color: var(--brand-dark); }

/* Навбар — светлый */
.navbar.app-navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  box-shadow: 0 1px 3px rgba(29,22,20,0.04);
}
.app-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
}
.app-navbar .navbar-brand::before {
  content: "🔧";
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--brand-light);
  border-radius: 10px;
}
.app-navbar .navbar-toggler {
  border-color: var(--border) !important;
}
.app-navbar .nav-link {
  color: var(--ink-muted) !important;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.45rem 0.9rem !important;
  transition: color 0.15s ease, background 0.15s ease;
}
.app-navbar .nav-link:hover {
  color: var(--brand-dark) !important;
  background: var(--brand-light);
}
.app-navbar .navbar-text {
  color: var(--ink-faint) !important;
  font-size: 0.82rem;
}
.app-navbar .nav-link.btn-link {
  color: var(--ink-muted) !important;
  font-size: 0.9rem;
}
.app-navbar .nav-link.btn-link:hover { color: var(--brand-dark) !important; }

/* Кнопка бургер-меню — под палец (мин. 44px, Apple/Google) */
.navbar-toggler {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Карточки-контейнеры */
.card, .content-card, .table-responsive {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.content-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card {
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.card:has(a.stretched-link):hover,
.row.g-3 .card:hover {
  box-shadow: var(--shadow-md);
  border-color: #e6cec7;
  transform: translateY(-2px);
}

/* Кнопки Bootstrap (списки, формы за пределами карточки заявки) */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.55rem 1.1rem;
  transition: box-shadow 0.15s ease, transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(138,53,39,0.22);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 4px 14px rgba(138,53,39,0.3);
}
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-link { text-decoration: none; font-weight: 700; }
.btn-link:hover { text-decoration: underline; }

/* Таблицы */
.table {
  --bs-table-bg: transparent;
  font-size: 0.9rem;
  margin-bottom: 0;
}
.table thead th {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  font-weight: 700;
  border-bottom-width: 1px;
  background: var(--neutral-bg);
}
.table td, .table th { vertical-align: middle; padding: 0.7rem 0.9rem; }
.table-hover tbody tr { transition: background-color 0.1s ease; }
.table-hover tbody tr:hover { background-color: var(--brand-light); }
.table a { font-weight: 700; text-decoration: none; }
.table a:hover { text-decoration: underline; }

/* Статус-бейджи — единая семантика по всему приложению */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
}
.status-neutral   { background: var(--neutral-bg); color: var(--ink-muted); }
.status-warning   { background: var(--warning-bg); color: var(--warning); }
.status-info      { background: var(--info-bg);    color: var(--info); }
.status-brand     { background: var(--brand-light); color: var(--brand); }
.status-success   { background: var(--success-bg); color: var(--success); }
.status-danger    { background: var(--danger-bg);  color: var(--danger); }

/* Карточки-статистика (сводка менеджера) */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.3rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.stat-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-value { font-weight: 800; font-size: 1.85rem; color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.45rem; font-weight: 500; }
.stat-card.stat-active { border-left: 3px solid var(--brand); }
.stat-card.stat-danger-accent { border-left: 3px solid var(--danger); }

/* ============================================================
   Карточка заявки — по макету Claude Design
   ============================================================ */

/* Шапка заявки (кнопка назад + заголовок + теги) прилипает к верху при
   скролле — как в референсе (там она вне скроллируемой зоны телефона).
   Наш navbar не sticky, поэтому она "подхватывает" эту роль сама. */
.order-sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 0.85rem 0 0.7rem;
  margin: -0.85rem 0 0.5rem;
  box-shadow: 0 4px 12px rgba(29,22,20,0.05);
}

.order-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.order-back-link:hover { color: var(--brand); }

.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}
.order-header-title { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--ink); }
.order-header-subtitle { font-weight: 600; font-size: 0.9rem; color: var(--ink-muted); margin-top: 0.2rem; }
.order-header-status { flex: none; }

.order-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.order-tag {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
}
.order-tag-urgent { background: var(--brand); color: #fff; }
.order-tag-overdue { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(168,23,47,0.2); }

/* Плашка выплаты сборщику — главное, что его интересует на этой странице,
   поэтому вынесена наверх крупным акцентом, а не строкой в таблице. */
.payout-hero {
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
  background: linear-gradient(158deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(138,53,39,0.85);
}
.payout-hero-label { font-weight: 700; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.66); }
.payout-hero-value { font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em; margin-top: 0.5rem; }
.payout-hero-breakdown {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.82);
}
.payout-hero-line { display: flex; justify-content: space-between; }
.payout-hero-total { font-weight: 800; color: #fff; padding-top: 0.4rem; border-top: 1px dashed rgba(255,255,255,0.22); }

.order-map-link { margin-top: 0.55rem; align-self: flex-start; }

.order-info-card { padding: 0.25rem 1.1rem; }
.info-row { padding: 0.9rem 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; }
.info-row-last, .order-info-card .info-row:last-child { border-bottom: none; }
.info-row-split { flex-direction: row; gap: 1rem; }
.info-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.info-label {
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.info-value { font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-top: 0.3rem; }
.info-value-danger { color: var(--danger); }
.info-value-muted { color: var(--ink-faint); font-weight: 500; }
.info-text { margin: 0.4rem 0 0; font-weight: 500; font-size: 0.9rem; line-height: 1.5; color: #4a4340; }

.assembler-row { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.5rem; }
.assembler-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-light);
  border: 1px solid rgba(138,53,39,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--brand);
}
.assembler-body { flex: 1; min-width: 0; }
.assembler-name { display: block; font-weight: 700; font-size: 0.95rem; }
.assembler-rating { display: block; font-weight: 600; font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.15rem; }
.assembler-rating-muted { color: var(--ink-faint); }

.chip-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(138,53,39,0.22);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.chip-btn:hover { background: var(--brand-light); color: var(--brand-dark); }
.chip-btn-accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-btn-accent:hover { background: var(--brand-dark); color: #fff; }

.cost-line { display: flex; justify-content: space-between; margin-top: 0.55rem; font-weight: 600; font-size: 0.87rem; color: #4a4340; }
.cost-line:first-of-type { margin-top: 0.5rem; }
.cost-figure { color: var(--ink); }
.cost-total {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
}

.bitrix-details { margin-top: 0.7rem; }
.bitrix-details summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  background: #faf8f7;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bitrix-details summary::-webkit-details-marker { display: none; }
.bitrix-details summary::after { content: '▾'; }
.bitrix-details[open] summary::after { content: '▴'; }
.bitrix-breakdown {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #faf8f7;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.payout-box {
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: var(--brand-light);
  border: 1px solid rgba(138,53,39,0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.payout-box span:first-child { font-weight: 700; font-size: 0.8rem; color: var(--brand-dark); }
.payout-box strong { font-weight: 800; font-size: 1.05rem; color: var(--brand); }

.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; margin-top: 0.5rem; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #faf8f7;
  text-decoration: none;
}
.file-chip:hover { background: var(--brand-light); }
.file-chip-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.6rem;
}
.file-chip-name { flex: 1; min-width: 0; font-weight: 700; font-size: 0.85rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-size { flex: none; font-weight: 600; font-size: 0.75rem; color: var(--ink-muted); }

/* Кнопки действий над заявкой — полноширинные, под палец */
.order-actions { display: flex; flex-direction: column; gap: 0.55rem; margin: 1rem 0 1.5rem; }
.btn-action {
  width: 100%;
  min-height: 48px;
  border: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn-action-success { background: var(--success); color: #fff; box-shadow: 0 6px 16px -8px rgba(37,107,76,0.6); }
.btn-action-success:hover { background: #1e5940; }
.btn-action-danger { background: var(--danger); color: #fff; }
.btn-action-danger:hover { background: #8a1226; }
.btn-action-outline-danger { background: transparent; color: var(--danger); border: 1.5px solid rgba(168,23,47,0.35); }
.btn-action-outline-danger:hover { background: var(--danger-bg); }
.btn-action-outline-info { background: var(--info-bg); color: var(--info); border: 1.5px solid rgba(37,99,168,0.3); }
.btn-action-outline-info:hover { background: #dceafb; }
.btn-action-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(138,53,39,0.6); }
.btn-action-primary:hover { background: var(--brand-dark); }
.btn-action-outline-primary { background: #fff; color: var(--brand); border: 1.5px solid rgba(138,53,39,0.3); }
.btn-action-outline-primary:hover { background: var(--brand-light); }
.btn-action-outline-neutral { background: transparent; color: var(--ink-muted); border: 1.5px solid var(--border); }
.btn-action-outline-neutral:hover { background: var(--neutral-bg); }

/* Нижняя панель действия на карточке заявки сборщика — по референсу
   прижата к низу; на обычной веб-странице делаем её просто заключительным
   блоком в потоке (без position:fixed — там ещё есть общий футер/навбар). */
.order-bottom-bar { margin: 0.25rem 0 1.5rem; }
.order-bottom-bar-form { margin: 0; }
.order-notice {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #faf8f7;
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #4a4340;
}
.order-notice-warning { background: var(--warning-bg); border-color: rgba(138,91,18,0.22); color: var(--warning); }

/* Оценка и выплата (закрытая заявка) */
.rate-payout-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #faf8f7;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.rate-payout-box:first-of-type { margin-top: 0.85rem; }
.rate-payout-box span:first-child { font-weight: 700; font-size: 0.85rem; color: #4a4340; }
.rate-payout-box-done { background: var(--success-bg); border-color: rgba(37,107,76,0.2); }
.rate-payout-box-done span:first-child { color: var(--success); }
.rate-payout-box-pending { background: var(--warning-bg); border-color: rgba(138,91,18,0.22); }
.rate-payout-box-pending span:first-child { color: var(--warning); }
.rate-payout-box form { margin: 0; }

/* История статусов — вертикальная лента вместо таблицы */
.section-title { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.section-title-row { display: flex; align-items: baseline; justify-content: space-between; }
.log-count { font-weight: 600; font-size: 0.75rem; color: var(--ink-faint); }

.timeline { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.65rem; }
.timeline-item { display: flex; gap: 0.65rem; }
.timeline-dot-col { flex: none; width: 9px; display: flex; flex-direction: column; align-items: center; padding-top: 0.35rem; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.timeline-dot.status-neutral { background: var(--ink-muted); }
.timeline-dot.status-warning { background: var(--warning); }
.timeline-dot.status-info { background: var(--info); }
.timeline-dot.status-brand { background: var(--brand); }
.timeline-dot.status-success { background: var(--success); }
.timeline-dot.status-danger { background: var(--danger); }
.timeline-line { flex: 1; width: 1px; background: var(--border); margin-top: 0.25rem; min-height: 1.2rem; }
.timeline-content { flex: 1; min-width: 0; padding-bottom: 0.15rem; }
.timeline-pills { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.timeline-arrow { font-weight: 700; font-size: 0.75rem; color: var(--ink-faint); }
.tiny-pill { font-weight: 600; font-size: 0.68rem; padding: 0.25rem 0.45rem; border-radius: 6px; background: var(--neutral-bg); color: var(--ink-muted); }
.timeline-who { margin-top: 0.4rem; font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.timeline-comment { margin-top: 0.2rem; font-weight: 500; font-size: 0.83rem; color: var(--ink-muted); }
.timeline-date { margin-top: 0.25rem; font-weight: 600; font-size: 0.72rem; color: var(--ink-faint); }

/* ============================================================
   Профиль сборщика (вид менеджера) — по макету Claude Design
   ============================================================ */

.profile-header { display: flex; gap: 0.8rem; align-items: flex-start; margin-top: 0.3rem; }
.profile-avatar-col { flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.profile-avatar, .profile-avatar-photo {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
}
.profile-avatar {
  background: var(--brand-light);
  border: 1px solid rgba(138,53,39,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--brand);
}
.profile-status-pill { font-size: 0.62rem; padding: 0.25rem 0.4rem; white-space: nowrap; }
.profile-header-body { flex: 1; min-width: 0; padding-top: 0.1rem; }
.profile-header-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); }
.profile-header-meta { font-weight: 600; font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.25rem; }
.profile-header-rating { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.45rem; flex-wrap: wrap; }
.profile-rating-value { font-weight: 800; font-size: 0.9rem; color: #c9922b; }
.profile-rating-count { font-weight: 600; font-size: 0.75rem; color: var(--ink-muted); }

.profile-field-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-field-row-last { border-bottom: none; }
.profile-field-label {
  flex: none;
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.1rem;
}
.profile-field-value { flex: 1; text-align: right; font-weight: 600; font-size: 0.87rem; color: var(--ink); }
.profile-field-value-good { color: var(--success); }
.profile-field-value-rating { color: #c9922b; font-weight: 800; }

.passport-box {
  background: var(--brand-light);
  border: 1px solid rgba(138,53,39,0.18);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
}
.passport-box .btn-action { margin-bottom: 0; }
.passport-box-note { margin-top: 0.6rem; font-weight: 600; font-size: 0.72rem; line-height: 1.45; color: var(--warning); }

.job-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.job-card, .review-card, .note-card {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: #faf8f7;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
a.job-card:hover { background: var(--brand-light); }
.job-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.job-card-title { min-width: 0; display: flex; align-items: baseline; gap: 0.4rem; }
.job-card-num { font-weight: 800; font-size: 0.85rem; color: var(--brand); }
.job-card-type { font-weight: 700; font-size: 0.83rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-card-status { flex: none; font-size: 0.6rem; padding: 0.25rem 0.4rem; }
.job-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; font-weight: 600; font-size: 0.72rem; color: var(--ink-muted); }
.job-card-sum { font-weight: 800; font-size: 0.83rem; color: var(--ink); }

.review-stars { font-weight: 800; font-size: 0.85rem; color: #c9922b; letter-spacing: 0.05em; }
.review-order-link { font-weight: 700; font-size: 0.75rem; }
.review-text { margin: 0.5rem 0 0; font-weight: 500; font-size: 0.82rem; line-height: 1.5; color: #4a4340; }
.review-flags { margin-top: 0.55rem; margin-bottom: 0; }
.order-tag-late { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(138,91,18,0.2); }
.review-date { margin-top: 0.5rem; font-weight: 600; font-size: 0.68rem; color: var(--ink-faint); }

.rating-grid { margin-top: 0.75rem; display: grid; grid-template-columns: auto 1fr auto auto; gap: 0 0.5rem; align-items: start; }
.rating-grid-head { font-weight: 700; font-size: 0.6rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); padding-bottom: 0.5rem; }
.rating-grid-center { text-align: center; }
.rating-grid-num { font-weight: 700; font-size: 0.8rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.rating-grid-score { min-width: 0; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.rating-grid-score > span:first-child { display: block; font-weight: 800; font-size: 0.8rem; color: #c9922b; }
.rating-grid-comment { display: block; margin-top: 0.15rem; font-weight: 500; font-size: 0.7rem; color: var(--ink-muted); }
.rating-grid-mark { font-weight: 700; font-size: 0.78rem; padding: 0.55rem 0; border-top: 1px solid var(--border); color: var(--ink-faint); }
.rating-grid-mark-ok { color: var(--success); }
.rating-grid-mark-bad { color: var(--danger); }
.rating-grid-empty { grid-column: 1 / -1; color: var(--ink-muted); padding: 0.5rem 0; }

.notes-card { background: #fefaf1; border-color: rgba(138,91,18,0.18); }
.notes-internal-tag { font-weight: 700; font-size: 0.6rem; letter-spacing: 0.04em; padding: 0.25rem 0.4rem; border-radius: 6px; background: var(--warning); color: #fff; }
.notes-note { margin: 0.3rem 0 0; font-weight: 600; font-size: 0.7rem; line-height: 1.45; color: var(--warning); }
.notes-form { margin-top: 0.75rem; }
.notes-form textarea { resize: none; height: 4.6rem; }
.notes-form .btn-action { margin-top: 0.5rem; }
.notes-list { margin-top: 0.75rem; }
.note-text { margin: 0; font-weight: 500; font-size: 0.82rem; line-height: 1.5; color: #4a4340; }
.note-meta { margin-top: 0.5rem; font-weight: 600; font-size: 0.68rem; color: var(--ink-faint); }

/* ============================================================
   Загрузка фотоотчёта — по макету Claude Design
   ============================================================ */

.upload-progress-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; }
.upload-progress-track { flex: 1; height: 7px; border-radius: 5px; background: #eae5e2; overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0; border-radius: 5px; background: var(--brand); transition: width 0.25s ease, background 0.25s ease; }
.upload-progress-label { flex: none; font-weight: 800; font-size: 0.72rem; color: var(--brand); transition: color 0.25s ease; }

.offline-notice {
  display: flex;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: #fefaf1;
  border: 1px solid rgba(138,91,18,0.2);
  margin-bottom: 1rem;
}
.offline-notice-icon { flex: none; font-size: 0.95rem; }
.offline-notice-title { font-weight: 700; font-size: 0.78rem; color: var(--warning); }
.offline-notice-text { margin-top: 0.25rem; font-weight: 500; font-size: 0.72rem; line-height: 1.5; color: var(--warning); }

/* Реальный <input type="file"> остаётся в DOM и рабочим (доступность, submit),
   просто визуально скрыт — открывается через <label for="..."> вокруг него. */
.photo-slot input[type="file"], .act-card-done ~ input[type="file"], #act-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.photo-slot-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.photo-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.65rem;
  border-radius: 12px;
  background: #faf8f7;
  border: 1px solid rgba(29,22,20,0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.photo-slot[data-slot-required="1"] { border-color: rgba(168,23,47,0.16); }
.photo-slot-done { background: #f7faf8; border-color: rgba(47,125,90,0.22) !important; }
.photo-slot-thumb {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--neutral-bg);
  border: 1.5px dashed rgba(29,22,20,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0;
}
.photo-slot-done .photo-slot-thumb { background: repeating-linear-gradient(45deg,#e4efe9,#e4efe9 7px,#d7e7df 7px,#d7e7df 14px); border: 1px solid rgba(47,125,90,0.2); }
.photo-slot-thumb-icon { font-weight: 700; font-size: 1.1rem; color: var(--ink-faint); }
.photo-slot-done .photo-slot-thumb-icon { color: var(--success); }
.photo-slot-body { flex: 1; min-width: 0; }
.photo-slot-label { font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.photo-slot-star { color: var(--danger); }
.photo-slot-hint { margin-top: 0.2rem; font-weight: 600; font-size: 0.7rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-slot-done .photo-slot-hint { color: var(--success); }
.photo-slot-btn {
  flex: none;
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  white-space: nowrap;
  margin: 0;
}
.photo-slot-done .photo-slot-btn { background: #fff; color: #4a4340; border: 1.5px solid rgba(29,22,20,0.14); }
.photo-slot-error { margin-top: 0.3rem; }

#act-card { position: relative; transition: border-color 0.15s ease; }
#act-card.act-card-done { border-color: rgba(47,125,90,0.22); }
.act-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.75rem;
  cursor: pointer;
  padding: 0.85rem;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.act-card-done .act-upload-btn { background: #f7faf8; color: var(--success); border: 1.5px solid rgba(47,125,90,0.25); }

.checklist-list { margin-top: 0.6rem; display: flex; flex-direction: column; }
.checklist-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.checklist-row:last-child { border-bottom: none; }
/* Чекбокс сам себе визуальный бокс (appearance:none + ::after-галочка) —
   не прячем реальный инпут отдельным элементом и не полагаемся на sibling-
   селектор: так надёжнее кросс-браузерно, чем 1px-скрытый инпут + соседний span. */
.checklist-input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 7px;
  background: #fff;
  border: 1.5px solid rgba(29,22,20,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.checklist-input::after { content: ''; color: #fff; font-weight: 800; font-size: 0.78rem; }
.checklist-input:checked { background: var(--success); border-color: var(--success); }
.checklist-input:checked::after { content: '✓'; }
.checklist-input:focus-visible { box-shadow: 0 0 0 3px rgba(3,105,161,0.2); outline: none; }
.checklist-text { flex: 1; font-weight: 600; font-size: 0.83rem; color: var(--ink); line-height: 1.4; }

.extras-list { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; }
.extras-row { display: flex; gap: 0.5rem; align-items: center; }
.extras-desc {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: #faf8f7;
  padding: 0.65rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink);
}
.extras-price-wrap {
  flex: none;
  width: 100px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: #faf8f7;
  padding: 0 0.6rem;
}
.extras-price { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 0.65rem 0; font-weight: 700; font-size: 0.78rem; color: var(--ink); }
.extras-currency { font-weight: 700; font-size: 0.78rem; color: var(--ink-faint); }
.extras-total {
  margin-top: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: var(--brand-light);
  border: 1px solid rgba(138,53,39,0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.extras-total span:first-child { font-weight: 700; font-size: 0.78rem; color: var(--brand-dark); }
.extras-total span:last-child { font-weight: 800; font-size: 1rem; color: var(--brand); }

.upload-submit-bar { margin: 0.25rem 0 1.5rem; }
.upload-blocked-hint { margin-bottom: 0.55rem; font-weight: 700; font-size: 0.72rem; color: var(--danger); text-align: center; }
.btn-action-submit { background: #c3bab6; color: #fff; }
.btn-action-submit-ready { background: var(--success); box-shadow: 0 8px 20px -10px rgba(37,107,76,0.85); }
.btn-action-submit-ready:hover { background: #1e5940; }

/* ============================================================
   Проверка фотоотчёта — по макету Claude Design
   ============================================================ */

.review-meta-row { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.6rem; flex-wrap: wrap; }
.review-meta-text { font-weight: 600; font-size: 0.8rem; color: var(--ink-muted); }
.log-count-good { color: var(--success); }

.review-photo-grid { margin-top: 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (min-width: 576px) { .review-photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.review-photo-item { border: none; background: transparent; padding: 0; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 0.4rem; }
.review-photo-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.review-photo-caption { font-weight: 700; font-size: 0.72rem; color: #4a4340; }

.review-checklist { margin-top: 0.6rem; display: flex; flex-direction: column; }
.review-checklist-row { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.review-checklist-row:last-child { border-bottom: none; }
.review-checklist-mark { flex: none; font-size: 0.85rem; }
.review-checklist-text { flex: 1; font-weight: 600; font-size: 0.83rem; line-height: 1.45; color: #4a4340; }
.review-checklist-text-bad { color: var(--danger); }

.review-extras-list { margin-top: 0.6rem; display: flex; flex-direction: column; }
.review-extras-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.83rem; color: var(--ink); }
.review-extras-row:last-child { border-bottom: none; }

.act-review-row { display: flex; gap: 0.7rem; margin-top: 0.65rem; }
.act-review-thumb-link { flex: none; }
.act-review-thumb { width: 76px; height: 98px; object-fit: cover; border-radius: 11px; border: 1px solid var(--border); }
.act-review-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.3rem; }
.act-review-filename { font-weight: 700; font-size: 0.8rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-review-by { font-weight: 600; font-size: 0.7rem; color: var(--ink-muted); }
.act-review-legible-pill { align-self: flex-start; font-size: 0.6rem; }
.act-confirm-row { margin-top: 0.7rem; background: #faf8f7; border: 1.5px solid var(--border); border-radius: 12px; padding: 0.65rem 0.75rem; }
.act-replace-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  text-align: center;
  cursor: pointer;
  padding: 0.65rem;
  border-radius: 11px;
  background: transparent;
  border: 1.5px dashed rgba(29,22,20,0.16);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.72rem;
}
#act-review-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.review-decision-buttons { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.75rem; }
.review-reject-panel { margin-top: 0.75rem; }
.review-decision-note { margin-top: 0.75rem; padding: 0.75rem 0.8rem; border-radius: 12px; font-weight: 700; font-size: 0.8rem; line-height: 1.5; }
.review-decision-note-success { background: var(--success-bg); border: 1px solid rgba(37,107,76,0.22); color: var(--success); }
.review-decision-note-danger { background: var(--danger-bg); border: 1px solid rgba(168,23,47,0.2); color: var(--danger); }

.btn-action-dark { background: var(--ink); color: #fff; }
.btn-action-dark:hover { background: #000; }

.review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(29,22,20,0.92);
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1rem 1.5rem;
}
.review-lightbox-header { display: flex; align-items: center; justify-content: space-between; color: #fff; font-weight: 700; font-size: 0.85rem; }
.review-lightbox-close { border: none; background: rgba(255,255,255,0.16); cursor: pointer; width: 32px; height: 32px; border-radius: 10px; color: #fff; font-weight: 700; }
.review-lightbox-img { flex: 1; margin-top: 0.9rem; width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 16px; }

/* Формы */
.form-label { font-weight: 700; font-size: 0.85rem; color: var(--ink); margin-bottom: 0.35rem; }
.form-control, .form-select,
input[type="text"]:not(.form-check-input),
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="number"],
input[type="file"],
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control::placeholder, textarea::placeholder { color: var(--ink-faint); }
.form-control:hover, .form-select:hover,
input:not([type="checkbox"]):not([type="radio"]):not(:disabled):hover,
select:not(:disabled):hover, textarea:not(:disabled):hover { border-color: #d6ccc0; }
.form-control:focus, .form-select:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="tel"]:focus,
input[type="number"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(138,53,39,0.14);
}
.form-control:disabled, .form-select:disabled, input:disabled, select:disabled, textarea:disabled {
  background: var(--neutral-bg);
  color: var(--ink-faint);
  cursor: not-allowed;
}
input[readonly], textarea[readonly] { background: var(--neutral-bg); color: var(--ink-muted); cursor: default; }

.form-select, select.form-control, select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 8L10 12.5L14.5 8' stroke='%238a7d78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 20px;
  padding-right: 2.3rem;
}
select[multiple] { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 0.85rem; }

textarea { resize: vertical; min-height: 5.5rem; }

.form-check { padding-left: 1.6em; }
.form-check-input { width: 1.15em; height: 1.15em; margin-left: -1.6em; border-color: var(--border); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138,53,39,0.14); }
.form-check-label { padding-top: 0.05em; }

@media (max-width: 767px) {
  .form-control, .form-select,
  input[type="text"], input[type="password"], input[type="email"],
  input[type="date"], input[type="datetime-local"], input[type="tel"],
  input[type="number"], input[type="file"], select, textarea {
    font-size: 16px !important;
  }
}

.row-overdue td   { background-color: var(--danger-bg) !important; }
.row-booked td    { background-color: var(--warning-bg) !important; }
.row-review td    { background-color: var(--info-bg) !important; }

.auth-wrapper { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px dashed #ddd3c7;
  border-radius: var(--radius);
}
.empty-state .h1 { opacity: 0.7; }

.alert { border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 0.9rem; padding: 0.85rem 1.1rem; box-shadow: var(--shadow-sm); }
.alert-success { background: var(--success-bg); color: #14532d; border-color: #bbf0cf; }
.alert-danger, .alert-error { background: var(--danger-bg); color: #7f1d1d; border-color: #fecaca; }
.alert-warning { background: var(--warning-bg); color: #78350f; border-color: #fde68a; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border-color: #bfdbfe; }

/* ============================================================
   Список заявок (менеджер) — по макету Claude Design
   ============================================================ */

.list-new-btn { flex: none; width: auto; min-height: 38px; padding: 0 1rem; font-size: 0.8rem; }
.order-header-subtitle { font-weight: 600; font-size: 0.78rem; color: var(--ink-muted); margin-top: 0.15rem; }

.list-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.9rem; }
.list-stat-chip {
  display: flex; flex-direction: column; gap: 0.15rem;
  padding: 0.6rem 0.65rem; border-radius: 12px; text-decoration: none;
  background: var(--neutral-bg); border: 1px solid var(--border);
}
.list-stat-chip-value { font-weight: 800; font-size: 1.15rem; color: var(--ink); line-height: 1; }
.list-stat-chip-label { font-weight: 600; font-size: 0.66rem; line-height: 1.3; color: var(--ink-muted); }
.list-stat-chip-warning { background: var(--warning-bg); border-color: rgba(138,91,18,0.2); }
.list-stat-chip-warning .list-stat-chip-value { color: var(--warning); }
.list-stat-chip-info { background: var(--info-bg); border-color: rgba(37,99,168,0.2); }
.list-stat-chip-info .list-stat-chip-value { color: var(--info); }
.list-stat-chip-danger { background: var(--danger-bg); border-color: rgba(168,23,47,0.2); }
.list-stat-chip-danger .list-stat-chip-value { color: var(--danger); }

.list-search-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.list-search-icon { flex: none; font-size: 1.05rem; color: var(--ink-faint); }
.list-search-input { flex: 1; min-width: 0; }
.list-search-btn { flex: none; width: auto; min-height: 38px; padding: 0 1rem; font-size: 0.8rem; }

.list-filter-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.list-filter-select { flex: 1; min-width: 0; }
.list-filter-toggle { flex: none; width: auto; min-height: 38px; padding: 0 1rem; font-size: 0.8rem; }

.list-order-cards { margin-top: 0; gap: 0.85rem; }
.list-order-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ink-faint);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
}
.list-border-status-neutral { border-left-color: var(--ink-faint); }
.list-border-status-warning { border-left-color: var(--warning); }
.list-border-status-info { border-left-color: var(--info); }
.list-border-status-brand { border-left-color: var(--brand); }
.list-border-status-success { border-left-color: var(--success); }
.list-border-status-danger { border-left-color: var(--danger); }

.list-order-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.list-order-card-title-col { min-width: 0; display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.list-order-card-num { font-weight: 800; font-size: 0.95rem; color: var(--brand); flex: none; }
.list-order-card-name { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.list-order-card-address { margin-top: 0.3rem; font-weight: 500; font-size: 0.82rem; color: var(--ink-muted); }

.list-order-card-tags { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.75rem; flex-wrap: wrap; }
.list-order-card-due { font-weight: 600; font-size: 0.78rem; color: var(--ink-muted); }
.list-order-card-due-overdue { color: var(--danger); font-weight: 700; }

.list-order-card-divider { height: 1px; background: var(--border); margin-top: 0.85rem; }

.list-order-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.85rem; }
.list-order-card-collector { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.list-order-card-open { margin-left: auto; }

.list-empty-reset { margin-top: 0.9rem; width: auto; display: inline-flex; padding: 0 1.1rem; }

.list-pagination { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 1rem; }
.list-pagination-btn { flex: none; width: auto; padding: 0 1rem; min-height: 40px; font-size: 0.8rem; }
.list-pagination-disabled { opacity: 0.4; pointer-events: none; }
.list-pagination-page { font-weight: 700; font-size: 0.78rem; color: var(--ink-muted); }

/* ============================================================
   Создать заявку (менеджер) — по макету Claude Design
   ============================================================ */

.form-section-card { margin-bottom: 0.85rem; display: flex; flex-direction: column; gap: 0.85rem; }
.form-section-header { display: flex; align-items: center; gap: 0.55rem; }
.form-section-num {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.75rem;
}
.form-section-title { font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field-label { font-weight: 700; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); }
.form-required { color: var(--danger); }
.form-field-hint { font-weight: 600; font-size: 0.72rem; color: var(--ink-faint); line-height: 1.4; }
.form-field-error { font-weight: 700; font-size: 0.72rem; color: var(--danger); }
.form-field-success { color: var(--success); }

.form-row-2, .form-row-mixed { display: flex; gap: 0.6rem; }
.form-row-2 .form-field { flex: 1; min-width: 0; }
.form-row-mixed .form-field:first-child { flex: 1.4; min-width: 0; }
.form-row-mixed .form-field:last-child { flex: 1; min-width: 0; }

.form-urgency-toggle { display: flex; gap: 0.5rem; }
.form-urgency-btn {
  position: relative; flex: 1; text-align: center; cursor: pointer;
  padding: 0.75rem 0.6rem; border-radius: 12px;
  background: #faf8f7; border: 1.5px solid var(--border); color: #4a4340;
  font-weight: 700; font-size: 0.8rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.form-urgency-btn input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.form-urgency-btn:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.form-urgency-btn-urgent:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }

.form-file-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; cursor: pointer; padding: 0.8rem; border-radius: 12px;
  border: 1.5px dashed rgba(29,22,20,0.18); background: #faf8f7; color: #4a4340;
  font-weight: 700; font-size: 0.8rem; text-align: center;
}
.form-file-btn-done { border: 1.5px solid rgba(37,107,76,0.3); background: #f7faf8; color: var(--success); }
#order-create-form input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.form-inline-btn-row { display: flex; gap: 0.5rem; align-items: center; }
.form-inline-btn-row input { flex: 1; min-width: 0; }
.form-inline-btn-row .chip-btn { flex: none; }
.chip-btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-btn-dark:hover { background: #000; border-color: #000; color: #fff; }

.bitrix-breakdown-card { border-radius: 14px; background: var(--neutral-bg); border: 1px solid var(--border); padding: 0.85rem; }
.bitrix-breakdown-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.bitrix-breakdown-title { font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.02em; color: #4a4340; }
.bitrix-readonly-badge {
  flex: none; font-weight: 700; font-size: 0.56rem; letter-spacing: 0.05em;
  padding: 0.3rem 0.45rem; border-radius: 6px;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-muted);
}
.bitrix-readonly-badge-filled { background: var(--success-bg); color: var(--success); border-color: transparent; }
.bitrix-breakdown-grid { margin-top: 0.7rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.bitrix-breakdown-item { display: flex; flex-direction: column; gap: 0.3rem; }
.bitrix-breakdown-hint { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px dashed rgba(29,22,20,0.14); font-weight: 600; font-size: 0.72rem; line-height: 1.5; color: var(--ink-muted); }

.form-submit-btn { margin: 0.25rem 0 1.5rem; }

/* ============================================================
   Мой профиль (сборщик) — по макету Claude Design
   ============================================================ */

.profile-page-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.profile-edit-btn { flex: none; width: auto; min-height: 38px; padding: 0 0.9rem; font-size: 0.78rem; }

.pending-change-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.pending-change-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; }
.pending-change-field { font-weight: 700; color: var(--ink); }
.pending-change-value { font-weight: 500; color: var(--ink-muted); text-align: right; }

@media (max-width: 767px) {
  body { font-size: 1rem; }
  .content-card { padding: 1rem; }
  .order-info-card { padding: 0.25rem 0.9rem; }
  .btn:not(.btn-sm) { min-height: 44px; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .btn-sm { min-height: 38px; }
  .table td, .table th { padding: 0.5rem 0.5rem; }
  .d-flex.gap-2 { row-gap: 0.5rem; }
  .stat-card { padding: 0.85rem 1rem; }
  .stat-card .stat-value { font-size: 1.5rem; }
}

@media (max-width: 375px) {
  .content-card { padding: 0.75rem; }
  h1.h4 { font-size: 1.25rem; }
}
