/* Чисто Град. Демо-CRM клининговой компании. Собственная тема, без внешних ресурсов. */

:root {
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --blue-mid: #2563eb;
  --blue-soft: #eff6ff;
  --blue-line: #dbeafe;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 26px rgba(29, 78, 216, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--blue-soft);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

svg {
  display: block;
}

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

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

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

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

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: #f8faff;
}

.btn .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.2);
}

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

.btn-ghost {
  background: #ffffff;
  border-color: var(--line);
  color: #334155;
}

.btn-ghost:hover {
  background: var(--blue-soft);
  border-color: var(--blue-line);
}

.btn-soft {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: var(--blue-line);
}

.btn-soft:hover {
  background: #e0ecff;
}

.btn-ok {
  background: var(--ok);
  color: #ffffff;
}

.btn-ok:hover {
  background: #166534;
}

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

.btn-danger:hover {
  background: #991b1b;
}

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

.btn-outline-danger:hover {
  background: var(--danger-bg);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12.5px;
}

.btn-xs {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 8px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
}

.icon-btn:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

/* Поля */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.field > span {
  display: block;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.13);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #94a3b8;
}

.form-error {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 500;
}

.select-plain {
  min-height: 36px;
  max-width: 220px;
  padding: 7px 30px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  font-size: 12.5px;
  color: #334155;
  outline: none;
}

.select-plain:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.13);
}

.search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  max-width: 260px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.search .icon {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  outline: none;
}

.search input::placeholder {
  color: #94a3b8;
}

.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.13);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
}

.segmented button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.is-active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Бейджи */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.8px;
  font-weight: 650;
  line-height: 1.55;
  white-space: nowrap;
  vertical-align: middle;
}

.badge .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.badge-new {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: #bfdbfe;
}

.badge-confirmed {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: #bbf7d0;
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: #fde68a;
}

.badge-muted,
.badge-source {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.badge-company {
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-color: #bfdbfe;
}

.badge-private {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

/* Экран входа */

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px 16px;
  background:
    radial-gradient(860px 520px at 6% -10%, #dbeafe 0%, rgba(219, 234, 254, 0) 62%),
    radial-gradient(720px 520px at 106% 112%, #bfdbfe 0%, rgba(191, 219, 254, 0) 56%),
    var(--blue-soft);
}

.login-wrap {
  width: 100%;
  max-width: 900px;
}

.login-card {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--blue-line);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(30, 64, 175, 0.16);
}

.login-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px 32px;
  color: #ffffff;
  background:
    radial-gradient(420px 260px at 110% 0%, rgba(96, 165, 250, 0.45) 0%, rgba(96, 165, 250, 0) 70%),
    linear-gradient(158deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand strong {
  display: block;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.login-brand span {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.74);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.28);
}

.brand-mark .icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.brand-mark-light {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.login-aside h2 {
  max-width: 340px;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.login-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.login-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.login-facts {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.login-facts div {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.login-facts strong {
  display: block;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.1;
}

.login-facts span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
}

.login-address {
  margin-top: auto;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 34px;
}

.login-form h1 {
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.login-sub {
  margin: 4px 0 20px;
  color: var(--muted);
  font-size: 12.5px;
}

.login-form .field + .field {
  margin-top: 12px;
}

.login-form .btn {
  margin-top: 16px;
  min-height: 42px;
}

.login-hint {
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid var(--blue-line);
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 11.5px;
}

.login-hint b {
  font-weight: 700;
}

.login-note {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 10.8px;
  line-height: 1.45;
}

.login-foot {
  margin-top: 14px;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

/* Верхняя панель */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand-slogan {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.8px;
  white-space: nowrap;
}

.topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-date .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.avatar-user {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name {
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.user-name-short {
  display: none;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.user-role {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

/* Каркас */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: sticky;
  top: 64px;
  display: flex;
  flex-direction: column;
  width: 236px;
  height: calc(100vh - 64px);
  flex: none;
  padding: 16px 12px 12px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.nav-item:hover {
  background: #f5f9ff;
  color: var(--blue);
}

.nav-item.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  color: #8194ad;
}

.nav-item.is-active .icon {
  color: var(--blue);
}

.nav-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
}

.nav-item.is-active .nav-count {
  background: #ffffff;
  color: var(--blue);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-note {
  margin: 0 4px 8px;
  color: #94a3b8;
  font-size: 10.5px;
  line-height: 1.4;
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.reset-btn:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.reset-btn .icon {
  width: 15px;
  height: 15px;
}

.reset-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: var(--danger-bg);
}

.reset-confirm p {
  width: 100%;
  color: #7f1d1d;
  font-size: 11.5px;
  line-height: 1.35;
}

.reset-actions {
  display: flex;
  gap: 6px;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 22px 24px 56px;
}

.page {
  max-width: 1220px;
  margin: 0 auto;
  animation: page-in 0.18s ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Заголовок страницы и сводка */

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

.page-head h1 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.stat-info {
  min-width: 0;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  margin: 3px 0 1px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-sub {
  display: block;
  color: var(--muted);
  font-size: 11.2px;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.stat-icon .icon {
  width: 18px;
  height: 18px;
}

.stat.is-warn .stat-icon {
  background: var(--warn-bg);
  color: var(--warn);
}

.stat.is-warn .stat-value {
  color: var(--warn);
}

.stat.is-ok .stat-icon {
  background: var(--ok-bg);
  color: var(--ok);
}

.stat.is-ok .stat-value {
  color: var(--ok);
}

/* Карточки, тулбар, таблицы */

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.card-head h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.toolbar-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.list-meta strong {
  color: var(--text);
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  flex: none;
  border-radius: 50%;
  background: #cbd5e1;
}

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

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

.table-wrap th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-wrap td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f8;
  font-size: 12.5px;
  vertical-align: middle;
}

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

.table-wrap tbody tr:hover {
  background: #f8fbff;
}

.row-click {
  cursor: pointer;
}

.cell-person {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cell-main {
  color: var(--text);
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.3;
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.2px;
  line-height: 1.3;
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

/* Пустые состояния, ссылки */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 20px;
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
}

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

.empty p {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12.5px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--blue);
}

.back-link .icon {
  width: 15px;
  height: 15px;
}

.link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Карточка клиента */

.entity-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.entity-id {
  min-width: 0;
}

.entity-id h1 {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.entity-id p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.entity-phone {
  white-space: nowrap;
}

.entity-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex: none;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.fact {
  min-width: 0;
}

.fact > span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.fact > strong {
  display: block;
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.fact-wide {
  grid-column: 1 / -1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.mini-objects {
  display: flex;
  flex-direction: column;
}

.mini-object {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid #eef2f8;
}

.mini-object:last-child {
  border-bottom: 0;
}

.mini-object-info {
  min-width: 0;
  flex: 1;
}

.mini-object-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.mini-object-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mini-object .badge {
  flex: none;
}

.object-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.object-icon .icon {
  width: 18px;
  height: 18px;
}

/* Объекты */

.objects-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.objects-meta strong {
  color: var(--text);
  font-weight: 700;
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 12px;
  padding: 14px;
}

.object-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.object-card:hover {
  border-color: var(--blue-line);
  box-shadow: 0 8px 22px rgba(29, 78, 216, 0.08);
}

.object-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.object-title {
  min-width: 0;
  flex: 1;
}

.object-title h3 {
  margin-bottom: 2px;
  font-size: 12.8px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.object-top > .badge {
  flex: none;
}

.object-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.object-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px dashed #e6eef9;
}

.object-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

.object-row span {
  color: var(--muted);
  flex: none;
}

.object-row strong {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

/* График */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.week-day {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.week-day.is-today {
  border-color: #bfdbfe;
  background: #f2f8ff;
}

.week-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 10px;
  border-bottom: 1px solid #e6eef9;
}

.week-day-name {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.week-day-date {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.week-day.is-today .week-day-name,
.week-day.is-today .week-day-date {
  color: var(--blue);
}

.week-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.week-day.is-today .week-day-count {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.week-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}

.slot {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.slot:hover {
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
  transform: translateY(-1px);
}

.slot.is-confirmed {
  border-left-color: #4338ca;
}

.slot.is-done {
  border-left-color: var(--ok);
}

.slot.is-cancelled {
  border-left-color: var(--danger);
}

.slot-time {
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.slot-title {
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}

.slot-addr {
  color: var(--muted);
  font-size: 10.2px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.slot-foot {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 9.8px;
  line-height: 1.3;
}

.slot-empty {
  padding: 12px 4px;
  color: #94a3b8;
  font-size: 10.5px;
  text-align: center;
}

.week-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.week-foot strong {
  color: var(--text);
  font-weight: 700;
}

/* Оплаты */

.pay-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-radius: 14px;
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(96, 165, 250, 0.5) 0%, rgba(96, 165, 250, 0) 70%),
    linear-gradient(135deg, #1e40af 0%, #1d4ed8 60%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(29, 78, 216, 0.24);
}

.pay-main {
  min-width: 0;
}

.pay-summary .label {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.pay-summary .value {
  display: block;
  margin: 3px 0 2px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.pay-summary .sub {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11.5px;
}

.pay-side {
  display: flex;
  gap: 22px;
}

.pay-side > div {
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.pay-side .value {
  font-size: 19px;
}

.pay-card {
  margin-top: 16px;
}

/* Задачи */

.quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 140px auto;
  align-items: end;
  gap: 10px;
  padding: 14px 16px;
  margin: 0;
}

.task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f8;
}

.task:last-child {
  border-bottom: 0;
}

.task:hover {
  background: #f9fcff;
}

.task-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task-check:hover {
  border-color: var(--blue);
}

.task-check .icon {
  width: 13px;
  height: 13px;
  opacity: 0;
  stroke-width: 3;
}

.task.is-done .task-check {
  background: var(--ok);
  border-color: var(--ok);
}

.task.is-done .task-check .icon {
  opacity: 1;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.task-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.task-due .icon {
  width: 13px;
  height: 13px;
}

.task-delete {
  width: 30px;
  height: 30px;
  margin-top: -3px;
  opacity: 0.5;
}

.task-delete:hover {
  background: var(--danger-bg);
  color: var(--danger);
  opacity: 1;
}

.task-delete .icon {
  width: 16px;
  height: 16px;
}

.task-divider {
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Отчёты */

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.metric-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-value {
  margin: 3px 0 2px;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.metric-sub {
  color: var(--muted);
  font-size: 11.3px;
  line-height: 1.35;
}

.metric.is-ok .metric-value {
  color: var(--ok);
}

.metric.is-warn .metric-value {
  color: var(--warn);
}

.metric.is-danger .metric-value {
  color: var(--danger);
}

.reports-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 232px;
  padding: 20px 18px 14px;
}

.chart-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.chart-value {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.chart-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 62px;
  flex: 1;
  min-height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--blue-soft);
}

.chart-bar {
  width: 100%;
  min-height: 5px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%);
  transition: height 0.3s ease;
}

.chart-name {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}

.chart-role {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.chart-note {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 1.4;
}

.service-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40% 34px 92px;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #eef2f8;
}

.service-row:last-child {
  border-bottom: 0;
}

.service-name {
  font-size: 12.3px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-soft);
}

.service-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #1d4ed8);
}

.service-count {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  text-align: right;
}

.service-sum {
  font-size: 11.5px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Модальные окна */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.5);
  animation: fade-in 0.14s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px 22px 18px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
  animation: modal-in 0.16s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

.modal-head h2 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.modal-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.8px;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.order-number {
  display: inline-block;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-top h3 {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.order-top p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.order-top > .badge {
  flex: none;
  margin-top: 2px;
}

.modal .facts {
  grid-template-columns: 1fr 1fr;
  padding: 14px 0 0;
  margin-top: 12px;
}

/* Уведомление */

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
  transform: translate(-50%, 10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Адаптив */

@media (max-width: 1240px) {
  .week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .week-day {
    min-height: 160px;
  }

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

@media (max-width: 1100px) {
  .topbar-date {
    display: none;
  }

  .user {
    margin-left: auto;
  }

  .reports-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .shell {
    flex-direction: column;
  }

  .sidebar {
    top: 64px;
    z-index: 30;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: auto;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .nav {
    flex-direction: row;
    flex: none;
    gap: 4px;
  }

  .nav-item {
    width: auto;
    min-height: 36px;
    padding: 7px 11px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .nav-item .icon {
    width: 16px;
    height: 16px;
  }

  .nav-count {
    padding: 1px 6px;
  }

  .sidebar-foot {
    display: flex;
    align-items: center;
    flex: none;
    margin: 0;
    padding: 0 0 0 4px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .sidebar-note {
    display: none;
  }

  .reset-btn {
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .reset-btn span {
    display: none;
  }

  .reset-confirm {
    flex-wrap: nowrap;
    align-items: center;
    min-height: 36px;
    padding: 4px 6px;
  }

  .reset-confirm p {
    width: auto;
    white-space: nowrap;
    font-size: 11px;
  }

  .reset-actions .btn {
    min-height: 26px;
    padding: 3px 7px;
    font-size: 11px;
  }

  .main {
    padding: 18px 16px 48px;
  }

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

@media (max-width: 760px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-aside {
    gap: 13px;
    padding: 22px 24px;
  }

  .login-aside h2 {
    font-size: 17px;
  }

  .login-features,
  .login-facts,
  .login-address {
    display: none;
  }

  .login-form {
    padding: 26px 24px 30px;
  }

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

  .table-wrap thead {
    display: none;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap tr {
    margin: 10px 12px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .table-wrap tbody tr:hover {
    background: #ffffff;
  }

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

  .table-wrap td {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
    align-items: start;
    padding: 5px 0;
    border-bottom: 0;
    font-size: 12.5px;
    text-align: right;
  }

  .table-wrap td::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1;
    padding-top: 1px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    text-align: left;
  }

  .table-wrap td > * {
    grid-column: 2;
  }

  .table-wrap td:first-child {
    margin-bottom: 3px;
    padding-bottom: 7px;
    border-bottom: 1px dashed #e6eef9;
  }

  .table-wrap td:first-child .cell-main {
    font-size: 13px;
  }

  .table-wrap td .cell-person {
    justify-content: flex-end;
    text-align: right;
  }

  .table-wrap td .cell-sub {
    text-align: right;
  }

  .table-wrap td .badge {
    margin-left: auto;
  }

  .table-wrap td .money {
    margin-left: auto;
  }

  .list-meta {
    padding: 9px 14px;
  }

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

  .quick-add {
    grid-template-columns: 1fr 1fr;
  }

  .quick-add .quick-text {
    grid-column: 1 / -1;
  }

  .quick-add .btn {
    grid-column: 1 / -1;
  }

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

  .facts,
  .modal .facts {
    grid-template-columns: 1fr;
  }

  .entity-top {
    flex-wrap: wrap;
  }

  .entity-actions {
    width: 100%;
    margin-left: 0;
  }

  .entity-actions .btn {
    flex: 1;
  }

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

  .pay-summary {
    padding: 17px 18px;
  }

  .pay-side {
    width: 100%;
    gap: 16px;
  }

  .pay-side > div {
    flex: 1;
    padding-left: 16px;
  }

  .service-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 9px 14px;
  }

  .service-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .service-count {
    grid-column: 2;
    grid-row: 2;
  }

  .service-sum {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
    gap: 10px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-mark .icon {
    width: 20px;
    height: 20px;
  }

  .brand-name {
    font-size: 14.5px;
  }

  .brand-slogan {
    display: none;
  }

  .user {
    margin-left: auto;
    padding-left: 10px;
  }

  .user-name,
  .user-role {
    display: none;
  }

  .user-name-short {
    display: inline;
  }

  .sidebar {
    top: 58px;
  }

  .main {
    padding: 14px 12px 44px;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .page-head h1 {
    font-size: 19px;
  }

  .page-actions,
  .page-head .btn {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .toolbar {
    padding: 10px 12px;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    flex: 1;
    padding: 5px 7px;
  }

  .search {
    max-width: none;
    flex-basis: 100%;
  }

  .select-plain {
    max-width: none;
    flex: 1;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    padding: 12px;
  }

  .stat-value {
    font-size: 19px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric {
    padding: 12px;
  }

  .metric-value {
    font-size: 20px;
  }

  .metric-label {
    font-size: 9.5px;
  }

  .chart {
    gap: 10px;
    height: 200px;
    padding: 16px 12px 12px;
  }

  .chart-name {
    font-size: 10.5px;
  }

  .card-head {
    padding: 11px 13px;
  }

  .entity-top {
    padding: 15px;
  }

  .entity-id h1 {
    font-size: 18px;
  }

  .modal-backdrop {
    padding: 14px 10px;
    align-items: flex-start;
  }

  .modal {
    margin: 6px 0;
    padding: 16px 15px 14px;
    max-height: none;
  }

  .quick-add {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .quick-add .quick-text,
  .quick-add .btn {
    grid-column: auto;
  }

  .week-grid {
    gap: 8px;
    padding: 10px;
  }

  .week-day {
    min-height: 140px;
  }

  .objects-grid {
    padding: 10px;
  }

  .pay-summary .value {
    font-size: 24px;
  }

  .pay-side .value {
    font-size: 17px;
  }
}

@media (max-width: 430px) {
  .nav-item {
    padding: 7px 9px;
    font-size: 12px;
  }

  .nav-item .icon {
    width: 15px;
    height: 15px;
  }

  .nav-count {
    display: none;
  }

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

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

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

  .week-day {
    min-height: 0;
  }

  .table-wrap tr {
    margin: 8px 10px;
  }

  .empty {
    padding: 34px 16px;
  }

  .login-form {
    padding: 22px 18px 26px;
  }

  .login-aside {
    padding: 20px 18px;
  }

  .pay-side {
    flex-direction: column;
    gap: 12px;
  }

  .pay-side > div {
    padding-left: 0;
    border-left: 0;
  }

  .modal-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
